summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-01-13 12:15:53 +0000
committerMike Frysinger <vapier@gentoo.org>2006-01-13 12:15:53 +0000
commitc84a34aa92ed251d54f2e37438ea2b3a7dfa8525 (patch)
tree3951f301bd844f31fbbdafc9d708ddd0acc3ae2c /sys-libs/glibc/glibc-2.3.5-r3.ebuild
parentia64 love (diff)
downloadgentoo-2-c84a34aa92ed251d54f2e37438ea2b3a7dfa8525.tar.gz
gentoo-2-c84a34aa92ed251d54f2e37438ea2b3a7dfa8525.tar.bz2
gentoo-2-c84a34aa92ed251d54f2e37438ea2b3a7dfa8525.zip
Fix double stripping on multilib systems #118207.
(Portage version: 2.1_pre3-r1)
Diffstat (limited to 'sys-libs/glibc/glibc-2.3.5-r3.ebuild')
-rw-r--r--sys-libs/glibc/glibc-2.3.5-r3.ebuild47
1 files changed, 29 insertions, 18 deletions
diff --git a/sys-libs/glibc/glibc-2.3.5-r3.ebuild b/sys-libs/glibc/glibc-2.3.5-r3.ebuild
index 2d7609e960ac..b01329dc382a 100644
--- a/sys-libs/glibc/glibc-2.3.5-r3.ebuild
+++ b/sys-libs/glibc/glibc-2.3.5-r3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r3.ebuild,v 1.12 2006/01/05 19:02:57 gustavoz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r3.ebuild,v 1.13 2006/01/13 12:15:53 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -372,23 +372,6 @@ toolchain-glibc_src_install() {
rm -rf ${D}/nptl
fi
- # Now, strip everything but the thread libs #46186, as well as the dynamic
- # linker, else we cannot set breakpoints in shared libraries.
- # Fix for ld-* by Lonnie Princehouse.
- mkdir -p ${T}/thread-backup
- for x in ${D}$(alt_libdir)/lib{pthread,thread_db}* \
- ${D}$(alt_libdir)/ld-* ; do
- [[ -f ${x} ]] && mv -f ${x} ${T}/thread-backup/
- done
- if want_linuxthreads && want_nptl ; then
- mkdir -p ${T}/thread-backup/tls
- for x in ${D}$(alt_libdir)/tls/lib{pthread,thread_db}* ; do
- [[ -f ${x} ]] && mv -f ${x} ${T}/thread-backup/tls
- done
- fi
- env -uRESTRICT CHOST=${CTARGET} prepallstrip
- cp -a -- ${T}/thread-backup/* ${D}$(alt_libdir)/ || die
-
if use pic && [[ $(tc-arch) != "amd64" ]] ; then
find ${S}/${buildtarget}/ -name "soinit.os" -exec cp {} ${D}$(alt_libdir)/soinit.o \;
find ${S}/${buildtarget}/ -name "sofini.os" -exec cp {} ${D}$(alt_libdir)/sofini.o \;
@@ -1200,6 +1183,32 @@ src_test() {
toolchain-glibc_src_test
}
+src_strip() {
+ # Now, strip everything but the thread libs #46186, as well as the dynamic
+ # linker, else we cannot set breakpoints in shared libraries due to bugs in
+ # gdb. Also want to grab stuff in tls subdir. whee.
+#when new portage supports this ...
+# env \
+# -uRESTRICT \
+# CHOST=${CTARGET} \
+# STRIP_MASK="/*/{,tls/}{ld-,lib{pthread,thread_db}}*" \
+# prepallstrip
+ pushd "${D}" > /dev/null
+
+ mkdir -p "${T}"/strip-backup
+ for x in $(find "${D}" -maxdepth 3 \
+ '(' -name 'ld-*' -o -name 'libpthread*' -o -name 'libthread_db*' ')' \
+ -a '(' '!' -name '*.a' ')' -type f -printf '%P ')
+ do
+ mkdir -p "${T}/strip-backup/${x%/*}"
+ cp -a -- "${D}/${x}" "${T}/strip-backup/${x}" || die "backing up ${x}"
+ done
+ env -uRESTRICT CHOST=${CTARGET} prepallstrip
+ cp -a -- "${T}"/strip-backup/* "${D}"/ || die "restoring non-stripped libs"
+
+ popd > /dev/null
+}
+
src_install() {
setup_env
@@ -1219,6 +1228,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
fi
@@ -1238,6 +1248,7 @@ src_install() {
fi
toolchain-glibc_src_install
+ [[ -z ${OABI} ]] && src_strip
# Handle stupid lib32 BS on amd64 and ppc64
if [[ -n ${OLD_LIBDIR} ]] ; then