diff options
author | Mike Frysinger <vapier@gentoo.org> | 2004-12-24 05:46:24 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2004-12-24 05:46:24 +0000 |
commit | 4b4fb3962b493c1533954092cabb6150f48cd07e (patch) | |
tree | ae758536d64cf7659d089d44956266be26338fd6 | |
parent | version bump (diff) | |
download | gcc-config-4b4fb3962b493c1533954092cabb6150f48cd07e.tar.gz gcc-config-4b4fb3962b493c1533954092cabb6150f48cd07e.tar.bz2 gcc-config-4b4fb3962b493c1533954092cabb6150f48cd07e.zip |
Seems people still have outdated gcc versions installed which break with GCC_SPECS="". Add a warning if their gcc is broken so they know they have to re-emerge gcc.
-rwxr-xr-x | gcc-config | 23 |
1 files changed, 18 insertions, 5 deletions
@@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.8,v 1.1 2004/12/23 18:04:06 vapier Exp $ +# $Header: gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.3.8,v 1.2 2004/12/24 05:46:24 vapier Exp $ # Author: Martin Schlemmer <azarah@gentoo.org> trap ":" INT QUIT TSTP @@ -89,7 +89,7 @@ get_real_chost() { is_cross_compiler() { get_real_chost - [ "${CC_COMP/${REAL_CHOST}}" = "${CC_COMP}" ] + [[ ${CC_COMP/${REAL_CHOST}} = ${CC_COMP} ]] } switch_profile() { @@ -160,11 +160,24 @@ switch_profile() { ${AWK} '!/^(STDCXX_INCDIR|LDPATH|CC|CXX|CTARGET|GCCBITS|GCC_SPECS)=/ {print $0}' \ "${GCC_ENV_D}/${CC_COMP}" > "${ENV_D}/05gcc" echo "LDPATH=\"${MY_LDPATH}\"" >> "${ENV_D}/05gcc" - if [[ -n ${GCC_SPECS} ]] && [[ -e ${ROOT}/${GCC_SPECS} ]] - then + if [[ -n ${GCC_SPECS} ]] && [[ -e ${ROOT}/${GCC_SPECS} ]] ; then echo "GCC_SPECS=\"${GCC_SPECS}\"" >> "${ENV_D}/05gcc" else - echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc" + # People need to rebuild their gcc or setting GCC_SPECS to + # "" will cause issues again :( + if [[ ${ROOT} != "/" ]] ; then + echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc" + else + if ! GCC_SPECS="" /usr/bin/gcc -v &>/dev/null ; then + echo + ewarn "Your gcc has a bug with GCC_SPECS." + ewarn "Please re-emerge gcc." + ewarn "http://bugs.gentoo.org/show_bug.cgi?id=68395" + echo + else + echo "GCC_SPECS=\"\"" >> "${ENV_D}/05gcc" + fi + fi fi echo "CURRENT=${CC_COMP}" > "${GCC_ENV_D}/config" |