CMakeLists.txt: detect -fcf-protection=full and -fstack-clash-protection

Introduced with GCC 8.2
release-v0.5.1
moneromooo-monero 6 years ago
parent fad88e18a9
commit 347bba9dd1
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3

@ -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

Loading…
Cancel
Save