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

Diff of /eclass/multilib.eclass

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

Revision 1.70 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.70 2009/01/09 06:59:45 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 # disable ccache for non-native builds #196243. this is because how 656 # We want to avoid the behind-the-back magic of gcc-config as it
655 # we cram ABI related CFLAGS behind the back of the gcc frontend with 657 # screws up ccache and distcc. See #196243 for more info.
656 # the gcc-config wrapper.
657 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then 658 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then
658 : ${CCACHE_DISABLE:=multilib-disable} 659 if [[ ${DEFAULT_ABI_SAVED} != "true" ]] ; then
659 else 660 for v in CHOST CBUILD AS CC CXX LD ; do
660 if [[ ${CCACHE_DISABLE} == "multilib-disable" ]] ; then 661 export __abi_saved_${v}="${!v}"
661 unset CCACHE_DISABLE 662 done
663 export DEFAULT_ABI_SAVED="true"
662 fi 664 fi
663 fi
664 export CCACHE_DISABLE
665 665
666 if has_version app-admin/eselect-compiler ; then 666 # Set the CHOST native first so that we pick up the native
667 # Binutils doesn't have wrappers for ld and as (yet). Eventually it 667 # toolchain and not a cross-compiler by accident #202811.
668 # will, and all this can just be handled with CHOST. 668 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
669 export LD="ld $(get_abi_LDFLAGS $1)"
670 export AS="as $(get_abi_ASFLAGS $1)" 669 export AS="$(tc-getAS) $(get_abi_ASFLAGS)"
671 670 export CC="$(tc-getCC) $(get_abi_CFLAGS)"
671 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)"
672 export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
672 export CHOST=$(get_abi_CHOST $1) 673 export CHOST=$(get_abi_CHOST $1)
673 export CBUILD=$(get_abi_CHOST $1) 674 export CBUILD=$(get_abi_CHOST $1)
674 else 675
675 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
676 fi 681 fi
677} 682}

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

  ViewVC Help
Powered by ViewVC 1.1.20