/[gentoo-x86]/sys-libs/glibc/glibc-2.3.5.ebuild
Gentoo

Diff of /sys-libs/glibc/glibc-2.3.5.ebuild

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

Revision 1.3 Revision 1.4
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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/sys-libs/glibc/Attic/glibc-2.3.5.ebuild,v 1.3 2005/04/13 20:51:22 lu_zero Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/Attic/glibc-2.3.5.ebuild,v 1.4 2005/04/14 07:17:58 eradicator Exp $
4 4
5# Here's how the cross-compile logic breaks down ... 5# Here's how the cross-compile logic breaks down ...
6# CTARGET - machine that will target the binaries 6# CTARGET - machine that will target the binaries
7# CHOST - machine that will host the binaries 7# CHOST - machine that will host the binaries
8# CBUILD - machine that will build the binaries 8# CBUILD - machine that will build the binaries
699 local min_kernel_version="$(KV_to_int "${NPTL_KERNEL_VERSION}")" 699 local min_kernel_version="$(KV_to_int "${NPTL_KERNEL_VERSION}")"
700 700
701 echo 701 echo
702 702
703 einfon "Checking gcc for __thread support ... " 703 einfon "Checking gcc for __thread support ... "
704 if ! $(tc-getCC ${CTARGET}) -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null; then 704 if want__thread ; then
705 echo "yes"
706 else
705 echo "no" 707 echo "no"
706 echo 708 echo
707 eerror "Could not find a gcc that supports the __thread directive!" 709 eerror "Could not find a gcc that supports the __thread directive!"
708 eerror "please update to gcc-3.2.2-r1 or later, and try again." 710 eerror "please update to gcc-3.2.2-r1 or later, and try again."
709 die "No __thread support in gcc!" 711 die "No __thread support in gcc!"
710 else
711 echo "yes"
712 fi 712 fi
713 713
714 # Building fails on an non-supporting kernel 714 # Building fails on an non-supporting kernel
715 einfon "Checking kernel version (>=${NPTL_KERNEL_VERSION}) ... " 715 einfon "Checking kernel version (>=${NPTL_KERNEL_VERSION}) ... "
716 if [ "`get_KV`" -lt "${min_kernel_version}" ] ; then 716 if [ "`get_KV`" -lt "${min_kernel_version}" ] ; then
747 amd64|ia64|ppc|ppc64|s390|x86) 747 amd64|ia64|ppc|ppc64|s390|x86)
748 return 0; 748 return 0;
749 ;; 749 ;;
750 sparc) 750 sparc)
751 # >= v9 is needed for nptl. 751 # >= v9 is needed for nptl.
752 [[ "${PROFILE_ARCH}" == "sparc32" ]] && return 1 752 [[ "${PROFILE_ARCH}" == "sparc" ]] && return 1
753 return 0; 753 return 0;
754 ;; 754 ;;
755 esac 755 esac
756 756
757 return 1 757 return 1
768 case $(tc-arch) in 768 case $(tc-arch) in
769 alpha|amd64|ia64|ppc|ppc64|s390) 769 alpha|amd64|ia64|ppc|ppc64|s390)
770 return 0; 770 return 0;
771 ;; 771 ;;
772 sparc) 772 sparc)
773 # 2.3.6 should have tls support on sparc64
774 # when using newer binutils
773 case ${CTARGET/-*} in 775 case ${CTARGET/-*} in
774 sparc64*) 776 sparc64*) return 1 ;;
775 [[ ${ABI} == "sparc32" ]] && return 0
776 return 1
777 ;;
778 *)
779 [[ ${PROFILE_ARCH} == "sparc" ]] && return 1
780 return 0 777 *) return 0 ;;
781 ;;
782 esac 778 esac
783 ;; 779 ;;
784 x86) 780 x86)
785 case ${CTARGET/-*} in 781 case ${CTARGET/-*} in
786 i486|i586|i686) return 0 ;; 782 i486|i586|i686) return 0 ;;
787 esac 783 esac
788 ;; 784 ;;
789 esac 785 esac
790 786
791 return 1 787 return 1
788}
789
790want__thread() {
791 want_tls || return 1
792
793 [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD}
794
795 $(tc-getCC ${CTARGET}) -c ${FILESDIR}/test-__thread.c -o ${T}/test2.o &> /dev/null
796 WANT__THREAD=$?
797
798 return ${WANT__THREAD}
792} 799}
793 800
794install_locales() { 801install_locales() {
795 unset LANGUAGE LANG LC_ALL 802 unset LANGUAGE LANG LC_ALL
796 cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}" 803 cd ${WORKDIR}/${MYMAINBUILDDIR} || die "${WORKDIR}/${MYMAINBUILDDIR}"
840 847
841 use nls || myconf="${myconf} --disable-nls" 848 use nls || myconf="${myconf} --disable-nls"
842 use erandom || myconf="${myconf} --disable-dev-erandom" 849 use erandom || myconf="${myconf} --disable-dev-erandom"
843 850
844 if [ "$1" == "linuxthreads" ] ; then 851 if [ "$1" == "linuxthreads" ] ; then
852 if want_tls ; then
853 myconf="${myconf} --with-tls"
854 else
855 myconf="${myconf} --without-tls"
856 fi
857
858 if want__thread ; then
859 myconf="${myconf} --with-__thread"
860 else
845 want_tls && myconf="${myconf} --with-tls --without-__thread" 861 myconf="${myconf} --without-__thread"
846 want_tls || myconf="${myconf} --without-tls --without-__thread" 862 fi
863
847 myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}" 864 myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}"
848 myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}" 865 myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}"
849 elif [ "$1" == "nptl" ] ; then 866 elif [ "$1" == "nptl" ] ; then
850 want_nptl && myconf="${myconf} --with-tls --with-__thread" 867 myconf="${myconf} --with-tls --with-__thread"
851 myconf="${myconf} --enable-add-ons=nptl${ADDONS}" 868 myconf="${myconf} --enable-add-ons=nptl${ADDONS}"
852 myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}" 869 myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}"
853 else 870 else
854 die "invalid pthread option" 871 die "invalid pthread option"
855 fi 872 fi

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.20