commit:     b9baf2eefe8267bfb201b8360a39eea4cf98bc22
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Wed Dec  3 19:40:52 2014 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Dec  3 19:40:52 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=b9baf2ee

sys-devel/gcc: Add abi_x86_* flags to control ABIs on amd64.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 31 ++++++++++++-------------------
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 6c8d007..c575f57 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -25,7 +25,8 @@ SRC_URI="mirror://gnu/${PN}/${P}/${P}.tar.bz2
 LICENSE="GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ 
gcc-runtime-library-exception-3.1 ) FDL-1.3+"
 SLOT="${PV%.*}"
 KEYWORDS="~amd64 ~x86"
-IUSE="altivec +cxx doc fixed-point +fortran go graphite hardened libssp
+IUSE="abi_x86_32 abi_x86_64 abi_x86_x32
+       altivec +cxx doc fixed-point +fortran go graphite hardened libssp
        multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize +ssp
        test vanilla"
 
@@ -359,25 +360,17 @@ src_configure() {
                        myconf+=( --with-abi=$(gcc-abi-map 
"${TARGET_DEFAULT_ABI}") )
                        ;;
                amd64)
-                       # drop the older/ABI checks once this get's merged into 
some
-                       # version of gcc upstream
-                       # translate our notion of multilibs into gcc's
-                       local abi list
-                       for abi in $(get_all_abis TARGET) ; do
-                               local l=$(gcc-abi-map ${abi})
-                               [[ -n ${l} ]] && list+=",${l}"
-                       done
-                       if [[ -n ${list} ]] ; then
-                               case ${CTARGET} in
-                               x86_64*)
-                                       myconf+=( 
--with-multilib-list=${list:1} )
-                                       ;;
-                               esac
-                       fi
+                       local abis=()
+                       use abi_x86_32 && abis+=( m32 )
+                       use abi_x86_64 && abis+=( m64 )
+                       use abi_x86_x32 && abis+=( mx32 )
+                       abis=${abis[*]}
 
-                       if has x32 $(get_all_abis TARGET) ; then
-                               myconf+=( --with-abi=$(gcc-abi-map 
${TARGET_DEFAULT_ABI}) )
-                       fi
+                       myconf+=(
+                               --enable-multilib
+                               --with-multilib-list="${abis// /,}"
+                               --with-abi="$(gcc-abi-map 
"${TARGET_DEFAULT_ABI}")"
+                       )
                        ;;
                x86)
                        # Default arch for x86 is normally i386, lets give it a 
bump

Reply via email to