Source: iscsitarget
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 iscsitarget-1.4.20.2.harden/debian/rules iscsitarget-1.4.20.2/debian/rules
--- iscsitarget-1.4.20.2.harden/debian/rules	2011-08-06 22:40:19.000000000 +0200
+++ iscsitarget-1.4.20.2/debian/rules	2012-01-22 15:47:21.000000000 +0100
@@ -12,8 +12,6 @@
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
-
-
 # get-orig-source target
 DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
 
@@ -36,13 +34,13 @@
 -include $(MA_DIR)/include/generic.make
 -include $(MA_DIR)/include/common-rules.make
 
-CFLAGS = -Wall -g
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+CFLAGS += `dpkg-buildflags --get CPPFLAGS`
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+export CFLAGS
+export LDFLAGS
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 	INSTALL_PROGRAM += -s
 endif
Nur in iscsitarget-1.4.20.2/debian: rules~.

Reply via email to