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

Diff of /eclass/multilib.eclass

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

Revision 1.36 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.36 2005/10/07 01:22:36 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.
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 case ${CTARGET} in
597 mips64*) export DEFAULT_ABI="n32" ;;
598 *) export DEFAULT_ABI="o32" ;; 596 export DEFAULT_ABI="n32"
599 esac
600 ;; 597 ;;
601 ppc64) 598 powerpc64*)
602 export CFLAGS_ppc=${CFLAGS_ppc--m32} 599 export CFLAGS_ppc=${CFLAGS_ppc--m32}
603 export CHOST_ppc=powerpc-${CTARGET_post} 600 export CHOST_ppc=powerpc-${CTARGET_post}
604 export CTARGET_ppc=powerpc-${CTARGET_post} 601 export CTARGET_ppc=powerpc-${CTARGET_post}
605 export CDEFINE_ppc="!__powerpc64__" 602 export CDEFINE_ppc="!__powerpc64__"
606 export LIBDIR_ppc="lib" 603 export LIBDIR_ppc="lib"
612 export LIBDIR_ppc64="lib64" 609 export LIBDIR_ppc64="lib64"
613 610
614 export MULTILIB_ABIS="ppc64 ppc" 611 export MULTILIB_ABIS="ppc64 ppc"
615 export DEFAULT_ABI="ppc64" 612 export DEFAULT_ABI="ppc64"
616 ;; 613 ;;
617 sparc) 614 sparc64*)
618 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 615 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
619 export CHOST_sparc32=sparc-${CTARGET_post} 616 export CHOST_sparc32=sparc-${CTARGET_post}
620 export CTARGET_sparc32=sparc-${CTARGET_post} 617 export CTARGET_sparc32=sparc-${CTARGET_post}
621 export CDEFINE_sparc32="!__arch64__" 618 export CDEFINE_sparc32="!__arch64__"
622 export LIBDIR_sparc32="lib" 619 export LIBDIR_sparc32="lib"
626 export CTARGET_sparc64=sparc64-${CTARGET_post} 623 export CTARGET_sparc64=sparc64-${CTARGET_post}
627 export CDEFINE_sparc64="__arch64__" 624 export CDEFINE_sparc64="__arch64__"
628 export LIBDIR_sparc64="lib64" 625 export LIBDIR_sparc64="lib64"
629 626
630 export MULTILIB_ABIS="sparc64 sparc32" 627 export MULTILIB_ABIS="sparc64 sparc32"
631 case ${CTARGET} in
632 sparc64*) export DEFAULT_ABI="sparc64" ;; 628 export DEFAULT_ABI="sparc64"
633 *) export DEFAULT_ABI="sparc32" ;;
634 esac
635 ;; 629 ;;
636 *) 630 *)
637 export MULTILIB_ABIS="default" 631 export MULTILIB_ABIS="default"
638 export DEFAULT_ABI="default" 632 export DEFAULT_ABI="default"
639 ;; 633 ;;

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

  ViewVC Help
Powered by ViewVC 1.1.20