From e7bebcfcdeb500c02860999e3ac52ac665e825c1 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 31 Jan 2010 00:24:16 +0000 Subject: Link with -Wl,--as-needed (closes: #560155). --- debian/changelog | 6 ++++++ debian/rules | 7 +++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index e835977d9..ba4919d0f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +openssh (1:5.3p1-2) UNRELEASED; urgency=low + + * Link with -Wl,--as-needed (closes: #560155). + + -- Colin Watson Sun, 31 Jan 2010 00:11:43 +0000 + openssh (1:5.3p1-1) unstable; urgency=low * New upstream release. diff --git a/debian/rules b/debian/rules index 09b8771b1..bd0ca85d7 100755 --- a/debian/rules +++ b/debian/rules @@ -107,9 +107,8 @@ confflags += --with-cflags='$(cflags)' confflags_udeb += --with-cflags='$(cflags_udeb)' # Linker flags. -ifneq ($(PIC_LDFLAGS)$(HARDENING_LDFLAGS),) -confflags += --with-ldflags='$(strip $(PIC_LDFLAGS) $(HARDENING_LDFLAGS))' -endif +confflags += --with-ldflags='$(strip -Wl,--as-needed $(PIC_LDFLAGS) $(HARDENING_LDFLAGS))' +confflags_udeb += --with-ldflags='-Wl,--as-needed' build: build-deb build-udeb @@ -123,7 +122,7 @@ build-deb-stamp: perl -pi -e 's,.*#define USE_BTMP .*,/* #undef USE_BTMP */,' build-deb/config.h $(MAKE) -C build-deb -j 2 ASKPASS_PROGRAM='/usr/bin/ssh-askpass' - $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(OPTFLAGS) -g -Wall' + $(MAKE) -C contrib gnome-ssh-askpass2 CC='$(CC) $(OPTFLAGS) -g -Wall -Wl,--as-needed' ifeq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) $(MAKE) -C debian/tests endif -- cgit v1.2.3