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

Diff of /eclass/multilib.eclass

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

Revision 1.33 Revision 1.34
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.33 2005/09/21 02:50:37 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.34 2005/10/06 10:03:53 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.
547 else 547 else
548 echo ".so.${ver}" 548 echo ".so.${ver}"
549 fi 549 fi
550 fi 550 fi
551} 551}
552
553# This is for the toolchain to setup profile variables when pulling in
554# a crosscompiler (and thus they aren't set in the profile)
555multilib_env() {
556 local CTARGET=$1
557 local CTARGET_post=${CTARGET#*-}
558
559 case $(tc-arch ${CTARGET}) in
560 amd64)
561 export CFLAGS_x86=${CFLAGS_x86--m32}
562 export CHOST_x86=i686-${CTARGET_post}
563 export CTARGET_x86=i686-${CTARGET_post}
564 export CDEFINE_x86="__i386__"
565 export LIBDIR_x86="lib"
566
567 export CFLAGS_amd64=${CFLAGS_amd64--m64}
568 export CHOST_amd64=x86_64-${CTARGET_post}
569 export CTARGET_amd64=x86_64-${CTARGET_post}
570 export CDEFINE_amd64="__x86_64__"
571 export LIBDIR_amd64="lib64"
572
573 export MULTILIB_ABIS="amd64 x86"
574 export DEFAULT_ABI="amd64"
575 ;;
576 mips)
577 export CFLAGS_o32=${CFLAGS_o32--mabi=32}
578 export CHOST_o32=mips-${CTARGET_post}
579 export CTARGET_o32=mips-${CTARGET_post}
580 export CDEFINE_o32="_MIPS_SIM == _ABIO32"
581 export LIBDIR_o32="lib"
582
583 export CFLAGS_n32=${CFLAGS_n32--mabi=n32}
584 export CHOST_n32=mips64-${CTARGET_post}
585 export CTARGET_n32=mips64-${CTARGET_post}
586 export CDEFINE_n32="_MIPS_SIM == _ABIN32"
587 export LIBDIR_n32="lib32"
588
589 export CFLAGS_n64=${CFLAGS_n64--mabi=64}
590 export CHOST_n64=mips64-${CTARGET_post}
591 export CTARGET_n64=mips64-${CTARGET_post}
592 export CDEFINE_n64="_MIPS_SIM == _ABI64"
593 export LIBDIR_n64="lib64"
594
595 export MULTILIB_ABIS="n64 n32 o32"
596 export DEFAULT_ABI="n32"
597 ;;
598 ppc64)
599 export CFLAGS_ppc=${CFLAGS_ppc--m32}
600 export CHOST_ppc=powerpc-${CTARGET_post}
601 export CTARGET_ppc=powerpc-${CTARGET_post}
602 export CDEFINE_ppc="!__powerpc64__"
603 export LIBDIR_ppc="lib"
604
605 export CFLAGS_ppc64=${CFLAGS_ppc64--m64}
606 export CHOST_ppc64=powerpc64-${CTARGET_post}
607 export CTARGET_ppc64=powerpc64-${CTARGET_post}
608 export CDEFINE_ppc64="__powerpc64__"
609 export LIBDIR_ppc64="lib64"
610
611 export MULTILIB_ABIS="ppc64 ppc"
612 export DEFAULT_ABI="ppc64"
613 ;;
614 sparc)
615 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
616 export CHOST_sparc32=sparc-${CTARGET_post}
617 export CTARGET_sparc32=sparc-${CTARGET_post}
618 export CDEFINE_sparc32="!__arch64__"
619 export LIBDIR_sparc32="lib"
620
621 export CFLAGS_sparc64=${CFLAGS_sparc64--m64}
622 export CHOST_sparc64=sparc64-${CTARGET_post}
623 export CTARGET_sparc64=sparc64-${CTARGET_post}
624 export CDEFINE_sparc64="__arch64__"
625 export LIBDIR_sparc64="lib64"
626
627 export MULTILIB_ABIS="sparc64 sparc32"
628 export DEFAULT_ABI="sparc64"
629 ;;
630 *)
631 export MULTILIB_ABIS="default"
632 export DEFAULT_ABI="default"
633 esac
634}

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

  ViewVC Help
Powered by ViewVC 1.1.20