Skip to content

Commit

Permalink
avoid using flags on old gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
AviaAv committed Sep 26, 2024
1 parent 97fb665 commit 24d673a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMake/unix_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ macro(os_set_flags)

# see https://readthedocs.intel.com/SecureCodingStandards/2023.Q2.0/compiler/c-cpp/ for more details

if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|armv7l") # Jetson system, some flags are not recognized
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|armv7l" OR # Some flags are not recognized or Jetson systems or on GCC version < 9
(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0"))) #
set(ADDITIONAL_COMPILER_FLAGS "-Wformat -Wformat-security -fPIC -D_FORTIFY_SOURCE=2 -fstack-protector")
else()
#‘-mfunction-return’ and ‘-fcf-protection’ are not compatible, so specifing -fcf-protection=none
Expand Down

0 comments on commit 24d673a

Please sign in to comment.