diff options
author | Ryan Hill <rhill@gentoo.org> | 2011-01-18 07:00:50 +0000 |
---|---|---|
committer | Ryan Hill <rhill@gentoo.org> | 2011-01-18 07:00:50 +0000 |
commit | 18520abee02ebe03b6ca81dc8b0bb6deaa3fe862 (patch) | |
tree | 3fe01c786c05672a3145f07e0483c874d065eb25 /eclass | |
parent | Updated with suggested workaround for ppc64 stable-ing (see bug 263641) (diff) | |
download | historical-18520abee02ebe03b6ca81dc8b0bb6deaa3fe862.tar.gz historical-18520abee02ebe03b6ca81dc8b0bb6deaa3fe862.tar.bz2 historical-18520abee02ebe03b6ca81dc8b0bb6deaa3fe862.zip |
Add support for Go language in 4.6. (bug #329551)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain.eclass | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass index d6ec8edd8c2f..09f8d4a5e139 100644 --- a/eclass/toolchain.eclass +++ b/eclass/toolchain.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.448 2011/01/18 01:42:19 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.449 2011/01/18 07:00:50 dirtyepic Exp $ # # Maintainer: Toolchain Ninjas <toolchain@gentoo.org> @@ -168,6 +168,7 @@ else [[ -n ${SPECS_VER} ]] && IUSE+=" nossp" fi [[ ${GCC_BRANCH_VER} == 4.5 ]] && IUSE+=" lto" + tc_version_is_at_least "4.6" && IUSE+=" go" fi fi @@ -826,6 +827,12 @@ gcc_pkg_setup() { # we dont want to use the installed compiler's specs to build gcc! unset GCC_SPECS + + if use nocxx ; then + use go && ewarn 'Go requires a C++ compiler, disabled due to USE="nocxx"' + use objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="nocxx"' + use gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="nocxx"' + fi fi want_libssp && libc_has_ssp && \ @@ -1251,6 +1258,7 @@ gcc-compiler-configure() { is_cxx && GCC_LANG="${GCC_LANG},c++" is_d && GCC_LANG="${GCC_LANG},d" is_gcj && GCC_LANG="${GCC_LANG},java" + is_go && GCC_LANG="${GCC_LANG},go" if is_objc || is_objcxx ; then GCC_LANG="${GCC_LANG},objc" if tc_version_is_at_least "4.0" ; then @@ -1829,7 +1837,7 @@ gcc-compiler_src_install() { # These should be symlinks dodir /usr/bin cd "${D}"${BINPATH} - for x in cpp gcc g++ c++ g77 gcj gcjh gfortran ; do + for x in cpp gcc g++ c++ g77 gcj gcjh gfortran gccgo ; do # For some reason, g77 gets made instead of ${CTARGET}-g77... # this should take care of that [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x} @@ -1926,6 +1934,10 @@ gcc-compiler_src_install() { doins "${module}" rm "${module}" done + + # Don't scan .gox files for executable stacks - false positives + export QA_EXECSTACK="usr/lib*/go/*/*.gox" + export QA_WX_LOAD="usr/lib*/go/*/*.gox" } gcc_slot_java() { @@ -2480,7 +2492,12 @@ is_fortran() { is_gcj() { gcc-lang-supported java || return 1 - use gcj + ! use nocxx && use gcj +} + +is_go() { + gcc-lang-supported go || return 1 + ! use nocxx && use go } is_libffi() { @@ -2495,7 +2512,7 @@ is_objc() { is_objcxx() { gcc-lang-supported 'obj-c++' || return 1 - use objc++ + ! use nocxx && use objc++ } is_ada() { |