summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Alfredsen <loki_val@gentoo.org>2009-05-03 20:03:10 +0000
committerPeter Alfredsen <loki_val@gentoo.org>2009-05-03 20:03:10 +0000
commit05c1d186cba26147468f38718ec58811b85f55a7 (patch)
treec7cd995c1a4cf394fac2d78dd8975f7d1d73ab8d /eclass/ELT-patches
parentBump version to use upstream tarball instead of gem. (diff)
downloadgentoo-2-05c1d186cba26147468f38718ec58811b85f55a7.tar.gz
gentoo-2-05c1d186cba26147468f38718ec58811b85f55a7.tar.bz2
gentoo-2-05c1d186cba26147468f38718ec58811b85f55a7.zip
Import patch from Debian http://bugs.debian.org/347650 which hacks around libtool deplib re-ordering, which inhibits -Wl,--as-needed. You have to set -Wl,--as-needed seperately in LDFLAGS for this to do any good, -Wl,--as-needed,--something-else will not do, but you can set -Wl,--something-else afterwards. Also make sure eclasses I 'own' run elibtoolize so they can reap the benefit.
Diffstat (limited to 'eclass/ELT-patches')
-rw-r--r--eclass/ELT-patches/as-needed/1.530
-rw-r--r--eclass/ELT-patches/as-needed/1.5.2638
-rw-r--r--eclass/ELT-patches/as-needed/2.2.638
3 files changed, 106 insertions, 0 deletions
diff --git a/eclass/ELT-patches/as-needed/1.5 b/eclass/ELT-patches/as-needed/1.5
new file mode 100644
index 000000000000..d9d45652c505
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/1.5
@@ -0,0 +1,30 @@
+--- ltmain.sh.orig 2006-03-29 15:45:36.000000000 +0200
++++ ltmain.sh 2006-03-29 16:39:30.000000000 +0200
+@@ -1754,6 +1754,11 @@
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
++ -Wl,--as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+@@ -2094,6 +2099,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)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
diff --git a/eclass/ELT-patches/as-needed/1.5.26 b/eclass/ELT-patches/as-needed/1.5.26
new file mode 100644
index 000000000000..8afd6d47dbdd
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/1.5.26
@@ -0,0 +1,38 @@
+--- ltmain.sh.orig 2009-04-18 16:51:52.000000000 +0200
++++ ltmain.sh 2009-04-18 16:55:05.000000000 +0200
+@@ -1812,10 +1812,15 @@
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
++ -Wl,--as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+@@ -2152,10 +2157,19 @@
+ fi
+ for deplib in $libs; do
+ 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"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
diff --git a/eclass/ELT-patches/as-needed/2.2.6 b/eclass/ELT-patches/as-needed/2.2.6
new file mode 100644
index 000000000000..c56369be7606
--- /dev/null
+++ b/eclass/ELT-patches/as-needed/2.2.6
@@ -0,0 +1,38 @@
+--- ltmain.sh.orig 2009-04-18 14:37:16.000000000 +0200
++++ ltmain.sh 2009-04-18 14:40:08.000000000 +0200
+@@ -4721,10 +4721,15 @@
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
++ -Wl,--as-needed)
++ deplibs="$deplibs $arg"
++ continue
++ ;;
++
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+@@ -5075,10 +5080,19 @@
+
+ for deplib in $libs; do
+ 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"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else