[Pkg-ceph-commits] [ceph] 13/16: build with "--as-needed" to minimise needless linking

Dmitry Smirnov onlyjob at moszumanska.debian.org
Tue Mar 25 02:13:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

onlyjob pushed a commit to branch experimental
in repository ceph.

commit ea38fb2
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Mon Mar 24 19:26:40 2014

    build with "--as-needed" to minimise needless linking
---
 debian/rules | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/rules b/debian/rules
index a58adb6..04dfe31 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,9 @@
 
 export DESTDIR=$(CURDIR)/debian/tmp
 
+# minimise needless linking
+export DEB_LDFLAGS_MAINT_APPEND= -Wl,--as-needed
+
 # Enable hardening
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 include /usr/share/dpkg/buildflags.mk
@@ -39,6 +42,11 @@ extraopts += --with-system-libs3
 %:
 	dh $@ --with javahelper,python2,autoreconf --parallel
 
+# use --as-needed only if supported by dh-autoreconf (to simplify backporting)
+DH_AS_NEEDED=$(shell dpkg --compare-versions $$(dpkg --status dh-autoreconf | grep Version | cut -d' ' -f2) ge 6 && echo --as-needed)
+override_dh_autoreconf:
+	dh_autoreconf $(DH_AS_NEEDED)
+
 override_dh_auto_configure:
 	dh_auto_configure -- $(extraopts)
 

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list