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

Diff of /eclass/multilib.eclass

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

Revision 1.1.1.1 Revision 1.49
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.1.1.1 2005/11/30 09:59:17 chriswhite Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.49 2006/05/28 19:31:33 blubb 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.
100export LDFLAGS_default 100export LDFLAGS_default
101export CHOST_default=${CHOST_default:-${CHOST}} 101export CHOST_default=${CHOST_default:-${CHOST}}
102export CTARGET_default=${CTARGET_default:-${CTARGET:-${CHOST_default}}} 102export CTARGET_default=${CTARGET_default:-${CTARGET:-${CHOST_default}}}
103export LIBDIR_default=${CONF_LIBDIR:-"lib"} 103export LIBDIR_default=${CONF_LIBDIR:-"lib"}
104export CDEFINE_default="__unix__" 104export CDEFINE_default="__unix__"
105export KERNEL_ABI=${KERNEL_ABI:-${DEFAULT_ABI}}
105 106
106# has_multilib_profile() 107# has_multilib_profile()
107has_multilib_profile() { 108has_multilib_profile() {
108 [ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ] 109 [ -n "${MULTILIB_ABIS}" -a "${MULTILIB_ABIS}" != "${MULTILIB_ABIS/ /}" ]
109} 110}
266get_all_libdirs() { 267get_all_libdirs() {
267 local libdirs="lib" 268 local libdirs="lib"
268 local abi 269 local abi
269 local dir 270 local dir
270 271
271 if has_multilib_profile; then 272 # Remove when amd64's 2004.3 is purged.
273 if [[ -n "${CONF_LIBDIR}" ]]; then
274 for dir in ${CONF_LIBDIR} ${CONF_MULTILIBDIR:-lib32}; do
275 [ "${dir}" != "lib" ] && libdirs="${libdirs} ${dir}"
276 done
277 else
272 for abi in ${MULTILIB_ABIS}; do 278 for abi in ${MULTILIB_ABIS}; do
273 [ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})" 279 [ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})"
274 done
275 elif [ -n "${CONF_LIBDIR}" ]; then
276 for dir in ${CONF_LIBDIR} ${CONF_MULTILIBDIR:-lib32}; do
277 [ "${dir}" != "lib" ] && libdirs="${libdirs} ${dir}"
278 done 280 done
279 fi 281 fi
280 282
281 echo "${libdirs}" 283 echo "${libdirs}"
282} 284}
388# Ideas for this code came from debian's sparc-linux headers package. 390# Ideas for this code came from debian's sparc-linux headers package.
389# 391#
390# Example: 392# Example:
391# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64 393# create_ml_includes /usr/include/asm __sparc__:/usr/include/asm-sparc __sparc64__:/usr/include/asm-sparc64
392# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64 394# create_ml_includes /usr/include/asm __i386__:/usr/include/asm-i386 __x86_64__:/usr/include/asm-x86_64
395#
396# Warning: Be careful with the ordering here. The default ABI has to be the
397# last, because it is always defined (by GCC)
393create_ml_includes() { 398create_ml_includes() {
394 local dest=$1 399 local dest=$1
395 shift 400 shift
396 local basedirs=$(create_ml_includes-listdirs "$@") 401 local basedirs=$(create_ml_includes-listdirs "$@")
397 402

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.49

  ViewVC Help
Powered by ViewVC 1.1.20