aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-08-19 17:35:26 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-08-19 17:35:26 -0500
commit5fd91463a260f216bfbeffc4ecb75500b7d907cb (patch)
tree512a71d2690d581fc14a4ab7e7b36edadfa96986 /CMakeLists.txt
parentMerge pull request #5728 (diff)
parentfix building on OpenBSD, simplify Readme section (diff)
downloadmonero-5fd91463a260f216bfbeffc4ecb75500b7d907cb.tar.xz
Merge pull request #5773
441f318 fix building on OpenBSD, simplify Readme section (mrme0w/The-King-of-Toasters)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 59384d180..60fcf130e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -651,7 +651,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()
@@ -663,7 +663,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)
@@ -671,7 +671,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)