From 9a3f43f4ee3ac8b57713f8fcd44b19ce7d3cf073 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 3 Sep 2018 10:45:07 +0200 Subject: [PATCH] cmake: Add -fstack-clash-protection Signed-off-by: Andreas Schneider --- CompilerChecks.cmake | 5 +++++ 1 file changed, 5 insertions(+) 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)