Skip to content
Permalink
Browse files

cmake: do not use -mmitigate-rop on GCC >= 9.1

It was removed, but it still accepted by the compiler, which warns
for every file
  • Loading branch information...
moneromooo-monero committed Jun 8, 2019
1 parent 35c20c4 commit e2848894c9c18b53dafead023040cefbb78f8622
Showing with 5 additions and 2 deletions.
  1. +5 −2 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)

0 comments on commit e284889

Please sign in to comment.
You can’t perform that action at this time.