diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-15 01:16:44 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2012-03-15 01:16:44 +0000 |
commit | 9d7580ee3a76720348b57cd05bb2f9cfa18bb1df (patch) | |
tree | f1f95d0ad2e7649e01c2939f4c7b62e7ea64795d /sys-devel/gcc-config | |
parent | Marked ~hppa (bug #408119). (diff) | |
download | gentoo-2-9d7580ee3a76720348b57cd05bb2f9cfa18bb1df.tar.gz gentoo-2-9d7580ee3a76720348b57cd05bb2f9cfa18bb1df.tar.bz2 gentoo-2-9d7580ee3a76720348b57cd05bb2f9cfa18bb1df.zip |
Use CTARGET from the env.d file by default to better work with custom GCC_VER.
(Portage version: 2.2.0_alpha90/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel/gcc-config')
-rw-r--r-- | sys-devel/gcc-config/ChangeLog | 9 | ||||
-rwxr-xr-x | sys-devel/gcc-config/files/gcc-config-1.5.1 | 12 | ||||
-rw-r--r-- | sys-devel/gcc-config/gcc-config-1.5.1-r1.ebuild | 61 |
3 files changed, 77 insertions, 5 deletions
diff --git a/sys-devel/gcc-config/ChangeLog b/sys-devel/gcc-config/ChangeLog index 34a7545a612d..dc343bc3d80b 100644 --- a/sys-devel/gcc-config/ChangeLog +++ b/sys-devel/gcc-config/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/gcc-config # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.204 2012/03/06 14:14:19 ranger Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/ChangeLog,v 1.205 2012/03/15 01:16:44 vapier Exp $ + +*gcc-config-1.5.1-r1 (15 Mar 2012) + + 15 Mar 2012; Mike Frysinger <vapier@gentoo.org> files/gcc-config-1.5.1, + +gcc-config-1.5.1-r1.ebuild: + Use CTARGET from the env.d file by default to better work with custom + GCC_VER. 06 Mar 2012; Brent Baude <ranger@gentoo.org> gcc-config-1.5-r2.ebuild: Marking gcc-config-1.5-r2 ppc for bug 406351 diff --git a/sys-devel/gcc-config/files/gcc-config-1.5.1 b/sys-devel/gcc-config/files/gcc-config-1.5.1 index 65c06a4ce8c7..e295ce3c9ff9 100755 --- a/sys-devel/gcc-config/files/gcc-config-1.5.1 +++ b/sys-devel/gcc-config/files/gcc-config-1.5.1 @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2012 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.5.1,v 1.1 2012/02/29 20:16:56 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc-config/files/gcc-config-1.5.1,v 1.2 2012/03/15 01:16:44 vapier Exp $ # Format of /etc/env.d/gcc/: # config-TARGET: CURRENT=version for TARGET @@ -651,9 +651,9 @@ for x in "$@" ; do rcsfile="$RCSfile: gcc-config-1.5.1,v $" rcsfile=${rcsfile#: } rcsfile=${rcsfile%,v*} - cvsrev="$Revision: 1.1 $" + cvsrev="$Revision: 1.2 $" cvsrev=${cvsrev#: } - cvsdate="$Date: 2012/02/29 20:16:56 $" + cvsdate="$Date: 2012/03/15 01:16:44 $" cvsdate=${cvsdate#: } echo "${rcsfile} (r${cvsrev% *} @ ${cvsdate% *})" exit 0 @@ -731,7 +731,11 @@ if [[ ${DOIT} != "get_current_profile" ]] ; then source_var GCC_VER "${GCC_ENV_D}/${CC_COMP}" CC_COMP_VERSION=${GCC_VER:-$(chop_gcc_ver_spec ${CC_COMP})} - CC_COMP_TARGET=${CC_COMP%-${CC_COMP_VERSION}*} + CC_COMP_TARGET=$(show_var CTARGET "${GCC_ENV_D}/${CC_COMP}") + if [[ -z ${CC_COMP_TARGET} ]] ; then + # Native configs don't have CTARGET in there. + CC_COMP_TARGET=${CC_COMP%-${CC_COMP_VERSION}*} + fi if [[ ! -d ${ROOT}/${GCC_LIB}/${CC_COMP_TARGET}/${CC_COMP_VERSION} ]]; then CC_COMP_VERSION=${CC_COMP_VERSION%-*} diff --git a/sys-devel/gcc-config/gcc-config-1.5.1-r1.ebuild b/sys-devel/gcc-config/gcc-config-1.5.1-r1.ebuild new file mode 100644 index 000000000000..05d202dbf7b7 --- /dev/null +++ b/sys-devel/gcc-config/gcc-config-1.5.1-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2012 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.5.1-r1.ebuild,v 1.1 2012/03/15 01:16:44 vapier Exp $ + +inherit flag-o-matic toolchain-funcs multilib + +# Version of .c wrapper to use +W_VER="1.5.2" + +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 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +RDEPEND="!app-admin/eselect-compiler" + +S=${WORKDIR} + +src_unpack() { + cp "${FILESDIR}"/wrapper-${W_VER}.c "${S}"/wrapper.c || die +} + +src_compile() { + strip-flags + emake CC="$(tc-getCC)" wrapper || die "compile wrapper" +} + +src_install() { + newbin "${FILESDIR}"/${PN}-${PV} ${PN} || die "install gcc-config" + sed -i \ + -e "s:@GENTOO_LIBDIR@:$(get_libdir):g" \ + "${D}"/usr/bin/${PN} + + exeinto /usr/$(get_libdir)/misc + newexe wrapper gcc-config || die "install wrapper" +} + +pkg_postinst() { + # Scrub eselect-compiler remains + if [[ -e ${ROOT}/etc/env.d/05compiler ]] ; then + rm -f "${ROOT}"/etc/env.d/05compiler + fi + + # Make sure old versions dont exist #79062 + rm -f "${ROOT}"/usr/sbin/gcc-config + + # 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 + + # Do we have a valid multi ver setup ? + local x + for x in $(gcc-config -C -l 2>/dev/null | awk '$NF == "*" { print $2 }') ; do + gcc-config ${x} + done +} |