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

Diff of /eclass/multilib.eclass

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

Revision 1.101 Revision 1.102
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2013 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.101 2012/10/17 19:13:18 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.102 2013/01/21 19:22:25 mgorny 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
393 393
394 export ABI=$1 394 export ABI=$1
395 395
396 # First restore any saved state we have laying around. 396 # First restore any saved state we have laying around.
397 if [[ ${__DEFAULT_ABI_SAVED} == "true" ]] ; then 397 if [[ ${__DEFAULT_ABI_SAVED} == "true" ]] ; then
398 for v in CHOST CBUILD AS CC CXX LD ; do 398 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
399 vv="__abi_saved_${v}" 399 vv="__abi_saved_${v}"
400 export ${v}="${!vv}" 400 export ${v}="${!vv}"
401 unset ${vv} 401 unset ${vv}
402 done 402 done
403 unset __DEFAULT_ABI_SAVED 403 unset __DEFAULT_ABI_SAVED
405 405
406 # We want to avoid the behind-the-back magic of gcc-config as it 406 # We want to avoid the behind-the-back magic of gcc-config as it
407 # screws up ccache and distcc. See #196243 for more info. 407 # screws up ccache and distcc. See #196243 for more info.
408 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then 408 if [[ ${ABI} != ${DEFAULT_ABI} ]] ; then
409 # Back that multilib-ass up so we can restore it later 409 # Back that multilib-ass up so we can restore it later
410 for v in CHOST CBUILD AS CC CXX LD ; do 410 for v in CHOST CBUILD AS CC CXX LD PKG_CONFIG_{LIBDIR,PATH} ; do
411 export __abi_saved_${v}="${!v}" 411 export __abi_saved_${v}="${!v}"
412 done 412 done
413 export __DEFAULT_ABI_SAVED="true" 413 export __DEFAULT_ABI_SAVED="true"
414 414
415 # Set the CHOST native first so that we pick up the native 415 # Set the CHOST native first so that we pick up the native
418 export CC="$(tc-getCC) $(get_abi_CFLAGS)" 418 export CC="$(tc-getCC) $(get_abi_CFLAGS)"
419 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)" 419 export CXX="$(tc-getCXX) $(get_abi_CFLAGS)"
420 export LD="$(tc-getLD) $(get_abi_LDFLAGS)" 420 export LD="$(tc-getLD) $(get_abi_LDFLAGS)"
421 export CHOST=$(get_abi_CHOST $1) 421 export CHOST=$(get_abi_CHOST $1)
422 export CBUILD=$(get_abi_CHOST $1) 422 export CBUILD=$(get_abi_CHOST $1)
423 export PKG_CONFIG_LIBDIR=${EPREFIX}/usr/$(get_libdir)/pkgconfig
424 export PKG_CONFIG_PATH=${EPREFIX}/usr/share/pkgconfig
423 fi 425 fi
424} 426}
425 427
426fi 428fi

Legend:
Removed from v.1.101  
changed lines
  Added in v.1.102

  ViewVC Help
Powered by ViewVC 1.1.20