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

Diff of /eclass/multilib.eclass

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

Revision 1.42 Revision 1.44
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.42 2005/10/10 21:18:15 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/multilib.eclass,v 1.44 2005/10/13 03:43:55 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
536 local ver=$1 537 local ver=$1
537 if use userland_Darwin ; then 538 case ${CHOST} in
539 *-darwin*) libname="dylib";;
540 *) libname="so";;
541 esac
542
538 if [ -z ${ver} ] ; then 543 if [[ -z $@ ]] ; then
539 echo ".dylib" 544 echo ".${libname}"
540 else
541 echo ".${ver}.dylib"
542 fi
543 else 545 else
544 if [ -z ${ver} ] ; then 546 for ver in "$@" ; do
545 echo ".so" 547 case ${CHOST} in
546 else 548 *-darwin*) echo ".${ver}.${libname}";;
547 echo ".so.${ver}" 549 *) echo ".${libname}.${ver}";;
548 fi 550 esac
551 done
549 fi 552 fi
550} 553}
551 554
552# This is for the toolchain to setup profile variables when pulling in 555# This is for the toolchain to setup profile variables when pulling in
553# a crosscompiler (and thus they aren't set in the profile) 556# a crosscompiler (and thus they aren't set in the profile)
607 export LIBDIR_ppc64="lib64" 610 export LIBDIR_ppc64="lib64"
608 611
609 export MULTILIB_ABIS="ppc64 ppc" 612 export MULTILIB_ABIS="ppc64 ppc"
610 export DEFAULT_ABI="ppc64" 613 export DEFAULT_ABI="ppc64"
611 ;; 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 ;;
612 sparc64*) 631 sparc64*)
613 export CFLAGS_sparc32=${CFLAGS_sparc32--m32} 632 export CFLAGS_sparc32=${CFLAGS_sparc32--m32}
614 export CHOST_sparc32=${CTARGET/sparc64/sparc} 633 export CHOST_sparc32=${CTARGET/sparc64/sparc}
615 export CTARGET_sparc32=${CHOST_sparc32} 634 export CTARGET_sparc32=${CHOST_sparc32}
616 export CDEFINE_sparc32="!__arch64__" 635 export CDEFINE_sparc32="!__arch64__"

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

  ViewVC Help
Powered by ViewVC 1.1.20