| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 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.92 2011/08/18 14:58:57 vapier Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.93 2011/10/14 22:54:35 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 |
| … | |
… | |
| 55 | else |
55 | else |
| 56 | get_abi_LIBDIR |
56 | get_abi_LIBDIR |
| 57 | fi |
57 | fi |
| 58 | } |
58 | } |
| 59 | |
59 | |
| 60 | # @FUNCTION: get_multilibdir |
|
|
| 61 | # @RETURN: Returns the multilibdir |
|
|
| 62 | get_multilibdir() { |
|
|
| 63 | if has_multilib_profile; then |
|
|
| 64 | eerror "get_multilibdir called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org" |
|
|
| 65 | exit 1 |
|
|
| 66 | fi |
|
|
| 67 | echo ${CONF_MULTILIBDIR:=lib32} |
|
|
| 68 | } |
|
|
| 69 | |
|
|
| 70 | # @FUNCTION: get_libdir_override |
|
|
| 71 | # @DESCRIPTION: |
|
|
| 72 | # Sometimes you need to override the value returned by get_libdir. A good |
|
|
| 73 | # example of this is xorg-x11, where lib32 isnt a supported configuration, |
|
|
| 74 | # and where lib64 -must- be used on amd64 (for applications that need lib |
|
|
| 75 | # to be 32bit, such as adobe acrobat). Note that this override also bypasses |
|
|
| 76 | # portage version sanity checking. |
|
|
| 77 | # get_libdir_override expects one argument, the result get_libdir should |
|
|
| 78 | # return: |
|
|
| 79 | # |
|
|
| 80 | # get_libdir_override lib64 |
|
|
| 81 | get_libdir_override() { |
|
|
| 82 | if has_multilib_profile; then |
|
|
| 83 | eerror "get_libdir_override called, but it shouldn't be needed with the new multilib approach. Please file a bug at http://bugs.gentoo.org and assign it to eradicator@gentoo.org" |
|
|
| 84 | exit 1 |
|
|
| 85 | fi |
|
|
| 86 | CONF_LIBDIR="$1" |
|
|
| 87 | CONF_LIBDIR_OVERRIDE="$1" |
|
|
| 88 | LIBDIR_default="$1" |
|
|
| 89 | } |
|
|
| 90 | |
|
|
| 91 | # @FUNCTION: get_abi_var |
60 | # @FUNCTION: get_abi_var |
| 92 | # @USAGE: <VAR> [ABI] |
61 | # @USAGE: <VAR> [ABI] |
| 93 | # @RETURN: returns the value of ${<VAR>_<ABI>} which should be set in make.defaults |
62 | # @RETURN: returns the value of ${<VAR>_<ABI>} which should be set in make.defaults |
|
|
63 | # @INTERNAL |
| 94 | # @DESCRIPTION: |
64 | # @DESCRIPTION: |
| 95 | # ex: |
65 | # ex: |
| 96 | # CFLAGS=$(get_abi_var CFLAGS sparc32) # CFLAGS=-m32 |
66 | # CFLAGS=$(get_abi_var CFLAGS sparc32) # CFLAGS=-m32 |
| 97 | # |
67 | # |
| 98 | # Note that the prefered method is to set CC="$(tc-getCC) $(get_abi_CFLAGS)" |
68 | # Note that the prefered method is to set CC="$(tc-getCC) $(get_abi_CFLAGS)" |
| … | |
… | |
| 122 | # @USAGE: [ABI] |
92 | # @USAGE: [ABI] |
| 123 | # @DESCRIPTION: |
93 | # @DESCRIPTION: |
| 124 | # Alias for 'get_abi_var CFLAGS' |
94 | # Alias for 'get_abi_var CFLAGS' |
| 125 | get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } |
95 | get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } |
| 126 | |
96 | |
| 127 | # @FUNCTION: get_abi_ASFLAGS |
|
|
| 128 | # @USAGE: [ABI] |
|
|
| 129 | # @DESCRIPTION: |
|
|
| 130 | # Alias for 'get_abi_var ASFLAGS' |
|
|
| 131 | get_abi_ASFLAGS() { get_abi_var ASFLAGS "$@"; } |
|
|
| 132 | |
|
|
| 133 | # @FUNCTION: get_abi_LDFLAGS |
97 | # @FUNCTION: get_abi_LDFLAGS |
| 134 | # @USAGE: [ABI] |
98 | # @USAGE: [ABI] |
| 135 | # @DESCRIPTION: |
99 | # @DESCRIPTION: |
| 136 | # Alias for 'get_abi_var LDFLAGS' |
100 | # Alias for 'get_abi_var LDFLAGS' |
| 137 | get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } |
101 | get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } |