[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#667828: Please enable hardened build flags



Package: hplip
Severity: important
Tags: patch

Please enable hardened build flags through dpkg-buildflags.

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

Cheers,
        Moritz
diff -aur hplip-3.12.2.harden/debian/rules hplip-3.12.2/debian/rules
--- hplip-3.12.2.harden/debian/rules	2012-04-06 21:28:34.000000000 +0200
+++ hplip-3.12.2/debian/rules	2012-04-06 21:34:56.000000000 +0200
@@ -65,15 +65,11 @@
   CONFFLAGS += --disable-pp-build
 endif
 
-DEBUGFLAGS=-g
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	DEBUGFLAGS += -O0
-else
-	DEBUGFLAGS += -O2
-endif
-
-CFLAGS:=-Wall -pipe $(DEBUGFLAGS)
+CFLAGS:=-Wall -pipe
+CFLAGS += `dpkg-buildflags --get CFLAGS`
 CXXFLAGS:=$(CFLAGS)
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
 
 ##
 ##  Build-tree preparation
@@ -122,7 +118,7 @@
 	ln -sf /usr/share/misc/config.guess .
 	rm -f config.cache
 
-	./configure CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
+	./configure CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
 		HPLIP_PPD_PATH=/usr/share/ppd \
 		$(CONFFLAGS) \
 	 	--config-cache \
Nur in hplip-3.12.2/debian: rules~.

Reply to: