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

Diff of /eclass/multilib.eclass

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

Revision 1.48 Revision 1.54
1# Copyright 1999-2004 Gentoo Foundation 1# Copyright 1999-2004 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.48 2006/03/09 16:30:50 blubb Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.54 2006/07/12 07:40:49 kevquinn Exp $
4# 4#
5# Author: Jeremy Huddleston <eradicator@gentoo.org> 5# Author: Jeremy Huddleston <eradicator@gentoo.org>
6# 6#
7# This eclass is for all functions pertaining to handling multilib. 7# This eclass is for all functions pertaining to handling multilib.
8# configurations. 8# configurations.
191 local var="${flag}_${abi}" 191 local var="${flag}_${abi}"
192 echo ${!var} 192 echo ${!var}
193} 193}
194 194
195get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } 195get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; }
196get_abi_ASFLAGS() { get_abi_var ASFLAGS "$@"; }
196get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } 197get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; }
197get_abi_CHOST() { get_abi_var CHOST "$@"; } 198get_abi_CHOST() { get_abi_var CHOST "$@"; }
198get_abi_CTARGET() { get_abi_var CTARGET "$@"; } 199get_abi_CTARGET() { get_abi_var CTARGET "$@"; }
199get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; } 200get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; }
200get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; } 201get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; }
390# Ideas for this code came from debian's sparc-linux headers package. 391# Ideas for this code came from debian's sparc-linux headers package.
391# 392#
392# Example: 393# Example:
393# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64 394# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64
394# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 395# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64
396#
397# Warning: Be careful with the ordering here. The default ABI has to be the
398# last, because it is always defined (by GCC)
395create_ml_includes() { 399create_ml_includes() {
396 local dest=$1 400 local dest=$1
397 shift 401 shift
398 local basedirs=$(create_ml_includes-listdirs "$@") 402 local basedirs=$(create_ml_includes-listdirs "$@")
399 403
650 export MULTILIB_ABIS="default" 654 export MULTILIB_ABIS="default"
651 export DEFAULT_ABI="default" 655 export DEFAULT_ABI="default"
652 ;; 656 ;;
653 esac 657 esac
654} 658}
659
660# Hide multilib details here for packages which are forced to be compiled for a
661# specific ABI when run on another ABI (like x86-specific packages on amd64)
662multilib_toolchain_setup() {
663 if has_version app-admin/eselect-compiler ; then
664 # Binutils doesn't have wrappers for ld and as (yet). Eventually it
665 # will, and all this can just be handled with CHOST.
666 export LD="ld $(get_abi_LDFLAGS $1)"
667 export AS="as $(get_abi_ASFLAGS $1)"
668
669 export CHOST=$(get_abi_CHOST $1)
670 export CBUILD=$(get_abi_CHOST $1)
671 else
672 tc-export CC
673 export ABI=$1
674 fi
675}

Legend:
Removed from v.1.48  
changed lines
  Added in v.1.54

  ViewVC Help
Powered by ViewVC 1.1.20