From 0050d18d910f04f0b3d6201f512e8ad672a7adce Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sun, 20 Nov 2011 20:12:47 +0000 Subject: [PATCH] =?utf8?q?check=20cxx=20is=20in=20IUSE=20before=20trying?= =?utf8?q?=20to=20use=20it=20#391149=20by=20Ra=C3=BAl=20Porcel?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- eclass/toolchain.eclass | 14 ++++++++------ 1 file 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 @@ -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 -- 2.26.2