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
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)
-rw-r--r--sys-libs/glibc/ChangeLog7
-rw-r--r--sys-libs/glibc/glibc-2.3.5-r1.ebuild49
-rw-r--r--sys-libs/glibc/glibc-2.3.5-r2.ebuild49
-rw-r--r--sys-libs/glibc/glibc-2.3.5-r3.ebuild47
-rw-r--r--sys-libs/glibc/glibc-2.3.6-r1.ebuild47
-rw-r--r--sys-libs/glibc/glibc-2.3.6-r2.ebuild55
-rw-r--r--sys-libs/glibc/glibc-2.3.6.ebuild47
7 files changed, 190 insertions, 111 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog
index 9317144ab7c8..f422bb464cec 100644
--- a/sys-libs/glibc/ChangeLog
+++ b/sys-libs/glibc/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for sys-libs/glibc
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.421 2006/01/07 16:39:57 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.422 2006/01/13 12:15:53 vapier Exp $
+
+ 13 Jan 2006; Mike Frysinger <vapier@gentoo.org> glibc-2.3.5-r1.ebuild,
+ glibc-2.3.5-r2.ebuild, glibc-2.3.5-r3.ebuild, glibc-2.3.6.ebuild,
+ glibc-2.3.6-r1.ebuild, glibc-2.3.6-r2.ebuild:
+ Fix double stripping on multilib systems #118207.
07 Jan 2006; Markus Rothe <corsair@gentoo.org> glibc-2.3.6-r2.ebuild:
Added ~ppc64
diff --git a/sys-libs/glibc/glibc-2.3.5-r1.ebuild b/sys-libs/glibc/glibc-2.3.5-r1.ebuild
index 2b8f793629be..554acbbbabb6 100644
--- a/sys-libs/glibc/glibc-2.3.5-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.3.5-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# 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-r1.ebuild,v 1.47 2005/12/17 00:46:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r1.ebuild,v 1.48 2006/01/13 12:15:53 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -379,23 +379,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 \;
@@ -1247,6 +1230,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
@@ -1262,6 +1271,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
unset MLTEST
@@ -1282,6 +1292,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
diff --git a/sys-libs/glibc/glibc-2.3.5-r2.ebuild b/sys-libs/glibc/glibc-2.3.5-r2.ebuild
index e0a7ba45fa9d..83fd946346a0 100644
--- a/sys-libs/glibc/glibc-2.3.5-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.3.5-r2.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# 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-r2.ebuild,v 1.22 2005/12/17 00:46:54 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.5-r2.ebuild,v 1.23 2006/01/13 12:15:53 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -367,23 +367,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 \;
@@ -1196,6 +1179,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
@@ -1215,6 +1224,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
fi
@@ -1234,6 +1244,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
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
diff --git a/sys-libs/glibc/glibc-2.3.6-r1.ebuild b/sys-libs/glibc/glibc-2.3.6-r1.ebuild
index cc761574eb44..7976a7512ad9 100644
--- a/sys-libs/glibc/glibc-2.3.6-r1.ebuild
+++ b/sys-libs/glibc/glibc-2.3.6-r1.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.6-r1.ebuild,v 1.10 2006/01/07 03:25:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r1.ebuild,v 1.11 2006/01/13 12:15:53 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -418,23 +418,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 \;
@@ -1273,6 +1256,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
@@ -1292,6 +1301,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
fi
@@ -1315,6 +1325,7 @@ src_install() {
else
toolchain-glibc_src_install
fi
+ [[ -z ${OABI} ]] && src_strip
# Handle stupid lib32 BS on amd64 and ppc64
if [[ -n ${OLD_LIBDIR} ]] ; then
diff --git a/sys-libs/glibc/glibc-2.3.6-r2.ebuild b/sys-libs/glibc/glibc-2.3.6-r2.ebuild
index 126ad8bf5d73..90d2e166966c 100644
--- a/sys-libs/glibc/glibc-2.3.6-r2.ebuild
+++ b/sys-libs/glibc/glibc-2.3.6-r2.ebuild
@@ -1,6 +1,14 @@
# 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.6-r2.ebuild,v 1.5 2006/01/07 16:39:58 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6-r2.ebuild,v 1.6 2006/01/13 12:15:53 vapier Exp $
+
+# TODO:
+# - fix warning from glibc build system:
+# /var/tmp/portage/glibc-2.3.6-r2/work/build-x86-x86_64-pc-linux-gnu-nptl/elf/ldconfig: Can't open configuration file /etc/ld.so.conf: No such file or directory
+# - fix warning from ebuild (amd64 multilib):
+# mv: cannot stat `/var/tmp/portage/glibc-2.3.6-r2/image//usr/lib32/locale': No such file or directory
+# - glibc installs a bunch of lib64 stuff into /usr/lib:
+# qlist glibc | grep ^/usr/lib/ | grep -v /debug/
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -418,23 +426,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 \;
@@ -1273,6 +1264,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
@@ -1292,6 +1309,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
fi
@@ -1315,6 +1333,7 @@ src_install() {
else
toolchain-glibc_src_install
fi
+ [[ -z ${OABI} ]] && src_strip
# Handle stupid lib32 BS on amd64 and ppc64
if [[ -n ${OLD_LIBDIR} ]] ; then
diff --git a/sys-libs/glibc/glibc-2.3.6.ebuild b/sys-libs/glibc/glibc-2.3.6.ebuild
index 79603e94369a..56723ffecd14 100644
--- a/sys-libs/glibc/glibc-2.3.6.ebuild
+++ b/sys-libs/glibc/glibc-2.3.6.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.6.ebuild,v 1.11 2006/01/07 03:25:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.3.6.ebuild,v 1.12 2006/01/13 12:15:53 vapier Exp $
# Here's how the cross-compile logic breaks down ...
# CTARGET - machine that will target the binaries
@@ -385,23 +385,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 \;
@@ -1226,6 +1209,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
@@ -1245,6 +1254,7 @@ src_install() {
done
ABI=${OABI}
unset OABI
+ src_strip
return 0
fi
fi
@@ -1264,6 +1274,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