Source: popt
Severity: important
Tags: patch
Please enable hardened build flags through dpkg-buildflags.See
http://lists.debian.org/debian-devel-announce/2012/02/msg00016.html
for details.
Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)
Cheers,
Moritz
diff -aur popt-1.16.harden/debian/rules popt-1.16/debian/rules
--- popt-1.16.harden/debian/rules 2011-12-20 14:27:23.000000000 +0100
+++ popt-1.16/debian/rules 2012-05-14 02:13:55.000000000 +0200
@@ -29,12 +29,10 @@
endif
endif
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-cflags = -O0 -Wall -W -g -D_GNU_SOURCE -D_REENTRANT
-else
-cflags = -O2 -Wall -W -g -D_GNU_SOURCE -D_REENTRANT
-endif
+cflags = `dpkg-buildflags --get CFLAGS` `dpkg-buildflags --get CPPFLAGS` -Wall -W -D_GNU_SOURCE -D_REENTRANT
cflags_udeb = -Os -Wall -W -g -D_GNU_SOURCE -D_REENTRANT
+ldflags = `dpkg-buildflags --get LDFLAGS`
+
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
install = install
@@ -72,7 +70,7 @@
build-arch-deb-stamp: configure-deb-stamp
dh_testdir
- cd $(objdir) && $(MAKE) CFLAGS="$(cflags)"
+ cd $(objdir) && $(MAKE) CFLAGS="$(cflags)" LDFLAGS="$(ldflags)"
touch $@
build-arch-udeb-stamp: configure-udeb-stamp
Nur in popt-1.16/debian: rules~.