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

Diff of /eclass/multilib.eclass

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

Revision 1.35 Revision 1.38
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.35 2005/10/06 20:33:21 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.38 2005/10/07 02:24:47 eradicator 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.
9
10 9
11DESCRIPTION="Based on the ${ECLASS} eclass" 10DESCRIPTION="Based on the ${ECLASS} eclass"
12 11
13# has_multilib_profile: 12# has_multilib_profile:
14# Return true if the current profile is a multilib profile and lists more than 13# Return true if the current profile is a multilib profile and lists more than
95### END DOCUMENTATION ### 94### END DOCUMENTATION ###
96 95
97# Defaults: 96# Defaults:
98export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"} 97export MULTILIB_ABIS=${MULTILIB_ABIS:-"default"}
99export DEFAULT_ABI=${DEFAULT_ABI:-"default"} 98export DEFAULT_ABI=${DEFAULT_ABI:-"default"}
100# This causes econf to set --libdir=/usr/lib where it didn't before
101#export ABI=${ABI:-"default"}
102export CFLAGS_default 99export CFLAGS_default
103export LDFLAGS_default 100export LDFLAGS_default
104export CHOST_default=${CHOST_default:-${CHOST}} 101export CHOST_default=${CHOST_default:-${CHOST}}
105export CTARGET_default=${CTARGET_default:-${CTARGET}} 102export CTARGET_default=${CTARGET_default:-${CTARGET}}
106export LIBDIR_default=${CONF_LIBDIR:-"lib"} 103export LIBDIR_default=${CONF_LIBDIR:-"lib"}
195} 192}
196 193
197get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; } 194get_abi_CFLAGS() { get_abi_var CFLAGS "$@"; }
198get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; } 195get_abi_LDFLAGS() { get_abi_var LDFLAGS "$@"; }
199get_abi_CHOST() { get_abi_var CHOST "$@"; } 196get_abi_CHOST() { get_abi_var CHOST "$@"; }
197get_abi_CTARGET() { get_abi_var CTARGET "$@"; }
200get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; } 198get_abi_FAKE_TARGETS() { get_abi_var FAKE_TARGETS "$@"; }
201get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; } 199get_abi_CDEFINE() { get_abi_var CDEFINE "$@"; }
202get_abi_LIBDIR() { get_abi_var LIBDIR "$@"; } 200get_abi_LIBDIR() { get_abi_var LIBDIR "$@"; }
203 201
204# Return a list of the ABIs we want to install for with 202# Return a list of the ABIs we want to install for with
555# a crosscompiler (and thus they aren't set in the profile) 553# a crosscompiler (and thus they aren't set in the profile)
556multilib_env() { 554multilib_env() {
557 local CTARGET=$1 555 local CTARGET=$1
558 local CTARGET_post=${CTARGET#*-} 556 local CTARGET_post=${CTARGET#*-}
559 557
560 case $(tc-arch ${CTARGET}) in 558 case ${CTARGET} in
561 amd64) 559 x86_64*)
562 export CFLAGS_x86=${CFLAGS_x86--m32} 560 export CFLAGS_x86=${CFLAGS_x86--m32}
563 export CHOST_x86=i686-${CTARGET_post} 561 export CHOST_x86=i686-${CTARGET_post}
564 export CTARGET_x86=i686-${CTARGET_post} 562 export CTARGET_x86=i686-${CTARGET_post}
565 export CDEFINE_x86="__i386__" 563 export CDEFINE_x86="__i386__"
566 export LIBDIR_x86="lib" 564 export LIBDIR_x86="lib"
572 export LIBDIR_amd64="lib64" 570 export LIBDIR_amd64="lib64"
573 571
574 export MULTILIB_ABIS="amd64 x86" 572 export MULTILIB_ABIS="amd64 x86"
575 export DEFAULT_ABI="amd64" 573 export DEFAULT_ABI="amd64"
576 ;; 574 ;;
577 mips) 575 mips64*)
578 export CFLAGS_o32=${CFLAGS_o32--mabi=32} 576 export CFLAGS_o32=${CFLAGS_o32--mabi=32}
579 export CHOST_o32=mips-${CTARGET_post} 577 export CHOST_o32=mips-${CTARGET_post}
580 export CTARGET_o32=mips-${CTARGET_post} 578 export CTARGET_o32=mips-${CTARGET_post}
581 export CDEFINE_o32="_MIPS_SIM == _ABIO32" 579 export CDEFINE_o32="_MIPS_SIM == _ABIO32"
582 export LIBDIR_o32="lib" 580 export LIBDIR_o32="lib"
592 export CTARGET_n64=mips64-${CTARGET_post} 590 export CTARGET_n64=mips64-${CTARGET_post}
593 export CDEFINE_n64="_MIPS_SIM == _ABI64" 591 export CDEFINE_n64="_MIPS_SIM == _ABI64"
594 export LIBDIR_n64="lib64" 592 export LIBDIR_n64="lib64"
595 593
596 export MULTILIB_ABIS="n64 n32 o32" 594 export MULTILIB_ABIS="n64 n32 o32"
597 export DEFAULT_ABI="n32" 595 export DEFAULT_ABI="n32"
598 ;; 596 ;;
599 ppc64) 597 powerpc64*)
600 export CFLAGS_ppc=${CFLAGS_ppc--m32} 598 export CFLAGS_ppc=${CFLAGS_ppc--m32}
601 export CHOST_ppc=powerpc-${CTARGET_post} 599 export CHOST_ppc=powerpc-${CTARGET_post}
602 export CTARGET_ppc=powerpc-${CTARGET_post} 600 export CTARGET_ppc=powerpc-${CTARGET_post}
603 export CDEFINE_ppc="!__powerpc64__" 601 export CDEFINE_ppc="!__powerpc64__"
604 export LIBDIR_ppc="lib" 602 export LIBDIR_ppc="lib"
610 export LIBDIR_ppc64="lib64" 608 export LIBDIR_ppc64="lib64"
611 609
612 export MULTILIB_ABIS="ppc64 ppc" 610 export MULTILIB_ABIS="ppc64 ppc"
613 export DEFAULT_ABI="ppc64" 611 export DEFAULT_ABI="ppc64"
614 ;; 612 ;;
615 sparc) 613 sparc64*)
616 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 614 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
617 export CHOST_sparc32=sparc-${CTARGET_post} 615 export CHOST_sparc32=sparc-${CTARGET_post}
618 export CTARGET_sparc32=sparc-${CTARGET_post} 616 export CTARGET_sparc32=sparc-${CTARGET_post}
619 export CDEFINE_sparc32="!__arch64__" 617 export CDEFINE_sparc32="!__arch64__"
620 export LIBDIR_sparc32="lib" 618 export LIBDIR_sparc32="lib"
629 export DEFAULT_ABI="sparc64" 627 export DEFAULT_ABI="sparc64"
630 ;; 628 ;;
631 *) 629 *)
632 export MULTILIB_ABIS="default" 630 export MULTILIB_ABIS="default"
633 export DEFAULT_ABI="default" 631 export DEFAULT_ABI="default"
632 ;;
634 esac 633 esac
635} 634}

Legend:
Removed from v.1.35  
changed lines
  Added in v.1.38

  ViewVC Help
Powered by ViewVC 1.1.20