diff options
author | nekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7> | 2012-01-24 22:23:06 +0000 |
---|---|---|
committer | nekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7> | 2012-01-24 22:23:06 +0000 |
commit | 36018131dda89831b3159ce57e89ce23bcc91cff (patch) | |
tree | 26014c5d4f3cd58408c317865010e334e54b67e7 /debian/rules | |
parent | f35045dcf12fa02a57e029cb229755321ef23342 (diff) | |
download | shadow-36018131dda89831b3159ce57e89ce23bcc91cff.tar.gz |
* debian/rules: Do not hard-code CFLAGS and LDFLAGS. Build with all
hardening flags set. Closes: #657010
Diffstat (limited to 'debian/rules')
-rwxr-xr-x | debian/rules | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/debian/rules b/debian/rules index 39be6d09..6f893de9 100755 --- a/debian/rules +++ b/debian/rules @@ -8,6 +8,16 @@ ifeq ($(DEB_HOST_ARCH_OS),hurd) override DEB_ARCH_PACKAGES=passwd endif +# To be set before loading any CDBS files (#651964) +#CDBS_FIX_COMPILE_FLAGS = 1 +# Enable PIE, BINDNOW, and possible future flags. +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all +# Unfortunately, this is not working (#651966), set flags manually + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/buildflags.mk + include /usr/share/cdbs/1/rules/debhelper.mk # Specify where dh_install will find the files that it needs to move: DEB_DH_INSTALL_SOURCEDIR=debian/tmp @@ -32,14 +42,6 @@ endif # Automatically controls patching at build time: include /usr/share/cdbs/1/rules/patchsys-quilt.mk -CFLAGS = -g -W -Wall -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif -export CFLAGS - # Add extras to the install process: binary-install/login:: dh_installpam -p login |