Package: libxml2 Version: 2.7.8.dfsg-5.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 libxml2-2.7.8.dfsg.orig/debian/rules libxml2-2.7.8.dfsg/debian/rules --- libxml2-2.7.8.dfsg.orig/debian/rules 2012-01-06 18:21:57.000000000 +0100 +++ libxml2-2.7.8.dfsg/debian/rules 2012-01-06 18:24:29.000000000 +0100 @@ -5,12 +5,13 @@ # The current default version of python PYVER=$(shell pyversions -d) -CFLAGS = -Wall -g +CFLAGS = `dpkg-buildflags --get CFLAGS` +CFLAGS += -Wall +LDFLAGS = `dpkg-buildflags --get LDFLAGS` +CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -fno-strict-aliasing +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -fno-strict-aliasing endif TARGETS := main $(PYVERS) $(PYVERS:%=%-dbg) @@ -25,7 +26,7 @@ export DH_OPTIONS = -Nlibxml2-udeb endif -CONFIGURE_FLAGS := --with-history CC="gcc -Wl,--as-needed" CFLAGS="$(CFLAGS)" --cache-file="$(CURDIR)/build/config.cache" +CONFIGURE_FLAGS := --with-history CC="gcc -Wl,--as-needed" CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" --cache-file="$(CURDIR)/build/config.cache" override_dh_auto_configure: $(TARGETS:%=configure-%) Nur in libxml2-2.7.8.dfsg/debian: rules~.