aboutsummaryrefslogtreecommitdiff
path: root/CompilerChecks.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-11-07 09:27:38 +0100
committerAndreas Schneider <asn@samba.org>2018-11-07 15:29:32 +0100
commitd9a6ecb148ae6fe485e8b7416cd5b8265e22804f (patch)
treeaed8a303d5a9fc5bb355dd229be45e8e0c3ff1bc /CompilerChecks.cmake
parentefbb27d464afbf97e5f4b83d51f521028391a45b (diff)
downloadsocket_wrapper-d9a6ecb148ae6fe485e8b7416cd5b8265e22804f.tar.gz
socket_wrapper-d9a6ecb148ae6fe485e8b7416cd5b8265e22804f.tar.xz
socket_wrapper-d9a6ecb148ae6fe485e8b7416cd5b8265e22804f.zip
cmake: Disable stack protector on Solaris
They don't work. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'CompilerChecks.cmake')
-rw-r--r--CompilerChecks.cmake36
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)