/[gentoo-x86]/eclass/multilib.eclass
Gentoo

Diff of /eclass/multilib.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.69 Revision 1.72
1# Copyright 1999-2008 Gentoo Foundation 1# Copyright 1999-2008 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.69 2008/11/28 09:20:26 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.72 2009/02/20 23:20:22 vapier Exp $
4 4
5# @ECLASS: multilib.eclass 5# @ECLASS: multilib.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# amd64@gentoo.org 7# amd64@gentoo.org
8# toolchain@gentoo.org 8# toolchain@gentoo.org
337 done 337 done
338 338
339 if is_final_abi; then 339 if is_final_abi; then
340 base=${T}/gentoo-multilib 340 base=${T}/gentoo-multilib
341 pushd "${base}" 341 pushd "${base}"
342 find . | tar -c -T - -f - | tar -x --no-same-owner -f - -C ${D} 342 find . | tar -c -T - -f - | tar -x --no-same-owner -f - -C "${D}"
343 popd 343 popd
344 344
345 # This 'set' stuff is required by mips profiles to properly pass 345 # This 'set' stuff is required by mips profiles to properly pass
346 # CDEFINE's (which have spaces) to sub-functions 346 # CDEFINE's (which have spaces) to sub-functions
347 set -- 347 set --
481 dodir ${dest} 481 dodir ${dest}
482 482
483 local basedir 483 local basedir
484 for basedir in ${basedirs}; do 484 for basedir in ${basedirs}; do
485 local dir 485 local dir
486 for dir in $(find ${D}/${basedir} -type d); do 486 for dir in $(find "${D}"/${basedir} -type d); do
487 dodir ${dest}/${dir/${D}\/${basedir}/} 487 dodir ${dest}/${dir/${D}\/${basedir}/}
488 done 488 done
489 done 489 done
490} 490}
491 491
647# @FUNCTION: multilib_toolchain_setup 647# @FUNCTION: multilib_toolchain_setup
648# @DESCRIPTION: 648# @DESCRIPTION:
649# Hide multilib details here for packages which are forced to be compiled for a 649# Hide multilib details here for packages which are forced to be compiled for a
650# specific ABI when run on another ABI (like x86-specific packages on amd64) 650# specific ABI when run on another ABI (like x86-specific packages on amd64)
651multilib_toolchain_setup() { 651multilib_toolchain_setup() {
652 local v vv
653
652 export ABI=$1 654 export ABI=$1
653 655
654 if has_version app-admin/eselect-compiler ; then 656 # We want to avoid the behind-the-back magic of gcc-config as it
655 # Binutils doesn't have wrappers for ld and as (yet). Eventually it 657 # screws up ccache and distcc. See #196243 for more info.
656 # will, and all this can just be handled with CHOST. 658 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then
657 export LD="ld $(get_abi_LDFLAGS $1)" 659 if [[ ${DEFAULT_ABI_SAVED} != "true" ]] ; then
660 for v in CHOST CBUILD AS CC CXX LD ; do
661 export __abi_saved_${v}="${!v}"
662 done
663 export DEFAULT_ABI_SAVED="true"
664 fi
665
666 # Set the CHOST native first so that we pick up the native
667 # toolchain and not a cross-compiler by accident #202811.
668 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
658 export AS="as $(get_abi_ASFLAGS $1)" 669 export AS="$(tc-getAS) $(get_abi_ASFLAGS)"
659 670 export CC="$(tc-getCC) $(get_abi_CFLAGS)"
671 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)"
672 export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
660 export CHOST=$(get_abi_CHOST $1) 673 export CHOST=$(get_abi_CHOST $1)
661 export CBUILD=$(get_abi_CHOST $1) 674 export CBUILD=$(get_abi_CHOST $1)
662 else 675
663 tc-export CC 676 elif [[ ${DEFAULT_ABI_SAVED} == "true" ]] ; then
677 for v in CHOST CBUILD AS CC CXX LD ; do
678 vv="__abi_saved_${v}"
679 export ${v}=${!vv}
680 done
664 fi 681 fi
665} 682}

Legend:
Removed from v.1.69  
changed lines
  Added in v.1.72

  ViewVC Help
Powered by ViewVC 1.1.20