diff options
Diffstat (limited to 'CompilerChecks.cmake')
| -rw-r--r-- | CompilerChecks.cmake | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake index f5a3c7f..5e9d830 100644 --- a/CompilerChecks.cmake +++ b/CompilerChecks.cmake @@ -65,27 +65,29 @@ if (UNIX) endif() endif() - check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG) - if (WITH_STACK_PROTECTOR_STRONG) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector-strong") - # This is needed as Solaris has a seperate libssp - if (SOLARIS) - list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector-strong") - endif() - else (WITH_STACK_PROTECTOR_STRONG) - check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) - if (WITH_STACK_PROTECTOR) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector") + if (NOT SOLARIS) + check_c_compiler_flag_ssp("-fstack-protector-strong" WITH_STACK_PROTECTOR_STRONG) + if (WITH_STACK_PROTECTOR_STRONG) + list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector-strong") # This is needed as Solaris has a seperate libssp if (SOLARIS) - list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector") + list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector-strong") endif() - endif() - endif (WITH_STACK_PROTECTOR_STRONG) + else (WITH_STACK_PROTECTOR_STRONG) + check_c_compiler_flag_ssp("-fstack-protector" WITH_STACK_PROTECTOR) + if (WITH_STACK_PROTECTOR) + list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-protector") + # This is needed as Solaris has a seperate libssp + if (SOLARIS) + list(APPEND SUPPORTED_LINKER_FLAGS "-fstack-protector") + endif() + endif() + endif (WITH_STACK_PROTECTOR_STRONG) - check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION) - if (WITH_STACK_CLASH_PROTECTION) - list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection") + check_c_compiler_flag_ssp("-fstack-clash-protection" WITH_STACK_CLASH_PROTECTION) + if (WITH_STACK_CLASH_PROTECTION) + list(APPEND SUPPORTED_COMPILER_FLAGS "-fstack-clash-protection") + endif() endif() if (PICKY_DEVELOPER) |
