diff options
-rw-r--r-- | eclass/ELT-patches/cross/link-ROOT | 20 | ||||
-rw-r--r-- | eclass/libtool.eclass | 12 |
2 files changed, 30 insertions, 2 deletions
diff --git a/eclass/ELT-patches/cross/link-ROOT b/eclass/ELT-patches/cross/link-ROOT new file mode 100644 index 000000000000..3c7d99be1f20 --- /dev/null +++ b/eclass/ELT-patches/cross/link-ROOT @@ -0,0 +1,20 @@ +--- libltdl/config/ltmain.sh 2008-09-07 19:56:33.000000000 +0200 ++++ libltdl/config/ltmain.sh.new 2009-02-15 20:37:47.000000000 +0100 +@@ -5768,7 +5768,7 @@ + test "$hardcode_direct_absolute" = no; then + add="$libdir/$linklib" + elif test "$hardcode_minus_L" = yes; then +- add_dir="-L$libdir" ++ add_dir="-L$ROOT/$libdir" + add="-l$name" + elif test "$hardcode_shlibpath_var" = yes; then + case :$finalize_shlibpath: in +@@ -5785,7 +5785,7 @@ + fi + else + # We cannot seem to hardcode it, guess we'll fake it. +- add_dir="-L$libdir" ++ add_dir="-L$ROOT/$libdir" + # Try looking first in the location we're being installed to. + if test -n "$inst_prefix_dir"; then + case $libdir in diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass index 29251aa430e3..ef928eddbcb7 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.81 2008/07/31 20:01:43 drac Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.82 2009/03/14 13:02:08 vapier Exp $ # # Maintainer: base-system@gentoo.org # @@ -15,6 +15,8 @@ DESCRIPTION="Based on the ${ECLASS} eclass" ELIBTOOL_VERSION="2.0.2" +inherit toolchain-funcs + ELT_PATCH_DIR="${ECLASSDIR}/ELT-patches" ELT_APPLIED_PATCHES= ELT_LTMAIN_SH= @@ -122,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" + local elt_patches="install-sh ltmain portage relink max_cmd_len sed test tmp cross" local start_dir=${PWD} my_dirlist=$(ELT_find_ltmain_sh) @@ -265,6 +267,12 @@ elibtoolize() { ELT_walk_patches "${x}/install-sh" "${y}" ret=$? ;; + "cross") + if tc-is-cross-compiler ; then + ELT_walk_patches "${x}/ltmain.sh" "${y}" + ret=$? + fi + ;; *) ELT_walk_patches "${x}/ltmain.sh" "${y}" ret=$? |