handle newer cxx behavior with gcc-4.7+, and newer libquadmath/fortran with gcc-4.6+
authorMike Frysinger <vapier@gentoo.org>
Mon, 12 Sep 2011 05:40:23 +0000 (05:40 +0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 12 Sep 2011 05:40:23 +0000 (05:40 +0000)
eclass/toolchain.eclass

index 95e189af923d86bec593a729b51e72ff0d87d506..d003b876b6d7bdd2f2255f49a24fce9c11f37ae0 100644 (file)
@@ -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.466 2011/09/11 17:48:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.467 2011/09/12 05:40:23 vapier Exp $
 #
 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
 
@@ -1177,6 +1177,18 @@ gcc-compiler-configure() {
                confgcc+=" --enable-java-awt=gtk"
        fi
 
+       # newer gcc versions like to bootstrap themselves with C++,
+       # so we need to manually disable it ourselves
+       if tc_version_is_at_least 4.7 && ! is_cxx ; then
+               confgcc+=" --disable-build-with-cxx --disable-build-poststage1-with-cxx"
+       fi
+
+       # newer gcc's come with libquadmath, but only fortran uses
+       # it, so auto punt it when we don't care
+       if tc_version_is_at_least 4.6 && ! is_fortran ; then
+               confgcc+=" --disable-libquadmath"
+       fi
+
        case $(tc-arch) in
                arm)    #264534
                        local arm_arch="${CTARGET%%-*}"