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

Diff of /eclass/multilib.eclass

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

Revision 1.49 Revision 1.57
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.49 2006/05/28 19:31:33 blubb Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.57 2006/10/13 16:50:53 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.
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 "$@"; }
267get_all_libdirs() { 268get_all_libdirs() {
268 local libdirs="lib" 269 local libdirs="lib"
269 local abi 270 local abi
270 local dir 271 local dir
271 272
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
278 for abi in ${MULTILIB_ABIS}; do 273 for abi in ${MULTILIB_ABIS}; do
279 [ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})" 274 [ "$(get_abi_LIBDIR ${abi})" != "lib" ] && libdirs="${libdirs} $(get_abi_LIBDIR ${abi})"
280 done 275 done
281 fi
282 276
283 echo "${libdirs}" 277 echo "${libdirs}"
284} 278}
285 279
286# Return true if ${ABI} is the last ABI on our list (or if we're not 280# Return true if ${ABI} is the last ABI on our list (or if we're not
570 export CDEFINE_x86="__i386__" 564 export CDEFINE_x86="__i386__"
571 export LIBDIR_x86="lib" 565 export LIBDIR_x86="lib"
572 566
573 export CFLAGS_amd64=${CFLAGS_amd64--m64} 567 export CFLAGS_amd64=${CFLAGS_amd64--m64}
574 export CHOST_amd64=${CTARGET} 568 export CHOST_amd64=${CTARGET}
575 export CTARGET_amd64=${CTARGET_amd64} 569 export CTARGET_amd64=${CHOST_amd64}
576 export CDEFINE_amd64="__x86_64__" 570 export CDEFINE_amd64="__x86_64__"
577 export LIBDIR_amd64="lib64" 571 export LIBDIR_amd64="lib64"
578 572
579 export MULTILIB_ABIS="amd64 x86" 573 export MULTILIB_ABIS="amd64 x86"
580 export DEFAULT_ABI="amd64" 574 export DEFAULT_ABI="amd64"
653 export MULTILIB_ABIS="default" 647 export MULTILIB_ABIS="default"
654 export DEFAULT_ABI="default" 648 export DEFAULT_ABI="default"
655 ;; 649 ;;
656 esac 650 esac
657} 651}
652
653# Hide multilib details here for packages which are forced to be compiled for a
654# specific ABI when run on another ABI (like x86-specific packages on amd64)
655multilib_toolchain_setup() {
656 export ABI=$1
657
658 if has_version app-admin/eselect-compiler ; then
659 # Binutils doesn't have wrappers for ld and as (yet). Eventually it
660 # will, and all this can just be handled with CHOST.
661 export LD="ld $(get_abi_LDFLAGS $1)"
662 export AS="as $(get_abi_ASFLAGS $1)"
663
664 export CHOST=$(get_abi_CHOST $1)
665 export CBUILD=$(get_abi_CHOST $1)
666 else
667 tc-export CC
668 fi
669}

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

  ViewVC Help
Powered by ViewVC 1.1.20