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

Diff of /eclass/multilib.eclass

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

Revision 1.34 Revision 1.37
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.34 2005/10/06 10:03:53 eradicator Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.37 2005/10/07 01:49:11 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
100# This causes econf to set --libdir=/usr/lib where it didn't before 99# This causes econf to set --libdir=/usr/lib where it didn't before
101#export ABI=${ABI:-"default"} 100#export ABI=${ABI:-"default"}
102export CFLAGS_default 101export CFLAGS_default
103export LDFLAGS_default 102export LDFLAGS_default
104export CHOST_default=${CHOST_default:-${CHOST}} 103export CHOST_default=${CHOST_default:-${CHOST}}
104export CTARGET_default=${CTARGET_default:-${CTARGET}}
105export LIBDIR_default=${CONF_LIBDIR:-"lib"} 105export LIBDIR_default=${CONF_LIBDIR:-"lib"}
106export CDEFINE_default="__unix__" 106export CDEFINE_default="__unix__"
107 107
108# has_multilib_profile() 108# has_multilib_profile()
109has_multilib_profile() { 109has_multilib_profile() {
554# a crosscompiler (and thus they aren't set in the profile) 554# a crosscompiler (and thus they aren't set in the profile)
555multilib_env() { 555multilib_env() {
556 local CTARGET=$1 556 local CTARGET=$1
557 local CTARGET_post=${CTARGET#*-} 557 local CTARGET_post=${CTARGET#*-}
558 558
559 case $(tc-arch ${CTARGET}) in 559 case ${CTARGET} in
560 amd64) 560 x86_64*)
561 export CFLAGS_x86=${CFLAGS_x86--m32} 561 export CFLAGS_x86=${CFLAGS_x86--m32}
562 export CHOST_x86=i686-${CTARGET_post} 562 export CHOST_x86=i686-${CTARGET_post}
563 export CTARGET_x86=i686-${CTARGET_post} 563 export CTARGET_x86=i686-${CTARGET_post}
564 export CDEFINE_x86="__i386__" 564 export CDEFINE_x86="__i386__"
565 export LIBDIR_x86="lib" 565 export LIBDIR_x86="lib"
571 export LIBDIR_amd64="lib64" 571 export LIBDIR_amd64="lib64"
572 572
573 export MULTILIB_ABIS="amd64 x86" 573 export MULTILIB_ABIS="amd64 x86"
574 export DEFAULT_ABI="amd64" 574 export DEFAULT_ABI="amd64"
575 ;; 575 ;;
576 mips) 576 mips64*)
577 export CFLAGS_o32=${CFLAGS_o32--mabi=32} 577 export CFLAGS_o32=${CFLAGS_o32--mabi=32}
578 export CHOST_o32=mips-${CTARGET_post} 578 export CHOST_o32=mips-${CTARGET_post}
579 export CTARGET_o32=mips-${CTARGET_post} 579 export CTARGET_o32=mips-${CTARGET_post}
580 export CDEFINE_o32="_MIPS_SIM == _ABIO32" 580 export CDEFINE_o32="_MIPS_SIM == _ABIO32"
581 export LIBDIR_o32="lib" 581 export LIBDIR_o32="lib"
591 export CTARGET_n64=mips64-${CTARGET_post} 591 export CTARGET_n64=mips64-${CTARGET_post}
592 export CDEFINE_n64="_MIPS_SIM == _ABI64" 592 export CDEFINE_n64="_MIPS_SIM == _ABI64"
593 export LIBDIR_n64="lib64" 593 export LIBDIR_n64="lib64"
594 594
595 export MULTILIB_ABIS="n64 n32 o32" 595 export MULTILIB_ABIS="n64 n32 o32"
596 export DEFAULT_ABI="n32" 596 export DEFAULT_ABI="n32"
597 ;; 597 ;;
598 ppc64) 598 powerpc64*)
599 export CFLAGS_ppc=${CFLAGS_ppc--m32} 599 export CFLAGS_ppc=${CFLAGS_ppc--m32}
600 export CHOST_ppc=powerpc-${CTARGET_post} 600 export CHOST_ppc=powerpc-${CTARGET_post}
601 export CTARGET_ppc=powerpc-${CTARGET_post} 601 export CTARGET_ppc=powerpc-${CTARGET_post}
602 export CDEFINE_ppc="!__powerpc64__" 602 export CDEFINE_ppc="!__powerpc64__"
603 export LIBDIR_ppc="lib" 603 export LIBDIR_ppc="lib"
609 export LIBDIR_ppc64="lib64" 609 export LIBDIR_ppc64="lib64"
610 610
611 export MULTILIB_ABIS="ppc64 ppc" 611 export MULTILIB_ABIS="ppc64 ppc"
612 export DEFAULT_ABI="ppc64" 612 export DEFAULT_ABI="ppc64"
613 ;; 613 ;;
614 sparc) 614 sparc64*)
615 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 615 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
616 export CHOST_sparc32=sparc-${CTARGET_post} 616 export CHOST_sparc32=sparc-${CTARGET_post}
617 export CTARGET_sparc32=sparc-${CTARGET_post} 617 export CTARGET_sparc32=sparc-${CTARGET_post}
618 export CDEFINE_sparc32="!__arch64__" 618 export CDEFINE_sparc32="!__arch64__"
619 export LIBDIR_sparc32="lib" 619 export LIBDIR_sparc32="lib"
628 export DEFAULT_ABI="sparc64" 628 export DEFAULT_ABI="sparc64"
629 ;; 629 ;;
630 *) 630 *)
631 export MULTILIB_ABIS="default" 631 export MULTILIB_ABIS="default"
632 export DEFAULT_ABI="default" 632 export DEFAULT_ABI="default"
633 ;;
633 esac 634 esac
634} 635}

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.37

  ViewVC Help
Powered by ViewVC 1.1.20