diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml index 4f5a522e1..e573b450d 100644 --- a/.github/workflows/code-coverage.yml +++ b/.github/workflows/code-coverage.yml @@ -30,7 +30,7 @@ jobs: #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. needs: check-for-duplicates if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 15 steps: diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml index 0cda3b2fc..de8805138 100644 --- a/.github/workflows/functional-tests.yml +++ b/.github/workflows/functional-tests.yml @@ -30,7 +30,7 @@ jobs: #Continue if check-for-duplicates found no duplicates. Always runs for pull-requests. needs: check-for-duplicates if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 timeout-minutes: 15 steps: @@ -105,4 +105,4 @@ jobs: grep -i '\[ FAIL]\|\[ TSF]\|\[ TTF]' cf/cfe_test.log exit -1 fi - working-directory: ./build/exe/cpu1/ \ No newline at end of file + working-directory: ./build/exe/cpu1/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 81ea36961..7815eccbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## Development Build: v7.0.0-rc4+dev218 +- Update CI to use Ubuntu 20.04 +- Enforce strict cast alignment on arch +- Support clang for whole archive flags +- Explicit toolchain in sample target.cmake +- See , , , and + ## Development Build: v7.0.0-rc4+dev205 - resolve static analysis errors in tbl_UT.c - See diff --git a/cmake/sample_defs/arch_build_custom.cmake b/cmake/sample_defs/arch_build_custom.cmake index a7ebb1a6b..194ec5b80 100644 --- a/cmake/sample_defs/arch_build_custom.cmake +++ b/cmake/sample_defs/arch_build_custom.cmake @@ -32,7 +32,6 @@ add_compile_options( -Wstrict-prototypes # Warn about missing prototypes -Wwrite-strings # Warn if not treating string literals as "const" -Wpointer-arith # Warn about suspicious pointer operations - -Wcast-align # Warn about casts that increase alignment requirements -Werror # Treat warnings as errors (code should be clean) -Wno-format-truncation # Inhibit printf-style format truncation warnings -Wno-stringop-truncation # Inhibit string operation truncation warnings diff --git a/cmake/sample_defs/arch_build_custom_native.cmake b/cmake/sample_defs/arch_build_custom_native.cmake new file mode 100644 index 000000000..89c069d4b --- /dev/null +++ b/cmake/sample_defs/arch_build_custom_native.cmake @@ -0,0 +1,11 @@ +# +# Example arch_build_custom.cmake +# ------------------------------- +# +# On native builds only, add strict cast alignment warnings +# This requires a newer version of gcc +# +add_compile_options( + -Wcast-align=strict # Warn about casts that increase alignment requirements +) + diff --git a/cmake/sample_defs/targets.cmake b/cmake/sample_defs/targets.cmake index 6ccb1d07c..b39453cf2 100644 --- a/cmake/sample_defs/targets.cmake +++ b/cmake/sample_defs/targets.cmake @@ -104,10 +104,12 @@ SET(MISSION_CPUNAMES cpu1) SET(cpu1_PROCESSORID 1) SET(cpu1_APPLIST ci_lab to_lab sch_lab) SET(cpu1_FILELIST cfe_es_startup.scr) +SET(cpu1_SYSTEM i686-linux-gnu) # CPU2 example. This is not built by default anymore but # serves as an example of how one would configure multiple cpus. SET(cpu2_PROCESSORID 2) SET(cpu2_APPLIST ci_lab to_lab sch_lab) SET(cpu2_FILELIST cfe_es_startup.scr) +SET(cpu2_SYSTEM i686-linux-gnu) diff --git a/cmake/sample_defs/toolchain-arm-cortexa8_neon-linux-gnueabi.cmake b/cmake/sample_defs/toolchain-arm-cortexa8_neon-linux-gnueabi.cmake index fcc78b0d5..7ddbf2ba6 100644 --- a/cmake/sample_defs/toolchain-arm-cortexa8_neon-linux-gnueabi.cmake +++ b/cmake/sample_defs/toolchain-arm-cortexa8_neon-linux-gnueabi.cmake @@ -30,6 +30,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # abstraction layers are built when using this toolchain # Note that "pc-linux" works fine even though this is not technically a "pc" SET(CFE_SYSTEM_PSPNAME "pc-linux") -SET(OSAL_SYSTEM_BSPTYPE "pc-linux") SET(OSAL_SYSTEM_OSTYPE "posix") - diff --git a/cmake/sample_defs/toolchain-cpu3.cmake b/cmake/sample_defs/toolchain-cpu3.cmake deleted file mode 100644 index 27a05d454..000000000 --- a/cmake/sample_defs/toolchain-cpu3.cmake +++ /dev/null @@ -1,25 +0,0 @@ -# This example toolchain file describes the cross compiler to use for -# the target architecture indicated in the configuration file. - -# Basic cross system configuration -SET(CMAKE_SYSTEM_NAME Linux) -SET(CMAKE_SYSTEM_VERSION 1) -SET(CMAKE_SYSTEM_PROCESSOR i686) - -# Specify the cross compiler executables -# Typically these would be installed in a home directory or somewhere -# in /opt. However in this example the system compiler is used. -SET(CMAKE_C_COMPILER "/usr/bin/gcc") -SET(CMAKE_CXX_COMPILER "/usr/bin/g++") - -# Configure the find commands -SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY NEVER) -SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) - -# These variable settings are specific to cFE/OSAL and determines which -# abstraction layers are built when using this toolchain -SET(CFE_SYSTEM_PSPNAME "pc-linux") -SET(OSAL_SYSTEM_BSPNAME "pc-linux") -SET(OSAL_SYSTEM_OSTYPE "posix") - diff --git a/cmake/sample_defs/toolchain-cpu2.cmake b/cmake/sample_defs/toolchain-i686-linux-clang.cmake similarity index 85% rename from cmake/sample_defs/toolchain-cpu2.cmake rename to cmake/sample_defs/toolchain-i686-linux-clang.cmake index 27a05d454..7b7aa96f0 100644 --- a/cmake/sample_defs/toolchain-cpu2.cmake +++ b/cmake/sample_defs/toolchain-i686-linux-clang.cmake @@ -9,8 +9,8 @@ SET(CMAKE_SYSTEM_PROCESSOR i686) # Specify the cross compiler executables # Typically these would be installed in a home directory or somewhere # in /opt. However in this example the system compiler is used. -SET(CMAKE_C_COMPILER "/usr/bin/gcc") -SET(CMAKE_CXX_COMPILER "/usr/bin/g++") +SET(CMAKE_C_COMPILER "/usr/bin/clang") +SET(CMAKE_CXX_COMPILER "/usr/bin/clang++") # Configure the find commands SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) @@ -20,6 +20,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) # These variable settings are specific to cFE/OSAL and determines which # abstraction layers are built when using this toolchain SET(CFE_SYSTEM_PSPNAME "pc-linux") -SET(OSAL_SYSTEM_BSPNAME "pc-linux") SET(OSAL_SYSTEM_OSTYPE "posix") - diff --git a/cmake/sample_defs/toolchain-cpu1.cmake b/cmake/sample_defs/toolchain-i686-linux-gnu.cmake similarity index 95% rename from cmake/sample_defs/toolchain-cpu1.cmake rename to cmake/sample_defs/toolchain-i686-linux-gnu.cmake index 27a05d454..3046a3a34 100644 --- a/cmake/sample_defs/toolchain-cpu1.cmake +++ b/cmake/sample_defs/toolchain-i686-linux-gnu.cmake @@ -20,6 +20,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE NEVER) # These variable settings are specific to cFE/OSAL and determines which # abstraction layers are built when using this toolchain SET(CFE_SYSTEM_PSPNAME "pc-linux") -SET(OSAL_SYSTEM_BSPNAME "pc-linux") SET(OSAL_SYSTEM_OSTYPE "posix") - diff --git a/cmake/sample_defs/toolchain-powerpc-440_softfp-linux-gnu.cmake b/cmake/sample_defs/toolchain-powerpc-440_softfp-linux-gnu.cmake index 16aa8ca39..0043aa391 100644 --- a/cmake/sample_defs/toolchain-powerpc-440_softfp-linux-gnu.cmake +++ b/cmake/sample_defs/toolchain-powerpc-440_softfp-linux-gnu.cmake @@ -33,6 +33,4 @@ SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # these settings are specific to cFE/OSAL and determines # which abstraction layers are built when this toolchain is used SET(CFE_SYSTEM_PSPNAME pc-linux) -SET(OSAL_SYSTEM_BSPTYPE pc-linux) SET(OSAL_SYSTEM_OSTYPE posix) - diff --git a/cmake/target/CMakeLists.txt b/cmake/target/CMakeLists.txt index 94efbf45d..5e5eb73c4 100644 --- a/cmake/target/CMakeLists.txt +++ b/cmake/target/CMakeLists.txt @@ -156,7 +156,7 @@ if (${TGTNAME}_APPLIST) set_target_properties(core-${TGTNAME} PROPERTIES ENABLE_EXPORTS TRUE) - if ("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") + if (("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU") OR ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")) # The option pair for GNU gcc/ld tools set(START_WHOLE_ARCHIVE "--whole-archive") set(STOP_WHOLE_ARCHIVE "--no-whole-archive") @@ -165,6 +165,7 @@ if (${TGTNAME}_APPLIST) set(COMPILER_LINKER_OPTION_PREFIX "-Wl,") else() # Other toolchain options may be added here + message(WARNING "Unmatched compiler id, WHOLE_ARCHIVE flags not automatically set and may need custom config") endif() # Determine if a pass-through prefix is needed for a linker option. diff --git a/modules/core_api/fsw/inc/cfe_version.h b/modules/core_api/fsw/inc/cfe_version.h index d13e68a9b..1cbb10245 100644 --- a/modules/core_api/fsw/inc/cfe_version.h +++ b/modules/core_api/fsw/inc/cfe_version.h @@ -26,7 +26,7 @@ #define CFE_VERSION_H /* Development Build Macro Definitions */ -#define CFE_BUILD_NUMBER 205 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ +#define CFE_BUILD_NUMBER 218 /**< @brief Development: Number of development git commits since CFE_BUILD_BASELINE */ #define CFE_BUILD_BASELINE "v7.0.0-rc4" /**< @brief Development: Reference git tag for build number */ /* See \ref cfsversions for definitions */