diff --git a/exiv2-0.27.3-fcf-protection.patch b/exiv2-0.27.3-fcf-protection.patch new file mode 100644 index 0000000..94a2c84 --- /dev/null +++ b/exiv2-0.27.3-fcf-protection.patch @@ -0,0 +1,12 @@ +diff -up exiv2-0.27.3-Source/cmake/compilerFlags.cmake.fcf-protection exiv2-0.27.3-Source/cmake/compilerFlags.cmake +--- exiv2-0.27.3-Source/cmake/compilerFlags.cmake.fcf-protection 2020-06-30 08:33:22.000000000 -0500 ++++ exiv2-0.27.3-Source/cmake/compilerFlags.cmake 2020-06-30 18:03:38.197967648 -0500 +@@ -26,7 +26,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Li + # 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 diff --git a/exiv2.spec b/exiv2.spec index aa6fa1f3..a0c189e 100644 --- a/exiv2.spec +++ b/exiv2.spec @@ -16,6 +16,9 @@ Source0: http://exiv2.org/builds/%{name}-%{version}-Source.tar.gz ## upstream patches ## upstreamable patches +# don't unconditionally use -fcf-protection flag, not supported on all archs +# fedora already includes this on archs that do support it +Patch100: exiv2-0.27.3-fcf-protection.patch BuildRequires: cmake BuildRequires: expat-devel