From acffc72f16c13a81f622f9353a5da40a35ebb5ee Mon Sep 17 00:00:00 2001 From: Thomas Backlund Date: Sat, 5 Feb 2011 19:36:23 +0000 Subject: merge under/overlinking scripts from rpm-manbo-setup --- force-as-needed-for-shared-lib-in-libtool | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 force-as-needed-for-shared-lib-in-libtool (limited to 'force-as-needed-for-shared-lib-in-libtool') diff --git a/force-as-needed-for-shared-lib-in-libtool b/force-as-needed-for-shared-lib-in-libtool new file mode 100755 index 0000000..2694273 --- /dev/null +++ b/force-as-needed-for-shared-lib-in-libtool @@ -0,0 +1,14 @@ +#!/bin/sh + +# replaces +# tmp_sharedflag='-shared' ;; +# with +# tmp_sharedflag='-shared -Wl,--as-needed' ;; +# +# since passing -Wl,--as-needed is not enough because libtool moves it +# after *.o and libs + +if [ -e configure ]; then + echo "Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html)" + sed -i "s/^\([ \t]*tmp_sharedflag\)='-shared'/\1='-shared -Wl,--as-needed'/" configure +fi -- cgit v1.2.1