summaryrefslogtreecommitdiff
path: root/eclass
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
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')
-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
-rw-r--r--eclass/gtk-sharp-module.eclass5
-rw-r--r--eclass/libtool.eclass8
-rw-r--r--eclass/poppler.eclass5
6 files changed, 118 insertions, 6 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
diff --git a/eclass/gtk-sharp-module.eclass b/eclass/gtk-sharp-module.eclass
index cc388ab8c444..f3c126622b88 100644
--- a/eclass/gtk-sharp-module.eclass
+++ b/eclass/gtk-sharp-module.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.23 2009/03/18 11:14:09 loki_val Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gtk-sharp-module.eclass,v 1.24 2009/05/03 20:03:10 loki_val Exp $
# @ECLASS: gtk-sharp-module.eclass
# @MAINTAINER:
@@ -14,7 +14,7 @@
WANT_AUTOMAKE=none
WANT_AUTOCONF=none
-inherit eutils mono multilib autotools base versionator
+inherit eutils mono multilib libtool autotools base versionator
# @ECLASS-VARIABLE: GTK_SHARP_MODULE
# @DESCRIPTION:
@@ -456,6 +456,7 @@ gtk-sharp-module_src_prepare() {
# If set, EAUTORECONF will be run during src_prepare.
[[ ${EAUTORECONF} ]] && eautoreconf
phase_hook ${TARBALL}-tarball-post
+ elibtoolize
}
# @FUNCTION: gtk-sharp-tarball_src_configure
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index ef928eddbcb7..c63c77a98958 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.82 2009/03/14 13:02:08 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.83 2009/05/03 20:03:10 loki_val Exp $
#
# Maintainer: base-system@gentoo.org
#
@@ -124,7 +124,7 @@ elibtoolize() {
local do_uclibc="yes"
local deptoremove=
local my_dirlist=
- local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross"
+ local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross as-needed"
local start_dir=${PWD}
my_dirlist=$(ELT_find_ltmain_sh)
@@ -219,6 +219,10 @@ elibtoolize() {
ret=$?
fi
;;
+ "as-needed")
+ ELT_walk_patches "${x}/ltmain.sh" "${y}"
+ ret=$?
+ ;;
"uclibc-conf")
if [[ -e ${x}/configure && \
-n $(grep 'Transform linux' "${x}/configure") ]] ; then
diff --git a/eclass/poppler.eclass b/eclass/poppler.eclass
index dc514876b044..1b553dfaf3c4 100644
--- a/eclass/poppler.eclass
+++ b/eclass/poppler.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/poppler.eclass,v 1.3 2009/04/10 23:18:41 loki_val Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/poppler.eclass,v 1.4 2009/05/03 20:03:10 loki_val Exp $
# @ECLASS: poppler.eclass
# @MAINTAINER:
@@ -9,7 +9,7 @@
# @DESCRIPTION:
# Provides an easy template for making modularized poppler-based ebuilds.
-inherit base multilib
+inherit base multilib libtool
has 2 ${EAPI} || DEPEND="EAPI-TOO-OLD"
@@ -126,6 +126,7 @@ poppler_src_prepare() {
sed -i \
-e 's#$(top_builddir)/poppler/libpoppler.la#-lpoppler#' \
$(find . -type f -name 'Makefile.in') || die "Failed to sed proper lib into Makefile.am"
+ elibtoolize
}
# @FUNCTION: poppler_src_configure