Package: diffutils
Version: 1:3.2-1
Severity: important
Tags: patch

Please enabled hardened build flags through dpkg-buildflags.

Patch attached. (dpkg-buildflags abides "noopt" from DEB_BUILD_OPTIONS)

Cheers,
        Moritz
diff -aur diffutils-3.2.orig/debian/rules diffutils-3.2/debian/rules
--- diffutils-3.2.orig/debian/rules	2011-08-04 20:27:24.000000000 +0200
+++ diffutils-3.2/debian/rules	2011-12-31 15:46:20.000000000 +0100
@@ -3,12 +3,13 @@
 package = diffutils
 docdir = debian/tmp/usr/share/doc/$(package)
 
-CFLAGS = -g -Wall
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
 STRIP = true
 
-ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-  CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
   STRIP = strip --remove-section=.comment --remove-section=.note
 endif
@@ -23,7 +24,7 @@
 endif
 
 build:
-	./configure $(confflags) --prefix=/usr
+	./configure CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" $(confflags) --prefix=/usr
 	$(MAKE) CFLAGS="$(CFLAGS)"
 	touch build
 
Nur in diffutils-3.2/debian: rules~.

Reply via email to