diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-03-19 20:30:01 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-03-19 20:30:01 +0000 |
commit | b65da18da6867b3433995a96c06a2b4402376f65 (patch) | |
tree | 519faf445382df52f3ddaf42e1e04089873fe889 /sys-devel/gcc-config | |
parent | magma-1.0_pre21 added to portage (diff) | |
download | gentoo-2-b65da18da6867b3433995a96c06a2b4402376f65.tar.gz gentoo-2-b65da18da6867b3433995a96c06a2b4402376f65.tar.bz2 gentoo-2-b65da18da6867b3433995a96c06a2b4402376f65.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).
(Portage version: 2.0.51.19)
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r-- | sys-devel/gcc-config/ChangeLog | 8 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.3.10 | 56 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.3.8 | 54 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.4.0 | 57 |
4 files changed, 100 insertions, 75 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/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 |