Merge pull request #893 from sodevel/fix/gcc46

Fix compilation on GCC 4.6
This commit is contained in:
Leonid Stryzhevskyi 2023-11-25 08:42:06 +02:00 committed by GitHub
commit 679b6e95f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,7 +256,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES GNU)
# -fcf-protection is supported only on x86 GNU/Linux per this gcc doc:
# https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fcf-protection
if ((CMAKE_SYSTEM_NAME STREQUAL "Linux") AND (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)"))
add_compiler_flags(4.6 "-fcf-protection")
add_compiler_flags(8.1 "-fcf-protection")
endif ()
add_compiler_flags(4.6 "-pipe")
add_compiler_flags(4.6 "-Werror=format-security")