From db9ef6810f5ec4d9c6e969bb7b53a37be0bdb548 Mon Sep 17 00:00:00 2001 From: Bdale Garbee Date: Fri, 30 Dec 2011 09:18:38 -0700 Subject: [PATCH] hardening build flags patch from Mortiz Muehlenhoff --- debian/changelog | 3 ++- debian/rules | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4039b5f3..b53c50cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,9 @@ tar (1.26-4) UNRELEASED; urgency=low * mark "Mult-Arch: foreign" to ease crossgrading, closes: #649478 + * hardened build flags patch from Moritz Huehlenhoff, closes: #653722 - -- Bdale Garbee Mon, 21 Nov 2011 08:03:32 -0700 + -- Bdale Garbee Fri, 30 Dec 2011 09:18:11 -0700 tar (1.26-3) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 2dbe2187..d978367b 100755 --- a/debian/rules +++ b/debian/rules @@ -6,12 +6,17 @@ ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) CONFARGS = --host=$(DEB_HOST_GNU_TYPE) endif +CFLAGS = `dpkg-buildflags --get CFLAGS` +CFLAGS += -Wall +LDFLAGS += `dpkg-buildflags --get LDFLAGS` +CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` + configure: configure-stamp configure-stamp: dh_testdir cp -f /usr/share/misc/config.sub build-aux/config.sub cp -f /usr/share/misc/config.guess build-aux/config.guess - RSH="/usr/bin/rsh" CFLAGS="-O2 -g -Wall" ./configure \ + RSH="/usr/bin/rsh" CPPFLAGS="$(CPPFLAGS)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" ./configure \ --prefix=/usr \ --libexecdir=/usr/sbin \ --with-lzma=xz \ -- 2.39.5