| 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.50 2006/06/20 08:48:24 eradicator Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.53 2006/06/27 09:11:46 vapier 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. |
| … | |
… | |
| 194 | |
194 | |
| 195 | get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } |
195 | get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } |
| 196 | get_abi_ASFLAGS() { get_abi_var ASFLAGS "$@"; } |
196 | get_abi_ASFLAGS() { get_abi_var ASFLAGS "$@"; } |
| 197 | get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } |
197 | get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } |
| 198 | get_abi_CHOST() { get_abi_var CHOST "$@"; } |
198 | get_abi_CHOST() { get_abi_var CHOST "$@"; } |
|
|
199 | get_abi_CTARGET() { get_abi_var CTARGET "$@"; } |
| 199 | get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; } |
200 | get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; } |
| 200 | get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; } |
201 | get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; } |
| 201 | get_abi_LIBDIR() { get_abi_var LIBDIR "$@"; } |
202 | get_abi_LIBDIR() { get_abi_var LIBDIR "$@"; } |
| 202 | |
203 | |
| 203 | # Return a list of the ABIs we want to install for with |
204 | # Return a list of the ABIs we want to install for with |
| … | |
… | |
| 654 | export DEFAULT_ABI="default" |
655 | export DEFAULT_ABI="default" |
| 655 | ;; |
656 | ;; |
| 656 | esac |
657 | esac |
| 657 | } |
658 | } |
| 658 | |
659 | |
| 659 | # This is for the single package in the tree whose maintainer believes it is so important to |
660 | # Hide multilib details here for packages which are forced to be compiled for a |
| 660 | # provide a compiled-from-source version before portage is able to support it (app-emul/wine) |
661 | # specific ABI when run on another ABI (like x86-specific packages on amd64) |
| 661 | multilib_toolchain_setup() { |
662 | multilib_toolchain_setup() { |
| 662 | export ABI=$1 |
663 | if has_version app-admin/eselect-compiler ; then |
| 663 | |
|
|
| 664 | # Binutils doesn't have wrappers for ld and as (yet). Eventually it |
664 | # Binutils doesn't have wrappers for ld and as (yet). Eventually it |
| 665 | # will, and all this can just be handled with CHOST. |
665 | # will, and all this can just be handled with CHOST. |
| 666 | export LD="ld $(get_abi_LDFLAGS)" |
666 | export LD="ld $(get_abi_LDFLAGS)" |
| 667 | export AS="as $(get_abi_ASFLAGS)" |
667 | export AS="as $(get_abi_ASFLAGS)" |
| 668 | |
668 | |
| 669 | export CHOST=$(get_abi_CHOST) |
669 | export CHOST=$(get_abi_CHOST) |
| 670 | export CBUILD=$(get_abi_CHOST) |
670 | export CBUILD=$(get_abi_CHOST) |
|
|
671 | else |
|
|
672 | tc-export CC |
|
|
673 | export ABI=$1 |
|
|
674 | fi |
| 671 | } |
675 | } |