aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-07-31 02:00:04 +0200
committerArmin Kuster <akuster808@gmail.com>2020-08-23 11:05:46 -0700
commit5fe92ba89e7f3c05eebb15592720974ae92a5d6a (patch)
tree5a7afe3ca244e66074e2caefd2152ac46c0a647b /meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch
parentfae2b902613f0fda14f70cbb1eb4c41e7c0fc9a7 (diff)
downloadmeta-openembedded-contrib-5fe92ba89e7f3c05eebb15592720974ae92a5d6a.tar.gz
exiv2: upgrade 0.27.1 -> 0.27.3
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 6443044ca9ec90d6740c42e618830ca52d656f5f) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch')
-rw-r--r--meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch b/meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch
new file mode 100644
index 0000000000..96146a1957
--- /dev/null
+++ b/meta-oe/recipes-support/exiv2/exiv2/0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch
@@ -0,0 +1,40 @@
+From 04d5f4805a86302a0e135a28d58a6c1ff6a68d52 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@gmail.com>
+Date: Thu, 30 Jul 2020 23:03:51 +0200
+Subject: [PATCH] Use compiler -fcf-protection only if compiler/arch supports
+ it
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There have been some PRs they were either rejected or some general suggestion
+for more flags suggested. So
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
+---
+ cmake/compilerFlags.cmake | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
+index 12caf42..455525e 100644
+--- a/cmake/compilerFlags.cmake
++++ b/cmake/compilerFlags.cmake
+@@ -26,7 +26,12 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
+ # 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)
++ # Gcc does support -fcf-protection on few arches only
++ CHECK_CXX_COMPILER_FLAG(-fcf-protection COMPILER_SUPPORTS_FCF_PROTECTION)
++ if (COMPILER_SUPPORTS_FCF_PROTECTION)
++ add_compile_options(-fcf-protection)
++ endif()
++ 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
+--
+2.21.3
+