Remove -fcf-protection from the cmake compiler options

That option isn't supported on all our arches (in particular sparc64).

Fixes the build on sparc64

ok sthen
This commit is contained in:
kmos 2021-03-05 14:34:58 +00:00
parent 6f83bf7d0a
commit 42ac369aa4

View File

@ -1,8 +1,19 @@
$OpenBSD: patch-cmake_compilerFlags_cmake,v 1.4 2021/01/24 18:30:50 ajacoutot Exp $
$OpenBSD: patch-cmake_compilerFlags_cmake,v 1.5 2021/03/05 14:34:58 kmos Exp $
-fcf-protection isn't supported on all platforms (sparc64 in particular)
Index: cmake/compilerFlags.cmake
--- cmake/compilerFlags.cmake.orig
+++ cmake/compilerFlags.cmake
@@ -26,7 +26,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CY
# This fails under Fedora, MinGW GCC 8.3.0 and CYGWIN/MSYS 9.3.0
if (NOT (MINGW OR CMAKE_HOST_SOLARIS OR CYGWIN OR MSYS) )
if (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 8.0)
- add_compile_options(-fstack-clash-protection -fcf-protection)
+ add_compile_options(-fstack-clash-protection)
endif()
if( (COMPILER_IS_GCC AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 5.0) # Not in GCC 4.8
@@ -49,7 +49,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CY
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} --coverage")
endif()