aboutsummaryrefslogtreecommitdiff
path: root/CompilerChecks.cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2018-09-03 10:45:07 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-09-03 14:18:25 +0200
commit9a3f43f4ee3ac8b57713f8fcd44b19ce7d3cf073 (patch)
tree51cfa2506dc4f8e9bcbd024c5620dc2b13ba5c3e /CompilerChecks.cmake
parentbaa434ebede2c3727e08f1203544d255de6b541f (diff)
downloadlibssh-9a3f43f4ee3ac8b57713f8fcd44b19ce7d3cf073.tar.gz
libssh-9a3f43f4ee3ac8b57713f8fcd44b19ce7d3cf073.tar.xz
libssh-9a3f43f4ee3ac8b57713f8fcd44b19ce7d3cf073.zip
cmake: Add -fstack-clash-protection
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'CompilerChecks.cmake')
-rw-r--r--CompilerChecks.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
index 92460828..2cbd00f5 100644
--- a/CompilerChecks.cmake
+++ b/CompilerChecks.cmake
@@ -73,6 +73,11 @@ if (UNIX)
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")
+ endif()
+
if (PICKY_DEVELOPER)
add_c_compiler_flag("-Wno-error=deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
add_c_compiler_flag("-Wno-error=tautological-compare" SUPPORTED_COMPILER_FLAGS)