aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-26 14:07:04 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-09-09 11:53:42 +0000
commit347bba9dd15fff187d23830940cc317aa58519d3 (patch)
treeef621cc07da6e96995eaad39d78bda9788fb2980
parentMerge pull request #4290 (diff)
downloadmonero-347bba9dd15fff187d23830940cc317aa58519d3.tar.xz
CMakeLists.txt: detect -fcf-protection=full and -fstack-clash-protection
Introduced with GCC 8.2
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a02f62e62..e4b6bfe01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -570,6 +570,14 @@ else()
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
endif()
+ # New in GCC 8.2
+ if (NOT WIN32)
+ add_c_flag_if_supported(-fcf-protection=full C_SECURITY_FLAGS)
+ add_cxx_flag_if_supported(-fcf-protection=full CXX_SECURITY_FLAGS)
+ add_c_flag_if_supported(-fstack-clash-protection C_SECURITY_FLAGS)
+ add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
+ endif()
+
# linker
if (NOT WIN32)
# Windows binaries die on startup with PIE