summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-12-06 05:22:24 +0000
committerMike Frysinger <vapier@gentoo.org>2011-12-06 05:22:24 +0000
commit71f0355f1815c73ffa306822f5933a5c571aa902 (patch)
treea8a73dc43b18a2bba57bce6aa3bbf751b13ed506 /eclass
parentsimplify the setup of $S and $SRC_URI a bit (diff)
downloadhistorical-71f0355f1815c73ffa306822f5933a5c571aa902.tar.gz
historical-71f0355f1815c73ffa306822f5933a5c571aa902.tar.bz2
historical-71f0355f1815c73ffa306822f5933a5c571aa902.zip
simplify GCC_LANG logic
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass44
1 files changed, 14 insertions, 30 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0759b6adbf84..9e885b4b0646 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.501 2011/12/06 05:10:02 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.502 2011/12/06 05:22:24 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -984,45 +984,34 @@ gcc-compiler-configure() {
;;
esac
- GCC_LANG="c"
- 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"
+ local GCC_LANG="c"
+ is_cxx && GCC_LANG+=",c++"
+ is_d && GCC_LANG+=",d"
+ is_gcj && GCC_LANG+=",java"
+ is_go && GCC_LANG+=",go"
if is_objc || is_objcxx ; then
- GCC_LANG="${GCC_LANG},objc"
+ GCC_LANG+=",objc"
if tc_version_is_at_least "4.0" ; then
use objc-gc && confgcc+=" --enable-objc-gc"
fi
- is_objcxx && GCC_LANG="${GCC_LANG},obj-c++"
+ is_objcxx && GCC_LANG+=",obj-c++"
fi
- is_treelang && GCC_LANG="${GCC_LANG},treelang"
+ is_treelang && GCC_LANG+=",treelang"
# fortran support just got sillier! the lang value can be f77 for
# fortran77, f95 for fortran95, or just plain old fortran for the
# currently supported standard depending on gcc version.
- is_fortran && GCC_LANG="${GCC_LANG},fortran"
- is_f77 && GCC_LANG="${GCC_LANG},f77"
- is_f95 && GCC_LANG="${GCC_LANG},f95"
+ is_fortran && GCC_LANG+=",fortran"
+ is_f77 && GCC_LANG+=",f77"
+ is_f95 && GCC_LANG+=",f95"
# We do NOT want 'ADA support' in here!
- # is_ada && GCC_LANG="${GCC_LANG},ada"
+ # is_ada && GCC_LANG+=",ada"
einfo "configuring for GCC_LANG: ${GCC_LANG}"
+ confgcc+=" --enable-languages=${GCC_LANG}"
}
-# Other than the variables described for gcc_setup_variables, the following
-# will alter tha behavior of gcc_do_configure:
-#
-# CTARGET
-# CBUILD
-# Enable building for a target that differs from CHOST
-#
-# GCC_LANG
-# Enable support for ${GCC_LANG} languages. defaults to just "c"
-#
-# Travis Tilley <lv@gentoo.org> (04 Sep 2004)
-#
gcc_do_configure() {
local confgcc
@@ -1115,11 +1104,6 @@ gcc_do_configure() {
gcc-compiler-configure || die
- # if not specified, assume we are building for a target that only
- # requires C support
- GCC_LANG=${GCC_LANG:-c}
- confgcc+=" --enable-languages=${GCC_LANG}"
-
if is_crosscompile ; then
# When building a stage1 cross-compiler (just C compiler), we have to
# disable a bunch of features or gcc goes boom