summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ELT-patches/gold-conf/2.2.610
-rw-r--r--eclass/libtool.eclass30
2 files changed, 31 insertions, 9 deletions
diff --git a/eclass/ELT-patches/gold-conf/2.2.6 b/eclass/ELT-patches/gold-conf/2.2.6
new file mode 100644
index 000000000000..048cbad01187
--- /dev/null
+++ b/eclass/ELT-patches/gold-conf/2.2.6
@@ -0,0 +1,10 @@
+--- configure.orig
++++ configure
+@@ -9933,6 +9933,7 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
++ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
diff --git a/eclass/libtool.eclass b/eclass/libtool.eclass
index dd862f559152..38f7a79bfd5d 100644
--- a/eclass/libtool.eclass
+++ b/eclass/libtool.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.90 2010/08/22 22:44:45 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/libtool.eclass,v 1.91 2011/06/09 15:53:04 flameeyes Exp $
# @ECLASS: libtool.eclass
# @MAINTAINER:
@@ -28,11 +28,16 @@ ELT_try_and_apply_patch() {
local file=$1
local patch=$2
+ (
+ echo ""
+ echo "Trying $(basename "$(dirname "${patch}")")-${patch##*/}.patch on ${file}"
+ ) &>> "${T}/elibtool.log"
+
# We only support patchlevel of 0 - why worry if its static patches?
- if patch -p0 --dry-run "${file}" "${patch}" &> "${T}/elibtool.log" ; then
+ if patch -p0 --dry-run "${file}" "${patch}" &>> "${T}/elibtool.log" ; then
einfo " Applying $(basename "$(dirname "${patch}")")-${patch##*/}.patch ..."
patch -p0 -g0 --no-backup-if-mismatch "${file}" "${patch}" \
- &> "${T}/elibtool.log"
+ &>> "${T}/elibtool.log"
ret=$?
export ELT_APPLIED_PATCHES="${ELT_APPLIED_PATCHES} ${patch##*/}"
else
@@ -161,6 +166,10 @@ elibtoolize() {
*-mint*) elt_patches+=" mint-conf" ;;
esac
+ if $(tc-getLD) --version 2>&1 | grep -qs 'GNU gold'; then
+ elt_patches+=" gold-conf"
+ fi
+
# Reuse "$@" for dirs to patch
set --
if [[ ${do_shallow} == "yes" ]] ; then
@@ -216,7 +225,7 @@ elibtoolize() {
ret=$?
# ltmain.sh and co might be in a subdirectory ...
elif [[ ! -e ${d}/configure ]] && \
- grep -qs 'Transform linux' "${d}/../configure" ; then
+ grep -qs 'Transform linux' "${d}/../configure" ; then
ELT_walk_patches "${d}/../configure" "${p}"
ret=$?
fi
@@ -234,7 +243,7 @@ elibtoolize() {
ret=$?
# ltmain.sh and co might be in a subdirectory ...
elif [[ ! -e ${d}/configure ]] && \
- grep -qs 'version_type=freebsd-' "${d}/../configure" ; then
+ grep -qs 'version_type=freebsd-' "${d}/../configure" ; then
ELT_walk_patches "${d}/../configure" "${p}"
ret=$?
fi
@@ -251,7 +260,7 @@ elibtoolize() {
ret=$?
# ltmain.sh and co might be in a subdirectory ...
elif [[ ! -e ${d}/configure ]] && \
- grep -qs '&& echo \.so ||' "${d}/../configure" ; then
+ grep -qs '&& echo \.so ||' "${d}/../configure" ; then
ELT_walk_patches "${d}/../configure" "${p}"
ret=$?
fi
@@ -293,16 +302,19 @@ elibtoolize() {
fi
done
;;
- mint-conf)
+ mint-conf|gold-conf)
ret=1
local subret=1
if [[ -e ${d}/configure ]]; then
ELT_walk_patches "${d}/configure" "${p}"
subret=$?
# ltmain.sh and co might be in a subdirectory ...
- elif [[ ! -e ${d}/configure && -e ${d}/../configure ]] ; then
+ elif [[ -e ${d}/../configure ]] ; then
ELT_walk_patches "${d}/../configure" "${p}"
subret=$?
+ elif [[ -e ${d}/../../configure ]] ; then
+ ELT_walk_patches "${d}/../../configure" "${p}"
+ subret=$?
fi
if [[ $subret -eq 0 ]]; then
# have at least one patch succeeded.
@@ -353,7 +365,7 @@ elibtoolize() {
# ewarn " Please verify that it is not needed."
:
else
- local version=$(ELT_libtool_version "${d}"/ltmain.sh)
+ local version=$(ELT_libtool_version "${d}"/ltmain.sh)
echo
eerror "Portage patch failed to apply (ltmain.sh version ${version})!"
eerror "Please file a bug report to add a proper patch."