package/exiv2: fix patch with stack protector flag
authorThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 31 Jul 2021 14:38:54 +0000 (16:38 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Sat, 31 Jul 2021 18:56:16 +0000 (20:56 +0200)
One of the files have CRLF line endings, which have been lost in the
process, causing build issues. Also, we update the upstream status of
the patch.

Fixes:

  http://autobuild.buildroot.net/results/31744f8476819c725f8c0024529515bb8059582d/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/exiv2/0001-add-BUILD_WITH_STACK_PROTECTOR-option.patch

index c82061661bf96877b1cc7ba45e032bc64782ecbe..18684ebbfa7a305578ceac8d01781ae79ff0050f 100644 (file)
@@ -1,6 +1,6 @@
-From 8651c9f823ace70b6609b10aeef0c0740636b570 Mon Sep 17 00:00:00 2001
+From 4bb57da5fb0bb0d7e747b9e325e9ec0876ffc1f9 Mon Sep 17 00:00:00 2001
 From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-Date: Thu, 1 Jul 2021 19:31:25 +0200
+Date: Sat, 31 Jul 2021 16:36:50 +0200
 Subject: [PATCH] add BUILD_WITH_STACK_PROTECTOR option
 
 Add BUILD_WITH_STACK_PROTECTOR to avoid the following build failure with
@@ -15,38 +15,40 @@ enable SSP support
 Fixes:
  - http://autobuild.buildroot.org/results/ae4635899124c602c70d2b342a76f95c34aa4a3d
 
+Upstream: https://github.com/Exiv2/exiv2/commit/f31c0eba098889899d29b7b0da830aee2b62a7b8
 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-[Upstream status: https://github.com/Exiv2/exiv2/pull/1756]
 ---
  CMakeLists.txt            | 1 +
- cmake/compilerFlags.cmake | 2 +-
- 2 files changed, 2 insertions(+), 1 deletion(-)
+ cmake/compilerFlags.cmake | 4 ++--
+ 2 files changed, 3 insertions(+), 2 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9fe8b5f9..aabb3dca 100644
+index 6f0da06a..0746ee14 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -52,6 +52,7 @@ mark_as_advanced(
+@@ -47,6 +47,7 @@ mark_as_advanced(
      EXIV2_TEAM_USE_SANITIZERS
  )
  
 +option( BUILD_WITH_STACK_PROTECTOR    "Build with stack protector"                            ON )
  option( BUILD_WITH_CCACHE             "Use ccache to speed up compilations"                   OFF )
  option( BUILD_WITH_COVERAGE           "Add compiler flags to generate coverage stats"         OFF )
- include(cmake/gcovr.cmake REQUIRED)
 diff --git a/cmake/compilerFlags.cmake b/cmake/compilerFlags.cmake
-index c8a85c59..20f6ac53 100644
+index 35faf501..0a646e50 100644
 --- a/cmake/compilerFlags.cmake
 +++ b/cmake/compilerFlags.cmake
-@@ -44,7 +44,7 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
-             if(HAS_FCF_PROTECTION)
-                 add_compile_options(-fcf-protection)
-             endif()
--            if(HAS_FSTACK_PROTECTOR_STRONG)
-+            if(BUILD_WITH_STACK_PROTECTOR AND HAS_FSTACK_PROTECTOR_STRONG)
-                 add_compile_options(-fstack-protector-strong)
-             endif()
-         endif()
+@@ -33,8 +33,8 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
+             endif()\r
+             if(HAS_FCF_PROTECTION)\r
+                 add_compile_options(-fcf-protection)\r
+-            endif()\r
+-            if(HAS_FSTACK_PROTECTOR_STRONG)\r
++              endif()\r
++          if(BUILD_WITH_STACK_PROTECTOR AND HAS_FSTACK_PROTECTOR_STRONG)\r
+                 add_compile_options(-fstack-protector-strong)\r
+             endif()\r
+         endif()\r
 -- 
-2.30.2
+2.31.1