only use --with-abi for x86_64 targets with recent enough versions as reported by...
authorMike Frysinger <vapier@gentoo.org>
Thu, 8 Dec 2011 22:38:33 +0000 (22:38 +0000)
committerMike Frysinger <vapier@gentoo.org>
Thu, 8 Dec 2011 22:38:33 +0000 (22:38 +0000)
eclass/toolchain.eclass

index d77ce9a6f964fb9674da3f6f0e58dcc9ce152095..9bdc179d158adff1b2bf0c9ab888f226a55a0018 100644 (file)
@@ -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.508 2011/12/08 18:11:32 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.509 2011/12/08 22:38:33 vapier Exp $
 #
 # Maintainer: Toolchain Ninjas <toolchain@gentoo.org>
 
@@ -965,9 +965,17 @@ gcc-compiler-configure() {
                        fi
                        ;;
                # Add --with-abi flags to set default ABI
-               amd64|mips)
+               mips)
                        confgcc+=" --with-abi=$(gcc-abi-map ${DEFAULT_ABI})"
                        ;;
+               amd64)
+                       # drop the 4.6.2 stuff once 4.7 goes stable
+                       if tc_version_is_at_least 4.7 ||
+                          ( tc_version_is_at_least 4.6.2 && has x32 $(get_all_abis) )
+                       then
+                               confgcc+=" --with-abi=$(gcc-abi-map ${DEFAULT_ABI})"
+                       fi
+                       ;;
                # Default arch for x86 is normally i386, lets give it a bump
                # since glibc will do so based on CTARGET anyways
                x86)