mirror of
https://github.com/Fishwaldo/bl808_coprocessor.git
synced 2025-03-15 11:21:28 +00:00
Revert "Update PMP protection range for 0x20000000"
This reverts commit 62428f469e
.
This commit is contained in:
parent
62428f469e
commit
62aa3200ef
40 changed files with 13 additions and 22117 deletions
|
@ -1,409 +0,0 @@
|
|||
# This is the CMakeCache file.
|
||||
# For build in directory: /home/fish/bl808/ox64_coproc/apps/test
|
||||
# It was generated by CMake: /usr/bin/cmake
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
BOARD:UNINITIALIZED=bl808dk
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CHIP:UNINITIALIZED=bl808
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_ADDR2LINE:FILEPATH=/usr/bin/addr2line
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_AR:FILEPATH=/usr/bin/ar
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_ASM_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_ASM_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib
|
||||
|
||||
//Flags used by the ASM compiler during all build types.
|
||||
CMAKE_ASM_FLAGS:STRING=
|
||||
|
||||
//Flags used by the ASM compiler during DEBUG builds.
|
||||
CMAKE_ASM_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the ASM compiler during MINSIZEREL builds.
|
||||
CMAKE_ASM_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the ASM compiler during RELEASE builds.
|
||||
CMAKE_ASM_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the ASM compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_ASM_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Choose the type of build, options are: None Debug Release RelWithDebInfo
|
||||
// MinSizeRel ...
|
||||
CMAKE_BUILD_TYPE:STRING=
|
||||
|
||||
//Enable/Disable color output during build.
|
||||
CMAKE_COLOR_MAKEFILE:BOOL=ON
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_CXX_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
|
||||
|
||||
//Flags used by the CXX compiler during all build types.
|
||||
CMAKE_CXX_FLAGS:STRING=
|
||||
|
||||
//Flags used by the CXX compiler during DEBUG builds.
|
||||
CMAKE_CXX_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the CXX compiler during MINSIZEREL builds.
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELEASE builds.
|
||||
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the CXX compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//A wrapper around 'ar' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_AR:FILEPATH=/usr/bin/gcc-ar-9
|
||||
|
||||
//A wrapper around 'ranlib' adding the appropriate '--plugin' option
|
||||
// for the GCC compiler
|
||||
CMAKE_C_COMPILER_RANLIB:FILEPATH=/usr/bin/gcc-ranlib-9
|
||||
|
||||
//Flags used by the C compiler during all build types.
|
||||
CMAKE_C_FLAGS:STRING=
|
||||
|
||||
//Flags used by the C compiler during DEBUG builds.
|
||||
CMAKE_C_FLAGS_DEBUG:STRING=-g
|
||||
|
||||
//Flags used by the C compiler during MINSIZEREL builds.
|
||||
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELEASE builds.
|
||||
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
|
||||
|
||||
//Flags used by the C compiler during RELWITHDEBINFO builds.
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND
|
||||
|
||||
//Flags used by the linker during all build types.
|
||||
CMAKE_EXE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during DEBUG builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during MINSIZEREL builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during RELEASE builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during RELWITHDEBINFO builds.
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Enable/Disable output of compile commands during generation.
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=OFF
|
||||
|
||||
//Install path prefix, prepended onto install directories.
|
||||
CMAKE_INSTALL_PREFIX:PATH=/usr/local
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// all build types.
|
||||
CMAKE_MODULE_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// DEBUG builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// MINSIZEREL builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELEASE builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of modules during
|
||||
// RELWITHDEBINFO builds.
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_NM:FILEPATH=/usr/bin/nm
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=ox64_coproc_
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_RANLIB:FILEPATH=/usr/bin/ranlib
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_READELF:FILEPATH=/usr/bin/readelf
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during all build types.
|
||||
CMAKE_SHARED_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of shared libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//If set, runtime paths are not added when installing shared libraries,
|
||||
// but are added when building.
|
||||
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
|
||||
|
||||
//If set, runtime paths are not added when using shared libraries.
|
||||
CMAKE_SKIP_RPATH:BOOL=NO
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during all build types.
|
||||
CMAKE_STATIC_LINKER_FLAGS:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during DEBUG builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during MINSIZEREL builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELEASE builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
|
||||
|
||||
//Flags used by the linker during the creation of static libraries
|
||||
// during RELWITHDEBINFO builds.
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
|
||||
|
||||
//Path to a program.
|
||||
CMAKE_STRIP:FILEPATH=/usr/bin/strip
|
||||
|
||||
//If this value is on, makefiles will be generated without the
|
||||
// .SILENT directive, and all commands will be echoed to the console
|
||||
// during the make. This is useful for debugging only. With Visual
|
||||
// Studio IDE projects all commands are done without /nologo.
|
||||
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
|
||||
|
||||
//No help, variable specified on the command line.
|
||||
CPU_ID:UNINITIALIZED=d0
|
||||
|
||||
//Path to a program.
|
||||
PYTHON_PREFER_EXECUTABLE:FILEPATH=/home/fish/.platformio/penv/bin/python
|
||||
|
||||
//Path to a program.
|
||||
_Python3_EXECUTABLE:FILEPATH=/home/fish/.platformio/penv/bin/python3
|
||||
|
||||
//The directory containing a CMake configuration file for bouffalo_sdk.
|
||||
bouffalo_sdk_DIR:PATH=/home/fish/bl808/bl_mcu_sdk/cmake
|
||||
|
||||
//Value Computed by CMake
|
||||
ox64_coproc__BINARY_DIR:STATIC=/home/fish/bl808/ox64_coproc/apps/test
|
||||
|
||||
//Value Computed by CMake
|
||||
ox64_coproc__SOURCE_DIR:STATIC=/home/fish/bl808/ox64_coproc/apps/test
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//ADVANCED property for variable: CMAKE_ADDR2LINE
|
||||
CMAKE_ADDR2LINE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_AR
|
||||
CMAKE_AR-ADVANCED:INTERNAL=1
|
||||
CMAKE_ASM_COMPILER:INTERNAL=gcc
|
||||
//ADVANCED property for variable: CMAKE_ASM_COMPILER_AR
|
||||
CMAKE_ASM_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_COMPILER_RANLIB
|
||||
CMAKE_ASM_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
CMAKE_ASM_COMPILER_WORKS:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_FLAGS
|
||||
CMAKE_ASM_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_FLAGS_DEBUG
|
||||
CMAKE_ASM_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_FLAGS_MINSIZEREL
|
||||
CMAKE_ASM_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_FLAGS_RELEASE
|
||||
CMAKE_ASM_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_ASM_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_ASM_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=/home/fish/bl808/ox64_coproc/apps/test
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=16
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=3
|
||||
//ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
|
||||
CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=/usr/bin/cmake
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=/usr/bin/cpack
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=/usr/bin/ctest
|
||||
CMAKE_CXX_COMPILER:INTERNAL=g++
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_AR
|
||||
CMAKE_CXX_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_COMPILER_RANLIB
|
||||
CMAKE_CXX_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS
|
||||
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
|
||||
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
|
||||
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
|
||||
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
CMAKE_C_COMPILER:INTERNAL=gcc
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_AR
|
||||
CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
|
||||
CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS
|
||||
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
|
||||
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
|
||||
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
|
||||
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_DLLTOOL
|
||||
CMAKE_DLLTOOL-ADVANCED:INTERNAL=1
|
||||
//Executable file format
|
||||
CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
|
||||
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_EXPORT_COMPILE_COMMANDS
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS-ADVANCED:INTERNAL=1
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=Unix Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=/home/fish/bl808/ox64_coproc/apps/test
|
||||
CMAKE_LINKER:INTERNAL=ld
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
|
||||
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
|
||||
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_NM
|
||||
CMAKE_NM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
CMAKE_OBJCOPY:INTERNAL=objcopy
|
||||
CMAKE_OBJDUMP:INTERNAL=objdump
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_RANLIB
|
||||
CMAKE_RANLIB-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_READELF
|
||||
CMAKE_READELF-ADVANCED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=/usr/share/cmake-3.16
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
|
||||
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
|
||||
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
|
||||
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_SKIP_RPATH
|
||||
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
|
||||
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
|
||||
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
|
||||
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
|
||||
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: CMAKE_STRIP
|
||||
CMAKE_STRIP-ADVANCED:INTERNAL=1
|
||||
//uname command
|
||||
CMAKE_UNAME:INTERNAL=/usr/bin/uname
|
||||
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
|
||||
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
|
||||
//Details about finding Python3
|
||||
FIND_PACKAGE_MESSAGE_DETAILS_Python3:INTERNAL=[/home/fish/.platformio/penv/bin/python3][cfound components: Interpreter ][v3.8.10(3.8)]
|
||||
SIZE:INTERNAL=size
|
||||
//ADVANCED property for variable: _Python3_EXECUTABLE
|
||||
_Python3_EXECUTABLE-ADVANCED:INTERNAL=1
|
||||
//ADVANCED property for variable: _Python3_INTERPRETER_SIGNATURE
|
||||
_Python3_INTERPRETER_SIGNATURE-ADVANCED:INTERNAL=1
|
||||
_Python3_INTERPRETER_SIGNATURE:INTERNAL=b6a92e72581d90da4ef84df9c56ea46f
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
set(CMAKE_ASM_COMPILER "/usr/bin/gcc")
|
||||
set(CMAKE_ASM_COMPILER_ARG1 "")
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_ASM_COMPILER_AR "/usr/bin/gcc-ar")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_ASM_COMPILER_RANLIB "/usr/bin/gcc-ranlib")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_ASM_COMPILER_LOADED 1)
|
||||
set(CMAKE_ASM_COMPILER_ID "GNU")
|
||||
set(CMAKE_ASM_COMPILER_VERSION "")
|
||||
set(CMAKE_ASM_COMPILER_ENV_VAR "ASM")
|
||||
|
||||
|
||||
set(CMAKE_ASM_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
set(CMAKE_ASM_LINKER_PREFERENCE 0)
|
||||
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
set(CMAKE_C_COMPILER "/usr/bin/gcc")
|
||||
set(CMAKE_C_COMPILER_ARG1 "")
|
||||
set(CMAKE_C_COMPILER_ID "GNU")
|
||||
set(CMAKE_C_COMPILER_VERSION "9.4.0")
|
||||
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_C_COMPILER_WRAPPER "")
|
||||
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "11")
|
||||
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_function_prototypes;c_std_99;c_restrict;c_variadic_macros;c_std_11;c_static_assert")
|
||||
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
|
||||
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_restrict;c_variadic_macros")
|
||||
set(CMAKE_C11_COMPILE_FEATURES "c_std_11;c_static_assert")
|
||||
|
||||
set(CMAKE_C_PLATFORM_ID "Linux")
|
||||
set(CMAKE_C_SIMULATE_ID "")
|
||||
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_C_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/gcc-ar-9")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCC 1)
|
||||
set(CMAKE_C_COMPILER_LOADED 1)
|
||||
set(CMAKE_C_COMPILER_WORKS 1)
|
||||
set(CMAKE_C_ABI_COMPILED TRUE)
|
||||
set(CMAKE_COMPILER_IS_MINGW )
|
||||
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||
set(CYGWIN 1)
|
||||
set(UNIX 1)
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_COMPILER_ENV_VAR "CC")
|
||||
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
set(MINGW 1)
|
||||
endif()
|
||||
set(CMAKE_C_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
|
||||
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
set(CMAKE_C_LINKER_PREFERENCE 10)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_C_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_C_COMPILER_ABI "ELF")
|
||||
set(CMAKE_C_LIBRARY_ARCHITECTURE "")
|
||||
|
||||
if(CMAKE_C_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_C_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
|
||||
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "gcc;gcc_s;c;gcc;gcc_s")
|
||||
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
|
||||
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
|
@ -1,88 +0,0 @@
|
|||
set(CMAKE_CXX_COMPILER "/usr/bin/g++")
|
||||
set(CMAKE_CXX_COMPILER_ARG1 "")
|
||||
set(CMAKE_CXX_COMPILER_ID "GNU")
|
||||
set(CMAKE_CXX_COMPILER_VERSION "9.4.0")
|
||||
set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "")
|
||||
set(CMAKE_CXX_COMPILER_WRAPPER "")
|
||||
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "14")
|
||||
set(CMAKE_CXX_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters;cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates;cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates;cxx_std_17;cxx_std_20")
|
||||
set(CMAKE_CXX98_COMPILE_FEATURES "cxx_std_98;cxx_template_template_parameters")
|
||||
set(CMAKE_CXX11_COMPILE_FEATURES "cxx_std_11;cxx_alias_templates;cxx_alignas;cxx_alignof;cxx_attributes;cxx_auto_type;cxx_constexpr;cxx_decltype;cxx_decltype_incomplete_return_types;cxx_default_function_template_args;cxx_defaulted_functions;cxx_defaulted_move_initializers;cxx_delegating_constructors;cxx_deleted_functions;cxx_enum_forward_declarations;cxx_explicit_conversions;cxx_extended_friend_declarations;cxx_extern_templates;cxx_final;cxx_func_identifier;cxx_generalized_initializers;cxx_inheriting_constructors;cxx_inline_namespaces;cxx_lambdas;cxx_local_type_template_args;cxx_long_long_type;cxx_noexcept;cxx_nonstatic_member_init;cxx_nullptr;cxx_override;cxx_range_for;cxx_raw_string_literals;cxx_reference_qualified_functions;cxx_right_angle_brackets;cxx_rvalue_references;cxx_sizeof_member;cxx_static_assert;cxx_strong_enums;cxx_thread_local;cxx_trailing_return_types;cxx_unicode_literals;cxx_uniform_initialization;cxx_unrestricted_unions;cxx_user_literals;cxx_variadic_macros;cxx_variadic_templates")
|
||||
set(CMAKE_CXX14_COMPILE_FEATURES "cxx_std_14;cxx_aggregate_default_initializers;cxx_attribute_deprecated;cxx_binary_literals;cxx_contextual_conversions;cxx_decltype_auto;cxx_digit_separators;cxx_generic_lambdas;cxx_lambda_init_captures;cxx_relaxed_constexpr;cxx_return_type_deduction;cxx_variable_templates")
|
||||
set(CMAKE_CXX17_COMPILE_FEATURES "cxx_std_17")
|
||||
set(CMAKE_CXX20_COMPILE_FEATURES "cxx_std_20")
|
||||
|
||||
set(CMAKE_CXX_PLATFORM_ID "Linux")
|
||||
set(CMAKE_CXX_SIMULATE_ID "")
|
||||
set(CMAKE_CXX_COMPILER_FRONTEND_VARIANT "")
|
||||
set(CMAKE_CXX_SIMULATE_VERSION "")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/gcc-ar-9")
|
||||
set(CMAKE_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/gcc-ranlib-9")
|
||||
set(CMAKE_LINKER "/usr/bin/ld")
|
||||
set(CMAKE_MT "")
|
||||
set(CMAKE_COMPILER_IS_GNUCXX 1)
|
||||
set(CMAKE_CXX_COMPILER_LOADED 1)
|
||||
set(CMAKE_CXX_COMPILER_WORKS 1)
|
||||
set(CMAKE_CXX_ABI_COMPILED TRUE)
|
||||
set(CMAKE_COMPILER_IS_MINGW )
|
||||
set(CMAKE_COMPILER_IS_CYGWIN )
|
||||
if(CMAKE_COMPILER_IS_CYGWIN)
|
||||
set(CYGWIN 1)
|
||||
set(UNIX 1)
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_COMPILER_ENV_VAR "CXX")
|
||||
|
||||
if(CMAKE_COMPILER_IS_MINGW)
|
||||
set(MINGW 1)
|
||||
endif()
|
||||
set(CMAKE_CXX_COMPILER_ID_RUN 1)
|
||||
set(CMAKE_CXX_SOURCE_FILE_EXTENSIONS C;M;c++;cc;cpp;cxx;m;mm;CPP)
|
||||
set(CMAKE_CXX_IGNORE_EXTENSIONS inl;h;hpp;HPP;H;o;O;obj;OBJ;def;DEF;rc;RC)
|
||||
|
||||
foreach (lang C OBJC OBJCXX)
|
||||
if (CMAKE_${lang}_COMPILER_ID_RUN)
|
||||
foreach(extension IN LISTS CMAKE_${lang}_SOURCE_FILE_EXTENSIONS)
|
||||
list(REMOVE_ITEM CMAKE_CXX_SOURCE_FILE_EXTENSIONS ${extension})
|
||||
endforeach()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE 30)
|
||||
set(CMAKE_CXX_LINKER_PREFERENCE_PROPAGATES 1)
|
||||
|
||||
# Save compiler ABI information.
|
||||
set(CMAKE_CXX_SIZEOF_DATA_PTR "8")
|
||||
set(CMAKE_CXX_COMPILER_ABI "ELF")
|
||||
set(CMAKE_CXX_LIBRARY_ARCHITECTURE "")
|
||||
|
||||
if(CMAKE_CXX_SIZEOF_DATA_PTR)
|
||||
set(CMAKE_SIZEOF_VOID_P "${CMAKE_CXX_SIZEOF_DATA_PTR}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ABI)
|
||||
set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_CXX_COMPILER_ABI}")
|
||||
endif()
|
||||
|
||||
if(CMAKE_CXX_LIBRARY_ARCHITECTURE)
|
||||
set(CMAKE_LIBRARY_ARCHITECTURE "")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX "")
|
||||
if(CMAKE_CXX_CL_SHOWINCLUDES_PREFIX)
|
||||
set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_CXX_CL_SHOWINCLUDES_PREFIX}")
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;m;gcc_s;gcc;c;gcc_s;gcc")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib")
|
||||
set(CMAKE_CXX_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")
|
Binary file not shown.
Binary file not shown.
|
@ -1,15 +0,0 @@
|
|||
set(CMAKE_HOST_SYSTEM "Linux-5.15.79.1-microsoft-standard-WSL2-HIDDEV+")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Linux")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "5.15.79.1-microsoft-standard-WSL2-HIDDEV+")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "x86_64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Generic-1")
|
||||
set(CMAKE_SYSTEM_NAME "Generic")
|
||||
set(CMAKE_SYSTEM_VERSION "1")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "RISCV")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "TRUE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
|
@ -1,671 +0,0 @@
|
|||
#ifdef __cplusplus
|
||||
# error "A C++ compiler has been selected for C."
|
||||
#endif
|
||||
|
||||
#if defined(__18CXX)
|
||||
# define ID_VOID_MAIN
|
||||
#endif
|
||||
#if defined(__CLASSIC_C__)
|
||||
/* cv-qualifiers did not exist in K&R C */
|
||||
# define const
|
||||
# define volatile
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_C)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_C >= 0x5100
|
||||
/* __SUNPRO_C = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_C>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_C>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_C & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_cc)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_cc = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_cc/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_cc/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_cc % 100)
|
||||
|
||||
#elif defined(__DECC)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECC_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECC_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECC_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECC_VER % 10000)
|
||||
|
||||
#elif defined(__IBMC__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__IBMC__) && !defined(__COMPILER_VER__) && __IBMC__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMC__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10)
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__TINYC__)
|
||||
# define COMPILER_ID "TinyCC"
|
||||
|
||||
#elif defined(__BCC__)
|
||||
# define COMPILER_ID "Bruce"
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
#elif defined(__SDCC_VERSION_MAJOR) || defined(SDCC)
|
||||
# define COMPILER_ID "SDCC"
|
||||
# if defined(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__SDCC_VERSION_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(__SDCC_VERSION_MINOR)
|
||||
# define COMPILER_VERSION_PATCH DEC(__SDCC_VERSION_PATCH)
|
||||
# else
|
||||
/* SDCC = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(SDCC/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(SDCC/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(SDCC % 10)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
|
||||
#if !defined(__STDC__)
|
||||
# if (defined(_MSC_VER) && !defined(__clang__)) \
|
||||
|| (defined(__ibmxl__) || defined(__IBMC__))
|
||||
# define C_DIALECT "90"
|
||||
# else
|
||||
# define C_DIALECT
|
||||
# endif
|
||||
#elif __STDC_VERSION__ >= 201000L
|
||||
# define C_DIALECT "11"
|
||||
#elif __STDC_VERSION__ >= 199901L
|
||||
# define C_DIALECT "99"
|
||||
#else
|
||||
# define C_DIALECT "90"
|
||||
#endif
|
||||
const char* info_language_dialect_default =
|
||||
"INFO" ":" "dialect_default[" C_DIALECT "]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef ID_VOID_MAIN
|
||||
void main() {}
|
||||
#else
|
||||
# if defined(__CLASSIC_C__)
|
||||
int main(argc, argv) int argc; char *argv[];
|
||||
# else
|
||||
int main(int argc, char* argv[])
|
||||
# endif
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
require += info_arch[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
||||
#endif
|
Binary file not shown.
|
@ -1,660 +0,0 @@
|
|||
/* This source file must have a .cpp extension so that all C++ compilers
|
||||
recognize the extension without flags. Borland does not know .cxx for
|
||||
example. */
|
||||
#ifndef __cplusplus
|
||||
# error "A C compiler has been selected for C++."
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number components: V=Version, R=Revision, P=Patch
|
||||
Version date components: YYYY=Year, MM=Month, DD=Day */
|
||||
|
||||
#if defined(__COMO__)
|
||||
# define COMPILER_ID "Comeau"
|
||||
/* __COMO_VERSION__ = VRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__COMO_VERSION__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__COMO_VERSION__ % 100)
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICC)
|
||||
# define COMPILER_ID "Intel"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_ID "GNU"
|
||||
# endif
|
||||
/* __INTEL_COMPILER = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
|
||||
# if defined(__INTEL_COMPILER_UPDATE)
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
|
||||
# else
|
||||
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
|
||||
# endif
|
||||
# if defined(__INTEL_COMPILER_BUILD_DATE)
|
||||
/* __INTEL_COMPILER_BUILD_DATE = YYYYMMDD */
|
||||
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
|
||||
# endif
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# if defined(__GNUC__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUC__)
|
||||
# elif defined(__GNUG__)
|
||||
# define SIMULATE_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define SIMULATE_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define SIMULATE_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__PATHCC__)
|
||||
# define COMPILER_ID "PathScale"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PATHCC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PATHCC_MINOR__)
|
||||
# if defined(__PATHCC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PATHCC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(__BORLANDC__) && defined(__CODEGEARC_VERSION__)
|
||||
# define COMPILER_ID "Embarcadero"
|
||||
# define COMPILER_VERSION_MAJOR HEX(__CODEGEARC_VERSION__>>24 & 0x00FF)
|
||||
# define COMPILER_VERSION_MINOR HEX(__CODEGEARC_VERSION__>>16 & 0x00FF)
|
||||
# define COMPILER_VERSION_PATCH DEC(__CODEGEARC_VERSION__ & 0xFFFF)
|
||||
|
||||
#elif defined(__BORLANDC__)
|
||||
# define COMPILER_ID "Borland"
|
||||
/* __BORLANDC__ = 0xVRR */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__BORLANDC__>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__BORLANDC__ & 0xFF)
|
||||
|
||||
#elif defined(__WATCOMC__) && __WATCOMC__ < 1200
|
||||
# define COMPILER_ID "Watcom"
|
||||
/* __WATCOMC__ = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__WATCOMC__ / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# define COMPILER_ID "OpenWatcom"
|
||||
/* __WATCOMC__ = VVRP + 1100 */
|
||||
# define COMPILER_VERSION_MAJOR DEC((__WATCOMC__ - 1100) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__WATCOMC__ / 10) % 10)
|
||||
# if (__WATCOMC__ % 10) > 0
|
||||
# define COMPILER_VERSION_PATCH DEC(__WATCOMC__ % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SUNPRO_CC)
|
||||
# define COMPILER_ID "SunPro"
|
||||
# if __SUNPRO_CC >= 0x5100
|
||||
/* __SUNPRO_CC = 0xVRRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>12)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# else
|
||||
/* __SUNPRO_CC = 0xVRP */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_CC>>8)
|
||||
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_CC>>4 & 0xF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_CC & 0xF)
|
||||
# endif
|
||||
|
||||
#elif defined(__HP_aCC)
|
||||
# define COMPILER_ID "HP"
|
||||
/* __HP_aCC = VVRRPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__HP_aCC/10000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__HP_aCC/100 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__HP_aCC % 100)
|
||||
|
||||
#elif defined(__DECCXX)
|
||||
# define COMPILER_ID "Compaq"
|
||||
/* __DECCXX_VER = VVRRTPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__DECCXX_VER/10000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__DECCXX_VER/100000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__DECCXX_VER % 10000)
|
||||
|
||||
#elif defined(__IBMCPP__) && defined(__COMPILER_VER__)
|
||||
# define COMPILER_ID "zOS"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__ibmxl__) && defined(__clang__)
|
||||
# define COMPILER_ID "XLClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ibmxl_version__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ibmxl_release__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ibmxl_modification__)
|
||||
# define COMPILER_VERSION_TWEAK DEC(__ibmxl_ptf_fix_level__)
|
||||
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ >= 800
|
||||
# define COMPILER_ID "XL"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__IBMCPP__) && !defined(__COMPILER_VER__) && __IBMCPP__ < 800
|
||||
# define COMPILER_ID "VisualAge"
|
||||
/* __IBMCPP__ = VRP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__IBMCPP__/100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__IBMCPP__/10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__IBMCPP__ % 10)
|
||||
|
||||
#elif defined(__PGI)
|
||||
# define COMPILER_ID "PGI"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__PGIC__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__PGIC_MINOR__)
|
||||
# if defined(__PGIC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__PGIC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
# define COMPILER_ID "Cray"
|
||||
# define COMPILER_VERSION_MAJOR DEC(_RELEASE_MAJOR)
|
||||
# define COMPILER_VERSION_MINOR DEC(_RELEASE_MINOR)
|
||||
|
||||
#elif defined(__TI_COMPILER_VERSION__)
|
||||
# define COMPILER_ID "TI"
|
||||
/* __TI_COMPILER_VERSION__ = VVVRRRPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__TI_COMPILER_VERSION__/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__TI_COMPILER_VERSION__/1000 % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC(__TI_COMPILER_VERSION__ % 1000)
|
||||
|
||||
#elif defined(__FUJITSU) || defined(__FCC_VERSION) || defined(__fcc_version)
|
||||
# define COMPILER_ID "Fujitsu"
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# define COMPILER_ID "GHS"
|
||||
/* __GHS_VERSION_NUMBER = VVVVRP */
|
||||
# ifdef __GHS_VERSION_NUMBER
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GHS_VERSION_NUMBER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GHS_VERSION_NUMBER / 10 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GHS_VERSION_NUMBER % 10)
|
||||
# endif
|
||||
|
||||
#elif defined(__SCO_VERSION__)
|
||||
# define COMPILER_ID "SCO"
|
||||
|
||||
#elif defined(__ARMCC_VERSION) && !defined(__clang__)
|
||||
# define COMPILER_ID "ARMCC"
|
||||
#if __ARMCC_VERSION >= 1000000
|
||||
/* __ARMCC_VERSION = VRRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#else
|
||||
/* __ARMCC_VERSION = VRPPPP */
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCC_VERSION/100000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCC_VERSION/10000 % 10)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCC_VERSION % 10000)
|
||||
#endif
|
||||
|
||||
|
||||
#elif defined(__clang__) && defined(__apple_build_version__)
|
||||
# define COMPILER_ID "AppleClang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
# define COMPILER_VERSION_TWEAK DEC(__apple_build_version__)
|
||||
|
||||
#elif defined(__clang__) && defined(__ARMCOMPILER_VERSION)
|
||||
# define COMPILER_ID "ARMClang"
|
||||
# define COMPILER_VERSION_MAJOR DEC(__ARMCOMPILER_VERSION/1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(__ARMCOMPILER_VERSION/10000 % 100)
|
||||
# define COMPILER_VERSION_PATCH DEC(__ARMCOMPILER_VERSION % 10000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__ARMCOMPILER_VERSION)
|
||||
|
||||
#elif defined(__clang__)
|
||||
# define COMPILER_ID "Clang"
|
||||
# if defined(_MSC_VER)
|
||||
# define SIMULATE_ID "MSVC"
|
||||
# endif
|
||||
# define COMPILER_VERSION_MAJOR DEC(__clang_major__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__clang_minor__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__clang_patchlevel__)
|
||||
# if defined(_MSC_VER)
|
||||
/* _MSC_VER = VVRR */
|
||||
# define SIMULATE_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define SIMULATE_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# endif
|
||||
|
||||
#elif defined(__GNUC__) || defined(__GNUG__)
|
||||
# define COMPILER_ID "GNU"
|
||||
# if defined(__GNUC__)
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUC__)
|
||||
# else
|
||||
# define COMPILER_VERSION_MAJOR DEC(__GNUG__)
|
||||
# endif
|
||||
# if defined(__GNUC_MINOR__)
|
||||
# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__)
|
||||
# endif
|
||||
# if defined(__GNUC_PATCHLEVEL__)
|
||||
# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__)
|
||||
# endif
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
# define COMPILER_ID "MSVC"
|
||||
/* _MSC_VER = VVRR */
|
||||
# define COMPILER_VERSION_MAJOR DEC(_MSC_VER / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC(_MSC_VER % 100)
|
||||
# if defined(_MSC_FULL_VER)
|
||||
# if _MSC_VER >= 1400
|
||||
/* _MSC_FULL_VER = VVRRPPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 100000)
|
||||
# else
|
||||
/* _MSC_FULL_VER = VVRRPPPP */
|
||||
# define COMPILER_VERSION_PATCH DEC(_MSC_FULL_VER % 10000)
|
||||
# endif
|
||||
# endif
|
||||
# if defined(_MSC_BUILD)
|
||||
# define COMPILER_VERSION_TWEAK DEC(_MSC_BUILD)
|
||||
# endif
|
||||
|
||||
#elif defined(__VISUALDSPVERSION__) || defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
|
||||
# define COMPILER_ID "ADSP"
|
||||
#if defined(__VISUALDSPVERSION__)
|
||||
/* __VISUALDSPVERSION__ = 0xVVRRPP00 */
|
||||
# define COMPILER_VERSION_MAJOR HEX(__VISUALDSPVERSION__>>24)
|
||||
# define COMPILER_VERSION_MINOR HEX(__VISUALDSPVERSION__>>16 & 0xFF)
|
||||
# define COMPILER_VERSION_PATCH HEX(__VISUALDSPVERSION__>>8 & 0xFF)
|
||||
#endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# define COMPILER_ID "IAR"
|
||||
# if defined(__VER__) && defined(__ICCARM__)
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 1000000)
|
||||
# define COMPILER_VERSION_MINOR DEC(((__VER__) / 1000) % 1000)
|
||||
# define COMPILER_VERSION_PATCH DEC((__VER__) % 1000)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# elif defined(__VER__) && (defined(__ICCAVR__) || defined(__ICCRX__) || defined(__ICCRH850__) || defined(__ICCRL78__) || defined(__ICC430__) || defined(__ICCRISCV__) || defined(__ICCV850__) || defined(__ICC8051__))
|
||||
# define COMPILER_VERSION_MAJOR DEC((__VER__) / 100)
|
||||
# define COMPILER_VERSION_MINOR DEC((__VER__) - (((__VER__) / 100)*100))
|
||||
# define COMPILER_VERSION_PATCH DEC(__SUBVERSION__)
|
||||
# define COMPILER_VERSION_INTERNAL DEC(__IAR_SYSTEMS_ICC__)
|
||||
# endif
|
||||
|
||||
|
||||
/* These compilers are either not known or too old to define an
|
||||
identification macro. Try to identify the platform and guess that
|
||||
it is the native compiler. */
|
||||
#elif defined(__hpux) || defined(__hpua)
|
||||
# define COMPILER_ID "HP"
|
||||
|
||||
#else /* unknown compiler */
|
||||
# define COMPILER_ID ""
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]";
|
||||
#ifdef SIMULATE_ID
|
||||
char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]";
|
||||
#endif
|
||||
|
||||
#ifdef __QNXNTO__
|
||||
char const* qnxnto = "INFO" ":" "qnxnto[]";
|
||||
#endif
|
||||
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
char const *info_cray = "INFO" ":" "compiler_wrapper[CrayPrgEnv]";
|
||||
#endif
|
||||
|
||||
#define STRINGIFY_HELPER(X) #X
|
||||
#define STRINGIFY(X) STRINGIFY_HELPER(X)
|
||||
|
||||
/* Identify known platforms by name. */
|
||||
#if defined(__linux) || defined(__linux__) || defined(linux)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
#elif defined(__CYGWIN__)
|
||||
# define PLATFORM_ID "Cygwin"
|
||||
|
||||
#elif defined(__MINGW32__)
|
||||
# define PLATFORM_ID "MinGW"
|
||||
|
||||
#elif defined(__APPLE__)
|
||||
# define PLATFORM_ID "Darwin"
|
||||
|
||||
#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
|
||||
# define PLATFORM_ID "Windows"
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD)
|
||||
# define PLATFORM_ID "FreeBSD"
|
||||
|
||||
#elif defined(__NetBSD__) || defined(__NetBSD)
|
||||
# define PLATFORM_ID "NetBSD"
|
||||
|
||||
#elif defined(__OpenBSD__) || defined(__OPENBSD)
|
||||
# define PLATFORM_ID "OpenBSD"
|
||||
|
||||
#elif defined(__sun) || defined(sun)
|
||||
# define PLATFORM_ID "SunOS"
|
||||
|
||||
#elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
|
||||
# define PLATFORM_ID "AIX"
|
||||
|
||||
#elif defined(__hpux) || defined(__hpux__)
|
||||
# define PLATFORM_ID "HP-UX"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
# define PLATFORM_ID "Haiku"
|
||||
|
||||
#elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
|
||||
# define PLATFORM_ID "BeOS"
|
||||
|
||||
#elif defined(__QNX__) || defined(__QNXNTO__)
|
||||
# define PLATFORM_ID "QNX"
|
||||
|
||||
#elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
|
||||
# define PLATFORM_ID "Tru64"
|
||||
|
||||
#elif defined(__riscos) || defined(__riscos__)
|
||||
# define PLATFORM_ID "RISCos"
|
||||
|
||||
#elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
|
||||
# define PLATFORM_ID "SINIX"
|
||||
|
||||
#elif defined(__UNIX_SV__)
|
||||
# define PLATFORM_ID "UNIX_SV"
|
||||
|
||||
#elif defined(__bsdos__)
|
||||
# define PLATFORM_ID "BSDOS"
|
||||
|
||||
#elif defined(_MPRAS) || defined(MPRAS)
|
||||
# define PLATFORM_ID "MP-RAS"
|
||||
|
||||
#elif defined(__osf) || defined(__osf__)
|
||||
# define PLATFORM_ID "OSF1"
|
||||
|
||||
#elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
|
||||
# define PLATFORM_ID "SCO_SV"
|
||||
|
||||
#elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
|
||||
# define PLATFORM_ID "ULTRIX"
|
||||
|
||||
#elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
|
||||
# define PLATFORM_ID "Xenix"
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(__LINUX__)
|
||||
# define PLATFORM_ID "Linux"
|
||||
|
||||
# elif defined(__DOS__)
|
||||
# define PLATFORM_ID "DOS"
|
||||
|
||||
# elif defined(__OS2__)
|
||||
# define PLATFORM_ID "OS2"
|
||||
|
||||
# elif defined(__WINDOWS__)
|
||||
# define PLATFORM_ID "Windows3x"
|
||||
|
||||
# else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
# endif
|
||||
|
||||
#elif defined(__INTEGRITY)
|
||||
# if defined(INT_178B)
|
||||
# define PLATFORM_ID "Integrity178"
|
||||
|
||||
# else /* regular Integrity */
|
||||
# define PLATFORM_ID "Integrity"
|
||||
# endif
|
||||
|
||||
#else /* unknown platform */
|
||||
# define PLATFORM_ID
|
||||
|
||||
#endif
|
||||
|
||||
/* For windows compilers MSVC and Intel we can determine
|
||||
the architecture of the compiler being used. This is because
|
||||
the compilers do not have flags that can change the architecture,
|
||||
but rather depend on which compiler is being used
|
||||
*/
|
||||
#if defined(_WIN32) && defined(_MSC_VER)
|
||||
# if defined(_M_IA64)
|
||||
# define ARCHITECTURE_ID "IA64"
|
||||
|
||||
# elif defined(_M_X64) || defined(_M_AMD64)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# elif defined(_M_ARM64)
|
||||
# define ARCHITECTURE_ID "ARM64"
|
||||
|
||||
# elif defined(_M_ARM)
|
||||
# if _M_ARM == 4
|
||||
# define ARCHITECTURE_ID "ARMV4I"
|
||||
# elif _M_ARM == 5
|
||||
# define ARCHITECTURE_ID "ARMV5I"
|
||||
# else
|
||||
# define ARCHITECTURE_ID "ARMV" STRINGIFY(_M_ARM)
|
||||
# endif
|
||||
|
||||
# elif defined(_M_MIPS)
|
||||
# define ARCHITECTURE_ID "MIPS"
|
||||
|
||||
# elif defined(_M_SH)
|
||||
# define ARCHITECTURE_ID "SHx"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__WATCOMC__)
|
||||
# if defined(_M_I86)
|
||||
# define ARCHITECTURE_ID "I86"
|
||||
|
||||
# elif defined(_M_IX86)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__IAR_SYSTEMS_ICC__) || defined(__IAR_SYSTEMS_ICC)
|
||||
# if defined(__ICCARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__ICCRX__)
|
||||
# define ARCHITECTURE_ID "RX"
|
||||
|
||||
# elif defined(__ICCRH850__)
|
||||
# define ARCHITECTURE_ID "RH850"
|
||||
|
||||
# elif defined(__ICCRL78__)
|
||||
# define ARCHITECTURE_ID "RL78"
|
||||
|
||||
# elif defined(__ICCRISCV__)
|
||||
# define ARCHITECTURE_ID "RISCV"
|
||||
|
||||
# elif defined(__ICCAVR__)
|
||||
# define ARCHITECTURE_ID "AVR"
|
||||
|
||||
# elif defined(__ICC430__)
|
||||
# define ARCHITECTURE_ID "MSP430"
|
||||
|
||||
# elif defined(__ICCV850__)
|
||||
# define ARCHITECTURE_ID "V850"
|
||||
|
||||
# elif defined(__ICC8051__)
|
||||
# define ARCHITECTURE_ID "8051"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
|
||||
#elif defined(__ghs__)
|
||||
# if defined(__PPC64__)
|
||||
# define ARCHITECTURE_ID "PPC64"
|
||||
|
||||
# elif defined(__ppc__)
|
||||
# define ARCHITECTURE_ID "PPC"
|
||||
|
||||
# elif defined(__ARM__)
|
||||
# define ARCHITECTURE_ID "ARM"
|
||||
|
||||
# elif defined(__x86_64__)
|
||||
# define ARCHITECTURE_ID "x64"
|
||||
|
||||
# elif defined(__i386__)
|
||||
# define ARCHITECTURE_ID "X86"
|
||||
|
||||
# else /* unknown architecture */
|
||||
# define ARCHITECTURE_ID ""
|
||||
# endif
|
||||
#else
|
||||
# define ARCHITECTURE_ID
|
||||
#endif
|
||||
|
||||
/* Convert integer to decimal digit literals. */
|
||||
#define DEC(n) \
|
||||
('0' + (((n) / 10000000)%10)), \
|
||||
('0' + (((n) / 1000000)%10)), \
|
||||
('0' + (((n) / 100000)%10)), \
|
||||
('0' + (((n) / 10000)%10)), \
|
||||
('0' + (((n) / 1000)%10)), \
|
||||
('0' + (((n) / 100)%10)), \
|
||||
('0' + (((n) / 10)%10)), \
|
||||
('0' + ((n) % 10))
|
||||
|
||||
/* Convert integer to hex digit literals. */
|
||||
#define HEX(n) \
|
||||
('0' + ((n)>>28 & 0xF)), \
|
||||
('0' + ((n)>>24 & 0xF)), \
|
||||
('0' + ((n)>>20 & 0xF)), \
|
||||
('0' + ((n)>>16 & 0xF)), \
|
||||
('0' + ((n)>>12 & 0xF)), \
|
||||
('0' + ((n)>>8 & 0xF)), \
|
||||
('0' + ((n)>>4 & 0xF)), \
|
||||
('0' + ((n) & 0xF))
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
char const info_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','[',
|
||||
COMPILER_VERSION_MAJOR,
|
||||
# ifdef COMPILER_VERSION_MINOR
|
||||
'.', COMPILER_VERSION_MINOR,
|
||||
# ifdef COMPILER_VERSION_PATCH
|
||||
'.', COMPILER_VERSION_PATCH,
|
||||
# ifdef COMPILER_VERSION_TWEAK
|
||||
'.', COMPILER_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the internal version number. */
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
char const info_version_internal[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
|
||||
'i','n','t','e','r','n','a','l','[',
|
||||
COMPILER_VERSION_INTERNAL,']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct a string literal encoding the version number components. */
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
char const info_simulate_version[] = {
|
||||
'I', 'N', 'F', 'O', ':',
|
||||
's','i','m','u','l','a','t','e','_','v','e','r','s','i','o','n','[',
|
||||
SIMULATE_VERSION_MAJOR,
|
||||
# ifdef SIMULATE_VERSION_MINOR
|
||||
'.', SIMULATE_VERSION_MINOR,
|
||||
# ifdef SIMULATE_VERSION_PATCH
|
||||
'.', SIMULATE_VERSION_PATCH,
|
||||
# ifdef SIMULATE_VERSION_TWEAK
|
||||
'.', SIMULATE_VERSION_TWEAK,
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
']','\0'};
|
||||
#endif
|
||||
|
||||
/* Construct the string literal in pieces to prevent the source from
|
||||
getting matched. Store it in a pointer rather than an array
|
||||
because some compilers will just produce instructions to fill the
|
||||
array rather than assigning a pointer to a static array. */
|
||||
char const* info_platform = "INFO" ":" "platform[" PLATFORM_ID "]";
|
||||
char const* info_arch = "INFO" ":" "arch[" ARCHITECTURE_ID "]";
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(__INTEL_COMPILER) && defined(_MSVC_LANG) && _MSVC_LANG < 201403L
|
||||
# if defined(__INTEL_CXX11_MODE__)
|
||||
# if defined(__cpp_aggregate_nsdmi)
|
||||
# define CXX_STD 201402L
|
||||
# else
|
||||
# define CXX_STD 201103L
|
||||
# endif
|
||||
# else
|
||||
# define CXX_STD 199711L
|
||||
# endif
|
||||
#elif defined(_MSC_VER) && defined(_MSVC_LANG)
|
||||
# define CXX_STD _MSVC_LANG
|
||||
#else
|
||||
# define CXX_STD __cplusplus
|
||||
#endif
|
||||
|
||||
const char* info_language_dialect_default = "INFO" ":" "dialect_default["
|
||||
#if CXX_STD > 201703L
|
||||
"20"
|
||||
#elif CXX_STD >= 201703L
|
||||
"17"
|
||||
#elif CXX_STD >= 201402L
|
||||
"14"
|
||||
#elif CXX_STD >= 201103L
|
||||
"11"
|
||||
#else
|
||||
"98"
|
||||
#endif
|
||||
"]";
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int require = 0;
|
||||
require += info_compiler[argc];
|
||||
require += info_platform[argc];
|
||||
#ifdef COMPILER_VERSION_MAJOR
|
||||
require += info_version[argc];
|
||||
#endif
|
||||
#ifdef COMPILER_VERSION_INTERNAL
|
||||
require += info_version_internal[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_ID
|
||||
require += info_simulate[argc];
|
||||
#endif
|
||||
#ifdef SIMULATE_VERSION_MAJOR
|
||||
require += info_simulate_version[argc];
|
||||
#endif
|
||||
#if defined(__CRAYXE) || defined(__CRAYXC)
|
||||
require += info_cray[argc];
|
||||
#endif
|
||||
require += info_language_dialect_default[argc];
|
||||
(void)argv;
|
||||
return require;
|
||||
}
|
Binary file not shown.
|
@ -1,440 +0,0 @@
|
|||
The target system is: Generic - 1 - RISCV
|
||||
The host system is: Linux - 5.15.79.1-microsoft-standard-WSL2-HIDDEV+ - x86_64
|
||||
Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
|
||||
Compiler: /usr/bin/gcc
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "a.out"
|
||||
|
||||
The C compiler identification is GNU, found in "/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/3.16.3/CompilerIdC/a.out"
|
||||
|
||||
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
|
||||
Compiler: /usr/bin/g++
|
||||
Build flags:
|
||||
Id flags:
|
||||
|
||||
The output was:
|
||||
0
|
||||
|
||||
|
||||
Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "a.out"
|
||||
|
||||
The CXX compiler identification is GNU, found in "/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/3.16.3/CompilerIdCXX/a.out"
|
||||
|
||||
Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
|
||||
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
|
||||
Copyright (C) 2019 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Detecting C compiler ABI info compiled with the following output:
|
||||
Change Dir: /home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):/usr/bin/make cmTC_d12a4/fast && /usr/bin/make -f CMakeFiles/cmTC_d12a4.dir/build.make CMakeFiles/cmTC_d12a4.dir/build
|
||||
make[1]: Entering directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp'
|
||||
Building C object CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj
|
||||
/usr/bin/gcc -v -o CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/gcc
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64'
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc1xLyUv.s
|
||||
GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
|
||||
compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
|
||||
#include "..." search starts here:
|
||||
#include <...> search starts here:
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/include
|
||||
/usr/local/include
|
||||
/usr/include/x86_64-linux-gnu
|
||||
/usr/include
|
||||
End of search list.
|
||||
GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
|
||||
compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64'
|
||||
as -v --64 -o CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj /tmp/cc1xLyUv.s
|
||||
GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64'
|
||||
Linking C executable cmTC_d12a4
|
||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d12a4.dir/link.txt --verbose=1
|
||||
/usr/bin/gcc -v CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -o cmTC_d12a4
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/gcc
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d12a4' '-mtune=generic' '-march=x86-64'
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc0qddlW.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_d12a4 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d12a4' '-mtune=generic' '-march=x86-64'
|
||||
make[1]: Leaving directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp'
|
||||
|
||||
|
||||
|
||||
Parsed C implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
add: [/usr/local/include]
|
||||
add: [/usr/include/x86_64-linux-gnu]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
collapse include dir [/usr/local/include] ==> [/usr/local/include]
|
||||
collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
|
||||
collapse include dir [/usr/include] ==> [/usr/include]
|
||||
implicit include dirs: [/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
|
||||
|
||||
|
||||
Parsed C implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: /home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):/usr/bin/make cmTC_d12a4/fast && /usr/bin/make -f CMakeFiles/cmTC_d12a4.dir/build.make CMakeFiles/cmTC_d12a4.dir/build]
|
||||
ignore line: [make[1]: Entering directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp']
|
||||
ignore line: [Building C object CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj]
|
||||
ignore line: [/usr/bin/gcc -v -o CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -c /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/gcc]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1 -quiet -v -imultiarch x86_64-linux-gnu /usr/share/cmake-3.16/Modules/CMakeCCompilerABI.c -quiet -dumpbase CMakeCCompilerABI.c -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/cc1xLyUv.s]
|
||||
ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
ignore line: [ /usr/local/include]
|
||||
ignore line: [ /usr/include/x86_64-linux-gnu]
|
||||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C17 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: c0c95c0b4209efec1c1892d5ff24030b]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj /tmp/cc1xLyUv.s]
|
||||
ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj' '-c' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [Linking C executable cmTC_d12a4]
|
||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d12a4.dir/link.txt --verbose=1]
|
||||
ignore line: [/usr/bin/gcc -v CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -o cmTC_d12a4 ]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/gcc]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_d12a4' '-mtune=generic' '-march=x86-64']
|
||||
link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/cc0qddlW.res -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_d12a4 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/cc0qddlW.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [--build-id] ==> ignore
|
||||
arg [--eh-frame-hdr] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [elf_x86_64] ==> ignore
|
||||
arg [--hash-style=gnu] ==> ignore
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-dynamic-linker] ==> ignore
|
||||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-pie] ==> ignore
|
||||
arg [-znow] ==> ignore
|
||||
arg [-zrelro] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_d12a4] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
|
||||
arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
|
||||
arg [-L/lib/../lib] ==> dir [/lib/../lib]
|
||||
arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
|
||||
arg [CMakeFiles/cmTC_d12a4.dir/CMakeCCompilerABI.c.obj] ==> ignore
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [--push-state] ==> ignore
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [--pop-state] ==> ignore
|
||||
arg [-lc] ==> lib [c]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [--push-state] ==> ignore
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [--pop-state] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
|
||||
collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/lib/../lib] ==> [/lib]
|
||||
collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
|
||||
implicit libs: [gcc;gcc_s;c;gcc;gcc_s]
|
||||
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
||||
Detecting CXX compiler ABI info compiled with the following output:
|
||||
Change Dir: /home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp
|
||||
|
||||
Run Build Command(s):/usr/bin/make cmTC_c2348/fast && /usr/bin/make -f CMakeFiles/cmTC_c2348.dir/build.make CMakeFiles/cmTC_c2348.dir/build
|
||||
make[1]: Entering directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp'
|
||||
Building CXX object CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj
|
||||
/usr/bin/g++ -v -o CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/g++
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccUdl4Ps.s
|
||||
GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
|
||||
compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"
|
||||
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"
|
||||
ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"
|
||||
#include "..." search starts here:
|
||||
#include <...> search starts here:
|
||||
/usr/include/c++/9
|
||||
/usr/include/x86_64-linux-gnu/c++/9
|
||||
/usr/include/c++/9/backward
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/include
|
||||
/usr/local/include
|
||||
/usr/include/x86_64-linux-gnu
|
||||
/usr/include
|
||||
End of search list.
|
||||
GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)
|
||||
compiled by GNU C version 9.4.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version isl-0.22.1-GMP
|
||||
|
||||
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
|
||||
Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
as -v --64 -o CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj /tmp/ccUdl4Ps.s
|
||||
GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
Linking CXX executable cmTC_c2348
|
||||
/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c2348.dir/link.txt --verbose=1
|
||||
/usr/bin/g++ -v CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -o cmTC_c2348
|
||||
Using built-in specs.
|
||||
COLLECT_GCC=/usr/bin/g++
|
||||
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
|
||||
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
|
||||
OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-linux-gnu
|
||||
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
|
||||
Thread model: posix
|
||||
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
|
||||
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/
|
||||
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c2348' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
/usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccf5lMYT.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_c2348 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o
|
||||
COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c2348' '-shared-libgcc' '-mtune=generic' '-march=x86-64'
|
||||
make[1]: Leaving directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp'
|
||||
|
||||
|
||||
|
||||
Parsed CXX implicit include dir info from above output: rv=done
|
||||
found start of include info
|
||||
found start of implicit include info
|
||||
add: [/usr/include/c++/9]
|
||||
add: [/usr/include/x86_64-linux-gnu/c++/9]
|
||||
add: [/usr/include/c++/9/backward]
|
||||
add: [/usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
add: [/usr/local/include]
|
||||
add: [/usr/include/x86_64-linux-gnu]
|
||||
add: [/usr/include]
|
||||
end of search list found
|
||||
collapse include dir [/usr/include/c++/9] ==> [/usr/include/c++/9]
|
||||
collapse include dir [/usr/include/x86_64-linux-gnu/c++/9] ==> [/usr/include/x86_64-linux-gnu/c++/9]
|
||||
collapse include dir [/usr/include/c++/9/backward] ==> [/usr/include/c++/9/backward]
|
||||
collapse include dir [/usr/lib/gcc/x86_64-linux-gnu/9/include] ==> [/usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
collapse include dir [/usr/local/include] ==> [/usr/local/include]
|
||||
collapse include dir [/usr/include/x86_64-linux-gnu] ==> [/usr/include/x86_64-linux-gnu]
|
||||
collapse include dir [/usr/include] ==> [/usr/include]
|
||||
implicit include dirs: [/usr/include/c++/9;/usr/include/x86_64-linux-gnu/c++/9;/usr/include/c++/9/backward;/usr/lib/gcc/x86_64-linux-gnu/9/include;/usr/local/include;/usr/include/x86_64-linux-gnu;/usr/include]
|
||||
|
||||
|
||||
Parsed CXX implicit link information from above output:
|
||||
link line regex: [^( *|.*[/\])(ld|CMAKE_LINK_STARTFILE-NOTFOUND|([^/\]+-)?ld|collect2)[^/\]*( |$)]
|
||||
ignore line: [Change Dir: /home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp]
|
||||
ignore line: []
|
||||
ignore line: [Run Build Command(s):/usr/bin/make cmTC_c2348/fast && /usr/bin/make -f CMakeFiles/cmTC_c2348.dir/build.make CMakeFiles/cmTC_c2348.dir/build]
|
||||
ignore line: [make[1]: Entering directory '/home/fish/bl808/ox64_coproc/apps/test/CMakeFiles/CMakeTmp']
|
||||
ignore line: [Building CXX object CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj]
|
||||
ignore line: [/usr/bin/g++ -v -o CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -c /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/cc1plus -quiet -v -imultiarch x86_64-linux-gnu -D_GNU_SOURCE /usr/share/cmake-3.16/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -version -fasynchronous-unwind-tables -fstack-protector-strong -Wformat -Wformat-security -fstack-clash-protection -fcf-protection -o /tmp/ccUdl4Ps.s]
|
||||
ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [ignoring duplicate directory "/usr/include/x86_64-linux-gnu/c++/9"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/include-fixed"]
|
||||
ignore line: [ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/9/../../../../x86_64-linux-gnu/include"]
|
||||
ignore line: [#include "..." search starts here:]
|
||||
ignore line: [#include <...> search starts here:]
|
||||
ignore line: [ /usr/include/c++/9]
|
||||
ignore line: [ /usr/include/x86_64-linux-gnu/c++/9]
|
||||
ignore line: [ /usr/include/c++/9/backward]
|
||||
ignore line: [ /usr/lib/gcc/x86_64-linux-gnu/9/include]
|
||||
ignore line: [ /usr/local/include]
|
||||
ignore line: [ /usr/include/x86_64-linux-gnu]
|
||||
ignore line: [ /usr/include]
|
||||
ignore line: [End of search list.]
|
||||
ignore line: [GNU C++14 (Ubuntu 9.4.0-1ubuntu1~20.04.1) version 9.4.0 (x86_64-linux-gnu)]
|
||||
ignore line: [ compiled by GNU C version 9.4.0 GMP version 6.2.0 MPFR version 4.0.2 MPC version 1.1.0 isl version isl-0.22.1-GMP]
|
||||
ignore line: []
|
||||
ignore line: [GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072]
|
||||
ignore line: [Compiler executable checksum: 65fe925b83d3956b533de4aaba7dace0]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [ as -v --64 -o CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj /tmp/ccUdl4Ps.s]
|
||||
ignore line: [GNU assembler version 2.34 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.34]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
ignore line: [Linking CXX executable cmTC_c2348]
|
||||
ignore line: [/usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_c2348.dir/link.txt --verbose=1]
|
||||
ignore line: [/usr/bin/g++ -v CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -o cmTC_c2348 ]
|
||||
ignore line: [Using built-in specs.]
|
||||
ignore line: [COLLECT_GCC=/usr/bin/g++]
|
||||
ignore line: [COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper]
|
||||
ignore line: [OFFLOAD_TARGET_NAMES=nvptx-none:hsa]
|
||||
ignore line: [OFFLOAD_TARGET_DEFAULT=1]
|
||||
ignore line: [Target: x86_64-linux-gnu]
|
||||
ignore line: [Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.1' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c ada c++ go brig d fortran objc obj-c++ gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32 m64 mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-Av3uEd/gcc-9-9.4.0/debian/tmp-nvptx/usr hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu]
|
||||
ignore line: [Thread model: posix]
|
||||
ignore line: [gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) ]
|
||||
ignore line: [COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/]
|
||||
ignore line: [LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/9/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib/:/lib/x86_64-linux-gnu/:/lib/../lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/../lib/:/usr/lib/gcc/x86_64-linux-gnu/9/../../../:/lib/:/usr/lib/]
|
||||
ignore line: [COLLECT_GCC_OPTIONS='-v' '-o' 'cmTC_c2348' '-shared-libgcc' '-mtune=generic' '-march=x86-64']
|
||||
link line: [ /usr/lib/gcc/x86_64-linux-gnu/9/collect2 -plugin /usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so -plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper -plugin-opt=-fresolution=/tmp/ccf5lMYT.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --eh-frame-hdr -m elf_x86_64 --hash-style=gnu --as-needed -dynamic-linker /lib64/ld-linux-x86-64.so.2 -pie -z now -z relro -o cmTC_c2348 /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o -L/usr/lib/gcc/x86_64-linux-gnu/9 -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu -L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib -L/lib/x86_64-linux-gnu -L/lib/../lib -L/usr/lib/x86_64-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/9/../../.. CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o /usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/collect2] ==> ignore
|
||||
arg [-plugin] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/liblto_plugin.so] ==> ignore
|
||||
arg [-plugin-opt=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper] ==> ignore
|
||||
arg [-plugin-opt=-fresolution=/tmp/ccf5lMYT.res] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lc] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc_s] ==> ignore
|
||||
arg [-plugin-opt=-pass-through=-lgcc] ==> ignore
|
||||
arg [--build-id] ==> ignore
|
||||
arg [--eh-frame-hdr] ==> ignore
|
||||
arg [-m] ==> ignore
|
||||
arg [elf_x86_64] ==> ignore
|
||||
arg [--hash-style=gnu] ==> ignore
|
||||
arg [--as-needed] ==> ignore
|
||||
arg [-dynamic-linker] ==> ignore
|
||||
arg [/lib64/ld-linux-x86-64.so.2] ==> ignore
|
||||
arg [-pie] ==> ignore
|
||||
arg [-znow] ==> ignore
|
||||
arg [-zrelro] ==> ignore
|
||||
arg [-o] ==> ignore
|
||||
arg [cmTC_c2348] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/Scrt1.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crti.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtbeginS.o] ==> ignore
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib]
|
||||
arg [-L/lib/x86_64-linux-gnu] ==> dir [/lib/x86_64-linux-gnu]
|
||||
arg [-L/lib/../lib] ==> dir [/lib/../lib]
|
||||
arg [-L/usr/lib/x86_64-linux-gnu] ==> dir [/usr/lib/x86_64-linux-gnu]
|
||||
arg [-L/usr/lib/../lib] ==> dir [/usr/lib/../lib]
|
||||
arg [-L/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..]
|
||||
arg [CMakeFiles/cmTC_c2348.dir/CMakeCXXCompilerABI.cpp.obj] ==> ignore
|
||||
arg [-lstdc++] ==> lib [stdc++]
|
||||
arg [-lm] ==> lib [m]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [-lc] ==> lib [c]
|
||||
arg [-lgcc_s] ==> lib [gcc_s]
|
||||
arg [-lgcc] ==> lib [gcc]
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/crtendS.o] ==> ignore
|
||||
arg [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu/crtn.o] ==> ignore
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9] ==> [/usr/lib/gcc/x86_64-linux-gnu/9]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../../../lib] ==> [/usr/lib]
|
||||
collapse library dir [/lib/x86_64-linux-gnu] ==> [/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/lib/../lib] ==> [/lib]
|
||||
collapse library dir [/usr/lib/x86_64-linux-gnu] ==> [/usr/lib/x86_64-linux-gnu]
|
||||
collapse library dir [/usr/lib/../lib] ==> [/usr/lib]
|
||||
collapse library dir [/usr/lib/gcc/x86_64-linux-gnu/9/../../..] ==> [/usr/lib]
|
||||
implicit libs: [stdc++;m;gcc_s;gcc;c;gcc_s;gcc]
|
||||
implicit dirs: [/usr/lib/gcc/x86_64-linux-gnu/9;/usr/lib/x86_64-linux-gnu;/usr/lib;/lib/x86_64-linux-gnu;/lib]
|
||||
implicit fwks: []
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
|
@ -1,20 +0,0 @@
|
|||
cmake_minimum_required(VERSION 3.15)
|
||||
|
||||
include(proj.conf)
|
||||
include(../../cmake/top.cmake)
|
||||
|
||||
sdk_add_include_directories(include)
|
||||
|
||||
target_sources(app PRIVATE
|
||||
)
|
||||
|
||||
#add_subdirectory(../common/ipc ${build_dir}/ipc)
|
||||
#add_subdirectory(../common/rpmsg-lite ${build_dir}/rpmsg-lite)
|
||||
|
||||
target_compile_options(app PRIVATE -ggdb -O0)
|
||||
# we need to set it on the shell library instead
|
||||
#target_compile_definitions(app PRIVATE -DSHELL_DEFAULT_NAME="0x64>")
|
||||
|
||||
sdk_set_main_file(src/main.c)
|
||||
sdk_set_linker_script(bl808_flash_d0.ld)
|
||||
project(ox64_coproc)
|
|
@ -1,20 +0,0 @@
|
|||
SDK_DEMO_PATH ?= .
|
||||
BL_SDK_BASE ?= /home/fish/bl808/bl_mcu_sdk
|
||||
|
||||
export BL_SDK_BASE
|
||||
|
||||
CHIP ?= bl808
|
||||
BOARD ?= bl808dk
|
||||
CPU_ID ?= d0
|
||||
CROSS_COMPILE ?= riscv64-unknown-elf-
|
||||
|
||||
# add custom cmake definition
|
||||
#cmake_definition+=-Dxxx=sss
|
||||
|
||||
include $(BL_SDK_BASE)/project.build
|
||||
|
||||
flash:
|
||||
bflb-mcu-tool --chipname=bl808 --firmware build/build_out/ox64_coproc_bl808_d0.bin
|
||||
|
||||
monitor:
|
||||
screen /dev/ttyACM0 2000000
|
|
@ -1,256 +0,0 @@
|
|||
/****************************************************************************************
|
||||
* @file flash.ld
|
||||
*
|
||||
* @brief This file is the link script file (gnuarm or armgcc).
|
||||
*
|
||||
* Copyright (C) BouffaloLab 2021
|
||||
*
|
||||
****************************************************************************************
|
||||
*/
|
||||
|
||||
/* configure the CPU type */
|
||||
OUTPUT_ARCH( "riscv" )
|
||||
/* link with the standard c library */
|
||||
INPUT(-lc)
|
||||
/* link with the standard GCC library */
|
||||
INPUT(-lgcc)
|
||||
/* configure the entry point */
|
||||
ENTRY(__start)
|
||||
|
||||
StackSize = 0x0400; /* 1KB */
|
||||
HeapMinSize = 0x1000; /* 4KB */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
xip_memory (rx) : ORIGIN = 0x58000000, LENGTH = 32M
|
||||
itcm_memory (rx) : ORIGIN = 0x3eff0000, LENGTH = 28K
|
||||
dtcm_memory (rx) : ORIGIN = 0x3eff7000, LENGTH = 4K
|
||||
nocache_ram_memory (!rx) : ORIGIN = 0x3eff8000, LENGTH = 0K
|
||||
ram_memory (!rx) : ORIGIN = 0x3eff8000, LENGTH = 512K
|
||||
xram_memory (!rx) : ORIGIN = 0x40000000, LENGTH = 16K
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__text_code_start__ = .;
|
||||
|
||||
KEEP (*(SORT_NONE(.init)))
|
||||
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
|
||||
/* section information for shell */
|
||||
. = ALIGN(8);
|
||||
__fsymtab_start = .;
|
||||
KEEP(*(FSymTab))
|
||||
__fsymtab_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__vsymtab_start = .;
|
||||
KEEP(*(VSymTab))
|
||||
__vsymtab_end = .;
|
||||
|
||||
/*put .rodata**/
|
||||
*(EXCLUDE_FILE( *bl808_glb*.o* \
|
||||
*bl808_glb_gpio*.o* \
|
||||
*bl808_pds*.o* \
|
||||
*bl808_aon*.o* \
|
||||
*bl808_hbn*.o* \
|
||||
*bl808_l1c*.o* \
|
||||
*bl808_common*.o* \
|
||||
*bl808_clock*.o* \
|
||||
*bl808_ef_ctrl*.o* \
|
||||
*bl808_sf_cfg*.o* \
|
||||
*bl808_sf_ctrl*.o* \
|
||||
*bl808_sflash*.o* \
|
||||
*bl808_xip_sflash*.o* \
|
||||
*bl808_romapi_patch*.o* ) .rodata*)
|
||||
|
||||
*(.srodata)
|
||||
*(.srodata.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__text_code_end__ = .;
|
||||
} > xip_memory
|
||||
|
||||
. = ALIGN(4);
|
||||
__itcm_load_addr = .;
|
||||
|
||||
.itcm_region : AT (__itcm_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__tcm_code_start__ = .;
|
||||
|
||||
*(.tcm_code.*)
|
||||
*(.tcm_const.*)
|
||||
*(.sclock_rlt_code.*)
|
||||
*(.sclock_rlt_const.*)
|
||||
|
||||
*bl808_glb*.o*(.rodata*)
|
||||
*bl808_glb_gpio*.o*(.rodata*)
|
||||
*bl808_pds*.o*(.rodata*)
|
||||
*bl808_aon*.o*(.rodata*)
|
||||
*bl808_hbn*.o*(.rodata*)
|
||||
*bl808_l1c*.o*(.rodata*)
|
||||
*bl808_common*.o*(.rodata*)
|
||||
*bl808_clock*.o*(.rodata*)
|
||||
*bl808_ef_ctrl*.o*(.rodata*)
|
||||
*bl808_sf_cfg*.o*(.rodata*)
|
||||
*bl808_sf_ctrl*.o*(.rodata*)
|
||||
*bl808_sflash*.o*(.rodata*)
|
||||
*bl808_xip_sflash*.o*(.rodata*)
|
||||
*bl808_romapi_patch*.o*(.rodata*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__tcm_code_end__ = .;
|
||||
} > itcm_memory
|
||||
|
||||
__dtcm_load_addr = __itcm_load_addr + SIZEOF(.itcm_region);
|
||||
|
||||
.dtcm_region : AT (__dtcm_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__tcm_data_start__ = .;
|
||||
|
||||
*(.tcm_data)
|
||||
/* *finger_print.o(.data*) */
|
||||
|
||||
. = ALIGN(4);
|
||||
__tcm_data_end__ = .;
|
||||
} > dtcm_memory
|
||||
|
||||
/*************************************************************************/
|
||||
/* .stack_dummy section doesn't contains any symbols. It is only
|
||||
* used for linker to calculate size of stack sections, and assign
|
||||
* values to stack symbols later */
|
||||
.stack_dummy (NOLOAD):
|
||||
{
|
||||
. = ALIGN(0x4);
|
||||
. = . + StackSize;
|
||||
. = ALIGN(0x4);
|
||||
} > dtcm_memory
|
||||
|
||||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory);
|
||||
PROVIDE( __freertos_irq_stack_top = __StackTop);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
ASSERT(__StackLimit >= __tcm_data_end__, "region RAM overflowed with stack")
|
||||
/*************************************************************************/
|
||||
__nocache_ram_load_addr = __dtcm_load_addr + SIZEOF(.dtcm_region);
|
||||
|
||||
.nocache_ram_region (NOLOAD) : AT (__nocache_ram_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__nocache_ram_data_start__ = .;
|
||||
|
||||
*(.nocache_ram)
|
||||
|
||||
. = ALIGN(4);
|
||||
__nocache_ram_data_end__ = .;
|
||||
} > nocache_ram_memory
|
||||
|
||||
__system_ram_load_addr = __nocache_ram_load_addr + SIZEOF(.nocache_ram_region);
|
||||
|
||||
.system_ram_data_region : AT (__system_ram_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__system_ram_data_start__ = .;
|
||||
|
||||
*(.system_ram)
|
||||
|
||||
. = ALIGN(4);
|
||||
__system_ram_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.system_ram_noinit_data_region (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.system_ram_noinit)
|
||||
|
||||
. = ALIGN(4);
|
||||
} > ram_memory
|
||||
|
||||
__ram_load_addr = __system_ram_load_addr + SIZEOF(.system_ram_data_region);
|
||||
|
||||
/* Data section */
|
||||
RAM_DATA : AT (__ram_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__ram_data_start__ = .;
|
||||
|
||||
PROVIDE( __global_pointer$ = . + 0x800 );
|
||||
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__ram_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
__etext_final = (__ram_load_addr + SIZEOF (RAM_DATA));
|
||||
ASSERT(__etext_final <= ORIGIN(xip_memory) + LENGTH(xip_memory), "code memory overflow")
|
||||
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
|
||||
*(.bss*)
|
||||
*(.sbss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.noinit_data (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__noinit_data_start__ = .;
|
||||
|
||||
*(.noinit_data*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__noinit_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.nocache_noinit_ram_region (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__nocache_ram_data_start__ = .;
|
||||
|
||||
*(.nocache_noinit_ram)
|
||||
|
||||
. = ALIGN(4);
|
||||
__nocache_ram_data_end__ = .;
|
||||
} > nocache_ram_memory
|
||||
|
||||
.heap (NOLOAD):
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__HeapBase = .;
|
||||
|
||||
/*__end__ = .;*/
|
||||
/*end = __end__;*/
|
||||
KEEP(*(.heap*))
|
||||
|
||||
. = ALIGN(4);
|
||||
__HeapLimit = .;
|
||||
} > ram_memory
|
||||
|
||||
__HeapLimit = ORIGIN(ram_memory) + LENGTH(ram_memory);
|
||||
ASSERT(__HeapLimit - __HeapBase >= HeapMinSize, "heap region overflow")
|
||||
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
/*
|
||||
* FreeRTOS Kernel V10.2.1
|
||||
* Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*
|
||||
* http://www.FreeRTOS.org
|
||||
* http://aws.amazon.com/freertos
|
||||
*
|
||||
* 1 tab == 4 spaces!
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
*----------------------------------------------------------*/
|
||||
#include "stdio.h"
|
||||
|
||||
#if defined(BL602) || defined(BL702) || defined(BL702L)
|
||||
#define configMTIME_BASE_ADDRESS (0x02000000UL + 0xBFF8UL)
|
||||
#define configMTIMECMP_BASE_ADDRESS (0x02000000UL + 0x4000UL)
|
||||
#else
|
||||
#if __riscv_xlen == 64
|
||||
#define configMTIME_BASE_ADDRESS (0)
|
||||
#define configMTIMECMP_BASE_ADDRESS ((0xE4000000UL) + 0x4000UL)
|
||||
#else
|
||||
#define configMTIME_BASE_ADDRESS ((0xE0000000UL) + 0xBFF8UL)
|
||||
#define configMTIMECMP_BASE_ADDRESS ((0xE0000000UL) + 0x4000UL)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// #define configSUPPORT_STATIC_ALLOCATION 1
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ((uint32_t)(1 * 1000 * 1000))
|
||||
#define configTICK_RATE_HZ ((TickType_t)1000)
|
||||
#define configMAX_PRIORITIES (7)
|
||||
#define configMINIMAL_STACK_SIZE ((unsigned short)128) /* Only needs to be this high as some demo tasks also use this constant. In production only the idle task would use this. */
|
||||
#define configTOTAL_HEAP_SIZE ((size_t)32 * 1024)
|
||||
#define configMAX_TASK_NAME_LEN (16)
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_STATS_FORMATTING_FUNCTIONS 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 0
|
||||
#define configUSE_MUTEXES 1
|
||||
#define configQUEUE_REGISTRY_SIZE 8
|
||||
#define configCHECK_FOR_STACK_OVERFLOW 2
|
||||
#define configUSE_RECURSIVE_MUTEXES 1
|
||||
#define configUSE_MALLOC_FAILED_HOOK 1
|
||||
#define configUSE_APPLICATION_TASK_TAG 0
|
||||
#define configUSE_COUNTING_SEMAPHORES 1
|
||||
#define configGENERATE_RUN_TIME_STATS 0
|
||||
#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1
|
||||
#define configUSE_TICKLESS_IDLE 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES (2)
|
||||
|
||||
/* Software timer definitions. */
|
||||
#define configUSE_TIMERS 1
|
||||
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
|
||||
#define configTIMER_QUEUE_LENGTH 4
|
||||
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE)
|
||||
|
||||
/* Task priorities. Allow these to be overridden. */
|
||||
#ifndef uartPRIMARY_PRIORITY
|
||||
#define uartPRIMARY_PRIORITY (configMAX_PRIORITIES - 3)
|
||||
#endif
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 1
|
||||
#define INCLUDE_vTaskCleanUpResources 1
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
#define INCLUDE_eTaskGetState 1
|
||||
#define INCLUDE_xTimerPendFunctionCall 1
|
||||
#define INCLUDE_xTaskAbortDelay 1
|
||||
#define INCLUDE_xTaskGetHandle 1
|
||||
#define INCLUDE_xSemaphoreGetMutexHolder 1
|
||||
|
||||
/* Normal assert() semantics without relying on the provision of an assert.h
|
||||
header file. */
|
||||
void vApplicationMallocFailedHook(void);
|
||||
void vAssertCalled(void);
|
||||
#define configASSERT(x) \
|
||||
if ((x) == 0) { \
|
||||
printf("file [%s]\r\n", __FILE__); \
|
||||
printf("func [%s]\r\n", __FUNCTION__); \
|
||||
printf("line [%d]\r\n", __LINE__); \
|
||||
printf("%s\r\n", (const char *)(#x)); \
|
||||
vAssertCalled(); \
|
||||
}
|
||||
|
||||
#if (configUSE_TICKLESS_IDLE != 0)
|
||||
void vApplicationSleep(uint32_t xExpectedIdleTime);
|
||||
#define portSUPPRESS_TICKS_AND_SLEEP(xExpectedIdleTime) vApplicationSleep(xExpectedIdleTime)
|
||||
#endif
|
||||
|
||||
// #define portUSING_MPU_WRAPPERS
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
|
@ -1,196 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2014, Mentor Graphics Corporation
|
||||
* Copyright (c) 2015 Xilinx, Inc.
|
||||
* Copyright (c) 2016 Freescale Semiconductor, Inc.
|
||||
* Copyright 2016-2021 NXP
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
|
||||
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
* POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef RPMSG_DEFAULT_CONFIG_H_
|
||||
#define RPMSG_DEFAULT_CONFIG_H_
|
||||
|
||||
#define RL_USE_CUSTOM_CONFIG (1)
|
||||
|
||||
#if RL_USE_CUSTOM_CONFIG
|
||||
#include "rpmsg_config.h"
|
||||
#endif
|
||||
|
||||
/*!
|
||||
* @addtogroup config
|
||||
* @{
|
||||
* @file
|
||||
*/
|
||||
|
||||
//! @name Configuration options
|
||||
//@{
|
||||
|
||||
//! @def RL_MS_PER_INTERVAL
|
||||
//!
|
||||
//! Delay in milliseconds used in non-blocking API functions for polling.
|
||||
//! The default value is 1.
|
||||
#ifndef RL_MS_PER_INTERVAL
|
||||
#define RL_MS_PER_INTERVAL (1)
|
||||
#endif
|
||||
|
||||
//! @def RL_ALLOW_CUSTOM_SHMEM_CONFIG
|
||||
//!
|
||||
//! This option allows to define custom shared memory configuration and replacing
|
||||
//! the shared memory related global settings from rpmsg_config.h This is useful
|
||||
//! when multiple instances are running in parallel but different shared memory
|
||||
//! arrangement (vring size & alignment, buffers size & count) is required. Note,
|
||||
//! that once enabled the platform_get_custom_shmem_config() function needs
|
||||
//! to be implemented in platform layer. The default value is 0 (all RPMsg_Lite
|
||||
//! instances use the same shared memory arrangement as defined by common config macros).
|
||||
#ifndef RL_ALLOW_CUSTOM_SHMEM_CONFIG
|
||||
#define RL_ALLOW_CUSTOM_SHMEM_CONFIG (0)
|
||||
#endif
|
||||
|
||||
#if !(defined(RL_ALLOW_CUSTOM_SHMEM_CONFIG) && (RL_ALLOW_CUSTOM_SHMEM_CONFIG == 1))
|
||||
//! @def RL_BUFFER_PAYLOAD_SIZE
|
||||
//!
|
||||
//! Size of the buffer payload, it must be equal to (240, 496, 1008, ...)
|
||||
//! [2^n - 16]. Ensure the same value is defined on both sides of rpmsg
|
||||
//! communication. The default value is 496U.
|
||||
#ifndef RL_BUFFER_PAYLOAD_SIZE
|
||||
#define RL_BUFFER_PAYLOAD_SIZE (496U)
|
||||
#endif
|
||||
|
||||
//! @def RL_BUFFER_COUNT
|
||||
//!
|
||||
//! Number of the buffers, it must be power of two (2, 4, ...).
|
||||
//! The default value is 2U.
|
||||
//! Note this value defines the buffer count for one direction of the rpmsg
|
||||
//! communication only, i.e. if the default value of 2 is used
|
||||
//! in rpmsg_config.h files for the master and the remote side, 4 buffers
|
||||
//! in total are created in the shared memory.
|
||||
#ifndef RL_BUFFER_COUNT
|
||||
#define RL_BUFFER_COUNT (2U)
|
||||
#endif
|
||||
|
||||
#else
|
||||
//! Define the buffer payload and count per different link IDs (rpmsg_lite instance) when RL_ALLOW_CUSTOM_SHMEM_CONFIG
|
||||
//! is set.
|
||||
//! Refer to the rpmsg_plaform.h for the used link IDs.
|
||||
#ifndef RL_BUFFER_PAYLOAD_SIZE
|
||||
#define RL_BUFFER_PAYLOAD_SIZE(link_id) (496U)
|
||||
#endif
|
||||
|
||||
#ifndef RL_BUFFER_COUNT
|
||||
#define RL_BUFFER_COUNT(link_id) (((link_id) == 0U) ? 256U : 2U)
|
||||
#endif
|
||||
#endif /* !(defined(RL_ALLOW_CUSTOM_SHMEM_CONFIG) && (RL_ALLOW_CUSTOM_SHMEM_CONFIG == 1))*/
|
||||
|
||||
//! @def RL_API_HAS_ZEROCOPY
|
||||
//!
|
||||
//! Zero-copy API functions enabled/disabled.
|
||||
//! The default value is 1 (enabled).
|
||||
#ifndef RL_API_HAS_ZEROCOPY
|
||||
#define RL_API_HAS_ZEROCOPY (1)
|
||||
#endif
|
||||
|
||||
//! @def RL_USE_STATIC_API
|
||||
//!
|
||||
//! Static API functions (no dynamic allocation) enabled/disabled.
|
||||
//! The default value is 0 (static API disabled).
|
||||
#ifndef RL_USE_STATIC_API
|
||||
#define RL_USE_STATIC_API (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_CLEAR_USED_BUFFERS
|
||||
//!
|
||||
//! Clearing used buffers before returning back to the pool of free buffers
|
||||
//! enabled/disabled.
|
||||
//! The default value is 0 (disabled).
|
||||
#ifndef RL_CLEAR_USED_BUFFERS
|
||||
#define RL_CLEAR_USED_BUFFERS (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_USE_MCMGR_IPC_ISR_HANDLER
|
||||
//!
|
||||
//! When enabled IPC interrupts are managed by the Multicore Manager (IPC
|
||||
//! interrupts router), when disabled RPMsg-Lite manages IPC interrupts
|
||||
//! by itself.
|
||||
//! The default value is 0 (no MCMGR IPC ISR handler used).
|
||||
#ifndef RL_USE_MCMGR_IPC_ISR_HANDLER
|
||||
#define RL_USE_MCMGR_IPC_ISR_HANDLER (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_USE_ENVIRONMENT_CONTEXT
|
||||
//!
|
||||
//! When enabled the environment layer uses its own context.
|
||||
//! Added for QNX port mainly, but can be used if required.
|
||||
//! The default value is 0 (no context, saves some RAM).
|
||||
#ifndef RL_USE_ENVIRONMENT_CONTEXT
|
||||
#define RL_USE_ENVIRONMENT_CONTEXT (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_DEBUG_CHECK_BUFFERS
|
||||
//!
|
||||
//! Do not use in RPMsg-Lite to Linux configuration
|
||||
#ifndef RL_DEBUG_CHECK_BUFFERS
|
||||
#define RL_DEBUG_CHECK_BUFFERS (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_ALLOW_CONSUMED_BUFFERS_NOTIFICATION
|
||||
//!
|
||||
//! When enabled the opposite side is notified each time received buffers
|
||||
//! are consumed and put into the queue of available buffers.
|
||||
//! Enable this option in RPMsg-Lite to Linux configuration to allow unblocking
|
||||
//! of the Linux blocking send.
|
||||
//! The default value is 0 (RPMsg-Lite to RPMsg-Lite communication).
|
||||
#ifndef RL_ALLOW_CONSUMED_BUFFERS_NOTIFICATION
|
||||
#define RL_ALLOW_CONSUMED_BUFFERS_NOTIFICATION (0)
|
||||
#endif
|
||||
|
||||
//! @def RL_HANG
|
||||
//!
|
||||
//! Default implementation of hang assert function
|
||||
static inline void RL_HANG(void)
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
//! @def RL_ASSERT
|
||||
//!
|
||||
//! Assert implementation.
|
||||
#ifndef RL_ASSERT
|
||||
#define RL_ASSERT_BOOL(b) \
|
||||
do \
|
||||
{ \
|
||||
if (!(b)) \
|
||||
{ \
|
||||
RL_HANG(); \
|
||||
} \
|
||||
} while (0 == 1);
|
||||
#define RL_ASSERT(x) RL_ASSERT_BOOL((int32_t)(x) != 0)
|
||||
|
||||
#endif
|
||||
//@}
|
||||
|
||||
#endif /* RPMSG_DEFAULT_CONFIG_H_ */
|
|
@ -1,15 +0,0 @@
|
|||
set(CONFIG_PSRAM 1)
|
||||
set(CONFIG_SHELL 1)
|
||||
set(CONFIG_SHELL_DEFAULT_NAME "ox64")
|
||||
set(CONFIG_FREERTOS 1)
|
||||
set(CONFIG_BFLOG 1)
|
||||
set(CONFIG_VLIBC 1)
|
||||
set(CONFIG_DEBUG 1)
|
||||
set(CONFIG_ROMAPI 0)
|
||||
set(CONFIG_TLSF 0)
|
||||
set(CONFIG_IPC 1)
|
||||
set(CONFIG_RPMSG 1)
|
||||
set(CONFIG_LOG_LEVEL 4)
|
||||
set(CONFIG_VLIBC_LONG_LONG 1)
|
||||
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
|
||||
#include <bl808_glb.h>
|
||||
#include <bflb_mtimer.h>
|
||||
#include <bflb_flash.h>
|
||||
// #include <FreeRTOS.h>
|
||||
// #include <task.h>
|
||||
// #ifdef CONFIG_TLSF
|
||||
// #include <bflb_tlsf.h>
|
||||
// #endif
|
||||
#include <bflb_gpio.h>
|
||||
|
||||
// #include <board.h>
|
||||
// #include <log.h>
|
||||
// #include <FreeRTOS.h>
|
||||
// #include <semphr.h>
|
||||
// #include "ipc.h"
|
||||
|
||||
// static uint8_t freertos_heap[configTOTAL_HEAP_SIZE];
|
||||
|
||||
// static HeapRegion_t xHeapRegions[] = {
|
||||
// { (uint8_t *)freertos_heap, 0 },
|
||||
// { NULL, 0 }, /* Terminates the array. */
|
||||
// { NULL, 0 } /* Terminates the array. */
|
||||
// };
|
||||
|
||||
extern uint32_t __start;
|
||||
int main(void)
|
||||
{
|
||||
// TaskHandle_t rpmsg_task_handle = NULL;
|
||||
// xHeapRegions[0].xSizeInBytes = configTOTAL_HEAP_SIZE;
|
||||
// vPortDefineHeapRegions(xHeapRegions);
|
||||
// LOG_I("Starting....\r\n");
|
||||
// board_init();
|
||||
// #if 0
|
||||
// /* setup JTAG for D0 */
|
||||
// struct bflb_device_s *gpio = bflb_device_get_by_name("gpio");
|
||||
// bflb_gpio_init(gpio, GPIO_PIN_12, GPIO_ALTERNATE | GPIO_FUNC_JTAG_M0);
|
||||
// bflb_gpio_init(gpio, GPIO_PIN_13, GPIO_ALTERNATE | GPIO_FUNC_JTAG_M0);
|
||||
// bflb_gpio_init(gpio, GPIO_PIN_6, GPIO_ALTERNATE | GPIO_FUNC_JTAG_M0);
|
||||
// bflb_gpio_init(gpio, GPIO_PIN_7, GPIO_ALTERNATE | GPIO_FUNC_JTAG_M0);
|
||||
// #endif
|
||||
// LOG_I("Starting 0x64_coproc on %d at 0x%08lx\r\n", GLB_Get_Core_Type(), __start);
|
||||
// LOG_I("Flash Offset at 0x%08lx\r\n", bflb_flash_get_image_offset());
|
||||
// #ifdef CONFIG_TLSF
|
||||
// bflb_tlsf_size_container_t *tlsf_size = bflb_tlsf_stats();
|
||||
// printf("Memory: Total: %dKb, Used: %dKb Free: %dKb\r\n", (tlsf_size->free + tlsf_size->used)/1024, tlsf_size->used/1024, tlsf_size->free/1024);
|
||||
// #endif
|
||||
// LOG_I("FreeRTOS Scheduler Starting\r\n");
|
||||
// #if 0
|
||||
// console_init();
|
||||
// LOG_I("Console Started\r\n");
|
||||
// pt_table_set_flash_operation(bflb_flash_erase, bflb_flash_write, bflb_flash_read);
|
||||
// pt_table_dump();
|
||||
// #endif
|
||||
// // vTaskDelay(1000/portTICK_RATE_MS);
|
||||
// // __BKPT();
|
||||
// if (xTaskCreate(rpmsg_task, "RPMSG_TASK", 2048, NULL, tskIDLE_PRIORITY + 1U, &rpmsg_task_handle) != pdPASS)
|
||||
// {
|
||||
// printf("\r\nFailed to create rpmsg task\r\n");
|
||||
// return -1;
|
||||
// }
|
||||
// vTaskStartScheduler();
|
||||
// /* we should never get here */
|
||||
while (1) {
|
||||
printf("haha\r\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,176 +0,0 @@
|
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
||||
|
||||
#.rst:
|
||||
# FindPythonInterp
|
||||
# ----------------
|
||||
#
|
||||
# Find python interpreter
|
||||
#
|
||||
# This module finds if Python interpreter is installed and determines
|
||||
# where the executables are. This code sets the following variables:
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# PYTHONINTERP_FOUND - Was the Python executable found
|
||||
# PYTHON_EXECUTABLE - path to the Python interpreter
|
||||
#
|
||||
#
|
||||
#
|
||||
# ::
|
||||
#
|
||||
# PYTHON_VERSION_STRING - Python version found e.g. 2.5.2
|
||||
# PYTHON_VERSION_MAJOR - Python major version found e.g. 2
|
||||
# PYTHON_VERSION_MINOR - Python minor version found e.g. 5
|
||||
# PYTHON_VERSION_PATCH - Python patch version found e.g. 2
|
||||
#
|
||||
#
|
||||
#
|
||||
# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list
|
||||
# of version numbers that should be taken into account when searching
|
||||
# for Python. You need to set this variable before calling
|
||||
# find_package(PythonInterp).
|
||||
#
|
||||
# If calling both ``find_package(PythonInterp)`` and
|
||||
# ``find_package(PythonLibs)``, call ``find_package(PythonInterp)`` first to
|
||||
# get the currently active Python version by default with a consistent version
|
||||
# of PYTHON_LIBRARIES.
|
||||
|
||||
function(determine_python_version exe result)
|
||||
execute_process(COMMAND "${exe}" -c
|
||||
"import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))"
|
||||
OUTPUT_VARIABLE _VERSION
|
||||
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||
ERROR_QUIET)
|
||||
if(_PYTHON_VERSION_RESULT)
|
||||
# sys.version predates sys.version_info, so use that
|
||||
execute_process(COMMAND "${exe}" -c "import sys; sys.stdout.write(sys.version)"
|
||||
OUTPUT_VARIABLE _VERSION
|
||||
RESULT_VARIABLE _PYTHON_VERSION_RESULT
|
||||
ERROR_QUIET)
|
||||
if(_PYTHON_VERSION_RESULT)
|
||||
# sys.version was first documented for Python 1.5, so assume
|
||||
# this is older.
|
||||
set(ver "1.4")
|
||||
else()
|
||||
string(REGEX REPLACE " .*" "" ver "${_VERSION}")
|
||||
endif()
|
||||
else()
|
||||
string(REPLACE ";" "." ver "${_VERSION}")
|
||||
endif()
|
||||
set(${result} ${ver} PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Find out if the 'python' executable on path has the correct version,
|
||||
# and choose it if it does. This gives this executable the highest
|
||||
# priority, which is expected behaviour.
|
||||
find_program(PYTHON_EXECUTABLE python)
|
||||
if(NOT (${PYTHON_EXECUTABLE} STREQUAL PYTHON_EXECUTABLE-NOTFOUND))
|
||||
determine_python_version(${PYTHON_EXECUTABLE} ver)
|
||||
if(${ver} VERSION_LESS PythonInterp_FIND_VERSION)
|
||||
# We didn't find the correct version on path, so forget about it
|
||||
# and continue looking.
|
||||
unset(PYTHON_EXECUTABLE)
|
||||
unset(PYTHON_EXECUTABLE CACHE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(_Python_NAMES)
|
||||
|
||||
set(_PYTHON1_VERSIONS 1.6 1.5)
|
||||
set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
|
||||
set(_PYTHON3_VERSIONS 3.9 3.8 3.7 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
|
||||
|
||||
if(PythonInterp_FIND_VERSION)
|
||||
if(PythonInterp_FIND_VERSION_COUNT GREATER 1)
|
||||
set(_PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION_MAJOR}.${PythonInterp_FIND_VERSION_MINOR}")
|
||||
list(APPEND _Python_NAMES
|
||||
python${_PYTHON_FIND_MAJ_MIN}
|
||||
python${PythonInterp_FIND_VERSION_MAJOR})
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
if(NOT PythonInterp_FIND_VERSION_EXACT)
|
||||
foreach(_PYTHON_V ${_PYTHON${PythonInterp_FIND_VERSION_MAJOR}_VERSIONS})
|
||||
if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN)
|
||||
list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V})
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
unset(_PYTHON_FIND_MAJ_MIN)
|
||||
else()
|
||||
list(APPEND _Python_NAMES python${PythonInterp_FIND_VERSION_MAJOR})
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonInterp_FIND_VERSION_MAJOR}_VERSIONS})
|
||||
endif()
|
||||
else()
|
||||
set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS})
|
||||
endif()
|
||||
find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES})
|
||||
|
||||
# Set up the versions we know about, in the order we will search. Always add
|
||||
# the user supplied additional versions to the front.
|
||||
set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS})
|
||||
# If FindPythonInterp has already found the major and minor version,
|
||||
# insert that version next to get consistent versions of the interpreter and
|
||||
# library.
|
||||
if(DEFINED PYTHONLIBS_VERSION_STRING)
|
||||
string(REPLACE "." ";" _PYTHONLIBS_VERSION "${PYTHONLIBS_VERSION_STRING}")
|
||||
list(GET _PYTHONLIBS_VERSION 0 _PYTHONLIBS_VERSION_MAJOR)
|
||||
list(GET _PYTHONLIBS_VERSION 1 _PYTHONLIBS_VERSION_MINOR)
|
||||
list(APPEND _Python_VERSIONS ${_PYTHONLIBS_VERSION_MAJOR}.${_PYTHONLIBS_VERSION_MINOR})
|
||||
endif()
|
||||
|
||||
# Search for the current active python version first on Linux, and last on Windows
|
||||
if(NOT WIN32)
|
||||
list(APPEND _Python_VERSIONS ";")
|
||||
endif()
|
||||
|
||||
list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS})
|
||||
|
||||
if(WIN32)
|
||||
list(APPEND _Python_VERSIONS ";")
|
||||
endif()
|
||||
|
||||
unset(_PYTHON_FIND_OTHER_VERSIONS)
|
||||
unset(_PYTHON1_VERSIONS)
|
||||
unset(_PYTHON2_VERSIONS)
|
||||
unset(_PYTHON3_VERSIONS)
|
||||
|
||||
# Search for newest python version if python executable isn't found
|
||||
if(NOT PYTHON_EXECUTABLE)
|
||||
foreach(_CURRENT_VERSION IN LISTS _Python_VERSIONS)
|
||||
set(_Python_NAMES python${_CURRENT_VERSION})
|
||||
if(WIN32)
|
||||
list(APPEND _Python_NAMES python)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES ${_Python_NAMES}
|
||||
HINTS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
|
||||
)
|
||||
endif()
|
||||
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES ${_Python_NAMES}
|
||||
PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]
|
||||
)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
# determine python version string
|
||||
if(PYTHON_EXECUTABLE)
|
||||
determine_python_version(${PYTHON_EXECUTABLE} res)
|
||||
set(PYTHON_VERSION_STRING ${res})
|
||||
|
||||
if(PYTHON_VERSION_STRING MATCHES "^([0-9]+)\\.([0-9]+)\\.([0-9]+)")
|
||||
set(PYTHON_VERSION_PATCH "${CMAKE_MATCH_3}")
|
||||
else()
|
||||
set(PYTHON_VERSION_PATCH "0")
|
||||
endif()
|
||||
set(PYTHON_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
set(PYTHON_VERSION_MINOR "${CMAKE_MATCH_2}")
|
||||
endif()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING)
|
||||
|
||||
mark_as_advanced(PYTHON_EXECUTABLE)
|
File diff suppressed because it is too large
Load diff
|
@ -1,318 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# Folders needed for conf/mconf files (kconfig has no method of redirecting all output files).
|
||||
# conf/mconf needs to be run from a different directory because of: GH-3408
|
||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig/include/generated)
|
||||
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig/include/config)
|
||||
|
||||
# Support multiple SOC_ROOT, remove PROJECT_ROOT as that is always sourced.
|
||||
set(kconfig_soc_root ${SOC_ROOT})
|
||||
list(REMOVE_ITEM kconfig_soc_root ${PROJECT_ROOT})
|
||||
set(OPERATION WRITE)
|
||||
foreach(root ${kconfig_soc_root})
|
||||
file(${OPERATION} ${KCONFIG_BINARY_DIR}/Kconfig.soc.defconfig
|
||||
"osource \"${root}/soc/$(ARCH)/*/Kconfig.defconfig\"\n"
|
||||
)
|
||||
file(${OPERATION} ${KCONFIG_BINARY_DIR}/Kconfig.soc
|
||||
"osource \"${root}/soc/$(ARCH)/*/Kconfig.soc\"\n"
|
||||
)
|
||||
file(${OPERATION} ${KCONFIG_BINARY_DIR}/Kconfig.soc.arch
|
||||
"osource \"${root}/soc/$(ARCH)/Kconfig\"\n"
|
||||
"osource \"${root}/soc/$(ARCH)/*/Kconfig\"\n"
|
||||
)
|
||||
set(OPERATION APPEND)
|
||||
endforeach()
|
||||
|
||||
# Support multiple shields in BOARD_ROOT, remove PROJECT_ROOT as that is always sourced.
|
||||
set(kconfig_board_root ${BOARD_ROOT})
|
||||
list(REMOVE_ITEM kconfig_board_root ${PROJECT_ROOT})
|
||||
set(OPERATION WRITE)
|
||||
foreach(root ${kconfig_board_root})
|
||||
file(${OPERATION} ${KCONFIG_BINARY_DIR}/Kconfig.shield.defconfig
|
||||
"osource \"${root}/boards/shields/*/Kconfig.defconfig\"\n"
|
||||
)
|
||||
file(${OPERATION} ${KCONFIG_BINARY_DIR}/Kconfig.shield
|
||||
"osource \"${root}/boards/shields/*/Kconfig.shield\"\n"
|
||||
)
|
||||
set(OPERATION APPEND)
|
||||
endforeach()
|
||||
|
||||
# if(KCONFIG_ROOT)
|
||||
# zephyr_file(APPLICATION_ROOT KCONFIG_ROOT)
|
||||
# # KCONFIG_ROOT has either been specified as a CMake variable or is
|
||||
# # already in the CMakeCache.txt. This has precedence.
|
||||
# else
|
||||
if(EXISTS ${APPLICATION_SOURCE_DIR}/Kconfig)
|
||||
set(KCONFIG_ROOT ${APPLICATION_SOURCE_DIR}/Kconfig)
|
||||
else()
|
||||
set(KCONFIG_ROOT ${PROJECT_ROOT}/Kconfig)
|
||||
endif()
|
||||
|
||||
set(BOARD_DEFCONFIG ${BOARD_DIR}/${BOARD}_defconfig)
|
||||
set(DOTCONFIG ${PROJECT_BINARY_DIR}/.config)
|
||||
set(PARSED_KCONFIG_SOURCES_TXT ${PROJECT_BINARY_DIR}/kconfig/sources.txt)
|
||||
|
||||
if(CONF_FILE)
|
||||
string(REPLACE " " ";" CONF_FILE_AS_LIST "${CONF_FILE}")
|
||||
endif()
|
||||
|
||||
if(OVERLAY_CONFIG)
|
||||
string(REPLACE " " ";" OVERLAY_CONFIG_AS_LIST "${OVERLAY_CONFIG}")
|
||||
endif()
|
||||
|
||||
if((DEFINED BOARD_REVISION) AND EXISTS ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.conf)
|
||||
list(INSERT CONF_FILE_AS_LIST 0 ${BOARD_DIR}/${BOARD}_${BOARD_REVISION_STRING}.conf)
|
||||
endif()
|
||||
|
||||
# DTS_ROOT_BINDINGS is a semicolon separated list, this causes
|
||||
# problems when invoking kconfig_target since semicolon is a special
|
||||
# character in the C shell, so we make it into a question-mark
|
||||
# separated list instead.
|
||||
string(REPLACE ";" "?" DTS_ROOT_BINDINGS "${DTS_ROOT_BINDINGS}")
|
||||
|
||||
# Export each `ZEPHYR_<module>_MODULE_DIR` to Kconfig.
|
||||
# This allows Kconfig files to refer relative from a modules root as:
|
||||
# source "$(ZEPHYR_FOO_MODULE_DIR)/Kconfig"
|
||||
foreach(module_name ${ZEPHYR_MODULE_NAMES})
|
||||
zephyr_string(SANITIZE TOUPPER MODULE_NAME_UPPER ${module_name})
|
||||
list(APPEND
|
||||
ZEPHYR_KCONFIG_MODULES_DIR
|
||||
"ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR=${ZEPHYR_${MODULE_NAME_UPPER}_MODULE_DIR}"
|
||||
)
|
||||
|
||||
if(ZEPHYR_${MODULE_NAME_UPPER}_KCONFIG)
|
||||
list(APPEND
|
||||
ZEPHYR_KCONFIG_MODULES_DIR
|
||||
"ZEPHYR_${MODULE_NAME_UPPER}_KCONFIG=${ZEPHYR_${MODULE_NAME_UPPER}_KCONFIG}"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# A list of common environment settings used when invoking Kconfig during CMake
|
||||
# configure time or menuconfig and related build target.
|
||||
string(REPLACE ";" "\\\;" SHIELD_AS_LIST_ESCAPED "${SHIELD_AS_LIST}")
|
||||
# cmake commands are escaped differently
|
||||
string(REPLACE ";" "\\;" SHIELD_AS_LIST_ESCAPED_COMMAND "${SHIELD_AS_LIST}")
|
||||
|
||||
set(COMMON_KCONFIG_ENV_SETTINGS
|
||||
PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
|
||||
srctree=${PROJECT_ROOT}
|
||||
KERNELVERSION=${KERNELVERSION}
|
||||
KCONFIG_CONFIG=${DOTCONFIG}
|
||||
# Set environment variables so that Kconfig can prune Kconfig source
|
||||
# files for other architectures
|
||||
ARCH=${ARCH}
|
||||
ARCH_DIR=${ARCH_DIR}
|
||||
BOARD_DIR=${BOARD_DIR}
|
||||
KCONFIG_BINARY_DIR=${KCONFIG_BINARY_DIR}
|
||||
TOOLCHAIN_KCONFIG_DIR=${TOOLCHAIN_KCONFIG_DIR}
|
||||
TOOLCHAIN_HAS_NEWLIB=$<IF:$<BOOL:${TOOLCHAIN_HAS_NEWLIB}>,y,n>
|
||||
EDT_PICKLE=${EDT_PICKLE}
|
||||
# Export all Zephyr modules to Kconfig
|
||||
${ZEPHYR_KCONFIG_MODULES_DIR}
|
||||
)
|
||||
|
||||
# Allow out-of-tree users to add their own Kconfig python frontend
|
||||
# targets by appending targets to the CMake list
|
||||
# 'EXTRA_KCONFIG_TARGETS' and setting variables named
|
||||
# 'EXTRA_KCONFIG_TARGET_COMMAND_FOR_<target>'
|
||||
#
|
||||
# e.g.
|
||||
# cmake -DEXTRA_KCONFIG_TARGETS=cli
|
||||
# -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_cli=cli_kconfig_frontend.py
|
||||
|
||||
set(EXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig
|
||||
${PROJECT_ROOT}/scripts/kconfig/menuconfig.py
|
||||
)
|
||||
|
||||
set(EXTRA_KCONFIG_TARGET_COMMAND_FOR_guiconfig
|
||||
${PROJECT_ROOT}/scripts/kconfig/guiconfig.py
|
||||
)
|
||||
|
||||
set(EXTRA_KCONFIG_TARGET_COMMAND_FOR_hardenconfig
|
||||
${PROJECT_ROOT}/scripts/kconfig/hardenconfig.py
|
||||
)
|
||||
|
||||
foreach(kconfig_target
|
||||
menuconfig
|
||||
guiconfig
|
||||
hardenconfig
|
||||
${EXTRA_KCONFIG_TARGETS}
|
||||
)
|
||||
add_custom_target(
|
||||
${kconfig_target}
|
||||
${CMAKE_COMMAND} -E env
|
||||
PROJECT_ROOT=${PROJECT_ROOT}
|
||||
ZEPHYR_TOOLCHAIN_VARIANT=${ZEPHYR_TOOLCHAIN_VARIANT}
|
||||
${COMMON_KCONFIG_ENV_SETTINGS}
|
||||
"SHIELD_AS_LIST=${SHIELD_AS_LIST_ESCAPED}"
|
||||
DTS_POST_CPP=${DTS_POST_CPP}
|
||||
DTS_ROOT_BINDINGS=${DTS_ROOT_BINDINGS}
|
||||
${PYTHON_EXECUTABLE}
|
||||
${EXTRA_KCONFIG_TARGET_COMMAND_FOR_${kconfig_target}}
|
||||
${KCONFIG_ROOT}
|
||||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/kconfig
|
||||
USES_TERMINAL
|
||||
COMMAND_EXPAND_LISTS
|
||||
)
|
||||
endforeach()
|
||||
|
||||
# Support assigning Kconfig symbols on the command-line with CMake
|
||||
# cache variables prefixed with 'CONFIG_'. This feature is
|
||||
# experimental and undocumented until it has undergone more
|
||||
# user-testing.
|
||||
unset(EXTRA_KCONFIG_OPTIONS)
|
||||
get_cmake_property(cache_variable_names CACHE_VARIABLES)
|
||||
foreach (name ${cache_variable_names})
|
||||
if("${name}" MATCHES "^CONFIG_")
|
||||
# When a cache variable starts with 'CONFIG_', it is assumed to be
|
||||
# a Kconfig symbol assignment from the CMake command line.
|
||||
set(EXTRA_KCONFIG_OPTIONS
|
||||
"${EXTRA_KCONFIG_OPTIONS}\n${name}=${${name}}"
|
||||
)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
if(EXTRA_KCONFIG_OPTIONS)
|
||||
set(EXTRA_KCONFIG_OPTIONS_FILE ${PROJECT_BINARY_DIR}/misc/generated/extra_kconfig_options.conf)
|
||||
file(WRITE
|
||||
${EXTRA_KCONFIG_OPTIONS_FILE}
|
||||
${EXTRA_KCONFIG_OPTIONS}
|
||||
)
|
||||
endif()
|
||||
|
||||
# Bring in extra configuration files dropped in by the user or anyone else;
|
||||
# make sure they are set at the end so we can override any other setting
|
||||
file(GLOB config_files ${APPLICATION_BINARY_DIR}/*.conf)
|
||||
list(SORT config_files)
|
||||
set(
|
||||
merge_config_files
|
||||
${BOARD_DEFCONFIG}
|
||||
${CONF_FILE_AS_LIST}
|
||||
${shield_conf_files}
|
||||
${OVERLAY_CONFIG_AS_LIST}
|
||||
${EXTRA_KCONFIG_OPTIONS_FILE}
|
||||
${config_files}
|
||||
)
|
||||
|
||||
# Create a list of absolute paths to the .config sources from
|
||||
# merge_config_files, which is a mix of absolute and relative paths.
|
||||
set(merge_config_files_with_absolute_paths "")
|
||||
foreach(f ${merge_config_files})
|
||||
if(IS_ABSOLUTE ${f})
|
||||
set(path ${f})
|
||||
else()
|
||||
set(path ${APPLICATION_CONFIG_DIR}/${f})
|
||||
endif()
|
||||
|
||||
list(APPEND merge_config_files_with_absolute_paths ${path})
|
||||
endforeach()
|
||||
set(merge_config_files ${merge_config_files_with_absolute_paths})
|
||||
|
||||
foreach(f ${merge_config_files})
|
||||
if(NOT EXISTS ${f} OR IS_DIRECTORY ${f})
|
||||
message(FATAL_ERROR "File not found: ${f}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Calculate a checksum of merge_config_files to determine if we need
|
||||
# to re-generate .config
|
||||
set(merge_config_files_checksum "")
|
||||
foreach(f ${merge_config_files})
|
||||
file(MD5 ${f} checksum)
|
||||
set(merge_config_files_checksum "${merge_config_files_checksum}${checksum}")
|
||||
endforeach()
|
||||
|
||||
# Create a new .config if it does not exists, or if the checksum of
|
||||
# the dependencies has changed
|
||||
set(merge_config_files_checksum_file ${PROJECT_BINARY_DIR}/.cmake.dotconfig.checksum)
|
||||
set(CREATE_NEW_DOTCONFIG 1)
|
||||
# Check if the checksum file exists too before trying to open it, though it
|
||||
# should under normal circumstances
|
||||
if(EXISTS ${DOTCONFIG} AND EXISTS ${merge_config_files_checksum_file})
|
||||
# Read out what the checksum was previously
|
||||
file(READ
|
||||
${merge_config_files_checksum_file}
|
||||
merge_config_files_checksum_prev
|
||||
)
|
||||
if(
|
||||
${merge_config_files_checksum} STREQUAL
|
||||
${merge_config_files_checksum_prev}
|
||||
)
|
||||
# Checksum is the same as before
|
||||
set(CREATE_NEW_DOTCONFIG 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(CREATE_NEW_DOTCONFIG)
|
||||
set(input_configs_are_handwritten --handwritten-input-configs)
|
||||
set(input_configs ${merge_config_files})
|
||||
else()
|
||||
set(input_configs ${DOTCONFIG})
|
||||
endif()
|
||||
|
||||
execute_process(
|
||||
COMMAND ${CMAKE_COMMAND} -E env
|
||||
${COMMON_KCONFIG_ENV_SETTINGS}
|
||||
SHIELD_AS_LIST=${SHIELD_AS_LIST_ESCAPED_COMMAND}
|
||||
${PYTHON_EXECUTABLE}
|
||||
${PROJECT_ROOT}/scripts/kconfig/kconfig.py
|
||||
--project-base=${PROJECT_ROOT}
|
||||
${input_configs_are_handwritten}
|
||||
${KCONFIG_ROOT}
|
||||
${DOTCONFIG}
|
||||
${AUTOCONF_H}
|
||||
${PARSED_KCONFIG_SOURCES_TXT}
|
||||
${input_configs}
|
||||
WORKING_DIRECTORY ${PROJECT_ROOT}
|
||||
# The working directory is set to the app dir such that the user
|
||||
# can use relative paths in CONF_FILE, e.g. CONF_FILE=nrf5.conf
|
||||
RESULT_VARIABLE ret
|
||||
)
|
||||
if(NOT "${ret}" STREQUAL "0")
|
||||
message(FATAL_ERROR "command failed with return code: ${ret}")
|
||||
endif()
|
||||
|
||||
if(CREATE_NEW_DOTCONFIG)
|
||||
# Write the new configuration fragment checksum. Only do this if kconfig.py
|
||||
# succeeds, to avoid marking zephyr/.config as up-to-date when it hasn't been
|
||||
# regenerated.
|
||||
file(WRITE ${merge_config_files_checksum_file}
|
||||
${merge_config_files_checksum})
|
||||
endif()
|
||||
|
||||
# Read out the list of 'Kconfig' sources that were used by the engine.
|
||||
file(STRINGS ${PARSED_KCONFIG_SOURCES_TXT} PARSED_KCONFIG_SOURCES_LIST)
|
||||
|
||||
# Force CMAKE configure when the Kconfig sources or configuration files changes.
|
||||
foreach(kconfig_input
|
||||
${merge_config_files}
|
||||
${DOTCONFIG}
|
||||
${PARSED_KCONFIG_SOURCES_LIST}
|
||||
)
|
||||
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${kconfig_input})
|
||||
endforeach()
|
||||
|
||||
add_custom_target(config-twister DEPENDS ${DOTCONFIG})
|
||||
|
||||
# Remove the CLI Kconfig symbols from the namespace and
|
||||
# CMakeCache.txt. If the symbols end up in DOTCONFIG they will be
|
||||
# re-introduced to the namespace through 'import_kconfig'.
|
||||
foreach (name ${cache_variable_names})
|
||||
if("${name}" MATCHES "^CONFIG_")
|
||||
unset(${name})
|
||||
unset(${name} CACHE)
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
# Parse the lines prefixed with CONFIG_ in the .config file from Kconfig
|
||||
import_kconfig(CONFIG_ ${DOTCONFIG})
|
||||
|
||||
# Re-introduce the CLI Kconfig symbols that survived
|
||||
foreach (name ${cache_variable_names})
|
||||
if("${name}" MATCHES "^CONFIG_")
|
||||
if(DEFINED ${name})
|
||||
set(${name} ${${name}} CACHE STRING "")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
|
@ -1,45 +0,0 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# On Windows, instruct Python to output UTF-8 even when not
|
||||
# interacting with a terminal. This is required since Python scripts
|
||||
# are invoked by CMake code and, on Windows, standard I/O encoding defaults
|
||||
# to the current code page if not connected to a terminal, which is often
|
||||
# not what we want.
|
||||
if (WIN32)
|
||||
set(ENV{PYTHONIOENCODING} "utf-8")
|
||||
endif()
|
||||
|
||||
set(PYTHON_MINIMUM_REQUIRED 3.6)
|
||||
|
||||
# We are using foreach here, instead of find_program(PYTHON_EXECUTABLE_SYSTEM_DEFAULT "python" "python3")
|
||||
# cause just using find_program directly could result in a python2.7 as python, and not finding a valid python3.
|
||||
foreach(PYTHON_PREFER ${PYTHON_PREFER} ${WEST_PYTHON} "python" "python3")
|
||||
find_program(PYTHON_PREFER_EXECUTABLE ${PYTHON_PREFER})
|
||||
if(PYTHON_PREFER_EXECUTABLE)
|
||||
execute_process (COMMAND "${PYTHON_PREFER_EXECUTABLE}" -c
|
||||
"import sys; sys.stdout.write('.'.join([str(x) for x in sys.version_info[:2]]))"
|
||||
RESULT_VARIABLE result
|
||||
OUTPUT_VARIABLE version
|
||||
ERROR_QUIET
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(version VERSION_LESS PYTHON_MINIMUM_REQUIRED)
|
||||
set(PYTHON_PREFER_EXECUTABLE "PYTHON_PREFER_EXECUTABLE-NOTFOUND")
|
||||
else()
|
||||
set(PYTHON_MINIMUM_REQUIRED ${version})
|
||||
set(PYTHON_EXACT EXACT)
|
||||
# Python3_ROOT_DIR ensures that location will be preferred by FindPython3.
|
||||
# On Linux, this has no impact as it will usually be /usr/bin
|
||||
# but on Windows it solve issues when both 32 and 64 bit versions are
|
||||
# installed, as version is not enough and FindPython3 might pick the
|
||||
# version not on %PATH%. Setting Python3_ROOT_DIR ensures we are using
|
||||
# the version we just tested.
|
||||
get_filename_component(PYTHON_PATH ${PYTHON_PREFER_EXECUTABLE} DIRECTORY)
|
||||
set(Python3_ROOT_DIR ${PYTHON_PATH})
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
find_package(Python3 ${PYTHON_MINIMUM_REQUIRED} REQUIRED ${PYTHON_EXACT})
|
||||
set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
|
@ -1,16 +0,0 @@
|
|||
#set(PROJECT_ROOT ${CMAKE_SOURCE_DIR})
|
||||
set(PROJECT_ROOT ENV{PROJECT_ROOT})
|
||||
set(ENV{PROJECT_ROOT} ${PROJECT_ROOT})
|
||||
set(KCONFIG_ROOT ${CMAKE_SOURCE_DIR}/Kconfig)
|
||||
set(BOARD_DIR ${CMAKE_SOURCE_DIR}/configs)
|
||||
# set(AUTOCONF_H ${CMAKE_CURRENT_BINARY_DIR}/kconfig/include/generated/autoconf.h)
|
||||
|
||||
# # Re-configure (Re-execute all CMakeLists.txt code) when autoconf.h changes
|
||||
# set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${AUTOCONF_H})
|
||||
|
||||
#include(../../cmake/extensions.cmake)
|
||||
include(../../cmake/python.cmake)
|
||||
include(../../cmake/kconfig.cmake)
|
||||
|
||||
find_package(bouffalo_sdk REQUIRED HINTS $ENV{BL_SDK_BASE})
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
target remote 10.100.201.177:1025
|
||||
#load
|
||||
thb main
|
||||
set disassemble-next-line on
|
||||
set mem inaccessible-by-default off
|
|
@ -1,59 +0,0 @@
|
|||
# Install script for directory: /home/fish/bl808/ox64_coproc/d0
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "TRUE")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("/home/fish/bl808/ox64_coproc/d0/build_out/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("/home/fish/bl808/ox64_coproc/d0/build_out/ipc/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("/home/fish/bl808/ox64_coproc/d0/build_out/rpmsg-lite/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
if(CMAKE_INSTALL_COMPONENT)
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest_${CMAKE_INSTALL_COMPONENT}.txt")
|
||||
else()
|
||||
set(CMAKE_INSTALL_MANIFEST "install_manifest.txt")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
file(WRITE "/home/fish/bl808/ox64_coproc/d0/${CMAKE_INSTALL_MANIFEST}"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
|
@ -1,235 +0,0 @@
|
|||
/****************************************************************************************
|
||||
* @file flash.ld
|
||||
*
|
||||
* @brief This file is the link script file (gnuarm or armgcc).
|
||||
*
|
||||
* Copyright (C) BouffaloLab 2021
|
||||
*
|
||||
****************************************************************************************
|
||||
*/
|
||||
|
||||
/* configure the CPU type */
|
||||
OUTPUT_ARCH( "riscv" )
|
||||
/* link with the standard c library */
|
||||
INPUT(-lc)
|
||||
/* link with the standard GCC library */
|
||||
INPUT(-lgcc)
|
||||
/* configure the entry point */
|
||||
ENTRY(__start)
|
||||
|
||||
StackSize = 0x0400; /* 1KB */
|
||||
HeapMinSize = 0x1000; /* 4KB */
|
||||
|
||||
MEMORY
|
||||
{
|
||||
xip_memory (rx) : ORIGIN = 0x58000000, LENGTH = 1M
|
||||
itcm_memory (rx) : ORIGIN = 0x3effc000, LENGTH = 17K
|
||||
dtcm_memory (rx) : ORIGIN = 0x3f000400, LENGTH = 31K
|
||||
ram_memory (!rx) : ORIGIN = 0x3ef80000, LENGTH = 32K
|
||||
xram_memory (!rx) : ORIGIN = 0x40004000, LENGTH = 16K
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
PROVIDE(__metal_chicken_bit = 0);
|
||||
|
||||
.text :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__text_code_start__ = .;
|
||||
|
||||
KEEP(*startup*.*o(*.text*))
|
||||
KEEP (*(SORT_NONE(_start)))
|
||||
KEEP (*(SORT_NONE(Reset_Handler)))
|
||||
|
||||
/* section information for shell */
|
||||
. = ALIGN(4);
|
||||
__fsymtab_start = .;
|
||||
KEEP(*(FSymTab))
|
||||
__fsymtab_end = .;
|
||||
|
||||
. = ALIGN(4);
|
||||
__vsymtab_start = .;
|
||||
KEEP(*(VSymTab))
|
||||
__vsymtab_end = .;
|
||||
|
||||
/* section information for usb desc */
|
||||
. = ALIGN(4);
|
||||
_usb_desc_start = .;
|
||||
KEEP(*(usb_desc))
|
||||
. = ALIGN(4);
|
||||
_usb_desc_end = .;
|
||||
|
||||
*(.text)
|
||||
*(.text.*)
|
||||
|
||||
/*put .rodata**/
|
||||
*(EXCLUDE_FILE( *bl808_glb*.o* \
|
||||
*bl808_pds*.o* \
|
||||
*bl808_common*.o* \
|
||||
*bl808_sf_cfg*.o* \
|
||||
*bl808_sf_ctrl*.o* \
|
||||
*bl808_sflash*.o* \
|
||||
*bl808_xip_sflash*.o* \
|
||||
*bl808_ef_ctrl*.o* \
|
||||
*bl808_sf_cfg_ext*.o* \
|
||||
*bl808_sflash_ext*.o* \
|
||||
*bl808_xip_sflash_ext*.o*) .rodata*)
|
||||
*(.rodata)
|
||||
*(.rodata.*)
|
||||
|
||||
*(.srodata)
|
||||
*(.srodata.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__text_code_end__ = .;
|
||||
} > xip_memory
|
||||
|
||||
. = ALIGN(4);
|
||||
__itcm_load_addr = .;
|
||||
|
||||
.itcm_region : AT (__itcm_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__tcm_code_start__ = .;
|
||||
|
||||
*(.tcm_code.*)
|
||||
*(.tcm_const.*)
|
||||
*(.sclock_rlt_code.*)
|
||||
*(.sclock_rlt_const.*)
|
||||
|
||||
*bl808_glb*.o*(.rodata*)
|
||||
*bl808_pds*.o*(.rodata*)
|
||||
*bl808_common*.o*(.rodata*)
|
||||
*bl808_sf_cfg*.o*(.rodata*)
|
||||
*bl808_sf_ctrl*.o*(.rodata*)
|
||||
*bl808_sflash*.o*(.rodata*)
|
||||
*bl808_xip_sflash*.o*(.rodata*)
|
||||
*bl808_ef_ctrl*.o*(.rodata*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__tcm_code_end__ = .;
|
||||
} > itcm_memory
|
||||
|
||||
__dtcm_load_addr = __itcm_load_addr + SIZEOF(.itcm_region);
|
||||
|
||||
.dtcm_region : AT (__dtcm_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__tcm_data_start__ = .;
|
||||
|
||||
*(.tcm_data)
|
||||
/* *finger_print.o(.data*) */
|
||||
|
||||
. = ALIGN(4);
|
||||
__tcm_data_end__ = .;
|
||||
} > dtcm_memory
|
||||
|
||||
/*************************************************************************/
|
||||
/* .stack_dummy section doesn't contains any symbols. It is only
|
||||
* used for linker to calculate size of stack sections, and assign
|
||||
* values to stack symbols later */
|
||||
.stack_dummy (NOLOAD):
|
||||
{
|
||||
. = ALIGN(0x4);
|
||||
. = . + StackSize;
|
||||
. = ALIGN(0x4);
|
||||
} > dtcm_memory
|
||||
|
||||
/* Set stack top to end of RAM, and stack limit move down by
|
||||
* size of stack_dummy section */
|
||||
__StackTop = ORIGIN(dtcm_memory) + LENGTH(dtcm_memory);
|
||||
PROVIDE( __freertos_irq_stack_top = __StackTop);
|
||||
__StackLimit = __StackTop - SIZEOF(.stack_dummy);
|
||||
|
||||
/* Check if data + heap + stack exceeds RAM limit */
|
||||
ASSERT(__StackLimit >= __tcm_data_end__, "region RAM overflowed with stack")
|
||||
/*************************************************************************/
|
||||
|
||||
__system_ram_load_addr = __dtcm_load_addr + SIZEOF(.dtcm_region);
|
||||
|
||||
.system_ram_data_region : AT (__system_ram_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__system_ram_data_start__ = .;
|
||||
|
||||
*(.system_ram)
|
||||
|
||||
. = ALIGN(4);
|
||||
__system_ram_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.system_ram_noinit_data_region (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
*(.system_ram_noinit)
|
||||
|
||||
. = ALIGN(4);
|
||||
} > ram_memory
|
||||
|
||||
__ram_load_addr = __system_ram_load_addr + SIZEOF(.system_ram_data_region);
|
||||
|
||||
/* Data section */
|
||||
RAM_DATA : AT (__ram_load_addr)
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__ram_data_start__ = .;
|
||||
|
||||
PROVIDE( __global_pointer$ = . + 0x800 );
|
||||
|
||||
*(.data)
|
||||
*(.data.*)
|
||||
*(.sdata)
|
||||
*(.sdata.*)
|
||||
*(.sdata2)
|
||||
*(.sdata2.*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__ram_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
__etext_final = (__ram_load_addr + SIZEOF (RAM_DATA));
|
||||
ASSERT(__etext_final <= ORIGIN(xip_memory) + LENGTH(xip_memory), "code memory overflow")
|
||||
|
||||
.bss (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__bss_start__ = .;
|
||||
|
||||
*(.bss*)
|
||||
*(.sbss*)
|
||||
*(COMMON)
|
||||
|
||||
. = ALIGN(4);
|
||||
__bss_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.noinit_data (NOLOAD) :
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__noinit_data_start__ = .;
|
||||
|
||||
*(.noinit_data*)
|
||||
|
||||
. = ALIGN(4);
|
||||
__noinit_data_end__ = .;
|
||||
} > ram_memory
|
||||
|
||||
.heap (NOLOAD):
|
||||
{
|
||||
. = ALIGN(4);
|
||||
__HeapBase = .;
|
||||
|
||||
/*__end__ = .;*/
|
||||
/*end = __end__;*/
|
||||
KEEP(*(.heap*))
|
||||
|
||||
. = ALIGN(4);
|
||||
__HeapLimit = .;
|
||||
} > ram_memory
|
||||
|
||||
__HeapLimit = ORIGIN(ram_memory) + LENGTH(ram_memory);
|
||||
ASSERT(__HeapLimit - __HeapBase >= HeapMinSize, "heap region overflow")
|
||||
|
||||
}
|
||||
|
|
@ -51,7 +51,7 @@ const pmp_config_entry_t pmp_entry_tab[8] = {
|
|||
[0] = {
|
||||
.entry_flag = ENTRY_FLAG_ADDR_NAPOT | ENTRY_FLAG_PERM_W | ENTRY_FLAG_PERM_R,
|
||||
.entry_pa_base = 0x20000000,
|
||||
.entry_pa_length = PMP_REG_SZ_1M,
|
||||
.entry_pa_length = 0x10000,
|
||||
},
|
||||
|
||||
[1] = {
|
||||
|
|
24
m0/.vscode/launch.json
vendored
24
m0/.vscode/launch.json
vendored
|
@ -8,7 +8,7 @@
|
|||
"type": "gdb",
|
||||
"request": "attach",
|
||||
"name": "Debug Microcontroller",
|
||||
"target": "extended-remote 172.28.203.211:1025",
|
||||
"target": "extended-remote 10.100.201.177:1025",
|
||||
"executable": "${workspaceRoot}/build/build_out/ox64_coproc_bl808_m0.elf",
|
||||
"cwd": "${workspaceRoot}",
|
||||
"gdbpath": "gdb-multiarch",
|
||||
|
@ -19,7 +19,7 @@
|
|||
// "monitor tpwr enable",
|
||||
// "monitor swdp_scan",
|
||||
// "attach 1",
|
||||
"file ${workspaceRoot}/build/build_out/ox64_coproc_bl808_m0.elf",
|
||||
//"file ${workspaceRoot}/build/build_out/ox64_coproc_bl808_m0.elf",
|
||||
"set mem inaccessible-by-default off",
|
||||
//"set architecture riscv:rv32",
|
||||
"set remotetimeout 250",
|
||||
|
@ -30,17 +30,17 @@
|
|||
//"set $mie=0",
|
||||
//"set $mstatus=0x1880",
|
||||
"thb main",
|
||||
// "mem 0x40000000 0x40004000 rw",
|
||||
// "mem 0x3f000000 0x3f018000 rw",
|
||||
// "mem 0x3efe8000 0x3f068000 rw",
|
||||
// "mem 0x22030000 0x22058000 rw",
|
||||
// "mem 0x22020000 0x22030000 rw",
|
||||
"mem 0x40000000 0x40004000 rw",
|
||||
"mem 0x3f000000 0x3f018000 rw",
|
||||
"mem 0x3efe8000 0x3f068000 rw",
|
||||
"mem 0x22030000 0x22058000 rw",
|
||||
"mem 0x22020000 0x22030000 rw",
|
||||
//"#rom",
|
||||
// "mem 0x90000000 0x90020000 ro",
|
||||
// //"#psram",
|
||||
// "mem 0x50000000 0x58000000 rw",
|
||||
// //"#flash",
|
||||
// "mem 0x58000000 0x60000000 ro",
|
||||
"mem 0x90000000 0x90020000 ro",
|
||||
//"#psram",
|
||||
"mem 0x50000000 0x58000000 rw",
|
||||
//"#flash",
|
||||
"mem 0x58000000 0x60000000 ro",
|
||||
"set $pc=0x58000000",
|
||||
"set $mie=0",
|
||||
"set $mstatus=0x1880",
|
||||
|
|
|
@ -1,134 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
# diffconfig - a tool to compare .config files.
|
||||
#
|
||||
# originally written in 2006 by Matt Mackall
|
||||
# (at least, this was in his bloatwatch source code)
|
||||
# last worked on 2008 by Tim Bird
|
||||
#
|
||||
|
||||
import sys, os
|
||||
|
||||
def usage():
|
||||
print("""Usage: diffconfig [-h] [-m] [<config1> <config2>]
|
||||
|
||||
Diffconfig is a simple utility for comparing two .config files.
|
||||
Using standard diff to compare .config files often includes extraneous and
|
||||
distracting information. This utility produces sorted output with only the
|
||||
changes in configuration values between the two files.
|
||||
|
||||
Added and removed items are shown with a leading plus or minus, respectively.
|
||||
Changed items show the old and new values on a single line.
|
||||
|
||||
If -m is specified, then output will be in "merge" style, which has the
|
||||
changed and new values in kernel config option format.
|
||||
|
||||
If no config files are specified, .config and .config.old are used.
|
||||
|
||||
Example usage:
|
||||
$ diffconfig .config config-with-some-changes
|
||||
-EXT2_FS_XATTR n
|
||||
-EXT2_FS_XIP n
|
||||
CRAMFS n -> y
|
||||
EXT2_FS y -> n
|
||||
LOG_BUF_SHIFT 14 -> 16
|
||||
PRINTK_TIME n -> y
|
||||
""")
|
||||
sys.exit(0)
|
||||
|
||||
# returns a dictionary of name/value pairs for config items in the file
|
||||
def readconfig(config_file):
|
||||
d = {}
|
||||
for line in config_file:
|
||||
line = line[:-1]
|
||||
if line[:7] == "CONFIG_":
|
||||
name, val = line[7:].split("=", 1)
|
||||
d[name] = val
|
||||
if line[-11:] == " is not set":
|
||||
d[line[9:-11]] = "n"
|
||||
return d
|
||||
|
||||
def print_config(op, config, value, new_value):
|
||||
global merge_style
|
||||
|
||||
if merge_style:
|
||||
if new_value:
|
||||
if new_value=="n":
|
||||
print("# CONFIG_%s is not set" % config)
|
||||
else:
|
||||
print("CONFIG_%s=%s" % (config, new_value))
|
||||
else:
|
||||
if op=="-":
|
||||
print("-%s %s" % (config, value))
|
||||
elif op=="+":
|
||||
print("+%s %s" % (config, new_value))
|
||||
else:
|
||||
print(" %s %s -> %s" % (config, value, new_value))
|
||||
|
||||
def main():
|
||||
global merge_style
|
||||
|
||||
# parse command line args
|
||||
if ("-h" in sys.argv or "--help" in sys.argv):
|
||||
usage()
|
||||
|
||||
merge_style = 0
|
||||
if "-m" in sys.argv:
|
||||
merge_style = 1
|
||||
sys.argv.remove("-m")
|
||||
|
||||
argc = len(sys.argv)
|
||||
if not (argc==1 or argc == 3):
|
||||
print("Error: incorrect number of arguments or unrecognized option")
|
||||
usage()
|
||||
|
||||
if argc == 1:
|
||||
# if no filenames given, assume .config and .config.old
|
||||
build_dir=""
|
||||
if "KBUILD_OUTPUT" in os.environ:
|
||||
build_dir = os.environ["KBUILD_OUTPUT"]+"/"
|
||||
configa_filename = build_dir + ".config.old"
|
||||
configb_filename = build_dir + ".config"
|
||||
else:
|
||||
configa_filename = sys.argv[1]
|
||||
configb_filename = sys.argv[2]
|
||||
|
||||
try:
|
||||
a = readconfig(open(configa_filename))
|
||||
b = readconfig(open(configb_filename))
|
||||
except (IOError):
|
||||
e = sys.exc_info()[1]
|
||||
print("I/O error[%s]: %s\n" % (e.args[0],e.args[1]))
|
||||
usage()
|
||||
|
||||
# print items in a but not b (accumulate, sort and print)
|
||||
old = []
|
||||
for config in a:
|
||||
if config not in b:
|
||||
old.append(config)
|
||||
old.sort()
|
||||
for config in old:
|
||||
print_config("-", config, a[config], None)
|
||||
del a[config]
|
||||
|
||||
# print items that changed (accumulate, sort, and print)
|
||||
changed = []
|
||||
for config in a:
|
||||
if a[config] != b[config]:
|
||||
changed.append(config)
|
||||
else:
|
||||
del b[config]
|
||||
changed.sort()
|
||||
for config in changed:
|
||||
print_config("->", config, a[config], b[config])
|
||||
del b[config]
|
||||
|
||||
# now print items in b but not in a
|
||||
# (items from b that were in a were removed above)
|
||||
new = sorted(b.keys())
|
||||
for config in new:
|
||||
print_config("+", config, None, b[config])
|
||||
|
||||
main()
|
File diff suppressed because it is too large
Load diff
|
@ -1,80 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (c) 2019 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import csv
|
||||
import os
|
||||
|
||||
from kconfiglib import standard_kconfig
|
||||
|
||||
|
||||
def hardenconfig(kconf):
|
||||
kconf.load_config()
|
||||
|
||||
hardened_kconf_filename = os.path.join(os.environ['PROJECT_ROOT'],
|
||||
'scripts', 'kconfig', 'hardened.csv')
|
||||
|
||||
options = compare_with_hardened_conf(kconf, hardened_kconf_filename)
|
||||
|
||||
display_results(options)
|
||||
|
||||
|
||||
class Option:
|
||||
|
||||
def __init__(self, name, recommended, current=None, symbol=None):
|
||||
self.name = name
|
||||
self.recommended = recommended
|
||||
self.current = current
|
||||
self.symbol = symbol
|
||||
|
||||
if current is None:
|
||||
self.result = 'NA'
|
||||
elif recommended == current:
|
||||
self.result = 'PASS'
|
||||
else:
|
||||
self.result = 'FAIL'
|
||||
|
||||
|
||||
def compare_with_hardened_conf(kconf, hardened_kconf_filename):
|
||||
options = []
|
||||
|
||||
with open(hardened_kconf_filename) as csvfile:
|
||||
csvreader = csv.reader(csvfile)
|
||||
for row in csvreader:
|
||||
if len(row) > 1:
|
||||
name = row[0]
|
||||
recommended = row[1]
|
||||
try:
|
||||
symbol = kconf.syms[name]
|
||||
current = symbol.str_value
|
||||
except KeyError:
|
||||
symbol = None
|
||||
current = None
|
||||
options.append(Option(name=name, current=current,
|
||||
recommended=recommended, symbol=symbol))
|
||||
return options
|
||||
|
||||
|
||||
def display_results(options):
|
||||
# header
|
||||
print('{:^50}|{:^13}|{:^20}'.format('name', 'current', 'recommended'), end='')
|
||||
print('||{:^28}\n'.format('check result'), end='')
|
||||
print('=' * 116)
|
||||
|
||||
# results, only printing options that have failed for now. It simplify the readability.
|
||||
# TODO: add command line option to show all results
|
||||
for opt in options:
|
||||
if opt.result == 'FAIL' and opt.symbol.visibility != 0:
|
||||
print('CONFIG_{:<43}|{:^13}|{:^20}'.format(
|
||||
opt.name, opt.current, opt.recommended), end='')
|
||||
print('||{:^28}\n'.format(opt.result), end='')
|
||||
print()
|
||||
|
||||
|
||||
def main():
|
||||
hardenconfig(standard_kconfig())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -1,85 +0,0 @@
|
|||
HW_STACK_PROTECTION,y
|
||||
INIT_STACKS,n
|
||||
KERNEL_DEBUG,n
|
||||
BOOT_BANNER,n
|
||||
BOOT_DELAY,0
|
||||
THREAD_MONITOR,n
|
||||
THREAD_NAME,n
|
||||
STACK_CANARIES,y
|
||||
EXECUTE_XOR_WRITE,y
|
||||
STACK_POINTER_RANDOM,100
|
||||
BOUNDS_CHECK_BYPASS_MITIGATION,y
|
||||
PERFORMANCE_METRICS,n
|
||||
STATS,n
|
||||
DEBUG,n
|
||||
TRACING,n
|
||||
STACK_USAGE,n
|
||||
PRINTK,n
|
||||
EARLY_CONSOLE,n
|
||||
ASSERT,n
|
||||
OVERRIDE_FRAME_POINTER_DEFAULT,y
|
||||
DEBUG_INFO,n
|
||||
DEBUG_THREAD_INFO,n
|
||||
TRACING_CTF,n
|
||||
USE_SEGGER_RTT,n
|
||||
LOG,n
|
||||
SHELL,n
|
||||
TEST_RANDOM_GENERATOR,n
|
||||
ZTEST,n
|
||||
TEST,n
|
||||
TEST_SHELL,n
|
||||
TEST_EXTRA_STACKSIZE,0
|
||||
TEST_USERSPACE,n
|
||||
BUILD_OUTPUT_STRIPPED,y
|
||||
SOC_ATMEL_SAME70_DISABLE_ERASE_PIN,y
|
||||
SOC_ATMEL_SAME70_WAIT_MODE,n
|
||||
FAULT_DUMP,0
|
||||
EXCEPTION_DEBUG,n
|
||||
X86_MMU,y
|
||||
BUILTIN_STACK_GUARD,y
|
||||
MPU_STACK_GUARD,y
|
||||
STACK_SENTINEL,y
|
||||
BOOT_TIME_MEASUREMENT,n,experimental
|
||||
BT_A2DP,n,experimental
|
||||
BT_AVDTP,n,experimental
|
||||
BT_BREDR,n,experimental
|
||||
BT_H5,n,experimental,
|
||||
BT_HFP_HF,n,experimental
|
||||
BT_RFCOMM,n,experimental
|
||||
BT_DEBUG_SMP,n
|
||||
BT_OOB_DATA_FIXED,n
|
||||
BT_FIXED_PASSKEY,n
|
||||
BT_DEBUG_KEYS,n
|
||||
BT_LOG_SNIFFER_INFO,n
|
||||
BT_USE_DEBUG_KEYS,n
|
||||
BT_STORE_DEBUG_KEYS,n
|
||||
BT_CONN_DISABLE_SECURITY,n
|
||||
CAN_NET,n,experimental
|
||||
CONSOLE_SUBSYS,n,experimental
|
||||
CRYPTO,n,experimental
|
||||
CRYPTO_MBEDTLS_SHIM,n,experimental
|
||||
CRYPTO_TINYCRYPT_SHIM,n,experimental
|
||||
MODEM_CONTEXT,n,experimental
|
||||
NET_BUF_VARIABLE_DATA_SIZE,n,experimental
|
||||
NET_CONNECTION_MANAGER,n,experimental
|
||||
NET_GPTP,n,experimental
|
||||
NET_IPV4_AUTO,n,experimental
|
||||
NET_L2_CANBUS,n,experimental
|
||||
NET_L2_IEEE802154_SECURITY,n,experimental
|
||||
NET_L2_PPP,n,experimental
|
||||
NET_L2_PTP,n,experimental
|
||||
NET_OFFLOAD,n,experimental
|
||||
NET_PROMISCUOUS_MODE,n,experimental
|
||||
NET_SOCKETS_CAN,n,experimental
|
||||
NET_SOCKETS_ENABLE_DTLS,n,experimental
|
||||
NET_SOCKETS_NET_MGMT,n,experimental
|
||||
NET_SOCKETS_OFFLOAD,n,experimental
|
||||
NET_SOCKETS_SOCKOPT_TLS,n,experimental
|
||||
DEBUG_THREAD_INFO,n,experimental
|
||||
PERFORMANCE_METRICS,n,experimental
|
||||
SHELL_TELNET_SUPPORT_COMMAND,n,experimental
|
||||
SPI_SLAVE,n,experimental
|
||||
THREAD_MONITOR,n,experimental
|
||||
THREAD_NAME,n,experimental
|
||||
UART_ASYNC_API,n,experimental
|
||||
MCUMGR_CMD_FS_MGMT,n
|
Can't render this file because it has a wrong number of fields in line 42.
|
|
@ -1,278 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Writes/updates the zephyr/.config configuration file by merging configuration
|
||||
# files passed as arguments, e.g. board *_defconfig and application prj.conf
|
||||
# files.
|
||||
#
|
||||
# When fragments haven't changed, zephyr/.config is both the input and the
|
||||
# output, which just updates it. This is handled in the CMake files.
|
||||
#
|
||||
# Also does various checks (most via Kconfiglib warnings).
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
import textwrap
|
||||
|
||||
# Zephyr doesn't use tristate symbols. They're supported here just to make the
|
||||
# script a bit more generic.
|
||||
from kconfiglib import Kconfig, split_expr, expr_value, expr_str, BOOL, \
|
||||
TRISTATE, TRI_TO_STR, AND, OR
|
||||
|
||||
|
||||
def main():
|
||||
args = parse_args()
|
||||
|
||||
if args.project_base:
|
||||
os.environ['PROJECT_BASE'] = args.project_base
|
||||
|
||||
print("Parsing " + args.kconfig_file)
|
||||
kconf = Kconfig(args.kconfig_file, warn_to_stderr=False,
|
||||
suppress_traceback=True)
|
||||
|
||||
if args.handwritten_input_configs:
|
||||
# Warn for assignments to undefined symbols, but only for handwritten
|
||||
# fragments, to avoid warnings-turned-errors when using an old
|
||||
# configuration file together with updated Kconfig files
|
||||
kconf.warn_assign_undef = True
|
||||
|
||||
# prj.conf may override settings from the board configuration, so
|
||||
# disable warnings about symbols being assigned more than once
|
||||
kconf.warn_assign_override = False
|
||||
kconf.warn_assign_redun = False
|
||||
|
||||
# Load configuration files
|
||||
print(kconf.load_config(args.configs_in[0]))
|
||||
for config in args.configs_in[1:]:
|
||||
# replace=False creates a merged configuration
|
||||
print(kconf.load_config(config, replace=False))
|
||||
|
||||
if args.handwritten_input_configs:
|
||||
# Check that there are no assignments to promptless symbols, which
|
||||
# have no effect.
|
||||
#
|
||||
# This only makes sense when loading handwritten fragments and not when
|
||||
# loading zephyr/.config, because zephyr/.config is configuration
|
||||
# output and also assigns promptless symbols.
|
||||
check_no_promptless_assign(kconf)
|
||||
|
||||
# Print warnings for symbols that didn't get the assigned value. Only
|
||||
# do this for handwritten input too, to avoid likely unhelpful warnings
|
||||
# when using an old configuration and updating Kconfig files.
|
||||
check_assigned_sym_values(kconf)
|
||||
check_assigned_choice_values(kconf)
|
||||
|
||||
#if kconf.syms['WARN_EXPERIMENTAL'].tri_value == 2:
|
||||
# check_experimental(kconf)
|
||||
|
||||
# Hack: Force all symbols to be evaluated, to catch warnings generated
|
||||
# during evaluation. Wait till the end to write the actual output files, so
|
||||
# that we don't generate any output if there are warnings-turned-errors.
|
||||
#
|
||||
# Kconfiglib caches calculated symbol values internally, so this is still
|
||||
# fast.
|
||||
kconf.write_config(os.devnull)
|
||||
|
||||
if kconf.warnings:
|
||||
# Put a blank line between warnings to make them easier to read
|
||||
for warning in kconf.warnings:
|
||||
print("\n" + warning, file=sys.stderr)
|
||||
|
||||
# Turn all warnings into errors, so that e.g. assignments to undefined
|
||||
# Kconfig symbols become errors.
|
||||
#
|
||||
# A warning is generated by this script whenever a symbol gets a
|
||||
# different value than the one it was assigned. Keep that one as just a
|
||||
# warning for now.
|
||||
err("Aborting due to Kconfig warnings")
|
||||
|
||||
# Write the merged configuration and the C header
|
||||
print(kconf.write_config(args.config_out))
|
||||
print(kconf.write_autoconf(args.header_out))
|
||||
|
||||
# Write the list of parsed Kconfig files to a file
|
||||
write_kconfig_filenames(kconf, args.kconfig_list_out)
|
||||
|
||||
|
||||
def check_no_promptless_assign(kconf):
|
||||
# Checks that no promptless symbols are assigned
|
||||
|
||||
for sym in kconf.unique_defined_syms:
|
||||
if sym.user_value is not None and promptless(sym):
|
||||
err(f"""\
|
||||
{sym.name_and_loc} is assigned in a configuration file, but is not directly
|
||||
user-configurable (has no prompt). It gets its value indirectly from other
|
||||
symbols. """ + SYM_INFO_HINT.format(sym))
|
||||
|
||||
|
||||
def check_assigned_sym_values(kconf):
|
||||
# Verifies that the values assigned to symbols "took" (matches the value
|
||||
# the symbols actually got), printing warnings otherwise. Choice symbols
|
||||
# are checked separately, in check_assigned_choice_values().
|
||||
|
||||
for sym in kconf.unique_defined_syms:
|
||||
if sym.choice:
|
||||
continue
|
||||
|
||||
user_value = sym.user_value
|
||||
if user_value is None:
|
||||
continue
|
||||
|
||||
# Tristate values are represented as 0, 1, 2. Having them as "n", "m",
|
||||
# "y" is more convenient here, so convert.
|
||||
if sym.type in (BOOL, TRISTATE):
|
||||
user_value = TRI_TO_STR[user_value]
|
||||
|
||||
if user_value != sym.str_value:
|
||||
msg = f"{sym.name_and_loc} was assigned the value '{user_value}'" \
|
||||
f" but got the value '{sym.str_value}'. "
|
||||
|
||||
# List any unsatisfied 'depends on' dependencies in the warning
|
||||
mdeps = missing_deps(sym)
|
||||
if mdeps:
|
||||
expr_strs = []
|
||||
for expr in mdeps:
|
||||
estr = expr_str(expr)
|
||||
if isinstance(expr, tuple):
|
||||
# Add () around dependencies that aren't plain symbols.
|
||||
# Gives '(FOO || BAR) (=n)' instead of
|
||||
# 'FOO || BAR (=n)', which might be clearer.
|
||||
estr = f"({estr})"
|
||||
expr_strs.append(f"{estr} "
|
||||
f"(={TRI_TO_STR[expr_value(expr)]})")
|
||||
|
||||
msg += "Check these unsatisfied dependencies: " + \
|
||||
", ".join(expr_strs) + ". "
|
||||
|
||||
warn(msg + SYM_INFO_HINT.format(sym))
|
||||
|
||||
|
||||
def missing_deps(sym):
|
||||
# check_assigned_sym_values() helper for finding unsatisfied dependencies.
|
||||
#
|
||||
# Given direct dependencies
|
||||
#
|
||||
# depends on <expr> && <expr> && ... && <expr>
|
||||
#
|
||||
# on 'sym' (which can also come from e.g. a surrounding 'if'), returns a
|
||||
# list of all <expr>s with a value less than the value 'sym' was assigned
|
||||
# ("less" instead of "not equal" just to be general and handle tristates,
|
||||
# even though Zephyr doesn't use them).
|
||||
#
|
||||
# For string/int/hex symbols, just looks for <expr> = n.
|
||||
#
|
||||
# Note that <expr>s can be something more complicated than just a symbol,
|
||||
# like 'FOO || BAR' or 'FOO = "string"'.
|
||||
|
||||
deps = split_expr(sym.direct_dep, AND)
|
||||
|
||||
if sym.type in (BOOL, TRISTATE):
|
||||
return [dep for dep in deps if expr_value(dep) < sym.user_value]
|
||||
# string/int/hex
|
||||
return [dep for dep in deps if expr_value(dep) == 0]
|
||||
|
||||
|
||||
def check_assigned_choice_values(kconf):
|
||||
# Verifies that any choice symbols that were selected (by setting them to
|
||||
# y) ended up as the selection, printing warnings otherwise.
|
||||
#
|
||||
# We check choice symbols separately to avoid warnings when two different
|
||||
# choice symbols within the same choice are set to y. This might happen if
|
||||
# a choice selection from a board defconfig is overridden in a prj.conf,
|
||||
# for example. The last choice symbol set to y becomes the selection (and
|
||||
# all other choice symbols get the value n).
|
||||
#
|
||||
# Without special-casing choices, we'd detect that the first symbol set to
|
||||
# y ended up as n, and print a spurious warning.
|
||||
|
||||
for choice in kconf.unique_choices:
|
||||
if choice.user_selection and \
|
||||
choice.user_selection is not choice.selection:
|
||||
|
||||
warn(f"""\
|
||||
The choice symbol {choice.user_selection.name_and_loc} was selected (set =y),
|
||||
but {choice.selection.name_and_loc if choice.selection else "no symbol"} ended
|
||||
up as the choice selection. """ + SYM_INFO_HINT.format(choice.user_selection))
|
||||
|
||||
|
||||
# Hint on where to find symbol information. Used like
|
||||
# SYM_INFO_HINT.format(sym).
|
||||
SYM_INFO_HINT = """\
|
||||
See http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_{0.name}.html
|
||||
and/or look up {0.name} in the menuconfig/guiconfig interface. The Application
|
||||
Development Primer, Setting Configuration Values, and Kconfig - Tips and Best
|
||||
Practices sections of the manual might be helpful too.\
|
||||
"""
|
||||
|
||||
|
||||
def check_experimental(kconf):
|
||||
experimental = kconf.syms['EXPERIMENTAL']
|
||||
dep_expr = experimental.rev_dep
|
||||
|
||||
if dep_expr is not kconf.n:
|
||||
selectors = [s for s in split_expr(dep_expr, OR) if expr_value(s) == 2]
|
||||
for selector in selectors:
|
||||
selector_name = split_expr(selector, AND)[0].name
|
||||
warn(f'Experimental symbol {selector_name} is enabled.')
|
||||
|
||||
|
||||
def promptless(sym):
|
||||
# Returns True if 'sym' has no prompt. Since the symbol might be defined in
|
||||
# multiple locations, we need to check all locations.
|
||||
|
||||
return not any(node.prompt for node in sym.nodes)
|
||||
|
||||
|
||||
def write_kconfig_filenames(kconf, kconfig_list_path):
|
||||
# Writes a sorted list with the absolute paths of all parsed Kconfig files
|
||||
# to 'kconfig_list_path'. The paths are realpath()'d, and duplicates are
|
||||
# removed. This file is used by CMake to look for changed Kconfig files. It
|
||||
# needs to be deterministic.
|
||||
|
||||
with open(kconfig_list_path, 'w') as out:
|
||||
for path in sorted({os.path.realpath(os.path.join(kconf.srctree, path))
|
||||
for path in kconf.kconfig_filenames}):
|
||||
print(path, file=out)
|
||||
|
||||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
parser.add_argument("--handwritten-input-configs",
|
||||
action="store_true",
|
||||
help="Assume the input configuration fragments are "
|
||||
"handwritten fragments and do additional checks "
|
||||
"on them, like no promptless symbols being "
|
||||
"assigned")
|
||||
parser.add_argument("--project-base",
|
||||
help="Path to current Zephyr installation")
|
||||
parser.add_argument("kconfig_file",
|
||||
help="Top-level Kconfig file")
|
||||
parser.add_argument("config_out",
|
||||
help="Output configuration file")
|
||||
parser.add_argument("header_out",
|
||||
help="Output header file")
|
||||
parser.add_argument("kconfig_list_out",
|
||||
help="Output file for list of parsed Kconfig files")
|
||||
parser.add_argument("configs_in",
|
||||
nargs="+",
|
||||
help="Input configuration fragments. Will be merged "
|
||||
"together.")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def warn(msg):
|
||||
# Use a large fill() width to try to avoid linebreaks in the symbol
|
||||
# reference link, and add some extra newlines to set the message off from
|
||||
# surrounding text (this usually gets printed as part of spammy CMake
|
||||
# output)
|
||||
print("\n" + textwrap.fill("warning: " + msg, 100) + "\n", file=sys.stderr)
|
||||
|
||||
|
||||
def err(msg):
|
||||
sys.exit("\n" + textwrap.fill("error: " + msg, 100) + "\n")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1,524 +0,0 @@
|
|||
# Copyright (c) 2018-2019 Linaro
|
||||
# Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import pickle
|
||||
import sys
|
||||
|
||||
KCONFIG_BASE = os.environ["PROJECT_ROOT"]
|
||||
sys.path.insert(0, os.path.join(KCONFIG_BASE, "scripts", "dts",
|
||||
"python-devicetree", "src"))
|
||||
|
||||
from devicetree import edtlib
|
||||
|
||||
# Types we support
|
||||
# 'string', 'int', 'hex', 'bool'
|
||||
|
||||
doc_mode = os.environ.get('KCONFIG_DOC_MODE') == "1"
|
||||
|
||||
if not doc_mode:
|
||||
EDT_PICKLE = os.environ.get("EDT_PICKLE")
|
||||
|
||||
# The "if" handles a missing dts.
|
||||
if EDT_PICKLE is not None and os.path.isfile(EDT_PICKLE):
|
||||
with open(EDT_PICKLE, 'rb') as f:
|
||||
edt = pickle.load(f)
|
||||
else:
|
||||
edt = None
|
||||
|
||||
|
||||
def _warn(kconf, msg):
|
||||
print("{}:{}: WARNING: {}".format(kconf.filename, kconf.linenr, msg))
|
||||
|
||||
|
||||
def _dt_units_to_scale(unit):
|
||||
if not unit:
|
||||
return 0
|
||||
if unit in {'k', 'K'}:
|
||||
return 10
|
||||
if unit in {'m', 'M'}:
|
||||
return 20
|
||||
if unit in {'g', 'G'}:
|
||||
return 30
|
||||
|
||||
|
||||
def dt_chosen_label(kconf, _, chosen):
|
||||
"""
|
||||
This function takes a 'chosen' property and treats that property as a path
|
||||
to an EDT node. If it finds an EDT node, it will look to see if that node
|
||||
has a "label" property and return the value of that "label", if not we
|
||||
return an empty string.
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return ""
|
||||
|
||||
node = edt.chosen_node(chosen)
|
||||
if not node:
|
||||
return ""
|
||||
|
||||
if "label" not in node.props:
|
||||
return ""
|
||||
|
||||
return node.props["label"].val
|
||||
|
||||
|
||||
def dt_chosen_enabled(kconf, _, chosen):
|
||||
"""
|
||||
This function returns "y" if /chosen contains a property named 'chosen'
|
||||
that points to an enabled node, and "n" otherwise
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
node = edt.chosen_node(chosen)
|
||||
return "y" if node and node.status == "okay" else "n"
|
||||
|
||||
|
||||
def dt_chosen_path(kconf, _, chosen):
|
||||
"""
|
||||
This function takes a /chosen node property and returns the path
|
||||
to the node in the property value, or the empty string.
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
node = edt.chosen_node(chosen)
|
||||
|
||||
return node.path if node else ""
|
||||
|
||||
|
||||
def dt_node_enabled(kconf, name, node):
|
||||
"""
|
||||
This function is used to test if a node is enabled (has status
|
||||
'okay') or not.
|
||||
|
||||
The 'node' argument is a string which is either a path or an
|
||||
alias, or both, depending on 'name'.
|
||||
|
||||
If 'name' is 'dt_path_enabled', 'node' is an alias or a path. If
|
||||
'name' is 'dt_alias_enabled, 'node' is an alias.
|
||||
"""
|
||||
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
if name == "dt_alias_enabled":
|
||||
if node.startswith("/"):
|
||||
# EDT.get_node() works with either aliases or paths. If we
|
||||
# are specifically being asked about an alias, reject paths.
|
||||
return "n"
|
||||
else:
|
||||
# Make sure this is being called appropriately.
|
||||
assert name == "dt_path_enabled"
|
||||
|
||||
try:
|
||||
node = edt.get_node(node)
|
||||
except edtlib.EDTError:
|
||||
return "n"
|
||||
|
||||
return "y" if node and node.status == "okay" else "n"
|
||||
|
||||
|
||||
def dt_nodelabel_enabled(kconf, _, label):
|
||||
"""
|
||||
This function is like dt_node_enabled(), but the 'label' argument
|
||||
should be a node label, like "foo" is here:
|
||||
|
||||
foo: some-node { ... };
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
node = edt.label2node.get(label)
|
||||
|
||||
return "y" if node and node.status == "okay" else "n"
|
||||
|
||||
|
||||
def _node_reg_addr(node, index, unit):
|
||||
if not node:
|
||||
return 0
|
||||
|
||||
if not node.regs:
|
||||
return 0
|
||||
|
||||
if int(index) >= len(node.regs):
|
||||
return 0
|
||||
|
||||
if node.regs[int(index)].addr is None:
|
||||
return 0
|
||||
|
||||
return node.regs[int(index)].addr >> _dt_units_to_scale(unit)
|
||||
|
||||
|
||||
def _node_reg_size(node, index, unit):
|
||||
if not node:
|
||||
return 0
|
||||
|
||||
if not node.regs:
|
||||
return 0
|
||||
|
||||
if int(index) >= len(node.regs):
|
||||
return 0
|
||||
|
||||
if node.regs[int(index)].size is None:
|
||||
return 0
|
||||
|
||||
return node.regs[int(index)].size >> _dt_units_to_scale(unit)
|
||||
|
||||
|
||||
def _node_int_prop(node, prop, unit=None):
|
||||
"""
|
||||
This function takes a 'node' and will look to see if that 'node' has a
|
||||
property called 'prop' and if that 'prop' is an integer type will return
|
||||
the value of the property 'prop' as either a string int or string hex
|
||||
value, if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if not node:
|
||||
return 0
|
||||
|
||||
if prop not in node.props:
|
||||
return 0
|
||||
|
||||
if node.props[prop].type != "int":
|
||||
return 0
|
||||
|
||||
return node.props[prop].val >> _dt_units_to_scale(unit)
|
||||
|
||||
|
||||
def _dt_chosen_reg_addr(kconf, chosen, index=0, unit=None):
|
||||
"""
|
||||
This function takes a 'chosen' property and treats that property as a path
|
||||
to an EDT node. If it finds an EDT node, it will look to see if that
|
||||
nodnode has a register at the given 'index' and return the address value of
|
||||
that reg, if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return 0
|
||||
|
||||
node = edt.chosen_node(chosen)
|
||||
|
||||
return _node_reg_addr(node, index, unit)
|
||||
|
||||
|
||||
def _dt_chosen_reg_size(kconf, chosen, index=0, unit=None):
|
||||
"""
|
||||
This function takes a 'chosen' property and treats that property as a path
|
||||
to an EDT node. If it finds an EDT node, it will look to see if that node
|
||||
has a register at the given 'index' and return the size value of that reg,
|
||||
if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return 0
|
||||
|
||||
node = edt.chosen_node(chosen)
|
||||
|
||||
return _node_reg_size(node, index, unit)
|
||||
|
||||
|
||||
def dt_chosen_reg(kconf, name, chosen, index=0, unit=None):
|
||||
"""
|
||||
This function just routes to the proper function and converts
|
||||
the result to either a string int or string hex value.
|
||||
"""
|
||||
if name == "dt_chosen_reg_size_int":
|
||||
return str(_dt_chosen_reg_size(kconf, chosen, index, unit))
|
||||
if name == "dt_chosen_reg_size_hex":
|
||||
return hex(_dt_chosen_reg_size(kconf, chosen, index, unit))
|
||||
if name == "dt_chosen_reg_addr_int":
|
||||
return str(_dt_chosen_reg_addr(kconf, chosen, index, unit))
|
||||
if name == "dt_chosen_reg_addr_hex":
|
||||
return hex(_dt_chosen_reg_addr(kconf, chosen, index, unit))
|
||||
|
||||
|
||||
def _dt_node_reg_addr(kconf, path, index=0, unit=None):
|
||||
"""
|
||||
This function takes a 'path' and looks for an EDT node at that path. If it
|
||||
finds an EDT node, it will look to see if that node has a register at the
|
||||
given 'index' and return the address value of that reg, if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return 0
|
||||
|
||||
try:
|
||||
node = edt.get_node(path)
|
||||
except edtlib.EDTError:
|
||||
return 0
|
||||
|
||||
return _node_reg_addr(node, index, unit)
|
||||
|
||||
|
||||
def _dt_node_reg_size(kconf, path, index=0, unit=None):
|
||||
"""
|
||||
This function takes a 'path' and looks for an EDT node at that path. If it
|
||||
finds an EDT node, it will look to see if that node has a register at the
|
||||
given 'index' and return the size value of that reg, if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return 0
|
||||
|
||||
try:
|
||||
node = edt.get_node(path)
|
||||
except edtlib.EDTError:
|
||||
return 0
|
||||
|
||||
return _node_reg_size(node, index, unit)
|
||||
|
||||
|
||||
def dt_node_reg(kconf, name, path, index=0, unit=None):
|
||||
"""
|
||||
This function just routes to the proper function and converts
|
||||
the result to either a string int or string hex value.
|
||||
"""
|
||||
if name == "dt_node_reg_size_int":
|
||||
return str(_dt_node_reg_size(kconf, path, index, unit))
|
||||
if name == "dt_node_reg_size_hex":
|
||||
return hex(_dt_node_reg_size(kconf, path, index, unit))
|
||||
if name == "dt_node_reg_addr_int":
|
||||
return str(_dt_node_reg_addr(kconf, path, index, unit))
|
||||
if name == "dt_node_reg_addr_hex":
|
||||
return hex(_dt_node_reg_addr(kconf, path, index, unit))
|
||||
|
||||
|
||||
def dt_node_has_bool_prop(kconf, _, path, prop):
|
||||
"""
|
||||
This function takes a 'path' and looks for an EDT node at that path. If it
|
||||
finds an EDT node, it will look to see if that node has a boolean property
|
||||
by the name of 'prop'. If the 'prop' exists it will return "y" otherwise
|
||||
we return "n".
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
try:
|
||||
node = edt.get_node(path)
|
||||
except edtlib.EDTError:
|
||||
return "n"
|
||||
|
||||
if prop not in node.props:
|
||||
return "n"
|
||||
|
||||
if node.props[prop].type != "boolean":
|
||||
return "n"
|
||||
|
||||
if node.props[prop].val:
|
||||
return "y"
|
||||
|
||||
return "n"
|
||||
|
||||
def dt_node_has_prop(kconf, _, label, prop):
|
||||
"""
|
||||
This function takes a 'label' and looks for an EDT node for that label. If
|
||||
it finds an EDT node, it will look to see if that node has a property
|
||||
by the name of 'prop'. If the 'prop' exists it will return "y" otherwise
|
||||
we return "n".
|
||||
"""
|
||||
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
try:
|
||||
node = edt.label2node.get(label)
|
||||
except edtlib.EDTError:
|
||||
return "n"
|
||||
|
||||
if node is None:
|
||||
return "n"
|
||||
|
||||
if prop in node.props:
|
||||
return "y"
|
||||
|
||||
return "n"
|
||||
|
||||
def dt_node_int_prop(kconf, name, path, prop, unit=None):
|
||||
"""
|
||||
This function takes a 'path' and property name ('prop') looks for an EDT
|
||||
node at that path. If it finds an EDT node, it will look to see if that
|
||||
node has a property called 'prop' and if that 'prop' is an integer type
|
||||
will return the value of the property 'prop' as either a string int or
|
||||
string hex value, if not we return 0.
|
||||
|
||||
The function will divide the value based on 'unit':
|
||||
None No division
|
||||
'k' or 'K' divide by 1024 (1 << 10)
|
||||
'm' or 'M' divide by 1,048,576 (1 << 20)
|
||||
'g' or 'G' divide by 1,073,741,824 (1 << 30)
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "0"
|
||||
|
||||
try:
|
||||
node = edt.get_node(path)
|
||||
except edtlib.EDTError:
|
||||
return "0"
|
||||
|
||||
if name == "dt_node_int_prop_int":
|
||||
return str(_node_int_prop(node, prop, unit))
|
||||
if name == "dt_node_int_prop_hex":
|
||||
return hex(_node_int_prop(node, prop, unit))
|
||||
|
||||
def dt_node_str_prop_equals(kconf, _, path, prop, val):
|
||||
"""
|
||||
This function takes a 'path' and property name ('prop') looks for an EDT
|
||||
node at that path. If it finds an EDT node, it will look to see if that
|
||||
node has a property 'prop' of type string. If that 'prop' is equal to 'val'
|
||||
it will return "y" otherwise return "n".
|
||||
"""
|
||||
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
try:
|
||||
node = edt.get_node(path)
|
||||
except edtlib.EDTError:
|
||||
return "n"
|
||||
|
||||
if prop not in node.props:
|
||||
return "n"
|
||||
|
||||
if node.props[prop].type != "string":
|
||||
return "n"
|
||||
|
||||
if node.props[prop].val == val:
|
||||
return "y"
|
||||
|
||||
return "n"
|
||||
|
||||
def dt_compat_enabled(kconf, _, compat):
|
||||
"""
|
||||
This function takes a 'compat' and returns "y" if we find a status "okay"
|
||||
compatible node in the EDT otherwise we return "n"
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
return "y" if compat in edt.compat2okay else "n"
|
||||
|
||||
|
||||
def dt_compat_on_bus(kconf, _, compat, bus):
|
||||
"""
|
||||
This function takes a 'compat' and returns "y" if we find an "enabled"
|
||||
compatible node in the EDT which is on bus 'bus'. It returns "n" otherwise.
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
if compat in edt.compat2okay:
|
||||
for node in edt.compat2okay[compat]:
|
||||
if node.on_bus is not None and node.on_bus == bus:
|
||||
return "y"
|
||||
|
||||
return "n"
|
||||
|
||||
|
||||
def dt_nodelabel_has_compat(kconf, _, label, compat):
|
||||
"""
|
||||
This function takes a 'label' and returns "y" if an "enabled" node with
|
||||
such label can be found in the EDT and that node is compatible with the
|
||||
provided 'compat', otherwise it returns "n".
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return "n"
|
||||
|
||||
if compat in edt.compat2okay:
|
||||
for node in edt.compat2okay[compat]:
|
||||
if label in node.labels:
|
||||
return "y"
|
||||
|
||||
return "n"
|
||||
|
||||
|
||||
def dt_nodelabel_path(kconf, _, label):
|
||||
"""
|
||||
This function takes a node label (not a label property) and
|
||||
returns the path to the node which has that label, or an empty
|
||||
string if there is no such node.
|
||||
"""
|
||||
if doc_mode or edt is None:
|
||||
return ""
|
||||
|
||||
node = edt.label2node.get(label)
|
||||
|
||||
return node.path if node else ""
|
||||
|
||||
|
||||
def shields_list_contains(kconf, _, shield):
|
||||
"""
|
||||
Return "n" if cmake environment variable 'SHIELD_AS_LIST' doesn't exist.
|
||||
Return "y" if 'shield' is present list obtained after 'SHIELD_AS_LIST'
|
||||
has been split using ";" as a separator and "n" otherwise.
|
||||
"""
|
||||
try:
|
||||
list = os.environ['SHIELD_AS_LIST']
|
||||
except KeyError:
|
||||
return "n"
|
||||
|
||||
return "y" if shield in list.split(";") else "n"
|
||||
|
||||
|
||||
# Keys in this dict are the function names as they appear
|
||||
# in Kconfig files. The values are tuples in this form:
|
||||
#
|
||||
# (python_function, minimum_number_of_args, maximum_number_of_args)
|
||||
#
|
||||
# Each python function is given a kconf object and its name in the
|
||||
# Kconfig file, followed by arguments from the Kconfig file.
|
||||
#
|
||||
# See the kconfiglib documentation for more details.
|
||||
functions = {
|
||||
"dt_compat_enabled": (dt_compat_enabled, 1, 1),
|
||||
"dt_compat_on_bus": (dt_compat_on_bus, 2, 2),
|
||||
"dt_chosen_label": (dt_chosen_label, 1, 1),
|
||||
"dt_chosen_enabled": (dt_chosen_enabled, 1, 1),
|
||||
"dt_chosen_path": (dt_chosen_path, 1, 1),
|
||||
"dt_path_enabled": (dt_node_enabled, 1, 1),
|
||||
"dt_alias_enabled": (dt_node_enabled, 1, 1),
|
||||
"dt_nodelabel_enabled": (dt_nodelabel_enabled, 1, 1),
|
||||
"dt_chosen_reg_addr_int": (dt_chosen_reg, 1, 3),
|
||||
"dt_chosen_reg_addr_hex": (dt_chosen_reg, 1, 3),
|
||||
"dt_chosen_reg_size_int": (dt_chosen_reg, 1, 3),
|
||||
"dt_chosen_reg_size_hex": (dt_chosen_reg, 1, 3),
|
||||
"dt_node_reg_addr_int": (dt_node_reg, 1, 3),
|
||||
"dt_node_reg_addr_hex": (dt_node_reg, 1, 3),
|
||||
"dt_node_reg_size_int": (dt_node_reg, 1, 3),
|
||||
"dt_node_reg_size_hex": (dt_node_reg, 1, 3),
|
||||
"dt_node_has_bool_prop": (dt_node_has_bool_prop, 2, 2),
|
||||
"dt_node_has_prop": (dt_node_has_prop, 2, 2),
|
||||
"dt_node_int_prop_int": (dt_node_int_prop, 2, 3),
|
||||
"dt_node_int_prop_hex": (dt_node_int_prop, 2, 3),
|
||||
"dt_node_str_prop_equals": (dt_node_str_prop_equals, 3, 3),
|
||||
"dt_nodelabel_has_compat": (dt_nodelabel_has_compat, 2, 2),
|
||||
"dt_nodelabel_path": (dt_nodelabel_path, 1, 1),
|
||||
"shields_list_contains": (shields_list_contains, 1, 1),
|
||||
}
|
File diff suppressed because it is too large
Load diff
|
@ -1,341 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
# Copyright (c) 2019 Nordic Semiconductor ASA
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
"""
|
||||
Linter for the Zephyr Kconfig files. Pass --help to see
|
||||
available checks. By default, all checks are enabled.
|
||||
|
||||
Some of the checks rely on heuristics and can get tripped up
|
||||
by things like preprocessor magic, so manual checking is
|
||||
still needed. 'git grep' is handy.
|
||||
|
||||
Requires west, because the checks need to see Kconfig files
|
||||
and source code from modules.
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import os
|
||||
import re
|
||||
import shlex
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
TOP_DIR = os.path.join(os.path.dirname(__file__), "..", "..")
|
||||
|
||||
sys.path.insert(0, os.path.join(TOP_DIR, "scripts", "kconfig"))
|
||||
import kconfiglib
|
||||
|
||||
|
||||
def main():
|
||||
init_kconfig()
|
||||
|
||||
args = parse_args()
|
||||
if args.checks:
|
||||
checks = args.checks
|
||||
else:
|
||||
# Run all checks if no checks were specified
|
||||
checks = (check_always_n,
|
||||
check_unused,
|
||||
check_pointless_menuconfigs,
|
||||
check_defconfig_only_definition,
|
||||
check_missing_config_prefix)
|
||||
|
||||
first = True
|
||||
for check in checks:
|
||||
if not first:
|
||||
print()
|
||||
first = False
|
||||
check()
|
||||
|
||||
|
||||
def parse_args():
|
||||
# args.checks is set to a list of check functions to run
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
formatter_class=argparse.RawTextHelpFormatter,
|
||||
description=__doc__)
|
||||
|
||||
parser.add_argument(
|
||||
"-n", "--check-always-n",
|
||||
action="append_const", dest="checks", const=check_always_n,
|
||||
help="""\
|
||||
List symbols that can never be anything but n/empty. These
|
||||
are detected as symbols with no prompt or defaults that
|
||||
aren't selected or implied.
|
||||
""")
|
||||
|
||||
parser.add_argument(
|
||||
"-u", "--check-unused",
|
||||
action="append_const", dest="checks", const=check_unused,
|
||||
help="""\
|
||||
List symbols that might be unused.
|
||||
|
||||
Heuristic:
|
||||
|
||||
- Isn't referenced in Kconfig
|
||||
- Isn't referenced as CONFIG_<NAME> outside Kconfig
|
||||
(besides possibly as CONFIG_<NAME>=<VALUE>)
|
||||
- Isn't selecting/implying other symbols
|
||||
- Isn't a choice symbol
|
||||
|
||||
C preprocessor magic can trip up this check.""")
|
||||
|
||||
parser.add_argument(
|
||||
"-m", "--check-pointless-menuconfigs",
|
||||
action="append_const", dest="checks", const=check_pointless_menuconfigs,
|
||||
help="""\
|
||||
List symbols defined with 'menuconfig' where the menu is
|
||||
empty due to the symbol not being followed by stuff that
|
||||
depends on it""")
|
||||
|
||||
parser.add_argument(
|
||||
"-d", "--check-defconfig-only-definition",
|
||||
action="append_const", dest="checks", const=check_defconfig_only_definition,
|
||||
help="""\
|
||||
List symbols that are only defined in Kconfig.defconfig
|
||||
files. A common base definition should probably be added
|
||||
somewhere for such symbols, and the type declaration ('int',
|
||||
'hex', etc.) removed from Kconfig.defconfig.""")
|
||||
|
||||
parser.add_argument(
|
||||
"-p", "--check-missing-config-prefix",
|
||||
action="append_const", dest="checks", const=check_missing_config_prefix,
|
||||
help="""\
|
||||
Look for references like
|
||||
|
||||
#if MACRO
|
||||
#if(n)def MACRO
|
||||
defined(MACRO)
|
||||
IS_ENABLED(MACRO)
|
||||
|
||||
where MACRO is the name of a defined Kconfig symbol but
|
||||
doesn't have a CONFIG_ prefix. Could be a typo.
|
||||
|
||||
Macros that are #define'd somewhere are not flagged.""")
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def check_always_n():
|
||||
print_header("Symbols that can't be anything but n/empty")
|
||||
for sym in kconf.unique_defined_syms:
|
||||
if not has_prompt(sym) and not is_selected_or_implied(sym) and \
|
||||
not has_defaults(sym):
|
||||
print(name_and_locs(sym))
|
||||
|
||||
|
||||
def check_unused():
|
||||
print_header("Symbols that look unused")
|
||||
referenced = referenced_sym_names()
|
||||
for sym in kconf.unique_defined_syms:
|
||||
if not is_selecting_or_implying(sym) and not sym.choice and \
|
||||
sym.name not in referenced:
|
||||
print(name_and_locs(sym))
|
||||
|
||||
|
||||
def check_pointless_menuconfigs():
|
||||
print_header("menuconfig symbols with empty menus")
|
||||
for node in kconf.node_iter():
|
||||
if node.is_menuconfig and not node.list and \
|
||||
isinstance(node.item, kconfiglib.Symbol):
|
||||
print("{0.item.name:40} {0.filename}:{0.linenr}".format(node))
|
||||
|
||||
|
||||
def check_defconfig_only_definition():
|
||||
print_header("Symbols only defined in Kconfig.defconfig files")
|
||||
for sym in kconf.unique_defined_syms:
|
||||
if all("defconfig" in node.filename for node in sym.nodes):
|
||||
print(name_and_locs(sym))
|
||||
|
||||
|
||||
def check_missing_config_prefix():
|
||||
print_header("Symbol references that might be missing a CONFIG_ prefix")
|
||||
|
||||
# Paths to modules
|
||||
modpaths = run(("west", "list", "-f{abspath}")).splitlines()
|
||||
|
||||
# Gather #define'd macros that might overlap with symbol names, so that
|
||||
# they don't trigger false positives
|
||||
defined = set()
|
||||
for modpath in modpaths:
|
||||
regex = r"#\s*define\s+([A-Z0-9_]+)\b"
|
||||
defines = run(("git", "grep", "--extended-regexp", regex),
|
||||
cwd=modpath, check=False)
|
||||
# Could pass --only-matching to git grep as well, but it was added
|
||||
# pretty recently (2018)
|
||||
defined.update(re.findall(regex, defines))
|
||||
|
||||
# Filter out symbols whose names are #define'd too. Preserve definition
|
||||
# order to make the output consistent.
|
||||
syms = [sym for sym in kconf.unique_defined_syms
|
||||
if sym.name not in defined]
|
||||
|
||||
# grep for symbol references in #ifdef/defined() that are missing a CONFIG_
|
||||
# prefix. Work around an "argument list too long" error from 'git grep' by
|
||||
# checking symbols in batches.
|
||||
for batch in split_list(syms, 200):
|
||||
# grep for '#if((n)def) <symbol>', 'defined(<symbol>', and
|
||||
# 'IS_ENABLED(<symbol>', with a missing CONFIG_ prefix
|
||||
regex = r"(?:#\s*if(?:n?def)\s+|\bdefined\s*\(\s*|IS_ENABLED\(\s*)(?:" + \
|
||||
"|".join(sym.name for sym in batch) + r")\b"
|
||||
cmd = ("git", "grep", "--line-number", "-I", "--perl-regexp", regex)
|
||||
|
||||
for modpath in modpaths:
|
||||
print(run(cmd, cwd=modpath, check=False), end="")
|
||||
|
||||
|
||||
def split_list(lst, batch_size):
|
||||
# check_missing_config_prefix() helper generator that splits a list into
|
||||
# equal-sized batches (possibly with a shorter batch at the end)
|
||||
|
||||
for i in range(0, len(lst), batch_size):
|
||||
yield lst[i:i + batch_size]
|
||||
|
||||
|
||||
def print_header(s):
|
||||
print(s + "\n" + len(s)*"=")
|
||||
|
||||
|
||||
def init_kconfig():
|
||||
global kconf
|
||||
|
||||
os.environ.update(
|
||||
srctree=TOP_DIR,
|
||||
CMAKE_BINARY_DIR=modules_file_dir(),
|
||||
KCONFIG_DOC_MODE="1",
|
||||
PROJECT_BASE=TOP_DIR,
|
||||
SOC_DIR="soc",
|
||||
ARCH_DIR="arch",
|
||||
BOARD_DIR="boards/*/*",
|
||||
ARCH="*")
|
||||
|
||||
kconf = kconfiglib.Kconfig(suppress_traceback=True)
|
||||
|
||||
|
||||
def modules_file_dir():
|
||||
# Creates Kconfig.modules in a temporary directory and returns the path to
|
||||
# the directory. Kconfig.modules brings in Kconfig files from modules.
|
||||
|
||||
tmpdir = tempfile.mkdtemp()
|
||||
run((os.path.join("scripts", "zephyr_module.py"),
|
||||
"--kconfig-out", os.path.join(tmpdir, "Kconfig.modules")))
|
||||
return tmpdir
|
||||
|
||||
|
||||
def referenced_sym_names():
|
||||
# Returns the names of all symbols referenced inside and outside the
|
||||
# Kconfig files (that we can detect), without any "CONFIG_" prefix
|
||||
|
||||
return referenced_in_kconfig() | referenced_outside_kconfig()
|
||||
|
||||
|
||||
def referenced_in_kconfig():
|
||||
# Returns the names of all symbols referenced inside the Kconfig files
|
||||
|
||||
return {ref.name
|
||||
for node in kconf.node_iter()
|
||||
for ref in node.referenced
|
||||
if isinstance(ref, kconfiglib.Symbol)}
|
||||
|
||||
|
||||
def referenced_outside_kconfig():
|
||||
# Returns the names of all symbols referenced outside the Kconfig files
|
||||
|
||||
regex = r"\bCONFIG_[A-Z0-9_]+\b"
|
||||
|
||||
res = set()
|
||||
|
||||
# 'git grep' all modules
|
||||
for modpath in run(("west", "list", "-f{abspath}")).splitlines():
|
||||
for line in run(("git", "grep", "-h", "-I", "--extended-regexp", regex),
|
||||
cwd=modpath).splitlines():
|
||||
# Don't record lines starting with "CONFIG_FOO=" or "# CONFIG_FOO="
|
||||
# as references, so that symbols that are only assigned in .config
|
||||
# files are not included
|
||||
if re.match(r"[\s#]*CONFIG_[A-Z0-9_]+=.*", line):
|
||||
continue
|
||||
|
||||
# Could pass --only-matching to git grep as well, but it was added
|
||||
# pretty recently (2018)
|
||||
for match in re.findall(regex, line):
|
||||
res.add(match[7:]) # Strip "CONFIG_"
|
||||
|
||||
return res
|
||||
|
||||
|
||||
def has_prompt(sym):
|
||||
return any(node.prompt for node in sym.nodes)
|
||||
|
||||
|
||||
def is_selected_or_implied(sym):
|
||||
return sym.rev_dep is not kconf.n or sym.weak_rev_dep is not kconf.n
|
||||
|
||||
|
||||
def has_defaults(sym):
|
||||
return bool(sym.defaults)
|
||||
|
||||
|
||||
def is_selecting_or_implying(sym):
|
||||
return sym.selects or sym.implies
|
||||
|
||||
|
||||
def name_and_locs(sym):
|
||||
# Returns a string with the name and definition location(s) for 'sym'
|
||||
|
||||
return "{:40} {}".format(
|
||||
sym.name,
|
||||
", ".join("{0.filename}:{0.linenr}".format(node) for node in sym.nodes))
|
||||
|
||||
|
||||
def run(cmd, cwd=TOP_DIR, check=True):
|
||||
# Runs 'cmd' with subprocess, returning the decoded stdout output. 'cwd' is
|
||||
# the working directory. It defaults to the top-level Zephyr directory.
|
||||
# Exits with an error if the command exits with a non-zero return code if
|
||||
# 'check' is True.
|
||||
|
||||
cmd_s = " ".join(shlex.quote(word) for word in cmd)
|
||||
|
||||
try:
|
||||
process = subprocess.Popen(
|
||||
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)
|
||||
except OSError as e:
|
||||
err("Failed to run '{}': {}".format(cmd_s, e))
|
||||
|
||||
stdout, stderr = process.communicate()
|
||||
# errors="ignore" temporarily works around
|
||||
# https://github.com/zephyrproject-rtos/esp-idf/pull/2
|
||||
stdout = stdout.decode("utf-8", errors="ignore")
|
||||
stderr = stderr.decode("utf-8")
|
||||
if check and process.returncode:
|
||||
err("""\
|
||||
'{}' exited with status {}.
|
||||
|
||||
===stdout===
|
||||
{}
|
||||
===stderr===
|
||||
{}""".format(cmd_s, process.returncode, stdout, stderr))
|
||||
|
||||
if stderr:
|
||||
warn("'{}' wrote to stderr:\n{}".format(cmd_s, stderr))
|
||||
|
||||
return stdout
|
||||
|
||||
|
||||
def err(msg):
|
||||
sys.exit(executable() + "error: " + msg)
|
||||
|
||||
|
||||
def warn(msg):
|
||||
print(executable() + "warning: " + msg, file=sys.stderr)
|
||||
|
||||
|
||||
def executable():
|
||||
cmd = sys.argv[0] # Empty string if missing
|
||||
return cmd + ": " if cmd else ""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue