diff options
author | Mr. Me0w <mrme0w@protonmail.ch> | 2019-07-23 16:36:59 +1000 |
---|---|---|
committer | Stephen Gregoratto <dev@sgregoratto.me> | 2019-07-30 00:34:38 +1000 |
commit | 441f318180c402057df3eda278d3df130c31a3f1 (patch) | |
tree | e1f1c0115daf46dddd3262fc0f5e223230291e18 /CMakeLists.txt | |
parent | Merge pull request #5763 (diff) | |
download | monero-441f318180c402057df3eda278d3df130c31a3f1.tar.xz |
fix building on OpenBSD, simplify Readme section
Based on a patch from @mrme0w (#5569). Fixes #5770
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a22478e9..d6f831e78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -645,7 +645,7 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing") # if those don't work for your compiler, single it out where appropriate - if(CMAKE_BUILD_TYPE STREQUAL "Release") + if(CMAKE_BUILD_TYPE STREQUAL "Release" AND NOT OPENBSD) set(C_SECURITY_FLAGS "${C_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1") set(CXX_SECURITY_FLAGS "${CXX_SECURITY_FLAGS} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1") endif() @@ -657,7 +657,7 @@ else() add_cxx_flag_if_supported(-Wformat-security CXX_SECURITY_FLAGS) # -fstack-protector - if (NOT WIN32) + if (NOT WIN32 AND NOT OPENBSD) 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) @@ -665,7 +665,7 @@ else() endif() # New in GCC 8.2 - if (NOT WIN32) + if (NOT WIN32 AND NOT OPENBSD) 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) |