diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-10-07 05:55:19 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-10-07 05:55:19 +0000 |
commit | 6529c271fa17c49252e932910e78d99b65712c28 (patch) | |
tree | 9f0da140fb6da03498fa52cc703787f76ab97fb7 /sys-libs/glibc | |
parent | m68k love (diff) | |
download | historical-6529c271fa17c49252e932910e78d99b65712c28.tar.gz historical-6529c271fa17c49252e932910e78d99b65712c28.tar.bz2 historical-6529c271fa17c49252e932910e78d99b65712c28.zip |
add back in linuxthreads
Package-Manager: portage-2.1.2_pre2-r5
Diffstat (limited to 'sys-libs/glibc')
-rw-r--r-- | sys-libs/glibc/Manifest | 21 | ||||
-rw-r--r-- | sys-libs/glibc/files/digest-glibc-2.5 | 3 | ||||
-rw-r--r-- | sys-libs/glibc/glibc-2.5.ebuild | 172 |
3 files changed, 166 insertions, 30 deletions
diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest index e392c24ebf73..09cfc7266994 100644 --- a/sys-libs/glibc/Manifest +++ b/sys-libs/glibc/Manifest @@ -474,6 +474,7 @@ DIST glibc-linuxthreads-2.3.2.tar.bz2 216310 RMD160 9be07e5896f5e4e728bdbbebb00d DIST glibc-linuxthreads-2.3.4.tar.bz2 236183 RMD160 fd13b9bf5c9991e6855c01fb34f4f3a87b49f57e SHA1 69391ed87d9afd1e124148a74e56267dec000532 SHA256 1c312c9c9f33d5cdf6622af390e5698e92f950e411b7795024aab089e0249a78 DIST glibc-linuxthreads-2.3.5.tar.bz2 236946 RMD160 b86afc7e2359165704d09c4c3b0d84826c636890 SHA1 bfc44a76a708f905fe9c414162d5efcd3d47355f SHA256 3fec798bb944c2f89f1d95ec7bb38f60e1393c9db0da6bdbb922606e023108b5 DIST glibc-linuxthreads-2.3.6.tar.bz2 243534 RMD160 bb89ac687419cede738314923bc952d191d8d252 SHA1 10190168bf948556afdfff46f87f9208402d810f SHA256 6c3bc4a247d1e5308fb14f81956802f09095d3683219859fcad5795aa3aea638 +DIST glibc-linuxthreads-2.5.tar.bz2 242445 RMD160 788484d035d53ac39aac18f6e3409a912eea1cfa SHA1 eb7765e5c0a14c7475f1c8b92cbe1f625a8fd76f SHA256 ee27aeba6124a8b351c720eb898917f0f8874d9a384cc2f17aa111a3d679bd2c DIST glibc-linuxthreads-20060605.tar.bz2 247200 RMD160 aaa0a150eec4d63787f86ae04ded4d92a10c6f29 SHA1 1e0cf861de45f22d01d7d305482bacb0a869262f SHA256 1d15e236926fff6daa81e6af34e7903206b67f849f828ca976ab077b4677fb52 DIST glibc-manpages-2.3.4-r1.tar.bz2 22276 RMD160 456e229ae92f2c5951be5ecebbc9685e8e1bffef SHA256 fda127a2d7784b945276c08e38d220c4d48c7cb057fd9a3380bde6d4d955554d DIST glibc-manpages-2.3.4.tar.bz2 14759 RMD160 56a648a9eb327568c0e6681aaa47a5c7bb93f84f SHA256 a512d0302005168bcb77860468884823b13f9f5ec2c9981b86b46e729e3e318d @@ -542,10 +543,10 @@ EBUILD glibc-2.4-r4.ebuild 38948 RMD160 1d268e7767afd0ea493e813699b6b82868c842c4 MD5 0dc3c3519d60f055aac9d3a4652cf71d glibc-2.4-r4.ebuild 38948 RMD160 1d268e7767afd0ea493e813699b6b82868c842c4 glibc-2.4-r4.ebuild 38948 SHA256 8d0fd8aa21580bb282034ccac1886059740ad49a1e40f12827e3c5b13c1b43cf glibc-2.4-r4.ebuild 38948 -EBUILD glibc-2.5.ebuild 33108 RMD160 28f258a2704481945c55c2fec944da1e2b9d70a4 SHA1 1f1507e920fe4c4aba7c3c5acd12484de258f303 SHA256 ee3240a9b6037021da5c69233aef08c3dd32128f96ced443a8596b0b6aec274a -MD5 4f6989b49ea0d3e68c97594ea7ea32bd glibc-2.5.ebuild 33108 -RMD160 28f258a2704481945c55c2fec944da1e2b9d70a4 glibc-2.5.ebuild 33108 -SHA256 ee3240a9b6037021da5c69233aef08c3dd32128f96ced443a8596b0b6aec274a glibc-2.5.ebuild 33108 +EBUILD glibc-2.5.ebuild 37563 RMD160 da9d9a4016fe7e522bfea372c242115199c72b3a SHA1 1a70241c532ce381835bf7441159e49e23b97b57 SHA256 5afb4dc615f08c746dd652ec6649964fd2d86b6a75fc8cb6355f41a95afe30df +MD5 79baba6d076f31a213018e8eaefcd34f glibc-2.5.ebuild 37563 +RMD160 da9d9a4016fe7e522bfea372c242115199c72b3a glibc-2.5.ebuild 37563 +SHA256 5afb4dc615f08c746dd652ec6649964fd2d86b6a75fc8cb6355f41a95afe30df glibc-2.5.ebuild 37563 MISC ChangeLog 96803 RMD160 7b0ca952ba58deb82ae2e913864afa11b988f38b SHA1 a8633e820738b29046bef0f4851ec187cfa7879b SHA256 6af3f08015e0b6dadf16ed43d85daf70bccf8bf542592030768a1faac2bed7cf MD5 daa398302c17bc66757a0389d4c3ae4c ChangeLog 96803 RMD160 7b0ca952ba58deb82ae2e913864afa11b988f38b ChangeLog 96803 @@ -599,13 +600,13 @@ SHA256 f22d43e9647ef7c83b51e5102caaca7e38b3d16783e6097b1a3cbe4b0957070e files/di MD5 3b44421b94377c2d6b90dc7f94b2d7c3 files/digest-glibc-2.4-r4 1575 RMD160 d08695833040cbf0ab8f4e758a58e6bbe732f448 files/digest-glibc-2.4-r4 1575 SHA256 4b956bd1ea1b389aabbedbfb44ad40e73996025b7e484a4af575bbcdedbacf0f files/digest-glibc-2.4-r4 1575 -MD5 1765466b365019c3f18ae00322bd7b87 files/digest-glibc-2.5 1009 -RMD160 c52f45cafd47492d970bcffb2f47e979802270e1 files/digest-glibc-2.5 1009 -SHA256 a80833d3e7bf6cdf23560d70864d3d8f29f3b39e943fecaaa7f08faabe867e0f files/digest-glibc-2.5 1009 +MD5 b90b0d937011836ea219d147d0904989 files/digest-glibc-2.5 1280 +RMD160 821b4705ae9a1faa2b28bd9e57f4595761b9f955 files/digest-glibc-2.5 1280 +SHA256 415dc49e4c0b254ed4731625acac2008699609a4da016560032f6326d4294320 files/digest-glibc-2.5 1280 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) -iD8DBQFFJzBRamhnQswr0vIRApUSAKCZc6Xga+JOYRtVuSeUguLNPFTJdgCaAhTF -O/Qwi7cMW1c+qMlnG510kSo= -=XODG +iD8DBQFFJ0FaamhnQswr0vIRAveWAJ9BQOO+xGlhUFOonCSwGY85Os0JnACgq/Wq ++OnCBsb9Ax7V83tb3RiZMVM= +=lCYM -----END PGP SIGNATURE----- diff --git a/sys-libs/glibc/files/digest-glibc-2.5 b/sys-libs/glibc/files/digest-glibc-2.5 index a744f4a0bc8c..8a9c93905c75 100644 --- a/sys-libs/glibc/files/digest-glibc-2.5 +++ b/sys-libs/glibc/files/digest-glibc-2.5 @@ -7,6 +7,9 @@ SHA256 9b2e12bb1eafb55ab2e5a868532b8e6ec39216c66c25b8998d7474bc4d4eb529 glibc-2. MD5 8787868ba8962d9b125997ec2f25ac01 glibc-libidn-2.5.tar.bz2 102330 RMD160 e10e85e0ee7cdab2e5518a93978cb688ccabee88 glibc-libidn-2.5.tar.bz2 102330 SHA256 de77e49e0beee6061d4c6e480f322566ba25d4e5e018c456a18ea4a8da5c0ede glibc-libidn-2.5.tar.bz2 102330 +MD5 870d76d46dcaba37c13d01dca47d1774 glibc-linuxthreads-2.5.tar.bz2 242445 +RMD160 788484d035d53ac39aac18f6e3409a912eea1cfa glibc-linuxthreads-2.5.tar.bz2 242445 +SHA256 ee27aeba6124a8b351c720eb898917f0f8874d9a384cc2f17aa111a3d679bd2c glibc-linuxthreads-2.5.tar.bz2 242445 MD5 183f6d46e8fa5e4b2aff240ab1586c2e glibc-ports-2.5.tar.bz2 409372 RMD160 e7e29df135a5f0f72760d10e5ad46de038e40725 glibc-ports-2.5.tar.bz2 409372 SHA256 80c38a005325e7539012bd665fb8e06af9ee9bfc74efb236ebff121265bfd463 glibc-ports-2.5.tar.bz2 409372 diff --git a/sys-libs/glibc/glibc-2.5.ebuild b/sys-libs/glibc/glibc-2.5.ebuild index 306533d5f20a..b2b3e149e99b 100644 --- a/sys-libs/glibc/glibc-2.5.ebuild +++ b/sys-libs/glibc/glibc-2.5.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5.ebuild,v 1.4 2006/10/07 04:42:37 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.5.ebuild,v 1.5 2006/10/07 05:55:19 vapier Exp $ # Here's how the cross-compile logic breaks down ... # CTARGET - machine that will target the binaries @@ -67,9 +67,12 @@ GLIBC_RELEASE_VER=$(get_version_component_range 1-3) BRANCH_UPDATE=${BRANCH_UPDATE-$(get_version_component_range 4)} GLIBC_PORTS_VER=${GLIBC_RELEASE_VER} #GLIBC_PORTS_VER="20060925" +GLIBC_LT_VER=${GLIBC_RELEASE_VER} +#GLIBC_LT_VER="20060605" # (Recent snapshots fails with 2.6.5 and earlier with NPTL) NPTL_KERNEL_VERSION=${NPTL_KERNEL_VERSION:-"2.6.9"} +LT_KERNEL_VERSION=${LT_KERNEL_VERSION:-"2.4.1"} ### SRC_URI ### @@ -143,6 +146,12 @@ get_glibc_src_uri() { ${GENTOO_TOOLCHAIN_DEV_URI//XXX/glibc-infopages-${GLIBC_INFOPAGE_VERSION:-${GLIBC_RELEASE_VER}}.tar.bz2}" fi + if [[ -n ${GLIBC_LT_VER} ]] ; then + GLIBC_SRC_URI="${GLIBC_SRC_URI} + mirror://gnu/glibc/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2 + ftp://sources.redhat.com/pub/glibc/snapshots/glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2" + fi + echo "${GLIBC_SRC_URI}" } @@ -162,6 +171,7 @@ toolchain-glibc_src_unpack() { unpack glibc-${GLIBC_RELEASE_VER}.tar.bz2 cd "${S}" + [[ -n ${GLIBC_LT_VER} ]] && unpack glibc-linuxthreads-${GLIBC_LT_VER}.tar.bz2 unpack_addon libidn unpack_addon ports ${GLIBC_PORTS_VER} @@ -217,9 +227,18 @@ toolchain-glibc_src_compile() { done echo - unset LD_ASSUME_KERNEL - glibc_do_configure nptl - make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" + if want_linuxthreads ; then + glibc_do_configure linuxthreads + einfo "Building GLIBC with linuxthreads..." + make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" + fi + if want_nptl ; then + # ... and then do the optional nptl build + unset LD_ASSUME_KERNEL + glibc_do_configure nptl + einfo "Building GLIBC with NPTL..." + make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" + fi } toolchain-glibc_headers_compile() { @@ -245,6 +264,12 @@ toolchain-glibc_headers_compile() { "${S}"/configure ${myconf} || die "failed to configure glibc" } +toolchain-glibc_src_test() { + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1" + unset LD_ASSUME_KERNEL + make check || die "make check failed for ${ABI}-${CTARGET}-$1" +} + toolchain-glibc_pkg_preinst() { # PPC64+others may want to eventually be added to this logic if they # decide to be multilib compatible and FHS compliant. note that this @@ -259,9 +284,9 @@ toolchain-glibc_pkg_preinst() { # it appears that /lib/tls is sometimes not removed. See bug # 69258 for more info. - if [[ -d ${ROOT}/$(alt_libdir)/tls ]] ; then + if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && ! { want_nptl && want_linuxthreads; }; then addwrite "${ROOT}"/$(alt_libdir)/ - ewarn "removing /${ROOT}$(alt_libdir)/tls..." + ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..." rm -r "${ROOT}"/$(alt_libdir)/tls || die fi @@ -274,14 +299,28 @@ toolchain-glibc_src_install() { # zoneinfo do not always get installed ... unset LANGUAGE LANG LC_ALL - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET} + local GBUILDDIR + if want_linuxthreads ; then + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads + else + GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl + fi local install_root=${D} is_crosscompile && install_root="${install_root}/usr/${CTARGET}" - cd "${GBUILDDIR}" - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - install || die + if want_linuxthreads ; then + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads + einfo "Installing GLIBC ${ABI} with linuxthreads ..." + make PARALLELMFLAGS="${MAKEOPTS}" \ + install_root="${install_root}" \ + install || die + else # nptlonly + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + einfo "Installing GLIBC ${ABI} with NPTL ..." + make PARALLELMFLAGS="${MAKEOPTS}" \ + install_root="${install_root}" \ + install || die + fi if is_crosscompile ; then # punt all the junk not needed by a cross-compiler @@ -289,6 +328,49 @@ toolchain-glibc_src_install() { rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc} fi + if want_linuxthreads && want_nptl ; then + einfo "Installing NPTL to $(alt_libdir)/tls/..." + cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl + dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl + + local l src_lib + for l in libc libm librt libpthread libthread_db ; do + # take care of shared lib first ... + l=${l}.so + if [[ -e ${l} ]] ; then + src_lib=${l} + else + src_lib=$(eval echo */${l}) + fi + cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" + fperms a+rx $(alt_libdir)/tls/${l} + dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) + + # then grab the linker script or the symlink ... + if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then + dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} + else + sed \ + -e "s:/${l}:/tls/${l}:g" \ + -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ + "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} + fi + + # then grab the static lib ... + src_lib=${src_lib/%.so/.a} + [[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} + cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" + src_lib=${src_lib/%.a/_nonshared.a} + if [[ -e ${src_lib} ]] ; then + cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" + fi + done + + # use the nptl linker instead of the linuxthreads one as the linuxthreads + # one may lack TLS support and that can be really bad for business + cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" + fi + # We'll take care of the cache ourselves rm -f "${D}"/etc/ld.so.cache @@ -425,6 +507,19 @@ toolchain-glibc_headers_install() { } toolchain-glibc_pkg_postinst() { + # Mixing nptlonly and -nptlonly glibc can prove dangerous if libpthread + # isn't removed in unmerge which happens sometimes. See bug #87671 + if ! is_crosscompile && want_linuxthreads && [[ ${ROOT} == "/" ]] ; then + for libdir in $(get_all_libdirs) ; do + for f in "${ROOT}"/${libdir}/libpthread-2.* "${ROOT}"/${libdir}/libpthread-0.6* ; do + if [[ -f ${f} ]] ; then + rm -f ${f} + ldconfig + fi + done + done + fi + if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then # Generate fastloading iconv module configuration file. "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" @@ -454,6 +549,13 @@ toolchain-glibc_pkg_postinst() { einfo "Gentoo's glibc no longer includes mdns." einfo "If you want mdns, emerge the sys-auth/nss-mdns package." echo + + if want_nptl && want_linuxthreads ; then + einfo "The default behavior of glibc on your system is to use NPTL. If" + einfo "you want to use linuxthreads for a particular program, start it" + einfo "by executing 'LD_ASSUME_KERNEL=${LT_KERNEL_VERSION} <program> [<options>]'" + echo + fi } ### SUPPORT FUNCTIONS ### @@ -656,6 +758,12 @@ want_nptl() { return 0 } +want_linuxthreads() { + ! use nptlonly && return 0 + want_nptl || return 0 + return 1 +} + want_tls() { # Archs that can use TLS (Thread Local Storage) case $(tc-arch) in @@ -719,9 +827,29 @@ glibc_do_configure() { [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp" - myconf="${myconf} --with-tls --with-__thread" - myconf="${myconf} --enable-add-ons=nptl,ports${ADDONS}" - myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}" + if [[ $1 == "linuxthreads" ]] ; then + if want_tls ; then + myconf="${myconf} --with-tls" + + if ! want__thread || use glibc-compat20 || [[ ${LT_KERNEL_VERSION} == 2.[02].* ]] ; then + myconf="${myconf} --without-__thread" + else + myconf="${myconf} --with-__thread" + fi + else + myconf="${myconf} --without-tls --without-__thread" + fi + + myconf="${myconf} --disable-sanity-checks" + myconf="${myconf} --enable-add-ons=ports,linuxthreads${ADDONS}" + myconf="${myconf} --enable-kernel=${LT_KERNEL_VERSION}" + elif [[ $1 == "nptl" ]] ; then + myconf="${myconf} --with-tls --with-__thread" + myconf="${myconf} --enable-add-ons=ports,nptl${ADDONS}" + myconf="${myconf} --enable-kernel=${NPTL_KERNEL_VERSION}" + else + die "invalid pthread option" + fi # Since SELinux support is only required for nscd, only enable it if: # 1. USE selinux @@ -762,7 +890,7 @@ glibc_do_configure() { has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET}) - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET} + local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 mkdir -p "${GBUILDDIR}" cd "${GBUILDDIR}" einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}" @@ -907,12 +1035,17 @@ pkg_setup() { eerror "and tell them to release an update that isn't broken." die "non-TLS symbol errno@glibc_2.0 not supported" fi - if ! use nptl || ! use nptl ; then - ewarn "glibc-2.4 is nptl-only!" + if want_linuxthreads ; then + ewarn "glibc-2.5 is nptl-only!" [[ ${CTARGET} == i386-* ]] && eerror "NPTL requires a CHOST of i486 or better" die "please add USE='nptl nptlonly' to make.conf" fi + if use nptlonly && ! use nptl ; then + eerror "If you want nptlonly, add nptl to your USE too ;p" + die "nptlonly without nptl" + fi + if [[ -e /proc/xen ]] && ! is-flag -mno-tls-direct-seg-refs ; then ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." ewarn "This will result in a 50% performance penalty, which is probably not what you want." @@ -1016,9 +1149,8 @@ src_test() { return 0 fi - cd "${WORKDIR}"/build-${ABI}-${CTARGET} || die "cd build-${ABI}-${CTARGET}" - unset LD_ASSUME_KERNEL - make check || die "make check failed for ${ABI}-${CTARGET}" + want_linuxthreads && toolchain-glibc_src_test linuxthreads + want_nptl && toolchain-glibc_src_test nptl } src_strip() { |