graphics/exiv2 specifies -fcf-protection=full which isn't supported by
ports-gcc on sparc64. The below patch fixes the build for sparc64.

ok?

--Kurt

Index: patches/patch-cmake_compilerFlags_cmake
===================================================================
RCS file: /cvs/ports/graphics/exiv2/patches/patch-cmake_compilerFlags_cmake,v
retrieving revision 1.4
diff -u -p -r1.4 patch-cmake_compilerFlags_cmake
--- patches/patch-cmake_compilerFlags_cmake     24 Jan 2021 18:30:50 -0000      
1.4
+++ patches/patch-cmake_compilerFlags_cmake     4 Mar 2021 21:07:59 -0000
@@ -1,8 +1,19 @@
 $OpenBSD: patch-cmake_compilerFlags_cmake,v 1.4 2021/01/24 18:30:50 ajacoutot 
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()

Reply via email to