wok-4.x annotate glibc/receipt @ rev 12472

Up glibc 2.20
author Stanislas Leduc <shann@slitaz.org>
date Fri Mar 03 09:44:37 2023 +0000 (15 months ago)
parents 654ef6aa1962
children d97d1f60fc46
rev   line source
pankso@9 1 # SliTaz package receipt.
pankso@9 2
pankso@9 3 PACKAGE="glibc"
shann@12472 4 VERSION="2.20"
pankso@3475 5 CATEGORY="meta"
pankso@9 6 SHORT_DESC="The GNU C libraries. This package is used to compile the libc."
pankso@9 7 MAINTAINER="pankso@slitaz.org"
pankso@9 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@9 9 WEB_SITE="http://www.gnu.org/software/libc/"
pankso@9 10 WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
pankso@9713 11
pankso@9713 12 DEPENDS="glibc-base glibc-locale glibc-dev"
shann@12466 13 BUILD_DEPENDS="linux-api-headers autoconf bash advancecomp"
pankso@9713 14
pankso@9713 15 # Genpkg order for tazwok.
gokhlayeh@9253 16 COOK_OPT="genpkg=glibc-base:glibc-extra-samba:glib-locale:glibc-dev"
gokhlayeh@8189 17
gokhlayeh@8189 18 # Rules to compile & install the temporary toolchain.
gokhlayeh@8189 19 cook_tmp_toolchain()
gokhlayeh@8189 20 {
gokhlayeh@8189 21 cd $src
gokhlayeh@8189 22
gokhlayeh@8189 23 # Build in a separate directory.
gokhlayeh@8189 24 mkdir ../glibc-build && cd ../glibc-build
gokhlayeh@8189 25
gokhlayeh@8189 26 # glibc no longer support i386, so use -march=i486 for better compatibility.
pankso@10024 27 # If i686 ???
slaxemulator@10420 28 unset CFLAGS CXXFLAGS
gokhlayeh@8189 29 case $ARCH in
slaxemulator@10420 30 i386|i486)
pankso@12008 31 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
slaxemulator@10420 32 *)
pankso@12006 33 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
gokhlayeh@8189 34 esac
gokhlayeh@8189 35
gokhlayeh@8189 36 { $src/configure \
slaxemulator@10420 37 --host=$HOST_SYSTEM \
gokhlayeh@8189 38 --build=$($src/scripts/config.guess) \
gokhlayeh@8189 39 --disable-profile --enable-add-ons \
slaxemulator@10420 40 --enable-kernel=2.6.30 --with-headers=/tools/include \
gokhlayeh@8189 41 libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
gokhlayeh@8189 42 make &&
gokhlayeh@8189 43 make install
gokhlayeh@8189 44 } || return 1
gokhlayeh@8189 45
gokhlayeh@8189 46 # Link compiler to this new glibc.
slaxemulator@10420 47 SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
slaxemulator@10420 48 $HOST_SYSTEM-gcc -dumpspecs | sed \
gokhlayeh@8189 49 -e 's@/lib\(64\)\?/ld@/tools&@g' \
gokhlayeh@8189 50 -e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS
gokhlayeh@8189 51 unset SPECS
gokhlayeh@8189 52 }
pankso@9 53
pankso@9 54 # Rules to configure and make the package.
pankso@9 55 compile_rules()
pankso@9 56 {
pankso@10031 57 cd $src
slaxemulator@10351 58
slaxemulator@10351 59 # SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
slaxemulator@10351 60 # default to build package will not ensure package work with Busybox awk
slaxemulator@10351 61 # and so should NOT be use to cook.
slaxemulator@10351 62 if [ -x /usr/bin/cook ]; then
slaxemulator@10351 63 [ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
slaxemulator@10351 64 fi
slaxemulator@10351 65
shann@12466 66 # Fixes and patches from LFS, Redhat
gokhlayeh@8748 67 sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
gokhlayeh@8189 68 sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
gokhlayeh@8189 69
shann@12466 70 # Glibc misc Bug Fixes
shann@12466 71 # fix for {linux,sys}/xattr.h incompatibility - commit fdbe8eae
shann@12466 72 patch -p1 -i $stuff/glibc-2.19-xattr_header.patch
gokhlayeh@8748 73
shann@12466 74 # fix issues in sin/cos slow path calculation - commit ffe768a9
shann@12466 75 patch -p1 -i $stuff/glibc-2.19-fix-sign-in-bsloww1-input.patch
shann@12466 76
shann@12466 77 # fix tzselect with missing TZDIR - commit 893b4f37/c72399fb
shann@12466 78 patch -p1 -i $stuff/glibc-2.19-tzselect-default.patch
shann@12466 79
shann@12466 80 # Revert commit causing issues with crappy DNS servers
shann@12466 81 patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
pascal@12445 82
gokhlayeh@8748 83 # Fix a stack imbalance that occurs under some conditions:
gokhlayeh@8748 84 sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
gokhlayeh@8748 85 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
gokhlayeh@8748 86 nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
gokhlayeh@8189 87
pankso@10031 88 # Glibc needs ld.so.conf in the install destdir.
gokhlayeh@8189 89 mkdir -p $WOK/$PACKAGE/install/etc
gokhlayeh@8189 90 touch $WOK/$PACKAGE/install/etc/ld.so.conf
pankso@10031 91 mkdir ../glibc-build && cd ../glibc-build
pankso@10031 92
pankso@10031 93 # Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
pankso@10031 94 # --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
pankso@10031 95 # "The higher the VERSION number is, the less compatibility code is
pankso@10031 96 # added, and the faster the code gets."
pankso@10031 97 unset CFLAGS CXXFLAGS
pankso@10031 98 case "$ARCH" in
pankso@10024 99 i386|i486)
pankso@12008 100 echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
pankso@10024 101 *)
pankso@12008 102 echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
pankso@10024 103 esac
gokhlayeh@8189 104 { $src/configure \
pankso@1153 105 --disable-profile \
pankso@1153 106 --enable-add-ons \
pankso@10034 107 --enable-kernel=2.6.30 \
shann@12466 108 --enable-obsolete-rpc \
pankso@10024 109 --libexecdir=/usr/lib/glibc \
pankso@10147 110 --build=$HOST_SYSTEM \
pankso@10147 111 --host=$HOST_SYSTEM &&
pankso@10031 112 make && make install_root=$DESTDIR install
gokhlayeh@8189 113 } || return 1
gokhlayeh@8189 114
pankso@10031 115 # If temporary toolchain was previously used, switch to regular toolchain.
gokhlayeh@8189 116 [ -d /tools ] || return
gokhlayeh@8189 117 mv /tools/bin/ld /tools/bin/ld-old
gokhlayeh@8189 118 mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
gokhlayeh@8189 119 mv /tools/bin/ld-new /tools/bin/ld
gokhlayeh@8189 120 ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
gokhlayeh@8189 121 gcc -dumpspecs | sed -e 's@/tools@@g' \
gokhlayeh@8189 122 -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
gokhlayeh@8189 123 -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
gokhlayeh@8189 124 `dirname $(gcc --print-libgcc-file-name)`/specs
pankso@9 125 }
pankso@9 126
pankso@9 127 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@9 128 genpkg_rules()
pankso@9 129 {
pankso@2701 130 LOCALE=""
pankso@9 131 mkdir -p $fs/var
gokhlayeh@8189 132
gokhlayeh@8189 133 # Remove build directory.
pankso@9713 134 rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
pankso@9713 135 rm -rf $WOK/$PACKAGE/$PACKAGE-build
pankso@9 136 }