# 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>
# 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"'
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