summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2005-03-19 20:30:01 +0000
committerMike Frysinger <vapier@gentoo.org>2005-03-19 20:30:01 +0000
commit1a8f6cae7dc0d65855f5e465346fd851d520980c (patch)
tree4052b02f1c8332db1eedabe8985aa7c2e9af7f13 /sys-devel/gcc-config
parentmagma-1.0_pre21 added to portage (diff)
downloadhistorical-1a8f6cae7dc0d65855f5e465346fd851d520980c.tar.gz
historical-1a8f6cae7dc0d65855f5e465346fd851d520980c.tar.bz2
historical-1a8f6cae7dc0d65855f5e465346fd851d520980c.zip
Make sure we copy libunwind in addition to libgcc_s (for ia64 and such). Also dont copy internal gcc libs while portage is calling us (causes python to segfault and crap).
Package-Manager: portage-2.0.51.19
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r--sys-devel/gcc-config/ChangeLog8
-rw-r--r--sys-devel/gcc-config/Manifest26
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.3.1056
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.3.854
-rwxr-xr-xsys-devel/gcc-config/files/gcc-config-1.4.057
5 files changed, 108 insertions, 93 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog
index 7ede22764b87..1b75357b5e90 100644
--- a/sys-devel/gcc-config/ChangeLog
+++ b/sys-devel/gcc-config/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/gcc-config
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.84 2005/03/17 02:22:25 eradicator Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.85 2005/03/19 20:30:01 vapier Exp $
+
+ 19 Mar 2005; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.3.8,
+ files/gcc-config-1.3.10, files/gcc-config-1.4.0:
+ Make sure we copy libunwind in addition to libgcc_s (for ia64 and such).
+ Also dont copy internal gcc libs while portage is calling us (causes python
+ to segfault and crap).
17 Mar 2005; Jeremy Huddleston <eradicator@gentoo.org>
gcc-config-1.3.10-r1.ebuild:
diff --git a/sys-devel/gcc-config/Manifest b/sys-devel/gcc-config/Manifest
index f8dd9817a21a..60bb18144dc0 100644
--- a/sys-devel/gcc-config/Manifest
+++ b/sys-devel/gcc-config/Manifest
@@ -1,24 +1,14 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+MD5 f2b7e6e4aceb4ecce630cfad4201a42d ChangeLog 17626
MD5 012868b502a874cc4f1abfa862bafb8a gcc-config-1.3.8-r4.ebuild 1429
+MD5 856d159682acb2dca11e43b8bbe42b70 gcc-config-1.4.0.ebuild 1896
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
-MD5 1cb221acf808b5cb94d0c178b851b661 ChangeLog 17326
MD5 ff66f6afda43670e224335246bd979d1 gcc-config-1.3.10-r1.ebuild 1450
-MD5 856d159682acb2dca11e43b8bbe42b70 gcc-config-1.4.0.ebuild 1896
+MD5 53ec01c338bb2ffa9499e7e097039c0c files/gcc-config-1.3.8 12791
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.8-r4 0
-MD5 cc883aedd8c77676f4fef7de5a5222cf files/gcc-config-1.3.8 12472
-MD5 ab755343b8f0faa0b78f9adee67935cc files/wrapper-1.4.3.c 7549
+MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.4.0 0
+MD5 43ff3671e1c0fa5508b8dae2bacc07e4 files/gcc-config-1.4.0 14845
+MD5 63c6927239590b5e009df5b7356797dd files/gcc-config-1.3.10 13518
+MD5 3b96d761f411a1befda4f334da8fea03 files/wrapper-1.4.6.c 10526
MD5 e3203a5aa6df669ffa479aeeb7605029 files/wrapper-1.4.5.c 10671
-MD5 96ab413be3d6ab70720bc52c76130b6b files/gcc-config-1.3.10 13207
MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.3.10-r1 0
-MD5 f95eabcf62085954d3a11976cf5be18f files/gcc-config-1.4.0 14534
-MD5 3b96d761f411a1befda4f334da8fea03 files/wrapper-1.4.6.c 10526
-MD5 d41d8cd98f00b204e9800998ecf8427e files/digest-gcc-config-1.4.0 0
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.0 (GNU/Linux)
-
-iD8DBQFCOOnsArHZZzCEUG0RAiVNAJ9IDWu/u1+BZ/PhYwYvt1NAIW/CIwCffzsh
-OyQMWtlZufvwzm1hK7/dLaY=
-=gDKx
------END PGP SIGNATURE-----
+MD5 ab755343b8f0faa0b78f9adee67935cc files/wrapper-1.4.3.c 7549
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.10 b/sys-devel/gcc-config/files/gcc-config-1.3.10
index f851e6563f32..25f2047be420 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.3.10
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.10
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.10,v 1.5 2005/03/16 23:51:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.10,v 1.6 2005/03/19 20:30:01 vapier Exp $
trap ":" INT QUIT TSTP
@@ -88,7 +88,7 @@ get_real_chost() {
is_cross_compiler() {
get_real_chost
- [[ ${CC_COMP/${REAL_CHOST}} = ${CC_COMP} ]]
+ [[ ${CC_COMP/${REAL_CHOST}} == ${CC_COMP} ]]
}
switch_profile() {
@@ -130,7 +130,7 @@ switch_profile() {
local sub_ldpath=
for sub_ldpath in ${LDPATH} ; do
if [[ -d ${sub_ldpath} ]] ; then
- if [[ ${MY_LDPATH/:${sub_ldpath}} = ${MY_LDPATH} ]] ; then
+ if [[ ${MY_LDPATH/:${sub_ldpath}} == ${MY_LDPATH} ]] ; then
MY_LDPATH="${MY_LDPATH}:${sub_ldpath}"
fi
fi
@@ -194,7 +194,7 @@ switch_profile() {
for x in ${native} ${CTARGET}-{gcc,c++,g++,f77,g77,gcj} ; do
# Make sure we have no stale wrappers
${RM} -f "${ROOT}/usr/bin/${x}"
- [[ ${x:${#x}-3} = "gcc" || ${x:${#x}-3} = "g++" ]] \
+ [[ ${x:${#x}-3} == "gcc" || ${x:${#x}-3} == "g++" ]] \
&& ${RM} -f "${ROOT}/usr/bin/${x}"{32,64}
# Only install a wrapper if the binary exists ...
@@ -203,7 +203,7 @@ switch_profile() {
# sync mtimes together. This makes things like ccache
# happy. See Bug #70548 for more info.
local ref=${ROOT}/${GCC_BIN_PATH}/${x}
- [[ ${x} = "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
+ [[ ${x} == "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
if [[ -x ${ref} ]] ; then
${CP} -f "${ROOT}/usr/lib/misc/gcc-config" \
"${ROOT}/usr/bin/${x}"
@@ -211,7 +211,7 @@ switch_profile() {
# Install 32bit and 64bit wrappers if need be
# This should probably get folded back into the wrapper ...
- if [[ ${x:${#x}-3} = "gcc" ]] || [[ ${x:${#x}-3} = "g++" ]] ; then
+ if [[ ${x:${#x}-3} == "gcc" ]] || [[ ${x:${#x}-3} == "g++" ]] ; then
for bits in ${GCCBITS} ; do
cp -f "${ROOT}/usr/lib/misc/gcc-config" \
"${ROOT}/usr/bin/${x}${bits}"
@@ -225,20 +225,26 @@ switch_profile() {
${CP} -f "${ROOT}/usr/lib/misc/gcc-config" "${ROOT}/lib/cpp"
fi
- # We need to make sure that libgcc_s.so makes it into /lib.
+ # We need to make sure that libgcc_s.so / libunwind.so make it into /lib.
# On many systems (x86/amd64/etc...), this will probably never matter,
# but on other systems (arm/mips/etc...), this is quite critical.
# http://bugs.gentoo.org/show_bug.cgi?id=60190
- if ! is_cross_compiler; then
+ #
+ # Don't copy the library if we're being called by portage because
+ # this may cause python to start segfaulting all over the place
+ # since on many arches, it uses libgcc_s.so.
+ if [[ -z ${PORTAGE_CALLER} ]] && ! is_cross_compiler; then
for multilib in $(${ROOT}/${GCC_BIN_PATH}/gcc -print-multi-lib); do
multiarg=${multilib#*;}
multiarg=${multiarg/@/-}
multilibdir=${multilib%;*}
libdir="lib/$(${ROOT}/${GCC_BIN_PATH}/gcc ${multiarg} -print-multi-os-directory)"
- if [[ -e ${ROOT}/${LDPATH}/${multildir}/libgcc_s.so ]]; then
- rm -f ${ROOT}/${libdir}/libgcc_so.so*
- cp -a ${ROOT}/${LDPATH}/${multilibdir}/libgcc_s.so* ${ROOT}/${libdir}/
- fi
+ for gcclib in gcc_s unwind ; do
+ if [[ -e ${ROOT}/${LDPATH}/${multildir}/lib${gcclib}.so ]]; then
+ rm -f "${ROOT}/${libdir}"/lib${gcclib}.so*
+ cp -a "${ROOT}/${LDPATH}/${multilibdir}"/lib${gcclib}.so* "${ROOT}/${libdir}"/
+ fi
+ done
done
unset multilib
unset multilibdir
@@ -246,13 +252,13 @@ switch_profile() {
unset libdir
fi
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
${ENV_UPDATE} &>/dev/null
fi
eend 0
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
echo
ewarn "If you intend to use the gcc from the new profile in an already"
ewarn "running shell, please remember to do:"
@@ -302,9 +308,9 @@ list_profiles() {
echo "Using gcc-config info in ${ROOT}"
fi
for x in "${GCC_ENV_D}"/* ; do
- if [[ -f ${x} ]] && [[ ${x/\/config} = ${x} ]] ; then
+ if [[ -f ${x} ]] && [[ ${x/\/config} == ${x} ]] ; then
x=${x##*/}
- [[ ${x} = ${CURRENT} ]] && x="${x} *"
+ [[ ${x} == ${CURRENT} ]] && x="${x} *"
echo "[${i}] ${x}"
i=$((i + 1))
fi
@@ -390,37 +396,37 @@ for x in "$@" ; do
CHECK_CHOST="yes"
;;
-c|--get-current-profile)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_current_profile"
fi
;;
-l|--list-profiles)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="list_profiles"
fi
;;
-E|--print-environ)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="print_environ"
fi
;;
-B|--get-bin-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_bin_path"
fi
;;
-L|--get-lib-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_lib_path"
fi
;;
-X|--get-stdcxx-incdir)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_stdcxx_incdir"
fi
@@ -445,7 +451,7 @@ for x in "$@" ; do
for y in "${GCC_ENV_D}"/* ; do
[[ ${y/\/config} != ${y} ]] && continue
- if [[ -f ${y} ]] && [[ ${x} = ${i} ]] ; then
+ if [[ -f ${y} ]] && [[ ${x} == ${i} ]] ; then
CC_COMP="${y##*/}"
break
fi
@@ -470,7 +476,7 @@ for x in "$@" ; do
esac
done
-if [[ ${DOIT} = "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
+if [[ ${DOIT} == "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
usage 1
fi
@@ -504,7 +510,7 @@ if [[ ${DOIT} != "get_current_profile" ]] ; then
fi
fi
-if [[ ${CHECK_CHOST} = "yes" ]] ; then
+if [[ ${CHECK_CHOST} == "yes" ]] ; then
# Chosen CHOST are not the same as the real CHOST according to
# make.conf, and --use-portage-chost option was given, so do nothing
get_real_chost
diff --git a/sys-devel/gcc-config/files/gcc-config-1.3.8 b/sys-devel/gcc-config/files/gcc-config-1.3.8
index 37f2a278fad7..89bf235798f8 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.3.8
+++ b/sys-devel/gcc-config/files/gcc-config-1.3.8
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.8,v 1.8 2005/03/16 23:51:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.8,v 1.9 2005/03/19 20:30:01 vapier Exp $
trap ":" INT QUIT TSTP
@@ -88,7 +88,7 @@ get_real_chost() {
is_cross_compiler() {
get_real_chost
- [[ ${CC_COMP/${REAL_CHOST}} = ${CC_COMP} ]]
+ [[ ${CC_COMP/${REAL_CHOST}} == ${CC_COMP} ]]
}
switch_profile() {
@@ -130,7 +130,7 @@ switch_profile() {
local sub_ldpath=
for sub_ldpath in ${LDPATH} ; do
if [[ -d ${sub_ldpath} ]] ; then
- if [[ ${MY_LDPATH/:${sub_ldpath}} = ${MY_LDPATH} ]] ; then
+ if [[ ${MY_LDPATH/:${sub_ldpath}} == ${MY_LDPATH} ]] ; then
MY_LDPATH="${MY_LDPATH}:${sub_ldpath}"
fi
fi
@@ -194,7 +194,7 @@ switch_profile() {
for x in ${native} ${CTARGET}-{gcc,c++,g++,f77,g77,gcj} ; do
# Make sure we have no stale wrappers
${RM} -f "${ROOT}/usr/bin/${x}"
- [[ ${x:${#x}-3} = "gcc" || ${x:${#x}-3} = "g++" ]] \
+ [[ ${x:${#x}-3} == "gcc" || ${x:${#x}-3} == "g++" ]] \
&& ${RM} -f "${ROOT}/usr/bin/${x}"{32,64}
# Only install a wrapper if the binary exists ...
@@ -203,7 +203,7 @@ switch_profile() {
# sync mtimes together. This makes things like ccache
# happy. See Bug #70548 for more info.
local ref=${ROOT}/${GCC_BIN_PATH}/${x}
- [[ ${x} = "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
+ [[ ${x} == "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
if [[ -x ${ref} ]] ; then
${CP} -f "${ROOT}/usr/lib/gcc-config/wrapper" \
"${ROOT}/usr/bin/${x}"
@@ -211,7 +211,7 @@ switch_profile() {
# Install 32bit and 64bit wrappers if need be
# This should probably get folded back into the wrapper ...
- if [[ ${x:${#x}-3} = "gcc" ]] || [[ ${x:${#x}-3} = "g++" ]] ; then
+ if [[ ${x:${#x}-3} == "gcc" ]] || [[ ${x:${#x}-3} == "g++" ]] ; then
for bits in ${GCCBITS} ; do
echo "#!/bin/sh"$'\n'"exec ${x} -m${bits} \"\$@\"" \
> "${ROOT}/usr/bin/${x}${bits}"
@@ -226,22 +226,30 @@ switch_profile() {
${CP} -f "${ROOT}/usr/lib/gcc-config/wrapper" "${ROOT}/lib/cpp"
fi
- # We need to make sure that libgcc_s.so makes it into /lib.
+ # We need to make sure that libgcc_s.so / libunwind.so make it into /lib.
# On many systems (x86/amd64/etc...), this will probably never matter,
# but on other systems (arm/mips/etc...), this is quite critical.
# http://bugs.gentoo.org/show_bug.cgi?id=60190
- if ! is_cross_compiler && [[ -e ${ROOT}/${LDPATH}/libgcc_s.so ]] ; then
- rm -f "${ROOT}"/lib/libgcc_so.so*
- cp -a "${ROOT}/${LDPATH}"/libgcc_s.so* "${ROOT}"/lib/
+ #
+ # Don't copy the library if we're being called by portage because
+ # this may cause python to start segfaulting all over the place
+ # since on many arches, it uses libgcc_s.so.
+ if [[ -z ${PORTAGE_CALLER} ]] && ! is_cross_compiler ; then
+ for gcclib in gcc_s unwind ; do
+ if [[ -e ${ROOT}/${LDPATH}/lib${gcclib}.so ]] ; then
+ rm -f "${ROOT}"/lib/lib${gcclib}.so*
+ cp -a "${ROOT}/${LDPATH}"/lib${gcclib}.so* "${ROOT}"/lib/
+ fi
+ done
fi
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
${ENV_UPDATE} &>/dev/null
fi
eend 0
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
echo
ewarn "If you intend to use the gcc from the new profile in an already"
ewarn "running shell, please remember to do:"
@@ -287,9 +295,9 @@ list_profiles() {
echo "Using gcc-config info in ${ROOT}"
fi
for x in "${GCC_ENV_D}"/* ; do
- if [[ -f ${x} ]] && [[ ${x/\/config} = ${x} ]] ; then
+ if [[ -f ${x} ]] && [[ ${x/\/config} == ${x} ]] ; then
x=${x##*/}
- [[ ${x} = ${CURRENT} ]] && x="${x} *"
+ [[ ${x} == ${CURRENT} ]] && x="${x} *"
echo "[${i}] ${x}"
i=$((i + 1))
fi
@@ -375,37 +383,37 @@ for x in "$@" ; do
CHECK_CHOST="yes"
;;
-c|--get-current-profile)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_current_profile"
fi
;;
-l|--list-profiles)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="list_profiles"
fi
;;
-E|--print-environ)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="print_environ"
fi
;;
-B|--get-bin-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_bin_path"
fi
;;
-L|--get-lib-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_lib_path"
fi
;;
-X|--get-stdcxx-incdir)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_stdcxx_incdir"
fi
@@ -430,7 +438,7 @@ for x in "$@" ; do
for y in "${GCC_ENV_D}"/* ; do
[[ ${y/\/config} != ${y} ]] && continue
- if [[ -f ${y} ]] && [[ ${x} = ${i} ]] ; then
+ if [[ -f ${y} ]] && [[ ${x} == ${i} ]] ; then
CC_COMP="${y##*/}"
break
fi
@@ -453,7 +461,7 @@ for x in "$@" ; do
esac
done
-if [[ ${DOIT} = "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
+if [[ ${DOIT} == "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
usage 1
fi
@@ -480,7 +488,7 @@ then
#exit 1
fi
-if [[ ${CHECK_CHOST} = "yes" ]] ; then
+if [[ ${CHECK_CHOST} == "yes" ]] ; then
# Chosen CHOST are not the same as the real CHOST according to
# make.conf, and --use-portage-chost option was given, so do nothing
get_real_chost
diff --git a/sys-devel/gcc-config/files/gcc-config-1.4.0 b/sys-devel/gcc-config/files/gcc-config-1.4.0
index 3a3ac55e9ced..8b2f44333fd9 100755
--- a/sys-devel/gcc-config/files/gcc-config-1.4.0
+++ b/sys-devel/gcc-config/files/gcc-config-1.4.0
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.7 2005/03/16 23:51:35 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.4.0,v 1.8 2005/03/19 20:30:01 vapier Exp $
trap ":" INT QUIT TSTP
@@ -88,7 +88,7 @@ get_real_chost() {
is_cross_compiler() {
get_real_chost
- [[ ${CC_COMP/${REAL_CHOST}} = ${CC_COMP} ]]
+ [[ ${CC_COMP/${REAL_CHOST}} == ${CC_COMP} ]]
}
create_script_wrapper() {
@@ -145,7 +145,7 @@ switch_profile() {
local sub_ldpath=
for sub_ldpath in ${LDPATH} ; do
if [[ -d ${sub_ldpath} ]] ; then
- if [[ ${MY_LDPATH/:${sub_ldpath}} = ${MY_LDPATH} ]] ; then
+ if [[ ${MY_LDPATH/:${sub_ldpath}} == ${MY_LDPATH} ]] ; then
MY_LDPATH="${MY_LDPATH}:${sub_ldpath}"
fi
fi
@@ -213,7 +213,7 @@ switch_profile() {
for x in ${native}; do
# Make sure we have no stale wrappers
${RM} -f "${ROOT}/usr/bin/${x}"
- [[ ${x:${#x}-3} = "gcc" || ${x:${#x}-3} = "g++" ]] \
+ [[ ${x:${#x}-3} == "gcc" || ${x:${#x}-3} == "g++" ]] \
&& ${RM} -f "${ROOT}/usr/bin/${x}"{32,64}
# Only install a wrapper if the binary exists ...
@@ -223,7 +223,7 @@ switch_profile() {
# happy. See Bug #70548 for more info.
local ref=${ROOT}/${GCC_BIN_PATH}/${x}
- [[ ${x} = "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
+ [[ ${x} == "cc" ]] && ref=${ROOT}/${GCC_BIN_PATH}/gcc
if [[ -x ${ref} ]] ; then
${CP} -f "${WRAPPER}" \
"${ROOT}/usr/bin/${x}"
@@ -231,7 +231,7 @@ switch_profile() {
# Install 32bit and 64bit wrappers if need be
# This should probably get folded back into the wrapper ...
- if [[ ${x:${#x}-3} = "gcc" ]] || [[ ${x:${#x}-3} = "g++" ]] ; then
+ if [[ ${x:${#x}-3} == "gcc" ]] || [[ ${x:${#x}-3} == "g++" ]] ; then
for bits in ${GCCBITS} ; do
cp -f "${WRAPPER}" \
"${ROOT}/usr/bin/${x}${bits}"
@@ -277,21 +277,26 @@ switch_profile() {
${CP} -f "${WRAPPER}" "${ROOT}/lib/cpp"
fi
- # We need to make sure that libgcc_s.so makes it into /lib.
+ # We need to make sure that libgcc_s.so / libunwind.so make it into /lib.
# On many systems (x86/amd64/etc...), this will probably never matter,
# but on other systems (arm/mips/etc...), this is quite critical.
-
# http://bugs.gentoo.org/show_bug.cgi?id=60190
- if ! is_cross_compiler; then
+ #
+ # Don't copy the library if we're being called by portage because
+ # this may cause python to start segfaulting all over the place
+ # since on many arches, it uses libgcc_s.so.
+ if [[ -z ${PORTAGE_CALLER} ]] && ! is_cross_compiler ; then
for multilib in $(${ROOT}/${GCC_BIN_PATH}/${CTARGET}-gcc -print-multi-lib); do
multiarg=${multilib#*;}
multiarg=${multiarg/@/-}
multilibdir=${multilib%;*}
libdir="lib/$(${ROOT}/${GCC_BIN_PATH}/${CTARGET}-gcc ${multiarg} -print-multi-os-directory)"
- if [[ -e ${ROOT}/${LDPATH}/${multildir}/libgcc_s.so ]]; then
- rm -f ${ROOT}/${libdir}/libgcc_so.so*
- cp -a ${ROOT}/${LDPATH}/${multilibdir}/libgcc_s.so* ${ROOT}/${libdir}/
- fi
+ for gcclib in gcc_s unwind ; do
+ if [[ -e ${ROOT}/${LDPATH}/${multildir}/lib${gcclib}.so ]]; then
+ rm -f "${ROOT}/${libdir}"/lib${gcclib}.so*
+ cp -a "${ROOT}/${LDPATH}"/${multilibdir}/lib${gcclib}.so* "${ROOT}/${libdir}"/
+ fi
+ done
done
unset multilib
unset multilibdir
@@ -299,13 +304,13 @@ switch_profile() {
unset libdir
fi
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
${ENV_UPDATE} &>/dev/null
fi
eend 0
- if [[ ${ROOT} = "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
+ if [[ ${ROOT} == "/" ]] && [[ ${OLD_CC_COMP} != ${CC_COMP} ]] ; then
echo
ewarn "If you intend to use the gcc from the new profile in an already"
ewarn "running shell, please remember to do:"
@@ -354,9 +359,9 @@ list_profiles() {
echo "Using gcc-config info in ${ROOT}"
fi
for x in "${GCC_ENV_D}"/* ; do
- if [[ -f ${x} ]] && [[ ${x/\/config} = ${x} ]] ; then
+ if [[ -f ${x} ]] && [[ ${x/\/config} == ${x} ]] ; then
x=${x##*/}
- [[ ${x} = ${CURRENT} ]] && x="${x} *"
+ [[ ${x} == ${CURRENT} ]] && x="${x} *"
echo "[${i}] ${x}"
i=$((i + 1))
fi
@@ -444,37 +449,37 @@ for x in "$@" ; do
CHECK_CHOST="yes"
;;
-c|--get-current-profile)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_current_profile"
fi
;;
-l|--list-profiles)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="list_profiles"
fi
;;
-E|--print-environ)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="print_environ"
fi
;;
-B|--get-bin-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_bin_path"
fi
;;
-L|--get-lib-path)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_lib_path"
fi
;;
-X|--get-stdcxx-incdir)
- if [[ ${NEED_ACTION} = "yes" ]] ; then
+ if [[ ${NEED_ACTION} == "yes" ]] ; then
NEED_ACTION="no"
DOIT="get_stdcxx_incdir"
fi
@@ -499,7 +504,7 @@ for x in "$@" ; do
for y in "${GCC_ENV_D}"/* ; do
[[ ${y/\/config} != ${y} ]] && continue
- if [[ -f ${y} ]] && [[ ${x} = ${i} ]] ; then
+ if [[ -f ${y} ]] && [[ ${x} == ${i} ]] ; then
CC_COMP="${y##*/}"
break
fi
@@ -524,7 +529,7 @@ for x in "$@" ; do
esac
done
-if [[ ${DOIT} = "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
+if [[ ${DOIT} == "switch_profile" ]] && [[ -z ${CC_COMP} ]] ; then
usage 1
fi
@@ -558,7 +563,7 @@ if [[ ${DOIT} != "get_current_profile" ]] ; then
fi
fi
-if [[ ${CHECK_CHOST} = "yes" ]] ; then
+if [[ ${CHECK_CHOST} == "yes" ]] ; then
# Chosen CHOST are not the same as the real CHOST according to
# make.conf, and --use-portage-chost option was given, so do nothing
get_real_chost