[silo-llnl] 36/96: --as-needed fix
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Jul 21 13:09:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository silo-llnl.
commit 2ed11501e07ed08da10507d414856e9998d8ba43
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Thu Sep 15 06:58:09 2011 +0100
--as-needed fix
---
debian/as-needed.patch | 38 ++++++++++++++++++++++++++++++++++++++
debian/changelog | 7 +++++++
debian/rules | 10 ++++++++--
3 files changed, 53 insertions(+), 2 deletions(-)
diff --git a/debian/as-needed.patch b/debian/as-needed.patch
new file mode 100644
index 0000000..c4748c7
--- /dev/null
+++ b/debian/as-needed.patch
@@ -0,0 +1,38 @@
+Author: Alastair McKinstry <mckinstry at debian.org>
+Description: Patch to ensure -Wl,--as-needed is NOT reordered by libtool.
+ Note that this patch is applied by ./debian/rules AFTER autoreconf is run;
+ it cannot be applied in ./debian/patches
+Bug-Debian: http://bugs.debian.org/347650
+Last-Updated: 2011-09-13
+Forwarded: no
+
+--- ltmain.sh.orig 2011-09-13 10:05:45.000000000 +0100
++++ ltmain.sh 2011-09-13 10:22:40.000000000 +0100
+@@ -5500,6 +5500,11 @@
+ continue
+ ;;
+
++ -Wl,--as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+@@ -6150,6 +6155,15 @@
+ lib=
+ found=no
+ case $deplib in
++ -Wl,--as-needed)
++ if test "$linkmode,$pass" = "prog,link"; then
++ compile_deplibs="$deplib $compile_deplibs"
++ finalize_deplibs="$deplib $finalize_deplibs"
++ else
++ deplibs="$deplib $deplibs"
++ fi
++ continue
++ ;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
diff --git a/debian/changelog b/debian/changelog
index 14e31ec..295b3c9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+silo-llnl (4.8-9) unstable; urgency=low
+
+ * Build with -Wl,--as-needed to remove unwanted dependencies.
+ * Remove unnecessary ${shlibs:Depends} from libsilo-dev
+
+ -- Alastair McKinstry <mckinstry at debian.org> Thu, 15 Sep 2011 06:57:23 +0100
+
silo-llnl (4.8-8) unstable; urgency=low
* B-D on libtool too.
diff --git a/debian/rules b/debian/rules
index c2972bc..f1d176b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,13 +21,19 @@ PYVERS:= `pyversions -s`
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
override_dh_auto_configure:
+ # Fix as-needed for libtool.
autoreconf -fiv
- dh_auto_configure -- --enable-pythonmodule --enable-silex --with-qt=/usr --enable-pythonmodule --enable-silex --with-qt-bin=/usr/bin --with-qt-lib=/usr/lib --with-qt-include=/usr/include/qt4 --with-hdf5=/usr/include,/usr/lib CPPFLAGS=" -I$(MPI_INC)" CC=$(CC)
+ (cd config && patch < ../debian/as-needed.patch)
+ LDFLAGS=" -Wl,--as-needed" dh_auto_configure -- --enable-pythonmodule --enable-silex --with-qt=/usr --enable-pythonmodule --enable-silex --with-qt-bin=/usr/bin --with-qt-lib=/usr/lib --with-qt-include=/usr/include/qt4 --with-hdf5=/usr/include,/usr/lib CPPFLAGS=" -I$(MPI_INC)" CC=$(CC)
override_dh_auto_build:
dh_auto_build
set -e ; for p in $(PYVERS) ; do \
- dh_auto_configure -- --enable-pythonmodule --enable-silex --with-qt=/usr --enable-pythonmodule --enable-silex --with-qt-bin=/usr/bin --with-qt-lib=/usr/lib --with-qt-include=/usr/include/qt4 --with-hdf5=/usr/include,/usr/lib PYTHON=$$p CPPFLAGS=" -I$(MPI_INC)" CC=$(CC) ; \
+ LDFLAGS=" -Wl,--as-needed" dh_auto_configure -- \
+ --enable-pythonmodule --enable-silex \
+ --with-qt=/usr --with-qt-bin=/usr/bin --with-qt-lib=/usr/lib \
+ --with-qt-include=/usr/include/qt4 \
+ --with-hdf5=/usr/include,/usr/lib PYTHON=$$p CPPFLAGS=" -I$(MPI_INC)" CC=$(CC) ; \
$(MAKE) -C tools/browser CXX=$(CC) ; \
$(MAKE) -C tools/python ; \
mkdir -p debian/tmp/usr/lib/pyshared/$$p ; \
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/silo-llnl.git
More information about the debian-science-commits
mailing list