From 8bbef9d942d5d6ca6099a01aaa8f78a7c072abc1 Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Tue, 7 Aug 2018 13:05:52 +0000 Subject: [PATCH] CMakeLists.txt: add -mmitigate-rop to security flags if found This is GCC/x86/x86_64 only --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 627618b82..cbecddee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -562,6 +562,9 @@ else() add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS) add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS) + add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS) + add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS) + # linker if (NOT WIN32) # Windows binaries die on startup with PIE