diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2011-04-25 13:37:00 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 22:45:18 +0200 |
commit | 75a4a592e5ccda30715f93563d741b83e0dcf39e (patch) | |
tree | 502f745607e77a2c4386ad38d818ddcafe81489c /source/l/glibc/glibc.SlackBuild | |
parent | b76270bf9e6dd375e495fec92140a79a79415d27 (diff) | |
download | current-75a4a592e5ccda30715f93563d741b83e0dcf39e.tar.gz |
Slackware 13.37slackware-13.37
Mon Apr 25 13:37:00 UTC 2011
Slackware 13.37 x86_64 stable is released!
Thanks to everyone who pitched in on this release: the Slackware team,
the folks producing upstream code, and linuxquestions.org for providing
a great forum for collaboration and testing.
The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a
dual-sided
32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware
project by picking up a copy from store.slackware.com. We're taking
pre-orders now, and offer a discount if you sign up for a subscription.
As always, thanks to the Slackware community for testing, suggestions,
and feedback. :-)
Have fun!
Diffstat (limited to 'source/l/glibc/glibc.SlackBuild')
-rwxr-xr-x | source/l/glibc/glibc.SlackBuild | 131 |
1 files changed, 74 insertions, 57 deletions
diff --git a/source/l/glibc/glibc.SlackBuild b/source/l/glibc/glibc.SlackBuild index c00d790e..d3f21ae5 100755 --- a/source/l/glibc/glibc.SlackBuild +++ b/source/l/glibc/glibc.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2006, 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,9 +22,9 @@ ## build glibc-$VERSION for Slackware -VERSION=${VERSION:-2.11.1} +VERSION=${VERSION:-2.13} CHECKOUT=${CHECKOUT:-""} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} ## Included in glibc now: ## glibc-libidn version @@ -42,6 +42,56 @@ if [ -z "$ARCH" ]; then esac fi +# I'll break this out as an option for fun :-) +case $ARCH in + i386) + OPTIMIZ="-O3 -march=i386 -mcpu=i686" + LIBDIRSUFFIX="" + ;; + i486) + OPTIMIZ="-O3 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" + ;; + i586) + OPTIMIZ="-O3 -march=i586" + LIBDIRSUFFIX="" + ;; + i686) + OPTIMIZ="-O3 -march=i686" + LIBDIRSUFFIX="" + ;; + athlon) + OPTIMIZ="-O3 -march=athlon" + LIBDIRSUFFIX="" + ;; + s390) + OPTIMIZ="-O3" + LIBDIRSUFFIX="" + ;; + x86_64) + OPTIMIZ="-O3 -fPIC" + LIBDIRSUFFIX="64" + ;; + *) + OPTIMIZ="-O3" + LIBDIRSUFFIX="" + ;; +esac + +case $ARCH in + x86_64) + TARGET=${TARGET:-x86_64} + ;; + i486) + # This should be i486 for all 32-bit x86 arch: + TARGET=${TARGET:-i486} + ;; +esac + +# Hand off the $ARCH variable to $SLACKWARE_ARCH to avoid confusing glibc: +SLACKWARE_ARCH=$ARCH +unset ARCH + CVSVER=${VERSION}${CHECKOUT} # NOTE!!! glibc needs to be built against the sanitized kernel headers, @@ -58,21 +108,11 @@ mkdir -p $TMP NUMJOBS=${NUMJOBS:--j4} # Sanity check on the version number in the install scripts: -if ! grep -vq libutil-$VERSION}.so $CWD/doinst.sh-glibc ; then +if ! grep -vq libutil-${VERSION}.so $CWD/doinst.sh-glibc ; then echo "FATAL: doinst.sh scripts have wrong version numbers." exit 1 fi -case $ARCH in - x86_64) - TARGET=${TARGET:-x86_64} - ;; - i486) - # This should be i486 for all 32-bit x86 arch: - TARGET=${TARGET:-i486} - ;; -esac - # This function fixes a doinst.sh file for x86_64. # With thanks to Fred Emmott. fix_doinst() { @@ -86,7 +126,7 @@ fix_doinst() { # Fix "( cd lib" occurrences sed -i "s#( cd lib\$#( cd lib${LIBDIRSUFFIX}#" install/doinst.sh - if [ "$ARCH" = "x86_64" ]; then + if [ "$SLACKWARE_ARCH" = "x86_64" ]; then sed -i 's#ld-linux.so.2#ld-linux-x86-64.so.2#' install/doinst.sh fi } @@ -112,6 +152,19 @@ apply_patches() { # This reverts a patch that was made to glibc to fix "namespace leakage", # which seems to cause some build failures (e.g. with conntrack): zcat $CWD/glibc.revert.to.fix.build.breakages.diff.gz | patch -p1 --verbose || exit 1 + # This partial security patch still applies and might be needed: + zcat $CWD/glibc.git-96611391ad8823ba58405325d78cefeae5cdf699-CVE-2010-3847b.patch.gz | patch -p1 --verbose || exit 1 + # Make it harder for people to trick ldd into running code: + zcat $CWD/glibc.ldd.trace.through.dynamic.linker.diff.gz | patch -p1 --verbose || exit 1 + # Make glibc compile with binutils using --enable-initfini-array. + # At this time, we do not recommend this due to probable ABI breakage. + # The also patch needs work before it would apply. + # ***NOT READY*** + #zcat $CWD/glibc.git-4a531bb0b3b582cb693de9f76d2d97d970f9a5d5.patch.gz | patch -p1 --verbose || exit 1 + # + # Avoid the Intel optimized asm routines for now because they break + # the flash player. We'll phase this in when it's safer to do so. + zcat $CWD/glibc.disable.broken.optimized.memcpy.diff.gz | patch -p1 --verbose || exit 1 # Update the timezone information. ( cd timezone tar xzf $CWD/tzdata?????.tar.gz @@ -128,42 +181,6 @@ apply_patches() { ) } -# I'll break this out as an option for fun :-) -case $ARCH in - i386) - OPTIMIZ="-O3 -march=i386 -mcpu=i686" - LIBDIRSUFFIX="" - ;; - i486) - OPTIMIZ="-O3 -march=i486 -mtune=i686" - LIBDIRSUFFIX="" - ;; - i586) - OPTIMIZ="-O3 -march=i586" - LIBDIRSUFFIX="" - ;; - i686) - OPTIMIZ="-O3 -march=i686" - LIBDIRSUFFIX="" - ;; - athlon) - OPTIMIZ="-O3 -march=athlon" - LIBDIRSUFFIX="" - ;; - s390) - OPTIMIZ="-O3" - LIBDIRSUFFIX="" - ;; - x86_64) - OPTIMIZ="-O3 -fPIC" - LIBDIRSUFFIX="64" - ;; - *) - OPTIMIZ="-O3" - LIBDIRSUFFIX="" - ;; -esac - # This is going to be the initial $DESTDIR: export PKG=$TMP/package-glibc-incoming-tree PGLIBC=$TMP/package-glibc @@ -232,7 +249,7 @@ fi # Make build directory: mkdir build-glibc-$VERSION -cd build-glibc-$VERSION +cd build-glibc-$VERSION || exit 1 echo "BUILDING DAS NPTL GLIBC" CFLAGS="-g $OPTIMIZ" \ @@ -373,7 +390,7 @@ mv $PKG/usr/lib${LIBDIRSUFFIX}/lib*_p.a usr/lib${LIBDIRSUFFIX} ( cd usr/lib${LIBDIRSUFFIX} ; strip -g *.a ) mkdir install cp -a $CWD/slack-desc.glibc-profile install/slack-desc -makepkg -l y -c n $TMP/glibc-profile-$VERSION-$ARCH-$BUILD.txz +makepkg -l y -c n $TMP/glibc-profile-$VERSION-$SLACKWARE_ARCH-$BUILD.txz # THIS IS NO LONGER PACKAGED (or is it? might be better to let it be made, and then ship it or not...) # glibc-debug: @@ -383,7 +400,7 @@ mkdir -p usr/lib${LIBDIRSUFFIX} mv $PKG/usr/lib${LIBDIRSUFFIX}/debug usr/lib${LIBDIRSUFFIX} mkdir install cp -a $CWD/slack-desc.glibc-debug install/slack-desc -makepkg -l y -c n $TMP/glibc-debug-$VERSION-$ARCH-$BUILD.txz +makepkg -l y -c n $TMP/glibc-debug-$VERSION-$SLACKWARE_ARCH-$BUILD.txz ## INSTEAD, NUKE THESE LIBS #rm -rf $PKG/usr/lib${LIBDIRSUFFIX}/debug @@ -397,7 +414,7 @@ cp -a $PKG/usr/share/i18n usr/share cp -a $PKG/usr/share/locale usr/share mkdir install cp -a $CWD/slack-desc.glibc-i18n install/slack-desc -makepkg -l y -c n $TMP/glibc-i18n-$VERSION-$ARCH-$BUILD.txz +makepkg -l y -c n $TMP/glibc-i18n-$VERSION-$SLACKWARE_ARCH-$BUILD.txz # glibc-solibs: cd $PSOLIBS @@ -438,7 +455,7 @@ fix_doinst # Ditch links: find . -type l -exec rm {} \; # Build the package: -makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$ARCH-$BUILD.txz +makepkg -l y -c n $TMP/glibc-solibs-$VERSION-$SLACKWARE_ARCH-$BUILD.txz # And finally, the complete "all-in-one" glibc package is created # from whatever was leftover: @@ -460,7 +477,7 @@ fix_doinst mv incoming/libSegFault.so . ) # Build the package: -/sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$ARCH-$BUILD.txz +/sbin/makepkg -l y -c n $TMP/glibc-$VERSION-$SLACKWARE_ARCH-$BUILD.txz # Done! echo |