Hi, I've uploaded an nmu enabling build hardening flags for pcre3 to
delayed/5.  Please let me know if I should delay longer.

Best wishes,
Mike
diff -Nru pcre3-8.35/debian/changelog pcre3-8.35/debian/changelog
--- pcre3-8.35/debian/changelog	2014-07-23 20:24:30.000000000 +0000
+++ pcre3-8.35/debian/changelog	2014-09-28 23:03:27.000000000 +0000
@@ -1,3 +1,10 @@
+pcre3 (1:8.35-3.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Enable build hardening flags (closes: #656008).
+
+ -- Michael Gilbert <mgilb...@debian.org>  Fri, 19 Sep 2014 01:48:23 +0000
+
 pcre3 (1:8.35-3) unstable; urgency=medium
 
   Thanks to Simon McVittie for all of the work on this:
diff -Nru pcre3-8.35/debian/rules pcre3-8.35/debian/rules
--- pcre3-8.35/debian/rules	2014-07-23 20:06:54.000000000 +0000
+++ pcre3-8.35/debian/rules	2014-09-28 23:03:27.000000000 +0000
@@ -11,18 +11,12 @@
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 
-CFLAGS = -Wall -g
 INSTALL = install
 INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
 INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
 INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
 INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755
 
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-CFLAGS += -O0
-else
-CFLAGS += -O2
-endif
 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 INSTALL_PROGRAM += -s
 endif
@@ -31,14 +25,15 @@
 	dh_testdir
 	# Add here commands to configure the package.
 	dh_autoreconf
-	CC_FOR_BUILD=cc CFLAGS="$(CFLAGS)" ./configure \
+	CC_FOR_BUILD=cc ./configure \
 		--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
 		--prefix=/usr --mandir=\$${prefix}/share/man \
 		--infodir=\$${prefix}/share/info \
 		--libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \
 		--enable-utf8 --enable-unicode-properties \
 		--disable-silent-rules \
-		$(shell . debian/jit-test)
+		$(shell . debian/jit-test) \
+		$(shell DEB_CFLAGS_MAINT_APPEND=-Wall DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags --export=configure)
 	touch configure-stamp
 
 build: build-arch build-indep

Reply via email to