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

Diff of /eclass/multilib.eclass

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

Revision 1.80 Revision 1.81
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.80 2011/03/07 02:46:28 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.81 2011/03/10 01:52: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
676multilib_toolchain_setup() { 676multilib_toolchain_setup() {
677 local v vv 677 local v vv
678 678
679 export ABI=$1 679 export ABI=$1
680 680
681 # First restore any saved state we have laying around.
682 if [[ ${__DEFAULT_ABI_SAVED} == "true" ]] ; then
683 for v in CHOST CBUILD AS CC CXX LD ; do
684 vv="__abi_saved_${v}"
685 export ${v}="${!vv}"
686 unset ${vv}
687 done
688 unset __DEFAULT_ABI_SAVED
689 fi
690
681 # We want to avoid the behind-the-back magic of gcc-config as it 691 # We want to avoid the behind-the-back magic of gcc-config as it
682 # screws up ccache and distcc. See #196243 for more info. 692 # screws up ccache and distcc. See #196243 for more info.
683 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then 693 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then
684 if [[ ${DEFAULT_ABI_SAVED} != "true" ]] ; then 694 # Back that multilib-ass up so we can restore it later
685 for v in CHOST CBUILD AS CC CXX LD ; do 695 for v in CHOST CBUILD AS CC CXX LD ; do
686 export __abi_saved_${v}="${!v}" 696 export __abi_saved_${v}="${!v}"
687 done 697 done
688 export DEFAULT_ABI_SAVED="true" 698 export __DEFAULT_ABI_SAVED="true"
689 fi
690 699
691 # Set the CHOST native first so that we pick up the native 700 # Set the CHOST native first so that we pick up the native
692 # toolchain and not a cross-compiler by accident #202811. 701 # toolchain and not a cross-compiler by accident #202811.
693 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI}) 702 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
694 export AS="$(tc-getAS) $(get_abi_ASFLAGS)" 703 export AS="$(tc-getAS) $(get_abi_ASFLAGS)"
695 export CC="$(tc-getCC) $(get_abi_CFLAGS)" 704 export CC="$(tc-getCC) $(get_abi_CFLAGS)"
696 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)" 705 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)"
697 export LD="$(tc-getLD) $(get_abi_LDFLAGS)" 706 export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
698 export CHOST=$(get_abi_CHOST $1) 707 export CHOST=$(get_abi_CHOST $1)
699 export CBUILD=$(get_abi_CHOST $1) 708 export CBUILD=$(get_abi_CHOST $1)
700
701 elif [[ ${DEFAULT_ABI_SAVED} == "true" ]] ; then
702 for v in CHOST CBUILD AS CC CXX LD ; do
703 vv="__abi_saved_${v}"
704 export ${v}="${!vv}"
705 done
706 fi 709 fi
707} 710}

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

  ViewVC Help
Powered by ViewVC 1.1.20