/[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.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.35 2005/10/06 20:33:21 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
555# a crosscompiler (and thus they aren't set in the profile) 554# a crosscompiler (and thus they aren't set in the profile)
556multilib_env() { 555multilib_env() {
557 local CTARGET=$1 556 local CTARGET=$1
558 local CTARGET_post=${CTARGET#*-} 557 local CTARGET_post=${CTARGET#*-}
559 558
560 case $(tc-arch ${CTARGET}) in 559 case ${CTARGET} in
561 amd64) 560 x86_64*)
562 export CFLAGS_x86=${CFLAGS_x86--m32} 561 export CFLAGS_x86=${CFLAGS_x86--m32}
563 export CHOST_x86=i686-${CTARGET_post} 562 export CHOST_x86=i686-${CTARGET_post}
564 export CTARGET_x86=i686-${CTARGET_post} 563 export CTARGET_x86=i686-${CTARGET_post}
565 export CDEFINE_x86="__i386__" 564 export CDEFINE_x86="__i386__"
566 export LIBDIR_x86="lib" 565 export LIBDIR_x86="lib"
572 export LIBDIR_amd64="lib64" 571 export LIBDIR_amd64="lib64"
573 572
574 export MULTILIB_ABIS="amd64 x86" 573 export MULTILIB_ABIS="amd64 x86"
575 export DEFAULT_ABI="amd64" 574 export DEFAULT_ABI="amd64"
576 ;; 575 ;;
577 mips) 576 mips64*)
578 export CFLAGS_o32=${CFLAGS_o32--mabi=32} 577 export CFLAGS_o32=${CFLAGS_o32--mabi=32}
579 export CHOST_o32=mips-${CTARGET_post} 578 export CHOST_o32=mips-${CTARGET_post}
580 export CTARGET_o32=mips-${CTARGET_post} 579 export CTARGET_o32=mips-${CTARGET_post}
581 export CDEFINE_o32="_MIPS_SIM == _ABIO32" 580 export CDEFINE_o32="_MIPS_SIM == _ABIO32"
582 export LIBDIR_o32="lib" 581 export LIBDIR_o32="lib"
592 export CTARGET_n64=mips64-${CTARGET_post} 591 export CTARGET_n64=mips64-${CTARGET_post}
593 export CDEFINE_n64="_MIPS_SIM == _ABI64" 592 export CDEFINE_n64="_MIPS_SIM == _ABI64"
594 export LIBDIR_n64="lib64" 593 export LIBDIR_n64="lib64"
595 594
596 export MULTILIB_ABIS="n64 n32 o32" 595 export MULTILIB_ABIS="n64 n32 o32"
597 export DEFAULT_ABI="n32" 596 export DEFAULT_ABI="n32"
598 ;; 597 ;;
599 ppc64) 598 powerpc64*)
600 export CFLAGS_ppc=${CFLAGS_ppc--m32} 599 export CFLAGS_ppc=${CFLAGS_ppc--m32}
601 export CHOST_ppc=powerpc-${CTARGET_post} 600 export CHOST_ppc=powerpc-${CTARGET_post}
602 export CTARGET_ppc=powerpc-${CTARGET_post} 601 export CTARGET_ppc=powerpc-${CTARGET_post}
603 export CDEFINE_ppc="!__powerpc64__" 602 export CDEFINE_ppc="!__powerpc64__"
604 export LIBDIR_ppc="lib" 603 export LIBDIR_ppc="lib"
610 export LIBDIR_ppc64="lib64" 609 export LIBDIR_ppc64="lib64"
611 610
612 export MULTILIB_ABIS="ppc64 ppc" 611 export MULTILIB_ABIS="ppc64 ppc"
613 export DEFAULT_ABI="ppc64" 612 export DEFAULT_ABI="ppc64"
614 ;; 613 ;;
615 sparc) 614 sparc64*)
616 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 615 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
617 export CHOST_sparc32=sparc-${CTARGET_post} 616 export CHOST_sparc32=sparc-${CTARGET_post}
618 export CTARGET_sparc32=sparc-${CTARGET_post} 617 export CTARGET_sparc32=sparc-${CTARGET_post}
619 export CDEFINE_sparc32="!__arch64__" 618 export CDEFINE_sparc32="!__arch64__"
620 export LIBDIR_sparc32="lib" 619 export LIBDIR_sparc32="lib"
629 export DEFAULT_ABI="sparc64" 628 export DEFAULT_ABI="sparc64"
630 ;; 629 ;;
631 *) 630 *)
632 export MULTILIB_ABIS="default" 631 export MULTILIB_ABIS="default"
633 export DEFAULT_ABI="default" 632 export DEFAULT_ABI="default"
633 ;;
634 esac 634 esac
635} 635}

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

  ViewVC Help
Powered by ViewVC 1.1.20