wok-undigest rev 1132

rm glibc to add later
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Wed Jul 23 21:36:23 2014 +0000 (2014-07-23)
parents d85acea3b94a
children ee67322bc831
files glibc-base/receipt glibc-base/stuff/arm-files.list glibc-base/stuff/i486-files.list glibc-base/stuff/mkdir.list glibc-base/stuff/wanted-files.list glibc-dev/receipt glibc-locale/receipt glibc/receipt glibc/stuff/glibc-2.13-gcc_fix-1.patch glibc/stuff/glibc-2.14-reexport-rpc-interface.patch glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch glibc/stuff/glibc-2.14-revert-4768ae77.patch glibc/stuff/glibc-2.14.1-fixes-1.patch glibc/stuff/glibc-2.14.1-gcc_fix-1.patch glibc/stuff/glibc-2.14.1-sort-1.patch
line diff
     1.1 --- a/glibc-base/receipt	Wed Jul 23 19:46:00 2014 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,136 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="glibc-base"
     1.7 -VERSION="2.14.1"
     1.8 -CATEGORY="base-system"
     1.9 -SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
    1.10 -WEB_SITE="http://www.gnu.org/software/libc/"
    1.11 -MAINTAINER="pankso@slitaz.org"
    1.12 -LICENSE="GPL2"
    1.13 -WANTED="glibc"
    1.14 -HOST_ARCH="i486"
    1.15 -
    1.16 -# Locales include by default, other locales are in: locale-** and glibc-locale
    1.17 -DEFAULT_LOCALE="en_US en_GB"
    1.18 -
    1.19 -# Handle multiarch compilation.
    1.20 -case "$ARCH" in
    1.21 -	arm*|x86_64) VERSION="2.13" WANTED="" ;;
    1.22 -esac
    1.23 -
    1.24 -# Handle multiarch installation.
    1.25 -case "$SLITAZ_ARCH" in
    1.26 -	arm*|x86_64) VERSION="2.13" WANTED="" ;;
    1.27 -esac
    1.28 -
    1.29 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.30 -#
    1.31 -# Full glibc is very long to compile (see package glibc for more
    1.32 -# informations). You can use the precompiled package available on
    1.33 -# SliTaz mirror to build a distro without recompiling glibc.
    1.34 -#
    1.35 -
    1.36 -# i18n
    1.37 -get_locales()
    1.38 -{
    1.39 -	local path=$1
    1.40 -	for i in $DEFAULT_LOCALE
    1.41 -	do
    1.42 -		cp $install/$path/i18n/locales/$i $fs/usr/share/i18n/locales
    1.43 -	done
    1.44 -}
    1.45 -
    1.46 -genpkg_rules()
    1.47 -{
    1.48 -	# Mkdir's.
    1.49 -	for dir in $(cat $stuff/mkdir.list)
    1.50 -	do
    1.51 -		mkdir -p ${fs}$dir
    1.52 -	done
    1.53 -
    1.54 -	case "$ARCH" in
    1.55 -		arm*)
    1.56 -			# Eglibc is cross compiled by cross to have a toolchain so we can
    1.57 -			# use these files instead of recooking it. ARM use Eglibc
    1.58 -			echo "Using cross compiled Eglibc..."
    1.59 -			install=/cross/$ARCH/sysroot
    1.60 -
    1.61 -			# /usr/{bin,share} /usr/lib/gconv
    1.62 -			for file in $(cat $stuff/arm-files.list)
    1.63 -			do
    1.64 -				cp -a ${install}$file ${fs}$file
    1.65 -			done
    1.66 -
    1.67 -			# libs
    1.68 -			for lib in libcrypt libm libc libresolv librt libutil libpthread \
    1.69 -				libnss_* libnsl libanl libdl
    1.70 -			do
    1.71 -				cp -a $install/lib/${lib}-*.so $fs/lib
    1.72 -				cp -a $install/lib/${lib}.so* $fs/lib
    1.73 -				cp -a $install/usr/lib/${lib}.so $fs/usr/lib
    1.74 -			done
    1.75 -			cp -a $install/lib/ld-*.so* $fs/lib
    1.76 -			cp -a $install/usr/lib/libc_nonshared.a $fs/usr/lib
    1.77 -			cp -a $install/usr/lib/libpthread_nonshared.a $fs/usr/lib
    1.78 -			cp $install/etc/rpc $fs/etc
    1.79 -			touch $fs/etc/ld.so.conf
    1.80 -			touch $fs/etc/ld.so.cache
    1.81 -			get_locales "usr/share" ;;
    1.82 -		x86_64)
    1.83 -			# EXPERIMENTAL: Glibc is cross compiled by cross to have a
    1.84 -			# toolchain so we can use these files instead of recooking it.
    1.85 -			echo "Using cross compiled Glibc..."
    1.86 -			install=/usr/cross/$ARCH
    1.87 -
    1.88 -			# /usr/{bin,share} /usr/lib/gconv
    1.89 -			for file in $(cat $stuff/arm-files.list)
    1.90 -			do
    1.91 -				cp -a ${install}$file ${fs}/usr/$file
    1.92 -			done
    1.93 -
    1.94 -			# /lib
    1.95 -			for lib in libcrypt libm libc libresolv librt libutil libpthread \
    1.96 -				libnss_* libnsl libanl libdl
    1.97 -			do
    1.98 -				cp -a $install/lib/${lib}-*.so $fs/lib
    1.99 -				cp -a $install/lib/${lib}.so* $fs/lib
   1.100 -			done
   1.101 -			cp -a $install/lib/ld-*.so* $fs/lib
   1.102 -			cp -a $install/lib/libc_nonshared.a $fs/lib
   1.103 -			cp -a $install/lib/libpthread_nonshared.a $fs/lib
   1.104 -			cp $install/etc/rpc $fs/etc
   1.105 -			touch $fs/etc/ld.so.conf
   1.106 -			get_locales "share"
   1.107 -			# Fix libraries search path
   1.108 -			sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libc.so
   1.109 -			sed -i s"|/usr/cross/$ARCH||"g $fs/lib/libpthread.so ;;
   1.110 -		*)
   1.111 -			# Copy all files specified in stuff/files.list. We get the files
   1.112 -			# from glibc package.
   1.113 -			for file in $(cat $stuff/wanted-files.list)
   1.114 -			do
   1.115 -				cp -a ${install}$file ${fs}$file
   1.116 -			done
   1.117 -			get_locales "usr/share"
   1.118 -	esac
   1.119 -}
   1.120 -
   1.121 -# Remove an eventual locale-archive since we use directories.
   1.122 -pre_install()
   1.123 -{
   1.124 -	rm -f $root/usr/lib/locale/locale-archive
   1.125 -}
   1.126 -
   1.127 -# Glibc-base is auto-updated in chroot but when cross-compiling we need
   1.128 -# to have /usr/cross/$ARCH search path in libc.so
   1.129 -post_install()
   1.130 -{
   1.131 -	# x86_64
   1.132 -	if echo $root | grep -q /usr/cross/x86_64; then
   1.133 -		echo "Fixing x86_64: $root/lib/libc.so"
   1.134 -		cat > $root/lib/libc.so << EOT
   1.135 -OUTPUT_FORMAT(elf64-x86-64)
   1.136 -GROUP ( $root/lib/libc.so.6 $root/lib/libc_nonshared.a AS_NEEDED ( $root/lib/ld-linux-x86-64.so.2 ) )
   1.137 -EOT
   1.138 -	fi
   1.139 -}
     2.1 --- a/glibc-base/stuff/arm-files.list	Wed Jul 23 19:46:00 2014 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,31 +0,0 @@
     2.4 -/usr/lib/gconv/UNICODE.so
     2.5 -/usr/lib/gconv/gconv-modules
     2.6 -/usr/lib/gconv/ANSI_X3.110.so
     2.7 -/usr/lib/gconv/ISO8859-1.so
     2.8 -/usr/lib/gconv/ISO8859-15.so
     2.9 -/usr/lib/gconv/UTF-16.so
    2.10 -/usr/lib/gconv/CP1252.so
    2.11 -/usr/lib/gconv/IBM437.so
    2.12 -/usr/lib/gconv/IBM850.so
    2.13 -
    2.14 -/usr/bin/locale
    2.15 -/usr/bin/localedef
    2.16 -
    2.17 -/usr/share/locale/locale.alias
    2.18 -/usr/share/i18n/charmaps/UTF-8.gz
    2.19 -
    2.20 -/usr/share/i18n/locales/i18n
    2.21 -/usr/share/i18n/locales/iso14651_t1
    2.22 -/usr/share/i18n/locales/iso14651_t1_common
    2.23 -/usr/share/i18n/locales/translit_neutral
    2.24 -/usr/share/i18n/locales/translit_combining
    2.25 -/usr/share/i18n/locales/translit_circle
    2.26 -/usr/share/i18n/locales/translit_cjk_compat
    2.27 -/usr/share/i18n/locales/translit_compat
    2.28 -/usr/share/i18n/locales/translit_font
    2.29 -/usr/share/i18n/locales/translit_fraction
    2.30 -/usr/share/i18n/locales/translit_narrow
    2.31 -/usr/share/i18n/locales/translit_small
    2.32 -/usr/share/i18n/locales/translit_wide
    2.33 -
    2.34 -/usr/share/zoneinfo/UTC
     3.1 --- a/glibc-base/stuff/i486-files.list	Wed Jul 23 19:46:00 2014 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,80 +0,0 @@
     3.4 -/lib/libutil-2.14.1.so
     3.5 -/lib/libnss_dns-2.14.1.so
     3.6 -/lib/libnsl-2.14.1.so
     3.7 -/lib/libanl-2.14.1.so
     3.8 -/lib/libm-2.14.1.so
     3.9 -/lib/libpthread-2.14.1.so
    3.10 -/lib/libthread_db-1.0.so
    3.11 -/lib/libnss_compat-2.14.1.so
    3.12 -/lib/libc-2.14.1.so
    3.13 -/lib/librt-2.14.1.so
    3.14 -/lib/libcrypt-2.14.1.so
    3.15 -/lib/ld-2.14.1.so
    3.16 -/lib/libresolv-2.14.1.so
    3.17 -/lib/libnss_files-2.14.1.so
    3.18 -/lib/libdl-2.14.1.so
    3.19 -
    3.20 -/usr/lib/gconv/UNICODE.so
    3.21 -/usr/lib/gconv/gconv-modules
    3.22 -/usr/lib/gconv/ANSI_X3.110.so
    3.23 -/usr/lib/gconv/ISO8859-1.so
    3.24 -/usr/lib/gconv/ISO8859-15.so
    3.25 -/usr/lib/gconv/UTF-16.so
    3.26 -/usr/lib/gconv/CP1252.so
    3.27 -/usr/lib/gconv/IBM437.so
    3.28 -/usr/lib/gconv/IBM850.so
    3.29 -
    3.30 -/usr/bin/locale
    3.31 -/usr/bin/localedef
    3.32 -
    3.33 -/usr/share/locale/locale.alias
    3.34 -/usr/share/i18n/charmaps/UTF-8.gz
    3.35 -
    3.36 -/usr/share/i18n/locales/i18n
    3.37 -/usr/share/i18n/locales/iso14651_t1 
    3.38 -/usr/share/i18n/locales/iso14651_t1_common 
    3.39 -/usr/share/i18n/locales/translit_neutral 
    3.40 -/usr/share/i18n/locales/translit_combining
    3.41 -/usr/share/i18n/locales/translit_circle 
    3.42 -/usr/share/i18n/locales/translit_cjk_compat 
    3.43 -/usr/share/i18n/locales/translit_compat 
    3.44 -/usr/share/i18n/locales/translit_font 
    3.45 -/usr/share/i18n/locales/translit_fraction
    3.46 -/usr/share/i18n/locales/translit_narrow
    3.47 -/usr/share/i18n/locales/translit_small
    3.48 -/usr/share/i18n/locales/translit_wide
    3.49 -
    3.50 -/usr/share/zoneinfo/UTC
    3.51 -
    3.52 -/etc/rpc
    3.53 -/etc/ld.so.conf
    3.54 -/etc/ld.so.cache
    3.55 -
    3.56 -/lib/libc.so.6
    3.57 -/lib/librt.so.1
    3.58 -/lib/libdl.so.2
    3.59 -/lib/libanl.so.1
    3.60 -/lib/libutil.so.1
    3.61 -/lib/libnss_dns.so.2
    3.62 -/lib/libnss_compat.so.2
    3.63 -/lib/libcrypt.so.1
    3.64 -/lib/libpthread.so.0
    3.65 -/lib/libthread_db.so.1
    3.66 -/lib/libm.so.6
    3.67 -/lib/ld-linux.so.2
    3.68 -/lib/libresolv.so.2
    3.69 -/lib/libnsl.so.1
    3.70 -/lib/libnss_files.so.2
    3.71 -
    3.72 -/usr/lib/libnss_dns.so
    3.73 -/usr/lib/libnss_files.so
    3.74 -/usr/lib/libcrypt.so
    3.75 -/usr/lib/libnss_compat.so
    3.76 -/usr/lib/libdl.so
    3.77 -/usr/lib/libm.so
    3.78 -/usr/lib/librt.so
    3.79 -/usr/lib/libresolv.so
    3.80 -/usr/lib/libnsl.so
    3.81 -/usr/lib/libutil.so
    3.82 -/usr/lib/libanl.so
    3.83 -/usr/lib/libthread_db.so
     4.1 --- a/glibc-base/stuff/mkdir.list	Wed Jul 23 19:46:00 2014 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,10 +0,0 @@
     4.4 -/etc
     4.5 -/lib
     4.6 -/usr/bin
     4.7 -/usr/lib/gconv
     4.8 -/usr/lib/locale
     4.9 -/usr/share/zoneinfo/America
    4.10 -/usr/share/zoneinfo/Europe
    4.11 -/usr/share/i18n/locales
    4.12 -/usr/share/i18n/charmaps
    4.13 -/usr/share/locale
     5.1 --- a/glibc-base/stuff/wanted-files.list	Wed Jul 23 19:46:00 2014 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,80 +0,0 @@
     5.4 -/lib/libutil-2.14.1.so
     5.5 -/lib/libnss_dns-2.14.1.so
     5.6 -/lib/libnsl-2.14.1.so
     5.7 -/lib/libanl-2.14.1.so
     5.8 -/lib/libm-2.14.1.so
     5.9 -/lib/libpthread-2.14.1.so
    5.10 -/lib/libthread_db-1.0.so
    5.11 -/lib/libnss_compat-2.14.1.so
    5.12 -/lib/libc-2.14.1.so
    5.13 -/lib/librt-2.14.1.so
    5.14 -/lib/libcrypt-2.14.1.so
    5.15 -/lib/ld-2.14.1.so
    5.16 -/lib/libresolv-2.14.1.so
    5.17 -/lib/libnss_files-2.14.1.so
    5.18 -/lib/libdl-2.14.1.so
    5.19 -
    5.20 -/usr/lib/gconv/UNICODE.so
    5.21 -/usr/lib/gconv/gconv-modules
    5.22 -/usr/lib/gconv/ANSI_X3.110.so
    5.23 -/usr/lib/gconv/ISO8859-1.so
    5.24 -/usr/lib/gconv/ISO8859-15.so
    5.25 -/usr/lib/gconv/UTF-16.so
    5.26 -/usr/lib/gconv/CP1252.so
    5.27 -/usr/lib/gconv/IBM437.so
    5.28 -/usr/lib/gconv/IBM850.so
    5.29 -
    5.30 -/usr/bin/locale
    5.31 -/usr/bin/localedef
    5.32 -
    5.33 -/usr/share/locale/locale.alias
    5.34 -/usr/share/i18n/charmaps/UTF-8.gz
    5.35 -
    5.36 -/usr/share/i18n/locales/i18n
    5.37 -/usr/share/i18n/locales/iso14651_t1 
    5.38 -/usr/share/i18n/locales/iso14651_t1_common 
    5.39 -/usr/share/i18n/locales/translit_neutral 
    5.40 -/usr/share/i18n/locales/translit_combining
    5.41 -/usr/share/i18n/locales/translit_circle 
    5.42 -/usr/share/i18n/locales/translit_cjk_compat 
    5.43 -/usr/share/i18n/locales/translit_compat 
    5.44 -/usr/share/i18n/locales/translit_font 
    5.45 -/usr/share/i18n/locales/translit_fraction
    5.46 -/usr/share/i18n/locales/translit_narrow
    5.47 -/usr/share/i18n/locales/translit_small
    5.48 -/usr/share/i18n/locales/translit_wide
    5.49 -
    5.50 -/usr/share/zoneinfo/UTC
    5.51 -
    5.52 -/etc/rpc
    5.53 -/etc/ld.so.conf
    5.54 -/etc/ld.so.cache
    5.55 -
    5.56 -/lib/libc.so.6
    5.57 -/lib/librt.so.1
    5.58 -/lib/libdl.so.2
    5.59 -/lib/libanl.so.1
    5.60 -/lib/libutil.so.1
    5.61 -/lib/libnss_dns.so.2
    5.62 -/lib/libnss_compat.so.2
    5.63 -/lib/libcrypt.so.1
    5.64 -/lib/libpthread.so.0
    5.65 -/lib/libthread_db.so.1
    5.66 -/lib/libm.so.6
    5.67 -/lib/ld-linux.so.2
    5.68 -/lib/libresolv.so.2
    5.69 -/lib/libnsl.so.1
    5.70 -/lib/libnss_files.so.2
    5.71 -
    5.72 -/usr/lib/libnss_dns.so
    5.73 -/usr/lib/libnss_files.so
    5.74 -/usr/lib/libcrypt.so
    5.75 -/usr/lib/libnss_compat.so
    5.76 -/usr/lib/libdl.so
    5.77 -/usr/lib/libm.so
    5.78 -/usr/lib/librt.so
    5.79 -/usr/lib/libresolv.so
    5.80 -/usr/lib/libnsl.so
    5.81 -/usr/lib/libutil.so
    5.82 -/usr/lib/libanl.so
    5.83 -/usr/lib/libthread_db.so
     6.1 --- a/glibc-dev/receipt	Wed Jul 23 19:46:00 2014 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,42 +0,0 @@
     6.4 -# SliTaz package receipt.
     6.5 -
     6.6 -PACKAGE="glibc-dev"
     6.7 -VERSION="2.14.1"
     6.8 -CATEGORY="development"
     6.9 -SHORT_DESC="The GNU C libraries devel files (Part of SliTaz toolchain)."
    6.10 -MAINTAINER="pankso@slitaz.org"
    6.11 -LICENSE="GPL2"
    6.12 -WANTED="glibc"
    6.13 -WEB_SITE="http://www.gnu.org/software/libc/"
    6.14 -
    6.15 -DEPENDS="glibc-base"
    6.16 -
    6.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
    6.18 -#
    6.19 -# This package is part of the toolchain. We use list to mkdir and cp files.
    6.20 -#
    6.21 -genpkg_rules()
    6.22 -{
    6.23 -    # Mass copy and then remove all files specified in stuff/base-files.list.
    6.24 -    # We get the files from glibc-base. Locale files are in: glibc-locale.
    6.25 -    cp -a $install/* $fs
    6.26 -    
    6.27 -    # Rm base files.
    6.28 -    echo -n "Removing all base files..."
    6.29 -    for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list`
    6.30 -    do
    6.31 -    	rm -f ${fs}$file
    6.32 -    done
    6.33 -    rm -rf $fs/etc
    6.34 -    rm -rf $fs/usr/share
    6.35 -    status
    6.36 -    
    6.37 -    # Rm locale.
    6.38 -    echo -n "Removing all locale files..."
    6.39 -    for file in `cat $WOK/glibc-locale/taz/glibc-locale-$VERSION/files.list`
    6.40 -    do
    6.41 -    	rm -f ${fs}$file
    6.42 -    done
    6.43 -    rm -rf $fs/usr/lib/gconv
    6.44 -    status
    6.45 -}
     7.1 --- a/glibc-locale/receipt	Wed Jul 23 19:46:00 2014 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,53 +0,0 @@
     7.4 -# SliTaz package receipt.
     7.5 -
     7.6 -PACKAGE="glibc-locale"
     7.7 -VERSION="2.14.1"
     7.8 -CATEGORY="system-tools"
     7.9 -SHORT_DESC="The GNU C libraries locale files and utilities (see also locale-*)."
    7.10 -MAINTAINER="pankso@slitaz.org"
    7.11 -LICENSE="GPL2"
    7.12 -WANTED="glibc"
    7.13 -WEB_SITE="http://www.gnu.org/software/libc/"
    7.14 -
    7.15 -DEPENDS="glibc-base glibc-extra-samba"
    7.16 -
    7.17 -LOCALE_PACK="cs de es fr hu id it pt ru sl zh_CN zh_TW"
    7.18 -
    7.19 -# Rules to gen a SliTaz package suitable for Tazpkg.
    7.20 -genpkg_rules()
    7.21 -{
    7.22 -	mkdir -p $fs/usr/share $fs/usr/lib $fs/usr/bin
    7.23 -
    7.24 -	cp -a $install/usr/lib/gconv $fs/usr/lib
    7.25 -	cp -a $install/usr/share/locale $fs/usr/share
    7.26 -	cp -a $install/usr/share/i18n $fs/usr/share
    7.27 -	cp -a $install/usr/share/zoneinfo $fs/usr/share
    7.28 -
    7.29 -	# Utilities and tools
    7.30 -	cp -a $install/usr/bin/iconv $fs/usr/bin
    7.31 -	cp -a $install/usr/bin/tzselect $fs/usr/bin
    7.32 -
    7.33 -	# Rm base files.
    7.34 -	echo -n "* Removing all base files..."
    7.35 -	for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list`
    7.36 -	do
    7.37 -		rm -f ${fs}$file
    7.38 -	done
    7.39 -	status
    7.40 -	
    7.41 -	# Rm glibc-extra-samba files.
    7.42 -	echo -n "* Removing extra samba files..."
    7.43 -	for file in `cat $WOK/glibc-extra-samba/taz/glibc-extra-samba-$VERSION/files.list`
    7.44 -	do
    7.45 -		rm -f ${fs}$file
    7.46 -	done
    7.47 -	status
    7.48 -
    7.49 -	# Rm files provided by locale-pack.
    7.50 -	for i in $LOCALE_PACK
    7.51 -	do
    7.52 -		echo -n "* Removing locale: $i"
    7.53 -		rm -rf $fs/usr/share/locale/$i
    7.54 -		status
    7.55 -	done
    7.56 -}
     8.1 --- a/glibc/receipt	Wed Jul 23 19:46:00 2014 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,149 +0,0 @@
     8.4 -# SliTaz package receipt.
     8.5 -
     8.6 -PACKAGE="glibc"
     8.7 -VERSION="2.14.1"
     8.8 -CATEGORY="meta"
     8.9 -SHORT_DESC="The GNU C libraries. This package is used to compile the libc."
    8.10 -MAINTAINER="pankso@slitaz.org"
    8.11 -LICENSE="GPL2"
    8.12 -TARBALL="$PACKAGE-$VERSION.tar.gz"
    8.13 -WEB_SITE="http://www.gnu.org/software/libc/"
    8.14 -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    8.15 -
    8.16 -DEPENDS="glibc-base glibc-locale glibc-dev"
    8.17 -BUILD_DEPENDS="linux-api-headers autoconf bash"
    8.18 -
    8.19 -# Genpkg order for tazwok.
    8.20 -COOK_OPT="genpkg=glibc-base:glib-locale:glibc-dev"
    8.21 -	
    8.22 -# Rules to compile & install the temporary toolchain.
    8.23 -cook_tmp_toolchain()
    8.24 -{
    8.25 -	cd $src
    8.26 -	
    8.27 -	# Glibc Bug Fixes Patch from LFS
    8.28 -	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
    8.29 -	# Glibc Bug Sort Relocatable Objects Patch
    8.30 -	patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
    8.31 -	# Fix a bug that prevents Glibc from building with GCC-4.6.2
    8.32 -	patch -Np1 -i stuff/glibc-2.14.1-gcc_fix-1.patch
    8.33 -
    8.34 -	# Build in a separate directory.
    8.35 -	mkdir ../glibc-build && cd ../glibc-build
    8.36 -
    8.37 -	# glibc no longer support i386, so use -march=i486 for better compatibility.
    8.38 -	# If i686 ???
    8.39 -	unset CFLAGS CXXFLAGS
    8.40 -	#case $ARCH in
    8.41 -		#i386|i486)
    8.42 -			echo "CFLAGS += -O2 -march=i486 -mtune=generic" > configparms ;;
    8.43 -		#*)
    8.44 -			#echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
    8.45 -	#esac
    8.46 -
    8.47 -	{ $src/configure \
    8.48 -		--host=$HOST_SYSTEM \
    8.49 -		--build=$($src/scripts/config.guess) \
    8.50 -		--disable-profile --enable-add-ons \
    8.51 -		--enable-kernel=2.6.30 --with-headers=/tools/include \
    8.52 -		libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
    8.53 -	make &&
    8.54 -	make install
    8.55 -	} || return 1
    8.56 -
    8.57 -	# Link compiler to this new glibc.
    8.58 -	SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
    8.59 -	$HOST_SYSTEM-gcc -dumpspecs | sed \
    8.60 -		-e 's@/lib\(64\)\?/ld@/tools&@g' \
    8.61 -		-e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 
    8.62 -	unset SPECS
    8.63 -}
    8.64 -
    8.65 -# Rules to configure and make the package.
    8.66 -compile_rules()
    8.67 -{
    8.68 -	cd $src
    8.69 -
    8.70 -	# SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
    8.71 -	# default to build package will not ensure package work with Busybox awk
    8.72 -	# and so should NOT be use to cook.
    8.73 -	if [ -x /usr/bin/cook ]; then
    8.74 -		[ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
    8.75 -	fi
    8.76 -
    8.77 -	# Fixes and patches from LFS, Redhat
    8.78 -	sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
    8.79 -	sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
    8.80 -
    8.81 -	# Glibc misc Bug Fixes
    8.82 -	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
    8.83 -	
    8.84 -	# Glibc Bug Sort Relocatable Objects Patch
    8.85 -	#patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
    8.86 -	
    8.87 -	# Fix a bug that prevents Glibc from building with GCC-4.6.2
    8.88 -	patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
    8.89 -	
    8.90 -	# Revert commit causing issues with crappy DNS servers
    8.91 -	patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
    8.92 -	
    8.93 -	# re-export RPC interface until libtirpc is ready as a replacement
    8.94 -	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
    8.95 -	patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
    8.96 -	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
    8.97 -	patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
    8.98 -
    8.99 -	# Fix a stack imbalance that occurs under some conditions:
   8.100 -	sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
   8.101 -		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
   8.102 -		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
   8.103 -
   8.104 -	# Glibc needs ld.so.conf in the install destdir.
   8.105 -	mkdir -p $WOK/$PACKAGE/install/etc
   8.106 -	touch $WOK/$PACKAGE/install/etc/ld.so.conf
   8.107 -	mkdir ../glibc-build && cd ../glibc-build
   8.108 -	
   8.109 -	# Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
   8.110 -	# --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
   8.111 -	# "The higher the VERSION number is, the less compatibility code is
   8.112 -	# added, and the faster the code gets."
   8.113 -	unset CFLAGS CXXFLAGS
   8.114 -	#case "$ARCH" in
   8.115 -		#i386|i486)
   8.116 -			echo "CFLAGS += -O2 -march=i486 -mtune=generic" > configparms ;;
   8.117 -		#*)
   8.118 -			#echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
   8.119 -	#esac
   8.120 -	{ $src/configure \
   8.121 -		--disable-profile \
   8.122 -		--enable-add-ons \
   8.123 -		--enable-kernel=2.6.30 \
   8.124 -		--libexecdir=/usr/lib/glibc \
   8.125 -		--build=$HOST_SYSTEM \
   8.126 -		--host=$HOST_SYSTEM \
   8.127 -		--target=$BUILD_SYSTEM &&
   8.128 -	make && make install_root=$DESTDIR install
   8.129 -	} || return 1
   8.130 -
   8.131 -	# If temporary toolchain was previously used, switch to regular toolchain.
   8.132 -	[ -d /tools ] || return
   8.133 -	mv /tools/bin/ld /tools/bin/ld-old
   8.134 -	mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
   8.135 -	mv /tools/bin/ld-new /tools/bin/ld
   8.136 -	ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
   8.137 -	gcc -dumpspecs | sed -e 's@/tools@@g' \
   8.138 -		-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
   8.139 -		-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
   8.140 -		`dirname $(gcc --print-libgcc-file-name)`/specs
   8.141 -}
   8.142 -
   8.143 -# Rules to gen a SliTaz package suitable for Tazpkg.
   8.144 -genpkg_rules()
   8.145 -{
   8.146 -	LOCALE=""
   8.147 -	mkdir -p $fs/var
   8.148 -
   8.149 -	# Remove build directory.
   8.150 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
   8.151 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
   8.152 -}
     9.1 --- a/glibc/stuff/glibc-2.13-gcc_fix-1.patch	Wed Jul 23 19:46:00 2014 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,49 +0,0 @@
     9.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
     9.5 -Date:                    2010-04-18
     9.6 -Initial Package Version: 2.11.1
     9.7 -Upstream Status:         Not Submitted
     9.8 -Origin:                  http://www.eglibc.org/archives/patches/msg00073.html
     9.9 -Description:             Fixes the following build problem with GCC-4.5.0:
    9.10 -
    9.11 -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
    9.12 -./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
    9.13 -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
    9.14 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    9.15 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    9.16 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    9.17 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
    9.18 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    9.19 -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
    9.20 -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
    9.21 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
    9.22 -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
    9.23 -
    9.24 -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
    9.25 ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c	2009-12-08 20:10:20.000000000 +0000
    9.26 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c	2010-04-17 11:34:06.882681001 +0000
    9.27 -@@ -45,6 +45,11 @@
    9.28 - /* Embed an #include to pull in the alignment and .end directives. */
    9.29 - asm ("\n#include \"defs.h\"");
    9.30 - 
    9.31 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
    9.32 -+asm ("\n#undef __i686");
    9.33 -+asm ("\n#define __i686 __i686");
    9.34 -+asm ("\n#endif");
    9.35 -+
    9.36 - /* The initial common code ends here. */
    9.37 - asm ("\n/*@HEADER_ENDS*/");
    9.38 - 
    9.39 -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h
    9.40 ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2009-12-08 20:10:20.000000000 +0000
    9.41 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h	2010-04-17 11:34:06.882681001 +0000
    9.42 -@@ -29,6 +29,10 @@
    9.43 - #include <dl-sysdep.h>
    9.44 - #include <tls.h>
    9.45 - 
    9.46 -+#if defined __i686 && defined __ASSEMBLER__
    9.47 -+#undef __i686
    9.48 -+#define __i686 __i686
    9.49 -+#endif
    9.50 - 
    9.51 - /* For Linux we can use the system call table in the header file
    9.52 - 	/usr/include/asm/unistd.h
    10.1 --- a/glibc/stuff/glibc-2.14-reexport-rpc-interface.patch	Wed Jul 23 19:46:00 2014 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,26 +0,0 @@
    10.4 -diff --git a/include/libc-symbols.h b/include/libc-symbols.h
    10.5 -index 67e1ca2..5e7cca5 100644
    10.6 ---- a/include/libc-symbols.h
    10.7 -+++ b/include/libc-symbols.h
    10.8 -@@ -635,7 +635,7 @@ for linking")
    10.9 - # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
   10.10 - # define libc_hidden_def(name) hidden_def (name)
   10.11 - # define libc_hidden_weak(name) hidden_weak (name)
   10.12 --# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
   10.13 -+# define libc_hidden_nolink(name, version) hidden_def (name)
   10.14 - # define libc_hidden_ver(local, name) hidden_ver (local, name)
   10.15 - # define libc_hidden_data_def(name) hidden_data_def (name)
   10.16 - # define libc_hidden_data_weak(name) hidden_data_weak (name)
   10.17 -diff --git a/sunrpc/Makefile b/sunrpc/Makefile
   10.18 -index 5134ce9..40c73d1 100644
   10.19 ---- a/sunrpc/Makefile
   10.20 -+++ b/sunrpc/Makefile
   10.21 -@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
   10.22 - 				    des_crypt.h)
   10.23 - headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
   10.24 - 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
   10.25 --headers = rpc/netdb.h
   10.26 -+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
   10.27 - install-others = $(inst_sysconfdir)/rpc
   10.28 - generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
   10.29 - 	    $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
    11.1 --- a/glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch	Wed Jul 23 19:46:00 2014 +0000
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,28 +0,0 @@
    11.4 -From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
    11.5 -From: Andreas Schwab <schwab@redhat.com>
    11.6 -Date: Tue, 17 May 2011 17:42:30 +0200
    11.7 -Subject: [PATCH] Reinstall NIS RPC headers
    11.8 -
    11.9 ----
   11.10 - nis/Makefile |    4 ++--
   11.11 - 1 files changed, 2 insertions(+), 2 deletions(-)
   11.12 -
   11.13 -diff --git a/nis/Makefile b/nis/Makefile
   11.14 -index b5c9609..d2934d9 100644
   11.15 ---- a/nis/Makefile
   11.16 -+++ b/nis/Makefile
   11.17 -@@ -23,9 +23,9 @@ subdir	:= nis
   11.18 - 
   11.19 - aux			:= nis_hash
   11.20 - 
   11.21 -+headers			:= $(wildcard rpcsvc/*.[hx])
   11.22 - distribute		:= nss-nis.h nss-nisplus.h nis_intern.h Banner \
   11.23 --			   nisplus-parser.h nis_xdr.h nss \
   11.24 --			   $(wildcard rpcsvc/*.[hx])
   11.25 -+			   nisplus-parser.h nis_xdr.h nss
   11.26 - 
   11.27 - # These are the databases available for the nis (and perhaps later nisplus)
   11.28 - # service.  This must be a superset of the services in nss.
   11.29 --- 
   11.30 -1.7.5.4
   11.31 -
    12.1 --- a/glibc/stuff/glibc-2.14-revert-4768ae77.patch	Wed Jul 23 19:46:00 2014 +0000
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,37 +0,0 @@
    12.4 -diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
    12.5 ---- glibc-orig//resolv/res_send.c	2011-06-10 18:59:03.041436996 +1000
    12.6 -+++ glibc/resolv/res_send.c	2011-06-10 19:08:09.379309323 +1000
    12.7 -@@ -549,7 +549,7 @@
    12.8 -				    ns, ansp, ansp2, nansp2, resplen2);
    12.9 -			if (n < 0)
   12.10 -				return (-1);
   12.11 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   12.12 -+			if (n == 0)
   12.13 -				goto next_ns;
   12.14 -		} else {
   12.15 -			/* Use datagrams. */
   12.16 -@@ -559,7 +559,7 @@
   12.17 -				    ansp2, nansp2, resplen2);
   12.18 -			if (n < 0)
   12.19 -				return (-1);
   12.20 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   12.21 -+			if (n == 0)
   12.22 -				goto next_ns;
   12.23 -			if (v_circuit)
   12.24 -			  // XXX Check whether both requests failed or
   12.25 -@@ -1275,14 +1275,10 @@
   12.26 -				(*thisresplenp > *thisanssizp)
   12.27 -				? *thisanssizp : *thisresplenp);
   12.28 -
   12.29 --			if (recvresp1 || (buf2 != NULL && recvresp2)) {
   12.30 --			  *resplen2 = 0;
   12.31 -+			if (recvresp1 || (buf2 != NULL && recvresp2))
   12.32 -			  return resplen;
   12.33 --			}
   12.34 -			if (buf2 != NULL)
   12.35 -			  {
   12.36 --			    /* No data from the first reply.  */
   12.37 --			    resplen = 0;
   12.38 -			    /* We are waiting for a possible second reply.  */
   12.39 -			    if (hp->id == anhp->id)
   12.40 -			      recvresp1 = 1;
    13.1 --- a/glibc/stuff/glibc-2.14.1-fixes-1.patch	Wed Jul 23 19:46:00 2014 +0000
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,159 +0,0 @@
    13.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
    13.5 -Date:                    2011-10-07
    13.6 -Initial Package Version: 2.14.1
    13.7 -Upstream Status:         From upstream
    13.8 -Origin:                  Matt Burgess
    13.9 -Description:             Fixes Firefox crashes and a bug when programs link to
   13.10 -                         SDL.
   13.11 -
   13.12 -diff -Naur glibc-2.14.1.orig/elf/dl-close.c glibc-2.14.1/elf/dl-close.c
   13.13 ---- glibc-2.14.1.orig/elf/dl-close.c	2011-10-07 09:48:55.000000000 +0000
   13.14 -+++ glibc-2.14.1/elf/dl-close.c	2011-10-07 19:43:10.346411120 +0000
   13.15 -@@ -119,17 +119,8 @@
   13.16 -   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
   13.17 -       || dl_close_state != not_pending)
   13.18 -     {
   13.19 --      if (map->l_direct_opencount == 0)
   13.20 --	{
   13.21 --	  if (map->l_type == lt_loaded)
   13.22 --	    dl_close_state = rerun;
   13.23 --	  else if (map->l_type == lt_library)
   13.24 --	    {
   13.25 --	      struct link_map **oldp = map->l_initfini;
   13.26 --	      map->l_initfini = map->l_orig_initfini;
   13.27 --	      _dl_scope_free (oldp);
   13.28 --	    }
   13.29 --	}
   13.30 -+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
   13.31 -+	dl_close_state = rerun;
   13.32 - 
   13.33 -       /* There are still references to this object.  Do nothing more.  */
   13.34 -       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
   13.35 -diff -Naur glibc-2.14.1.orig/elf/dl-deps.c glibc-2.14.1/elf/dl-deps.c
   13.36 ---- glibc-2.14.1.orig/elf/dl-deps.c	2011-10-07 09:48:55.000000000 +0000
   13.37 -+++ glibc-2.14.1/elf/dl-deps.c	2011-10-07 19:43:10.348432639 +0000
   13.38 -@@ -478,6 +478,7 @@
   13.39 - 		  nneeded * sizeof needed[0]);
   13.40 - 	  atomic_write_barrier ();
   13.41 - 	  l->l_initfini = l_initfini;
   13.42 -+	  l->l_free_initfini = 1;
   13.43 - 	}
   13.44 - 
   13.45 -       /* If we have no auxiliary objects just go on to the next map.  */
   13.46 -@@ -678,6 +679,7 @@
   13.47 -   l_initfini[nlist] = NULL;
   13.48 -   atomic_write_barrier ();
   13.49 -   map->l_initfini = l_initfini;
   13.50 -+  map->l_free_initfini = 1;
   13.51 -   if (l_reldeps != NULL)
   13.52 -     {
   13.53 -       atomic_write_barrier ();
   13.54 -@@ -686,7 +688,7 @@
   13.55 -       _dl_scope_free (old_l_reldeps);
   13.56 -     }
   13.57 -   if (old_l_initfini != NULL)
   13.58 --      map->l_orig_initfini = old_l_initfini;
   13.59 -+    _dl_scope_free (old_l_initfini);
   13.60 - 
   13.61 -   if (errno_reason)
   13.62 -     _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
   13.63 -diff -Naur glibc-2.14.1.orig/elf/dl-libc.c glibc-2.14.1/elf/dl-libc.c
   13.64 ---- glibc-2.14.1.orig/elf/dl-libc.c	2011-10-07 09:48:55.000000000 +0000
   13.65 -+++ glibc-2.14.1/elf/dl-libc.c	2011-10-07 19:43:10.352411141 +0000
   13.66 -@@ -279,6 +279,10 @@
   13.67 - 	      if (! old->dont_free)
   13.68 - 		free (old);
   13.69 - 	    }
   13.70 -+
   13.71 -+	  /* Free the initfini dependency list.  */
   13.72 -+	  if (l->l_free_initfini)
   13.73 -+	    free (l->l_initfini);
   13.74 - 	}
   13.75 - 
   13.76 -       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
   13.77 -diff -Naur glibc-2.14.1.orig/elf/rtld.c glibc-2.14.1/elf/rtld.c
   13.78 ---- glibc-2.14.1.orig/elf/rtld.c	2011-10-07 09:48:55.000000000 +0000
   13.79 -+++ glibc-2.14.1/elf/rtld.c	2011-10-07 19:43:10.355406263 +0000
   13.80 -@@ -2263,6 +2263,7 @@
   13.81 - 	      lnp->dont_free = 1;
   13.82 - 	      lnp = lnp->next;
   13.83 - 	    }
   13.84 -+	  l->l_free_initfini = 0;
   13.85 - 
   13.86 - 	  if (l != &GL(dl_rtld_map))
   13.87 - 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
   13.88 -diff -Naur glibc-2.14.1.orig/include/link.h glibc-2.14.1/include/link.h
   13.89 ---- glibc-2.14.1.orig/include/link.h	2011-10-07 09:48:55.000000000 +0000
   13.90 -+++ glibc-2.14.1/include/link.h	2011-10-07 19:43:10.357462703 +0000
   13.91 -@@ -192,6 +192,9 @@
   13.92 - 						 during LD_TRACE_PRELINKING=1
   13.93 - 						 contains any DT_SYMBOLIC
   13.94 - 						 libraries.  */
   13.95 -+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
   13.96 -+				       freed, ie. not allocated with
   13.97 -+				       the dummy malloc in ld.so.  */
   13.98 - 
   13.99 -     /* Collected information about own RPATH directories.  */
  13.100 -     struct r_search_path_struct l_rpath_dirs;
  13.101 -@@ -240,9 +243,6 @@
  13.102 - 
  13.103 -     /* List of object in order of the init and fini calls.  */
  13.104 -     struct link_map **l_initfini;
  13.105 --    /* The init and fini list generated at startup, saved when the
  13.106 --       object is also loaded dynamically.  */
  13.107 --    struct link_map **l_orig_initfini;
  13.108 - 
  13.109 -     /* List of the dependencies introduced through symbol binding.  */
  13.110 -     struct link_map_reldeps
  13.111 -diff -Naur glibc-2.14.1.orig/resolv/res_query.c glibc-2.14.1/resolv/res_query.c
  13.112 ---- glibc-2.14.1.orig/resolv/res_query.c	2011-10-07 09:48:55.000000000 +0000
  13.113 -+++ glibc-2.14.1/resolv/res_query.c	2011-10-07 19:43:10.361412711 +0000
  13.114 -@@ -122,6 +122,7 @@
  13.115 - 		  int *resplen2)
  13.116 - {
  13.117 - 	HEADER *hp = (HEADER *) answer;
  13.118 -+	HEADER *hp2;
  13.119 - 	int n, use_malloc = 0;
  13.120 - 	u_int oflags = statp->_flags;
  13.121 - 
  13.122 -@@ -239,26 +240,25 @@
  13.123 - 	  /* __libc_res_nsend might have reallocated the buffer.  */
  13.124 - 	  hp = (HEADER *) *answerp;
  13.125 - 
  13.126 --	/* We simplify the following tests by assigning HP to HP2.  It
  13.127 --	   is easy to verify that this is the same as ignoring all
  13.128 --	   tests of HP2.  */
  13.129 --	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
  13.130 --
  13.131 --	if (n < (int) sizeof (HEADER) && answerp2 != NULL
  13.132 --	    && *resplen2 > (int) sizeof (HEADER))
  13.133 -+	/* We simplify the following tests by assigning HP to HP2 or
  13.134 -+	   vice versa.  It is easy to verify that this is the same as
  13.135 -+	   ignoring all tests of HP or HP2.  */
  13.136 -+	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
  13.137 - 	  {
  13.138 --	    /* Special case of partial answer.  */
  13.139 --	    assert (hp != hp2);
  13.140 --	    hp = hp2;
  13.141 -+	    hp2 = hp;
  13.142 - 	  }
  13.143 --	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
  13.144 --		 && n > (int) sizeof (HEADER))
  13.145 -+	else
  13.146 - 	  {
  13.147 --	    /* Special case of partial answer.  */
  13.148 --	    assert (hp != hp2);
  13.149 --	    hp2 = hp;
  13.150 -+	    hp2 = (HEADER *) *answerp2;
  13.151 -+	    if (n < (int) sizeof (HEADER))
  13.152 -+	      {
  13.153 -+	        hp = hp2;
  13.154 -+	      }
  13.155 - 	  }
  13.156 - 
  13.157 -+	/* Make sure both hp and hp2 are defined */
  13.158 -+	assert((hp != NULL) && (hp2 != NULL));
  13.159 -+
  13.160 - 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
  13.161 - 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
  13.162 - #ifdef DEBUG
    14.1 --- a/glibc/stuff/glibc-2.14.1-gcc_fix-1.patch	Wed Jul 23 19:46:00 2014 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,49 +0,0 @@
    14.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
    14.5 -Date:                    2010-04-18
    14.6 -Initial Package Version: 2.11.1
    14.7 -Upstream Status:         Not Submitted
    14.8 -Origin:                  http://www.eglibc.org/archives/patches/msg00073.html
    14.9 -Description:             Fixes the following build problem with GCC-4.5.0:
   14.10 -
   14.11 -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
   14.12 -./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
   14.13 -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
   14.14 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   14.15 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   14.16 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   14.17 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
   14.18 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   14.19 -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
   14.20 -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
   14.21 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
   14.22 -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
   14.23 -
   14.24 -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
   14.25 ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c	2009-12-08 20:10:20.000000000 +0000
   14.26 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c	2010-04-17 11:34:06.882681001 +0000
   14.27 -@@ -45,6 +45,11 @@
   14.28 - /* Embed an #include to pull in the alignment and .end directives. */
   14.29 - asm ("\n#include \"defs.h\"");
   14.30 - 
   14.31 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
   14.32 -+asm ("\n#undef __i686");
   14.33 -+asm ("\n#define __i686 __i686");
   14.34 -+asm ("\n#endif");
   14.35 -+
   14.36 - /* The initial common code ends here. */
   14.37 - asm ("\n/*@HEADER_ENDS*/");
   14.38 - 
   14.39 -diff -Naur glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h
   14.40 ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2009-12-08 20:10:20.000000000 +0000
   14.41 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h	2010-04-17 11:34:06.882681001 +0000
   14.42 -@@ -29,6 +29,10 @@
   14.43 - #include <dl-sysdep.h>
   14.44 - #include <tls.h>
   14.45 - 
   14.46 -+#if defined __i686 && defined __ASSEMBLER__
   14.47 -+#undef __i686
   14.48 -+#define __i686 __i686
   14.49 -+#endif
   14.50 - 
   14.51 - /* For Linux we can use the system call table in the header file
   14.52 - 	/usr/include/asm/unistd.h
    15.1 --- a/glibc/stuff/glibc-2.14.1-sort-1.patch	Wed Jul 23 19:46:00 2014 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,273 +0,0 @@
    15.4 -Submitted By:            Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
    15.5 -Date:                    2012-02-24
    15.6 -Initial Package Version: 2.14.1
    15.7 -Upstream Status:         From upstream
    15.8 -Origin:                  Upstream
    15.9 -Description:             Sort objects by dependency before relocation.
   15.10 -                         Fixes segfault in dlopen for several programs.
   15.11 -
   15.12 -diff --git a/Makeconfig b/Makeconfig
   15.13 -index 2db2821..68547b2 100644
   15.14 ---- a/Makeconfig
   15.15 -+++ b/Makeconfig
   15.16 -@@ -938,6 +938,12 @@ libdl =
   15.17 - endif
   15.18 - endif
   15.19 - 
   15.20 -+ifeq ($(build-shared),yes)
   15.21 -+libm = $(common-objpfx)math/libm.so$(libm.so-version)
   15.22 -+else
   15.23 -+libm = $(common-objpfx)math/libm.a
   15.24 -+endif
   15.25 -+
   15.26 - # These are the subdirectories containing the library source.  The order
   15.27 - # is more or less arbitrary.  The sorting step will take care of the
   15.28 - # dependencies.
   15.29 -diff --git a/elf/Makefile b/elf/Makefile
   15.30 -index 052e763..3f1772a 100644
   15.31 ---- a/elf/Makefile
   15.32 -+++ b/elf/Makefile
   15.33 -@@ -124,7 +124,8 @@ distribute	:= rtld-Rules \
   15.34 - 		   tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
   15.35 - 		   tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
   15.36 - 		   tst-initorder.c \
   15.37 --		   tst-initorder2.c
   15.38 -+		   tst-initorder2.c \
   15.39 -+		   tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
   15.40 - 
   15.41 - CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
   15.42 - CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
   15.43 -@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
   15.44 - 	 tst-audit1 tst-audit2 \
   15.45 - 	 tst-stackguard1 tst-addr1 tst-thrlock \
   15.46 - 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
   15.47 --	 tst-initorder tst-initorder2
   15.48 -+	 tst-initorder tst-initorder2 tst-relsort1
   15.49 - #	 reldep9
   15.50 - test-srcs = tst-pathopt
   15.51 - selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
   15.52 -@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
   15.53 - 		tst-initordera1 tst-initorderb1 \
   15.54 - 		tst-initordera2 tst-initorderb2 \
   15.55 - 		tst-initordera3 tst-initordera4 \
   15.56 --		tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
   15.57 -+		tst-initorder2a tst-initorder2b tst-initorder2c \
   15.58 -+		tst-initorder2d \
   15.59 -+		tst-relsort1mod1 tst-relsort1mod2
   15.60 - ifeq (yes,$(have-initfini-array))
   15.61 - modules-names += tst-array2dep tst-array5dep
   15.62 - endif
   15.63 -@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
   15.64 - CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
   15.65 - CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
   15.66 - endif
   15.67 -+
   15.68 -+$(objpfx)tst-relsort1: $(libdl)
   15.69 -+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
   15.70 -+$(objpfx)tst-relsort1mod2.so: $(libm)
   15.71 -+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
   15.72 -+			   $(objpfx)tst-relsort1mod2.so
   15.73 -diff --git a/elf/dl-open.c b/elf/dl-open.c
   15.74 -index a0b5c50..a56bdc1 100644
   15.75 ---- a/elf/dl-open.c
   15.76 -+++ b/elf/dl-open.c
   15.77 -@@ -1,5 +1,5 @@
   15.78 - /* Load a shared object at runtime, relocate it, and run its initializer.
   15.79 --   Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
   15.80 -+   Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
   15.81 -    This file is part of the GNU C Library.
   15.82 - 
   15.83 -    The GNU C Library is free software; you can redistribute it and/or
   15.84 -@@ -303,45 +303,109 @@ dl_open_worker (void *a)
   15.85 -   if (GLRO(dl_lazy))
   15.86 -     reloc_mode |= mode & RTLD_LAZY;
   15.87 - 
   15.88 --  /* Relocate the objects loaded.  We do this in reverse order so that copy
   15.89 --     relocs of earlier objects overwrite the data written by later objects.  */
   15.90 --
   15.91 -+  /* Sort the objects by dependency for the relocation process.  This
   15.92 -+     allows IFUNC relocations to work and it also means copy
   15.93 -+     relocation of dependencies are if necessary overwritten.  */
   15.94 -+  size_t nmaps = 0;
   15.95 -   struct link_map *l = new;
   15.96 --  while (l->l_next)
   15.97 --    l = l->l_next;
   15.98 --  while (1)
   15.99 -+  do
  15.100 -+    {
  15.101 -+      if (! l->l_real->l_relocated)
  15.102 -+	++nmaps;
  15.103 -+      l = l->l_next;
  15.104 -+    }
  15.105 -+  while (l != NULL);
  15.106 -+  struct link_map *maps[nmaps];
  15.107 -+  nmaps = 0;
  15.108 -+  l = new;
  15.109 -+  do
  15.110 -     {
  15.111 -       if (! l->l_real->l_relocated)
  15.112 -+	maps[nmaps++] = l;
  15.113 -+      l = l->l_next;
  15.114 -+    }
  15.115 -+  while (l != NULL);
  15.116 -+  if (nmaps > 1)
  15.117 -+    {
  15.118 -+      char seen[nmaps];
  15.119 -+      memset (seen, '\0', nmaps);
  15.120 -+      size_t i = 0;
  15.121 -+      while (1)
  15.122 - 	{
  15.123 --#ifdef SHARED
  15.124 --	  if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
  15.125 -+	  ++seen[i];
  15.126 -+	  struct link_map *thisp = maps[i];
  15.127 -+
  15.128 -+	  /* Find the last object in the list for which the current one is
  15.129 -+	     a dependency and move the current object behind the object
  15.130 -+	     with the dependency.  */
  15.131 -+	  size_t k = nmaps - 1;
  15.132 -+	  while (k > i)
  15.133 - 	    {
  15.134 --	      /* If this here is the shared object which we want to profile
  15.135 --		 make sure the profile is started.  We can find out whether
  15.136 --		 this is necessary or not by observing the `_dl_profile_map'
  15.137 --		 variable.  If was NULL but is not NULL afterwars we must
  15.138 --		 start the profiling.  */
  15.139 --	      struct link_map *old_profile_map = GL(dl_profile_map);
  15.140 -+	      struct link_map **runp = maps[k]->l_initfini;
  15.141 -+	      if (runp != NULL)
  15.142 -+		/* Look through the dependencies of the object.  */
  15.143 -+		while (*runp != NULL)
  15.144 -+		  if (__builtin_expect (*runp++ == thisp, 0))
  15.145 -+		    {
  15.146 -+		      /* Move the current object to the back past the last
  15.147 -+			 object with it as the dependency.  */
  15.148 -+		      memmove (&maps[i], &maps[i + 1],
  15.149 -+			       (k - i) * sizeof (maps[0]));
  15.150 -+		      maps[k] = thisp;
  15.151 -+
  15.152 -+		      if (seen[i + 1] > 1)
  15.153 -+			{
  15.154 -+			  ++i;
  15.155 -+			  goto next_clear;
  15.156 -+			}
  15.157 -+
  15.158 -+		      char this_seen = seen[i];
  15.159 -+		      memmove (&seen[i], &seen[i + 1],
  15.160 -+			       (k - i) * sizeof (seen[0]));
  15.161 -+		      seen[k] = this_seen;
  15.162 -+
  15.163 -+		      goto next;
  15.164 -+		    }
  15.165 -+
  15.166 -+	      --k;
  15.167 -+	    }
  15.168 - 
  15.169 --	      _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
  15.170 -+	  if (++i == nmaps)
  15.171 -+	    break;
  15.172 -+	next_clear:
  15.173 -+	  memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
  15.174 -+	next:;
  15.175 -+	}
  15.176 -+    }
  15.177 - 
  15.178 --	      if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
  15.179 --		{
  15.180 --		  /* We must prepare the profiling.  */
  15.181 --		  _dl_start_profile ();
  15.182 -+  for (size_t i = nmaps; i-- > 0; )
  15.183 -+    {
  15.184 -+      l = maps[i];
  15.185 - 
  15.186 --		  /* Prevent unloading the object.  */
  15.187 --		  GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
  15.188 --		}
  15.189 -+#ifdef SHARED
  15.190 -+      if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
  15.191 -+	{
  15.192 -+	  /* If this here is the shared object which we want to profile
  15.193 -+	     make sure the profile is started.  We can find out whether
  15.194 -+	     this is necessary or not by observing the `_dl_profile_map'
  15.195 -+	     variable.  If it was NULL but is not NULL afterwars we must
  15.196 -+	     start the profiling.  */
  15.197 -+	  struct link_map *old_profile_map = GL(dl_profile_map);
  15.198 -+
  15.199 -+	  _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
  15.200 -+
  15.201 -+	  if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
  15.202 -+	    {
  15.203 -+	      /* We must prepare the profiling.  */
  15.204 -+	      _dl_start_profile ();
  15.205 -+
  15.206 -+	      /* Prevent unloading the object.  */
  15.207 -+	      GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
  15.208 - 	    }
  15.209 --	  else
  15.210 --#endif
  15.211 --	    _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
  15.212 - 	}
  15.213 --
  15.214 --      if (l == new)
  15.215 --	break;
  15.216 --      l = l->l_prev;
  15.217 -+      else
  15.218 -+#endif
  15.219 -+	_dl_relocate_object (l, l->l_scope, reloc_mode, 0);
  15.220 -     }
  15.221 - 
  15.222 -   /* If the file is not loaded now as a dependency, add the search
  15.223 -diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
  15.224 -new file mode 100644
  15.225 -index 0000000..972100c
  15.226 ---- /dev/null
  15.227 -+++ b/elf/tst-relsort1.c
  15.228 -@@ -0,0 +1,19 @@
  15.229 -+#include <dlfcn.h>
  15.230 -+#include <stdio.h>
  15.231 -+
  15.232 -+
  15.233 -+static int
  15.234 -+do_test ()
  15.235 -+{
  15.236 -+  const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
  15.237 -+  void *h = dlopen (lib, RTLD_NOW);
  15.238 -+  if (h == NULL)
  15.239 -+    {
  15.240 -+      puts (dlerror ());
  15.241 -+      return 1;
  15.242 -+    }
  15.243 -+  return 0;
  15.244 -+}
  15.245 -+
  15.246 -+#define TEST_FUNCTION do_test ()
  15.247 -+#include "../test-skeleton.c"
  15.248 -diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
  15.249 -new file mode 100644
  15.250 -index 0000000..9e4a943
  15.251 ---- /dev/null
  15.252 -+++ b/elf/tst-relsort1mod1.c
  15.253 -@@ -0,0 +1,7 @@
  15.254 -+extern int foo (double);
  15.255 -+
  15.256 -+int
  15.257 -+bar (void)
  15.258 -+{
  15.259 -+  return foo (1.2);
  15.260 -+}
  15.261 -diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
  15.262 -new file mode 100644
  15.263 -index 0000000..a2c3e55
  15.264 ---- /dev/null
  15.265 -+++ b/elf/tst-relsort1mod2.c
  15.266 -@@ -0,0 +1,7 @@
  15.267 -+#include <math.h>
  15.268 -+
  15.269 -+int
  15.270 -+foo (double d)
  15.271 -+{
  15.272 -+  return floor (d) != 0.0;
  15.273 -+}
  15.274 --- 
  15.275 -1.7.3.4
  15.276 -