Bug#655503: Please enabled hardened build flags
Package: x11-xserver-utils
Version: 7.6+3
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 x11-xserver-utils-7.6+3.orig/debian/rules x11-xserver-utils-7.6+3/debian/rules
--- x11-xserver-utils-7.6+3.orig/debian/rules 2011-06-04 01:07:12.000000000 +0200
+++ x11-xserver-utils-7.6+3/debian/rules 2012-01-11 19:40:09.000000000 +0100
@@ -18,12 +18,11 @@
SUBDIRS=$(DEF_SUBDIRS)
BUILD_STAMPS = $(addprefix $(STAMP_DIR)/build-,$(SUBDIRS))
-CFLAGS = -Wall -g
-ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS)))
- CFLAGS += -O0
-else
- CFLAGS += -O2
-endif
+CFLAGS = `dpkg-buildflags --get CFLAGS`
+CFLAGS += -Wall
+LDFLAGS = `dpkg-buildflags --get LDFLAGS`
+CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
MAKEFLAGS += -j$(NUMJOBS)
@@ -50,7 +49,7 @@
../$*/configure --prefix=/usr --mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info $(confflags) \
--disable-xprint \
- CFLAGS="$(CFLAGS)" \
+ CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" \
RSH=rsh \
MANCONF="/etc/manpath.config"
cd $*-build && $(MAKE)
Nur in x11-xserver-utils-7.6+3/debian: rules~.
Reply to: