CMakeLists.txt: disable -fstack-protector* on windows

Current GCC produces broken binaries with these options
This commit is contained in:
iDunk5400 2018-08-21 22:40:03 +00:00 committed by moneromooo-monero
parent b780cf4db1
commit 2bc977bab9
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 6 additions and 4 deletions

View File

@ -567,10 +567,12 @@ else()
add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS)
# -fstack-protector
add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS)
add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
if (NOT WIN32)
add_c_flag_if_supported(-fstack-protector C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-protector CXX_SECURITY_FLAGS)
add_c_flag_if_supported(-fstack-protector-strong C_SECURITY_FLAGS)
add_cxx_flag_if_supported(-fstack-protector-strong CXX_SECURITY_FLAGS)
endif()
# linker
if (NOT WIN32)