Merge pull request #4178

347bba9d CMakeLists.txt: detect -fcf-protection=full and -fstack-clash-protection (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2018-09-14 12:20:32 +02:00
commit e8049be955
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD

View file

@ -570,6 +570,14 @@ else()
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS) add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
endif() 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 # linker
if (NOT WIN32) if (NOT WIN32)
# Windows binaries die on startup with PIE # Windows binaries die on startup with PIE