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

Diff of /eclass/multilib.eclass

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

Revision 1.105 Revision 1.106
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2014 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.105 2014/01/17 07:44:45 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.106 2014/07/11 08:21:58 ulm 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
9# @BLURB: This eclass is for all functions pertaining to handling multilib configurations. 9# @BLURB: This eclass is for all functions pertaining to handling multilib configurations.
10# @DESCRIPTION: 10# @DESCRIPTION:
11# This eclass is for all functions pertaining to handling multilib configurations. 11# This eclass is for all functions pertaining to handling multilib configurations.
12 12
13if [[ ${___ECLASS_ONCE_MULTILIB} != "recur -_+^+_- spank" ]] ; then 13if [[ -z ${_MULTILIB_ECLASS} ]]; then
14___ECLASS_ONCE_MULTILIB="recur -_+^+_- spank" 14_MULTILIB_ECLASS=1
15 15
16inherit toolchain-funcs 16inherit toolchain-funcs
17 17
18# Defaults: 18# Defaults:
19export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"} 19export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"}
412 local v vv 412 local v vv
413 413
414 export ABI=$1 414 export ABI=$1
415 415
416 # First restore any saved state we have laying around. 416 # First restore any saved state we have laying around.
417 if [[ ${__DEFAULT_ABI_SAVED} == "true" ]] ; then 417 if [[ ${_DEFAULT_ABI_SAVED} == "true" ]] ; then
418 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do 418 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
419 vv="__abi_saved_${v}" 419 vv="_abi_saved_${v}"
420 [[ ${!vv+set} == "set" ]] && export ${v}="${!vv}" || unset ${v} 420 [[ ${!vv+set} == "set" ]] && export ${v}="${!vv}" || unset ${v}
421 unset ${vv} 421 unset ${vv}
422 done 422 done
423 unset __DEFAULT_ABI_SAVED 423 unset _DEFAULT_ABI_SAVED
424 fi 424 fi
425 425
426 # We want to avoid the behind-the-back magic of gcc-config as it 426 # We want to avoid the behind-the-back magic of gcc-config as it
427 # screws up ccache and distcc. See #196243 for more info. 427 # screws up ccache and distcc. See #196243 for more info.
428 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then 428 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then
429 # Back that multilib-ass up so we can restore it later 429 # Back that multilib-ass up so we can restore it later
430 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do 430 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
431 vv="__abi_saved_${v}" 431 vv="_abi_saved_${v}"
432 [[ ${!v+set} == "set" ]] && export ${vv}="${!v}" || unset ${vv} 432 [[ ${!v+set} == "set" ]] && export ${vv}="${!v}" || unset ${vv}
433 done 433 done
434 export __DEFAULT_ABI_SAVED="true" 434 export _DEFAULT_ABI_SAVED="true"
435 435
436 # Set the CHOST native first so that we pick up the native 436 # Set the CHOST native first so that we pick up the native
437 # toolchain and not a cross-compiler by accident #202811. 437 # toolchain and not a cross-compiler by accident #202811.
438 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI}) 438 export CHOST=$(get_abi_CHOST ${DEFAULT_ABI})
439 export CC="$(tc-getCC) $(get_abi_CFLAGS)" 439 export CC="$(tc-getCC) $(get_abi_CFLAGS)"

Legend:
Removed from v.1.105  
changed lines
  Added in v.1.106

  ViewVC Help
Powered by ViewVC 1.1.20