summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-10-01 08:22:26 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-10-01 14:18:18 +0200
commit9a61bb2176e6599094c575dec7184c3afd6f39bd (patch)
tree940bb36cb88b37ab9fd462a93532253129c1bb00 /debian/rules
parent3644a2fba449065e19ff663d4f31af10bb6def4f (diff)
debian/rules: add hardening=+all
Because of dpkg-buildflags we already get most of the hardening features, +all adds -fPIE and ld -z now Thanks: Simon Ruderich, Markus Waldeck
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules9
1 files changed, 6 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules
index c7b5aa304..f031cfddb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,9 +21,12 @@ endif
-include build/environment.mak
ifneq (,$(shell which dpkg-buildflags))
- export CXXFLAGS = $(shell dpkg-buildflags --get CXXFLAGS)
- export LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
- export CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+ # make does not export to $(shell) so we need to workaround
+ # (http://savannah.gnu.org/bugs/?10593)
+ dpkg_buildflags = DEB_BUILD_MAINT_OPTIONS=hardening=+all dpkg-buildflags
+ export CXXFLAGS = $(shell $(dpkg_buildflags) --get CXXFLAGS)
+ export LDFLAGS = $(shell $(dpkg_buildflags) --get LDFLAGS)
+ export CPPFLAGS = $(shell $(dpkg_buildflags) --get CPPFLAGS)
else
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
export CXXFLAGS = -O0 -g -Wall