aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-06-11 17:22:11 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-06-11 17:22:11 -0500
commit538fae4ec29eb79fd11e569a21a4b334a5e94b75 (patch)
treecc19e574be53d22a2d0468d576be4a5060c501a8 /CMakeLists.txt
parentMerge pull request #5622 (diff)
parentcmake: do not use -mmitigate-rop on GCC >= 9.1 (diff)
downloadmonero-538fae4ec29eb79fd11e569a21a4b334a5e94b75.tar.xz
Merge pull request #5614
4cff925 p2p: fix GCC 9.1 crash (monermooo-monero) f47488c Fix GCC 9.1 build warnings (moneromooo-monero) ce13a98 cmake: do not use -mmitigate-rop on GCC >= 9.1 (moneromooo-monero)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 037b9cb50..6a22478e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -672,8 +672,11 @@ else()
add_cxx_flag_if_supported(-fstack-clash-protection CXX_SECURITY_FLAGS)
endif()
- add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
- add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)
+ # Removed in GCC 9.1 (or before ?), but still accepted, so spams the output
+ if (NOT (CMAKE_C_COMPILER_ID STREQUAL "GNU" AND NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 9.1))
+ add_c_flag_if_supported(-mmitigate-rop C_SECURITY_FLAGS)
+ add_cxx_flag_if_supported(-mmitigate-rop CXX_SECURITY_FLAGS)
+ endif()
# linker
if (NOT WIN32)