summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-20 20:12:47 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-20 20:12:47 +0000
commit5c5757e30e7cde75ffa4bbe7952159a9ce2bec2e (patch)
tree05b121f9e1e59c0f65dda3df964821e7372a099f /eclass
parentDrop gtetrinet and monster-masher esound related mask. (diff)
downloadgentoo-2-5c5757e30e7cde75ffa4bbe7952159a9ce2bec2e.tar.gz
gentoo-2-5c5757e30e7cde75ffa4bbe7952159a9ce2bec2e.tar.bz2
gentoo-2-5c5757e30e7cde75ffa4bbe7952159a9ce2bec2e.zip
check cxx is in IUSE before trying to use it #391149 by Raúl Porcel
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass14
1 files changed, 8 insertions, 6 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 9257375f25fb..0a6ea47bbc4d 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.479 2011/11/14 17:40:06 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.480 2011/11/20 20:12:47 vapier Exp $
#
# Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
@@ -776,7 +776,7 @@ toolchain_pkg_setup() {
# we dont want to use the installed compiler's specs to build gcc!
unset GCC_SPECS
- if ! use cxx ; then
+ if ! is_cxx ; then
use_if_iuse go && ewarn 'Go requires a C++ compiler, disabled due to USE="-cxx"'
use_if_iuse objc++ && ewarn 'Obj-C++ requires a C++ compiler, disabled due to USE="-cxx"'
use_if_iuse gcj && ewarn 'GCJ requires a C++ compiler, disabled due to USE="-cxx"'
@@ -1251,10 +1251,12 @@ gcc_do_configure() {
local confgcc
# Sanity check for USE=nocxx -> USE=cxx migration
- if (use cxx && use nocxx) || (use !cxx && use !nocxx) ; then
- eerror "We are migrating USE=nocxx to USE=cxx, but your USE settings do not make"
- eerror "sense. Please make sure these two flags line up logically in your setup."
- die "USE='cxx nocxx' and USE='-cxx -nocxx' make no sense"
+ if in_iuse cxx && in_iuse nocxx ; then
+ if (use cxx && use nocxx) || (use !cxx && use !nocxx) ; then
+ eerror "We are migrating USE=nocxx to USE=cxx, but your USE settings do not make"
+ eerror "sense. Please make sure these two flags line up logically in your setup."
+ die "USE='cxx nocxx' and USE='-cxx -nocxx' make no sense"
+ fi
fi
# Set configuration based on path variables