diff --git a/CMake/unix_config.cmake b/CMake/unix_config.cmake index 603adda0fc..34d220a139 100644 --- a/CMake/unix_config.cmake +++ b/CMake/unix_config.cmake @@ -72,10 +72,10 @@ macro(os_set_flags) if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64|armv7l" OR APPLE OR # Some flags are not recognized or some systems / gcc versions (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") + set(ADDITIONAL_COMPILER_FLAGS "-Wformat -Wformat-security -fPIC -fstack-protector") else() #‘-mfunction-return’ and ‘-fcf-protection’ are not compatible, so specifing -fcf-protection=none - set(ADDITIONAL_COMPILER_FLAGS "-Wformat -Wformat-security -fPIC -D_FORTIFY_SOURCE=2 -fcf-protection=none -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -fstack-protector") + set(ADDITIONAL_COMPILER_FLAGS "-Wformat -Wformat-security -fPIC -fcf-protection=none -mfunction-return=thunk -mindirect-branch=thunk -mindirect-branch-register -fstack-protector") endif() set(CMAKE_LINKER_FLAGS "${CMAKE_LINKER_FLAGS} -pie")