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

Diff of /eclass/multilib.eclass

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

Revision 1.1.1.1 Revision 1.42
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.1.1.1 2005/11/30 09:59:17 chriswhite Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.42 2005/10/10 21:18:15 vapier 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.
531 # exit because we'll likely be called from a subshell 531 # exit because we'll likely be called from a subshell
532 exit 1 532 exit 1
533} 533}
534 534
535get_libname() { 535get_libname() {
536 local libname
537 local ver=$1 536 local ver=$1
538 case ${CHOST} in 537 if use userland_Darwin ; then
539 *-darwin*) libname="dylib";;
540 *) libname="so";;
541 esac
542
543 if [[ -z $@ ]] ; then 538 if [ -z ${ver} ] ; then
544 echo ".${libname}" 539 echo ".dylib"
540 else
541 echo ".${ver}.dylib"
542 fi
545 else 543 else
546 for ver in "$@" ; do 544 if [ -z ${ver} ] ; then
547 case ${CHOST} in 545 echo ".so"
548 *-darwin*) echo ".${ver}.${libname}";; 546 else
549 *) echo ".${libname}.${ver}";; 547 echo ".so.${ver}"
550 esac 548 fi
551 done
552 fi 549 fi
553} 550}
554 551
555# This is for the toolchain to setup profile variables when pulling in 552# This is for the toolchain to setup profile variables when pulling in
556# a crosscompiler (and thus they aren't set in the profile) 553# a crosscompiler (and thus they aren't set in the profile)
591 export CHOST_n64=${CTARGET} 588 export CHOST_n64=${CTARGET}
592 export CTARGET_n64=${CHOST_n64} 589 export CTARGET_n64=${CHOST_n64}
593 export CDEFINE_n64="_MIPS_SIM == _ABI64" 590 export CDEFINE_n64="_MIPS_SIM == _ABI64"
594 export LIBDIR_n64="lib64" 591 export LIBDIR_n64="lib64"
595 592
596 export MULTILIB_ABIS="n64 n32 o32" 593 export MULTILIB_ABIS="n64 n32" # o32
597 export DEFAULT_ABI="n32" 594 export DEFAULT_ABI="n32"
598 ;; 595 ;;
599 powerpc64*) 596 powerpc64*)
600 export CFLAGS_ppc=${CFLAGS_ppc--m32} 597 export CFLAGS_ppc=${CFLAGS_ppc--m32}
601 export CHOST_ppc=${CTARGET/powerpc64/powerpc} 598 export CHOST_ppc=${CTARGET/powerpc64/powerpc}
602 export CTARGET_ppc=${CHOST_ppc} 599 export CTARGET_ppc=${CHOST_ppc}
609 export CDEFINE_ppc64="__powerpc64__" 606 export CDEFINE_ppc64="__powerpc64__"
610 export LIBDIR_ppc64="lib64" 607 export LIBDIR_ppc64="lib64"
611 608
612 export MULTILIB_ABIS="ppc64 ppc" 609 export MULTILIB_ABIS="ppc64 ppc"
613 export DEFAULT_ABI="ppc64" 610 export DEFAULT_ABI="ppc64"
614 ;;
615 s390x*)
616 export CFLAGS_s390=${CFLAGS_s390--m31} # the 31 is not a typo
617 export CHOST_s390=${CTARGET/s390x/s390}
618 export CTARGET_s390=${CHOST_s390}
619 export CDEFINE_s390="!__s390x__"
620 export LIBDIR_s390="lib"
621
622 export CFLAGS_s390x=${CFLAGS_s390x--m64}
623 export CHOST_s390x=${CTARGET}
624 export CTARGET_s390x=${CHOST_s390x}
625 export CDEFINE_s390x="__s390x__"
626 export LIBDIR_s390x="lib64"
627
628 export MULTILIB_ABIS="s390x s390"
629 export DEFAULT_ABI="s390x"
630 ;; 611 ;;
631 sparc64*) 612 sparc64*)
632 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 613 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
633 export CHOST_sparc32=${CTARGET/sparc64/sparc} 614 export CHOST_sparc32=${CTARGET/sparc64/sparc}
634 export CTARGET_sparc32=${CHOST_sparc32} 615 export CTARGET_sparc32=${CHOST_sparc32}

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.42

  ViewVC Help
Powered by ViewVC 1.1.20