From 41a7859fe26b19043ffc7e69bf9c0c3316e5c3f1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 24 Dec 2004 05:46:24 +0000 Subject: 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. --- sys-devel/gcc-config/ChangeLog | 10 ++++- sys-devel/gcc-config/files/digest-gcc-config-1.3.8 | 0 .../gcc-config/files/digest-gcc-config-1.3.8-r1 | 0 sys-devel/gcc-config/files/gcc-config-1.3.8 | 23 ++++++++--- sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild | 46 ++++++++++++++++++++++ sys-devel/gcc-config/gcc-config-1.3.8.ebuild | 46 ---------------------- 6 files changed, 73 insertions(+), 52 deletions(-) delete mode 100644 sys-devel/gcc-config/files/digest-gcc-config-1.3.8 create mode 100644 sys-devel/gcc-config/files/digest-gcc-config-1.3.8-r1 create mode 100644 sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild delete mode 100644 sys-devel/gcc-config/gcc-config-1.3.8.ebuild (limited to 'sys-devel') diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index 05a14b0c4c9e..e1bf6ccbb17b 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-devel/gcc-config # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.70 2004/12/23 18:04:06 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.71 2004/12/24 05:46:23 vapier Exp $ + +*gcc-config-1.3.8-r1 (24 Dec 2004) + + 24 Dec 2004; Mike Frysinger files/gcc-config-1.3.8, + +gcc-config-1.3.8-r1.ebuild, -gcc-config-1.3.8.ebuild: + 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. *gcc-config-1.3.8 (23 Dec 2004) diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.8 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.8 deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/sys-devel/gcc-config/files/digest-gcc-config-1.3.8-r1 b/sys-devel/gcc-config/files/digest-gcc-config-1.3.8-r1 new file mode 100644 index 000000000000..e69de29bb2d1 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 309f49694423..ee8c1176252f 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-2004 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.1 2004/12/23 18:04:06 vapier Exp $ +# $Header: /var/cvsroot/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 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" diff --git a/sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild new file mode 100644 index 000000000000..f9f558c4ffcf --- /dev/null +++ b/sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.8-r1.ebuild,v 1.1 2004/12/24 05:46:23 vapier Exp $ + +inherit toolchain-funcs + +# Version of .c wrapper to use +W_VER="1.4.3" + +DESCRIPTION="Utility to change the gcc compiler being used" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="virtual/libc + >=sys-apps/portage-2.0.47-r10" # We need portageq ... + +S=${WORKDIR} + +src_compile() { + $(tc-getCC) -O2 -Wall -o wrapper \ + ${FILESDIR}/wrapper-${W_VER}.c || die "compile wrapper" +} + +src_install() { + newbin ${FILESDIR}/${PN}-${PV} ${PN} || die "install gcc-config" + dosed "s:PORTAGE-VERSION:${PVR}:" /usr/bin/${PN} + + exeinto /usr/lib/gcc-config + doexe wrapper || die "install wrapper" +} + +pkg_postinst() { + # Do we have a valid multi ver setup ? + if gcc-config --get-current-profile &>/dev/null ; then + # We not longer use the /usr/include/g++-v3 hacks, as + # it is not needed ... + [[ -L ${ROOT}/usr/include/g++ ]] && rm -f "${ROOT}"/usr/include/g++ + [[ -L ${ROOT}/usr/include/g++-v3 ]] && rm -f "${ROOT}"/usr/include/g++-v3 + [[ ${ROOT} = "/" ]] && gcc-config $(/usr/bin/gcc-config --get-current-profile) + fi +} diff --git a/sys-devel/gcc-config/gcc-config-1.3.8.ebuild b/sys-devel/gcc-config/gcc-config-1.3.8.ebuild deleted file mode 100644 index 182ff2847f37..000000000000 --- a/sys-devel/gcc-config/gcc-config-1.3.8.ebuild +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright 1999-2004 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/gcc-config-1.3.8.ebuild,v 1.4 2004/12/24 02:23:52 vapier Exp $ - -inherit toolchain-funcs - -# Version of .c wrapper to use -W_VER="1.4.3" - -DESCRIPTION="Utility to change the gcc compiler being used" -HOMEPAGE="http://www.gentoo.org/" -SRC_URI="" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" -IUSE="" - -DEPEND="virtual/libc - >=sys-apps/portage-2.0.47-r10" # We need portageq ... - -S=${WORKDIR} - -src_compile() { - $(tc-getCC) -O2 -Wall -o wrapper \ - ${FILESDIR}/wrapper-${W_VER}.c || die "compile wrapper" -} - -src_install() { - newbin ${FILESDIR}/${PN}-${PV} ${PN} || die "install gcc-config" - dosed "s:PORTAGE-VERSION:${PVR}:" /usr/bin/${PN} - - exeinto /usr/lib/gcc-config - doexe wrapper || die "install wrapper" -} - -pkg_postinst() { - # Do we have a valid multi ver setup ? - if gcc-config --get-current-profile &>/dev/null ; then - # We not longer use the /usr/include/g++-v3 hacks, as - # it is not needed ... - [[ -L ${ROOT}/usr/include/g++ ]] && rm -f "${ROOT}"/usr/include/g++ - [[ -L ${ROOT}/usr/include/g++-v3 ]] && rm -f "${ROOT}"/usr/include/g++-v3 - [[ ${ROOT} = "/" ]] && gcc-config $(/usr/bin/gcc-config --get-current-profile) - fi -} -- cgit v1.2.3-65-gdbad