Source: apg
Version: 2.2.3.dfsg.1-5
Tags: patch
User: debian-...@lists.debian.org
Usertags: pac-bti

Hallo Marc,

whilst trying to figure out why a rebuild of apg on arm64 does not
enable BTI [1] I noticed that there is an issue with the way the
upstream Makefile sets CFLAGS and LDFLAGS. Please see the attached
patch.

Thanks,
  Emanuele

[1] https://wiki.debian.org/ToolChain/PACBTI
diff -Nru apg-2.2.3.dfsg.1/debian/changelog apg-2.2.3.dfsg.1/debian/changelog
--- apg-2.2.3.dfsg.1/debian/changelog   2017-10-02 00:19:40.000000000 +0200
+++ apg-2.2.3.dfsg.1/debian/changelog   2024-02-13 11:43:54.000000000 +0100
@@ -1,3 +1,11 @@
+apg (2.2.3.dfsg.1-5.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix dpkg-buildflags invocation in debian/patches/Makefile to properly set
+    CFLAGS and LDFLAGS.
+
+ -- Emanuele Rocca <e...@debian.org>  Mon, 06 May 2024 17:40:04 +0200
+
 apg (2.2.3.dfsg.1-5) unstable; urgency=low
 
   * add warning to package description about FIPS 181 deprecation.
diff -Nru apg-2.2.3.dfsg.1/debian/patches/Makefile 
apg-2.2.3.dfsg.1/debian/patches/Makefile
--- apg-2.2.3.dfsg.1/debian/patches/Makefile    2017-10-02 00:19:40.000000000 
+0200
+++ apg-2.2.3.dfsg.1/debian/patches/Makefile    2024-02-13 11:43:54.000000000 
+0100
@@ -5,14 +5,16 @@
  add dpkg-buildflags for hardening
 Origin: vendor
 Forwarded: not-needed
---- a/Makefile
-+++ b/Makefile
+Index: apg-2.2.3.dfsg.1/Makefile
+===================================================================
+--- apg-2.2.3.dfsg.1.orig/Makefile
++++ apg-2.2.3.dfsg.1/Makefile
 @@ -6,7 +6,7 @@ CC = gcc
  ##################################################################
  # Compilation flags
  # You should comment the line below for AIX+native cc
 -FLAGS = -Wall
-+FLAGS = -Wall `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get LDFLAGS`
++FLAGS = -Wall $(shell dpkg-buildflags --get CFLAGS) $(shell dpkg-buildflags 
--get LDFLAGS)
  
  ##################################################################
  # Libraries

Reply via email to