wok-undigest rev 1182

Add libgio(2.32.->2.43.), glibc(with mtune), kde-menu, build mplayer (1.2)
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Mon Nov 02 07:47:23 2015 +0100 (2015-11-02)
parents f836b85e4c0d
children ddc4ee6b8d87
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/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-CVE-2015-0235.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 gnome-panel/receipt kde-menu/receipt libgio-dev/receipt libgio/receipt libgweather-dev/receipt libgweather/receipt mplayer/receipt
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/glibc-base/receipt	Mon Nov 02 07:47:23 2015 +0100
     1.3 @@ -0,0 +1,136 @@
     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 arm x86_64"
    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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/glibc-base/stuff/arm-files.list	Mon Nov 02 07:47:23 2015 +0100
     2.3 @@ -0,0 +1,41 @@
     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/Europe/Madrid
    2.35 +/usr/share/zoneinfo/Europe/London
    2.36 +/usr/share/zoneinfo/Europe/Zurich
    2.37 +/usr/share/zoneinfo/Europe/Paris
    2.38 +/usr/share/zoneinfo/UTC
    2.39 +/usr/share/zoneinfo/CET
    2.40 +/usr/share/zoneinfo/America/Montreal
    2.41 +/usr/share/zoneinfo/America/New_York
    2.42 +/usr/share/zoneinfo/America/Los_Angeles
    2.43 +/usr/share/zoneinfo/America/Sao_Paulo
    2.44 +/usr/share/zoneinfo/America/Mexico_City
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/glibc-base/stuff/i486-files.list	Mon Nov 02 07:47:23 2015 +0100
     3.3 @@ -0,0 +1,80 @@
     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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/glibc-base/stuff/mkdir.list	Mon Nov 02 07:47:23 2015 +0100
     4.3 @@ -0,0 +1,10 @@
     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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/glibc-base/stuff/wanted-files.list	Mon Nov 02 07:47:23 2015 +0100
     5.3 @@ -0,0 +1,80 @@
     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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/glibc-dev/receipt	Mon Nov 02 07:47:23 2015 +0100
     6.3 @@ -0,0 +1,42 @@
     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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/glibc/receipt	Mon Nov 02 07:47:23 2015 +0100
     7.3 @@ -0,0 +1,156 @@
     7.4 +# SliTaz package receipt.
     7.5 +
     7.6 +PACKAGE="glibc"
     7.7 +VERSION="2.14.1"
     7.8 +CATEGORY="meta"
     7.9 +SHORT_DESC="The GNU C libraries. This package is used to compile the libc."
    7.10 +MAINTAINER="pankso@slitaz.org"
    7.11 +LICENSE="GPL2"
    7.12 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    7.13 +WEB_SITE="http://www.gnu.org/software/libc/"
    7.14 +WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    7.15 +
    7.16 +DEPENDS="glibc-base glibc-locale glibc-dev"
    7.17 +BUILD_DEPENDS="linux-api-headers autoconf bash"
    7.18 +
    7.19 +# Genpkg order for tazwok.
    7.20 +COOK_OPT="genpkg=glibc-base:glibc-extra-samba:glib-locale:glibc-dev"
    7.21 +	
    7.22 +# Rules to compile & install the temporary toolchain.
    7.23 +cook_tmp_toolchain()
    7.24 +{
    7.25 +	cd $src
    7.26 +	
    7.27 +	# Glibc Bug Fixes Patch from LFS
    7.28 +	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
    7.29 +	# Glibc Bug Sort Relocatable Objects Patch
    7.30 +	patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
    7.31 +	# Fix a bug that prevents Glibc from building with GCC-4.6.2
    7.32 +	patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
    7.33 +	# GHOST
    7.34 +	patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
    7.35 +
    7.36 +	# Build in a separate directory.
    7.37 +	mkdir ../glibc-build && cd ../glibc-build
    7.38 +
    7.39 +	# glibc no longer support i386, so use -march=i486 for better compatibility.
    7.40 +	# If i686 ???
    7.41 +	unset CFLAGS CXXFLAGS
    7.42 +	case $ARCH in
    7.43 +		i386|i486)
    7.44 +			echo "CFLAGS += -O2 -march=i486 -mtune=i686" > configparms ;;
    7.45 +		*)
    7.46 +			echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
    7.47 +	esac
    7.48 +
    7.49 +	{ $src/configure \
    7.50 +		--host=$HOST_SYSTEM \
    7.51 +		--build=$($src/scripts/config.guess) \
    7.52 +		--disable-profile --enable-add-ons \
    7.53 +		--enable-kernel=2.6.30 --with-headers=/tools/include \
    7.54 +		libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
    7.55 +	make &&
    7.56 +	make install
    7.57 +	} || return 1
    7.58 +
    7.59 +	# Link compiler to this new glibc.
    7.60 +	SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
    7.61 +	$HOST_SYSTEM-gcc -dumpspecs | sed \
    7.62 +		-e 's@/lib\(64\)\?/ld@/tools&@g' \
    7.63 +		-e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 
    7.64 +	unset SPECS
    7.65 +}
    7.66 +
    7.67 +# Rules to configure and make the package.
    7.68 +compile_rules()
    7.69 +{
    7.70 +	# SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
    7.71 +	# default to build package will not ensure package work with Busybox awk
    7.72 +	# and so should NOT be use to cook.
    7.73 +	if [ -x /usr/bin/cook ]; then
    7.74 +		[ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
    7.75 +	fi
    7.76 +
    7.77 +	# Make 4.x support...
    7.78 +	# sed -i 's/3\.79/4.* | &/' configure*
    7.79 +	# Fixes and patches from LFS, Redhat
    7.80 +	sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
    7.81 +	sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
    7.82 +
    7.83 +	# Glibc misc Bug Fixes
    7.84 +	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
    7.85 +	
    7.86 +	# Glibc Bug Sort Relocatable Objects Patch
    7.87 +	#patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
    7.88 +	
    7.89 +	# Fix a bug that prevents Glibc from building with GCC-4.6.2
    7.90 +	patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
    7.91 +	
    7.92 +	# Revert commit causing issues with crappy DNS servers
    7.93 +	patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
    7.94 +	
    7.95 +	# re-export RPC interface until libtirpc is ready as a replacement
    7.96 +	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
    7.97 +	patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
    7.98 +	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
    7.99 +	patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
   7.100 +	# GHOST
   7.101 +	patch -Np1 -i $stuff/glibc-2.14.1-CVE-2015-0235.patch
   7.102 +
   7.103 +	# Fix a stack imbalance that occurs under some conditions:
   7.104 +	sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
   7.105 +		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
   7.106 +		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
   7.107 +
   7.108 +	# Glibc needs ld.so.conf in the install destdir.
   7.109 +	mkdir -p $WOK/$PACKAGE/install/etc
   7.110 +	touch $WOK/$PACKAGE/install/etc/ld.so.conf
   7.111 +	mkdir ../glibc-build && cd ../glibc-build
   7.112 +	
   7.113 +	# Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
   7.114 +	# --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
   7.115 +	# "The higher the VERSION number is, the less compatibility code is
   7.116 +	# added, and the faster the code gets."
   7.117 +	unset CFLAGS CXXFLAGS
   7.118 +	case "$ARCH" in
   7.119 +		i386|i486)
   7.120 +			echo "CFLAGS += -O2 -march=i486 -mtune=i686" > configparms ;;
   7.121 +		*)
   7.122 +			echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
   7.123 +	esac
   7.124 +	{ $src/configure \
   7.125 +		--disable-profile \
   7.126 +		--enable-add-ons \
   7.127 +		--enable-kernel=2.6.30 \
   7.128 +		--libexecdir=/usr/lib/glibc \
   7.129 +		--build=$HOST_SYSTEM \
   7.130 +		--host=$HOST_SYSTEM \
   7.131 +		--target=$BUILD_SYSTEM &&
   7.132 +	make && make install_root=$DESTDIR install
   7.133 +	} || return 1
   7.134 +
   7.135 +	# If temporary toolchain was previously used, switch to regular toolchain.
   7.136 +	[ -d /tools ] || return
   7.137 +	mv /tools/bin/ld /tools/bin/ld-old
   7.138 +	mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
   7.139 +	mv /tools/bin/ld-new /tools/bin/ld
   7.140 +	ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
   7.141 +	gcc -dumpspecs | sed -e 's@/tools@@g' \
   7.142 +		-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
   7.143 +		-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
   7.144 +		`dirname $(gcc --print-libgcc-file-name)`/specs
   7.145 +}
   7.146 +
   7.147 +# Rules to gen a SliTaz package suitable for Tazpkg.
   7.148 +genpkg_rules()
   7.149 +{
   7.150 +	LOCALE=""
   7.151 +	mkdir -p $fs/var
   7.152 +
   7.153 +	# Remove build directory.
   7.154 +	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
   7.155 +	rm -rf $WOK/$PACKAGE/$PACKAGE-build
   7.156 +
   7.157 +	# check install
   7.158 +	ls $install/lib/
   7.159 +}
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/glibc/stuff/glibc-2.13-gcc_fix-1.patch	Mon Nov 02 07:47:23 2015 +0100
     8.3 @@ -0,0 +1,49 @@
     8.4 +Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
     8.5 +Date:                    2010-04-18
     8.6 +Initial Package Version: 2.11.1
     8.7 +Upstream Status:         Not Submitted
     8.8 +Origin:                  http://www.eglibc.org/archives/patches/msg00073.html
     8.9 +Description:             Fixes the following build problem with GCC-4.5.0:
    8.10 +
    8.11 +/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
    8.12 +./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
    8.13 +./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
    8.14 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    8.15 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    8.16 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    8.17 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
    8.18 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
    8.19 +./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
    8.20 +./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
    8.21 +./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
    8.22 +make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
    8.23 +
    8.24 +diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
    8.25 +--- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c	2009-12-08 20:10:20.000000000 +0000
    8.26 ++++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c	2010-04-17 11:34:06.882681001 +0000
    8.27 +@@ -45,6 +45,11 @@
    8.28 + /* Embed an #include to pull in the alignment and .end directives. */
    8.29 + asm ("\n#include \"defs.h\"");
    8.30 + 
    8.31 ++asm ("\n#if defined __i686 && defined __ASSEMBLER__");
    8.32 ++asm ("\n#undef __i686");
    8.33 ++asm ("\n#define __i686 __i686");
    8.34 ++asm ("\n#endif");
    8.35 ++
    8.36 + /* The initial common code ends here. */
    8.37 + asm ("\n/*@HEADER_ENDS*/");
    8.38 + 
    8.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
    8.40 +--- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2009-12-08 20:10:20.000000000 +0000
    8.41 ++++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h	2010-04-17 11:34:06.882681001 +0000
    8.42 +@@ -29,6 +29,10 @@
    8.43 + #include <dl-sysdep.h>
    8.44 + #include <tls.h>
    8.45 + 
    8.46 ++#if defined __i686 && defined __ASSEMBLER__
    8.47 ++#undef __i686
    8.48 ++#define __i686 __i686
    8.49 ++#endif
    8.50 + 
    8.51 + /* For Linux we can use the system call table in the header file
    8.52 + 	/usr/include/asm/unistd.h
     9.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.2 +++ b/glibc/stuff/glibc-2.14-reexport-rpc-interface.patch	Mon Nov 02 07:47:23 2015 +0100
     9.3 @@ -0,0 +1,26 @@
     9.4 +diff --git a/include/libc-symbols.h b/include/libc-symbols.h
     9.5 +index 67e1ca2..5e7cca5 100644
     9.6 +--- a/include/libc-symbols.h
     9.7 ++++ b/include/libc-symbols.h
     9.8 +@@ -635,7 +635,7 @@ for linking")
     9.9 + # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
    9.10 + # define libc_hidden_def(name) hidden_def (name)
    9.11 + # define libc_hidden_weak(name) hidden_weak (name)
    9.12 +-# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
    9.13 ++# define libc_hidden_nolink(name, version) hidden_def (name)
    9.14 + # define libc_hidden_ver(local, name) hidden_ver (local, name)
    9.15 + # define libc_hidden_data_def(name) hidden_data_def (name)
    9.16 + # define libc_hidden_data_weak(name) hidden_data_weak (name)
    9.17 +diff --git a/sunrpc/Makefile b/sunrpc/Makefile
    9.18 +index 5134ce9..40c73d1 100644
    9.19 +--- a/sunrpc/Makefile
    9.20 ++++ b/sunrpc/Makefile
    9.21 +@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
    9.22 + 				    des_crypt.h)
    9.23 + headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
    9.24 + 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
    9.25 +-headers = rpc/netdb.h
    9.26 ++headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
    9.27 + install-others = $(inst_sysconfdir)/rpc
    9.28 + generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
    9.29 + 	    $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
    10.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.2 +++ b/glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch	Mon Nov 02 07:47:23 2015 +0100
    10.3 @@ -0,0 +1,28 @@
    10.4 +From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
    10.5 +From: Andreas Schwab <schwab@redhat.com>
    10.6 +Date: Tue, 17 May 2011 17:42:30 +0200
    10.7 +Subject: [PATCH] Reinstall NIS RPC headers
    10.8 +
    10.9 +---
   10.10 + nis/Makefile |    4 ++--
   10.11 + 1 files changed, 2 insertions(+), 2 deletions(-)
   10.12 +
   10.13 +diff --git a/nis/Makefile b/nis/Makefile
   10.14 +index b5c9609..d2934d9 100644
   10.15 +--- a/nis/Makefile
   10.16 ++++ b/nis/Makefile
   10.17 +@@ -23,9 +23,9 @@ subdir	:= nis
   10.18 + 
   10.19 + aux			:= nis_hash
   10.20 + 
   10.21 ++headers			:= $(wildcard rpcsvc/*.[hx])
   10.22 + distribute		:= nss-nis.h nss-nisplus.h nis_intern.h Banner \
   10.23 +-			   nisplus-parser.h nis_xdr.h nss \
   10.24 +-			   $(wildcard rpcsvc/*.[hx])
   10.25 ++			   nisplus-parser.h nis_xdr.h nss
   10.26 + 
   10.27 + # These are the databases available for the nis (and perhaps later nisplus)
   10.28 + # service.  This must be a superset of the services in nss.
   10.29 +-- 
   10.30 +1.7.5.4
   10.31 +
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/glibc/stuff/glibc-2.14-revert-4768ae77.patch	Mon Nov 02 07:47:23 2015 +0100
    11.3 @@ -0,0 +1,37 @@
    11.4 +diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
    11.5 +--- glibc-orig//resolv/res_send.c	2011-06-10 18:59:03.041436996 +1000
    11.6 ++++ glibc/resolv/res_send.c	2011-06-10 19:08:09.379309323 +1000
    11.7 +@@ -549,7 +549,7 @@
    11.8 +				    ns, ansp, ansp2, nansp2, resplen2);
    11.9 +			if (n < 0)
   11.10 +				return (-1);
   11.11 +-			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   11.12 ++			if (n == 0)
   11.13 +				goto next_ns;
   11.14 +		} else {
   11.15 +			/* Use datagrams. */
   11.16 +@@ -559,7 +559,7 @@
   11.17 +				    ansp2, nansp2, resplen2);
   11.18 +			if (n < 0)
   11.19 +				return (-1);
   11.20 +-			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   11.21 ++			if (n == 0)
   11.22 +				goto next_ns;
   11.23 +			if (v_circuit)
   11.24 +			  // XXX Check whether both requests failed or
   11.25 +@@ -1275,14 +1275,10 @@
   11.26 +				(*thisresplenp > *thisanssizp)
   11.27 +				? *thisanssizp : *thisresplenp);
   11.28 +
   11.29 +-			if (recvresp1 || (buf2 != NULL && recvresp2)) {
   11.30 +-			  *resplen2 = 0;
   11.31 ++			if (recvresp1 || (buf2 != NULL && recvresp2))
   11.32 +			  return resplen;
   11.33 +-			}
   11.34 +			if (buf2 != NULL)
   11.35 +			  {
   11.36 +-			    /* No data from the first reply.  */
   11.37 +-			    resplen = 0;
   11.38 +			    /* We are waiting for a possible second reply.  */
   11.39 +			    if (hp->id == anhp->id)
   11.40 +			      recvresp1 = 1;
    12.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.2 +++ b/glibc/stuff/glibc-2.14.1-CVE-2015-0235.patch	Mon Nov 02 07:47:23 2015 +0100
    12.3 @@ -0,0 +1,149 @@
    12.4 +CVE-2015-0235 GHOST
    12.5 +From https://sourceware.org/git/?p=glibc.git;a=commit;h=d5dd6189d506068ed11c8bfa1e1e9bffde04decd
    12.6 +--- glibc-2.14.1/nss/digits_dots.c
    12.7 ++++ glibc-2.14.1/nss/digits_dots.c
    12.8 +@@ -47,7 +47,10 @@
    12.9 +     {
   12.10 +       if (h_errnop)
   12.11 + 	*h_errnop = NETDB_INTERNAL;
   12.12 +-      *result = NULL;
   12.13 ++      if (buffer_size == NULL)
   12.14 ++        *status = NSS_STATUS_TRYAGAIN;
   12.15 ++      else
   12.16 ++        *result = NULL;
   12.17 +       return -1;
   12.18 +     }
   12.19 + 
   12.20 +@@ -84,14 +87,16 @@
   12.21 + 	}
   12.22 + 
   12.23 +       size_needed = (sizeof (*host_addr)
   12.24 +-		     + sizeof (*h_addr_ptrs) + strlen (name) + 1);
   12.25 ++		     + sizeof (*h_addr_ptrs)
   12.26 ++		     + sizeof (*h_alias_ptr) + strlen (name) + 1);
   12.27 + 
   12.28 +       if (buffer_size == NULL)
   12.29 +         {
   12.30 + 	  if (buflen < size_needed)
   12.31 + 	    {
   12.32 ++	      *status = NSS_STATUS_TRYAGAIN;
   12.33 + 	      if (h_errnop != NULL)
   12.34 +-		*h_errnop = TRY_AGAIN;
   12.35 ++		*h_errnop = NETDB_INTERNAL;
   12.36 + 	      __set_errno (ERANGE);
   12.37 + 	      goto done;
   12.38 + 	    }
   12.39 +@@ -110,7 +115,7 @@
   12.40 + 	      *buffer_size = 0;
   12.41 + 	      __set_errno (save);
   12.42 + 	      if (h_errnop != NULL)
   12.43 +-		*h_errnop = TRY_AGAIN;
   12.44 ++		*h_errnop = NETDB_INTERNAL;
   12.45 + 	      *result = NULL;
   12.46 + 	      goto done;
   12.47 + 	    }
   12.48 +@@ -150,7 +155,9 @@
   12.49 + 		  if (! ok)
   12.50 + 		    {
   12.51 + 		      *h_errnop = HOST_NOT_FOUND;
   12.52 +-		      if (buffer_size)
   12.53 ++		      if (buffer_size == NULL)
   12.54 ++		        *status = NSS_STATUS_NOTFOUND;
   12.55 ++		      else
   12.56 + 			*result = NULL;
   12.57 + 		      goto done;
   12.58 + 		    }
   12.59 +@@ -202,15 +209,6 @@
   12.60 + 
   12.61 +       if ((isxdigit (name[0]) && strchr (name, ':') != NULL) || name[0] == ':')
   12.62 + 	{
   12.63 +-	  const char *cp;
   12.64 +-	  char *hostname;
   12.65 +-	  typedef unsigned char host_addr_t[16];
   12.66 +-	  host_addr_t *host_addr;
   12.67 +-	  typedef char *host_addr_list_t[2];
   12.68 +-	  host_addr_list_t *h_addr_ptrs;
   12.69 +-	  size_t size_needed;
   12.70 +-	  int addr_size;
   12.71 +-
   12.72 + 	  switch (af)
   12.73 + 	    {
   12.74 + 	    default:
   12.75 +@@ -226,7 +224,10 @@
   12.76 + 	      /* This is not possible.  We cannot represent an IPv6 address
   12.77 + 		 in an `struct in_addr' variable.  */
   12.78 + 	      *h_errnop = HOST_NOT_FOUND;
   12.79 +-	      *result = NULL;
   12.80 ++	      if (buffer_size == NULL)
   12.81 ++	        *status = NSS_STATUS_NOTFOUND;
   12.82 ++	      else
   12.83 ++	        *result = NULL;
   12.84 + 	      goto done;
   12.85 + 
   12.86 + 	    case AF_INET6:
   12.87 +@@ -234,42 +235,6 @@
   12.88 + 	      break;
   12.89 + 	    }
   12.90 + 
   12.91 +-	  size_needed = (sizeof (*host_addr)
   12.92 +-			 + sizeof (*h_addr_ptrs) + strlen (name) + 1);
   12.93 +-
   12.94 +-	  if (buffer_size == NULL && buflen < size_needed)
   12.95 +-	    {
   12.96 +-	      if (h_errnop != NULL)
   12.97 +-		*h_errnop = TRY_AGAIN;
   12.98 +-	      __set_errno (ERANGE);
   12.99 +-	      goto done;
  12.100 +-	    }
  12.101 +-	  else if (buffer_size != NULL && *buffer_size < size_needed)
  12.102 +-	    {
  12.103 +-	      char *new_buf;
  12.104 +-	      *buffer_size = size_needed;
  12.105 +-	      new_buf = realloc (*buffer, *buffer_size);
  12.106 +-
  12.107 +-	      if (new_buf == NULL)
  12.108 +-		{
  12.109 +-		  save = errno;
  12.110 +-		  free (*buffer);
  12.111 +-		  __set_errno (save);
  12.112 +-		  *buffer = NULL;
  12.113 +-		  *buffer_size = 0;
  12.114 +-		  *result = NULL;
  12.115 +-		  goto done;
  12.116 +-		}
  12.117 +-	      *buffer = new_buf;
  12.118 +-	    }
  12.119 +-
  12.120 +-	  memset (*buffer, '\0', size_needed);
  12.121 +-
  12.122 +-	  host_addr = (host_addr_t *) *buffer;
  12.123 +-	  h_addr_ptrs = (host_addr_list_t *)
  12.124 +-	    ((char *) host_addr + sizeof (*host_addr));
  12.125 +-	  hostname = (char *) h_addr_ptrs + sizeof (*h_addr_ptrs);
  12.126 +-
  12.127 + 	  for (cp = name;; ++cp)
  12.128 + 	    {
  12.129 + 	      if (!*cp)
  12.130 +@@ -282,7 +247,9 @@
  12.131 + 		  if (inet_pton (AF_INET6, name, host_addr) <= 0)
  12.132 + 		    {
  12.133 + 		      *h_errnop = HOST_NOT_FOUND;
  12.134 +-		      if (buffer_size)
  12.135 ++		      if (buffer_size == NULL)
  12.136 ++		        *status = NSS_STATUS_NOTFOUND;
  12.137 ++		      else
  12.138 + 			*result = NULL;
  12.139 + 		      goto done;
  12.140 + 		    }
  12.141 +--- glibc-2.14.1/nss/getXXbyYY_r.c
  12.142 ++++ glibc-2.14.1/nss/getXXbyYY_r.c
  12.143 +@@ -180,6 +180,9 @@
  12.144 +     case -1:
  12.145 +       return errno;
  12.146 +     case 1:
  12.147 ++#ifdef NEED_H_ERRNO
  12.148 ++      any_service = true;
  12.149 ++#endif
  12.150 +       goto done;
  12.151 +     }
  12.152 + #endif
    13.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.2 +++ b/glibc/stuff/glibc-2.14.1-fixes-1.patch	Mon Nov 02 07:47:23 2015 +0100
    13.3 @@ -0,0 +1,159 @@
    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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/glibc/stuff/glibc-2.14.1-gcc_fix-1.patch	Mon Nov 02 07:47:23 2015 +0100
    14.3 @@ -0,0 +1,49 @@
    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 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/glibc/stuff/glibc-2.14.1-sort-1.patch	Mon Nov 02 07:47:23 2015 +0100
    15.3 @@ -0,0 +1,273 @@
    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 +
    16.1 --- a/gnome-panel/receipt	Mon Nov 02 06:14:54 2015 +0100
    16.2 +++ b/gnome-panel/receipt	Mon Nov 02 07:47:23 2015 +0100
    16.3 @@ -14,7 +14,7 @@
    16.4  libwnck libsoup libgweather"
    16.5  BUILD_DEPENDS="GConf-dev gtk+-dev librsvg-dev gnome-desktop-dev gnome-menus-dev
    16.6  dbus-glib-dev libcanberra-dev python-dev libwnck-dev libgweather-dev \
    16.7 -libsoup-dev gnome-doc-utils-dev"
    16.8 +libsoup-dev gnome-doc-utils-dev libgio-dev"
    16.9  
   16.10  # Rules to configure and make the package.
   16.11  compile_rules()
   16.12 @@ -47,3 +47,4 @@
   16.13  		$fs/usr/share/icons/hicolor
   16.14  	rm $fs/usr/share/gnome-panelrc
   16.15  }
   16.16 +
    17.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.2 +++ b/kde-menu/receipt	Mon Nov 02 07:47:23 2015 +0100
    17.3 @@ -0,0 +1,16 @@
    17.4 +# SliTaz package receipt.
    17.5 +
    17.6 +PACKAGE="kde-menu"
    17.7 +VERSION="4.14.3"
    17.8 +CATEGORY="development"
    17.9 +SHORT_DESC="KDElibs include files."
   17.10 +MAINTAINER="pankso@slitaz.org"
   17.11 +LICENSE="GPL2"
   17.12 +WANTED="kdelibs"
   17.13 +WEB_SITE="http://www.kde.org/"
   17.14 +
   17.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
   17.16 +genpkg_rules()
   17.17 +{
   17.18 +	cp -a $install/etc $fs
   17.19 +}
    18.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.2 +++ b/libgio-dev/receipt	Mon Nov 02 07:47:23 2015 +0100
    18.3 @@ -0,0 +1,22 @@
    18.4 +# SliTaz package receipt.
    18.5 +
    18.6 +PACKAGE="libgio-dev"
    18.7 +VERSION="2.43.3"
    18.8 +CATEGORY="development"
    18.9 +SHORT_DESC="Glib libgio devel files."
   18.10 +MAINTAINER="pankso@slitaz.org"
   18.11 +LICENSE="GPL2"
   18.12 +WANTED="glib"
   18.13 +WEB_SITE="http://www.gtk.org/"
   18.14 +HOST_ARCH="i486 arm"
   18.15 +
   18.16 +DEPENDS="libgio pkg-config"
   18.17 +
   18.18 +# Rules to gen a SliTaz package suitable for Tazpkg.
   18.19 +genpkg_rules()
   18.20 +{
   18.21 +	mkdir -p $fs/usr/lib/pkgconfig $fs/usr/include
   18.22 +	cp -a $install/usr/lib/libgio*.*a $fs/usr/lib
   18.23 +	cp -a $install/usr/lib/pkgconfig/gio*.pc $fs/usr/lib/pkgconfig
   18.24 +	cp -a $install/usr/include/gio-unix-2.0 $fs/usr/include
   18.25 +}
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/libgio/receipt	Mon Nov 02 07:47:23 2015 +0100
    19.3 @@ -0,0 +1,20 @@
    19.4 +# SliTaz package receipt.
    19.5 +
    19.6 +PACKAGE="libgio"
    19.7 +VERSION="2.43.3"
    19.8 +CATEGORY="x-window"
    19.9 +SHORT_DESC="Glib libgio shared library."
   19.10 +MAINTAINER="pankso@slitaz.org"
   19.11 +LICENSE="GPL2"
   19.12 +WANTED="glib"
   19.13 +WEB_SITE="http://www.gtk.org/"
   19.14 +HOST_ARCH="i486 arm"
   19.15 +
   19.16 +DEPENDS="glib"
   19.17 +
   19.18 +# Rules to gen a SliTaz package suitable for Tazpkg.
   19.19 +genpkg_rules()
   19.20 +{
   19.21 +    mkdir -p $fs/usr/lib
   19.22 +    cp -a $install/usr/lib/libgio*.so* $fs/usr/lib
   19.23 +}
    20.1 --- a/libgweather-dev/receipt	Mon Nov 02 06:14:54 2015 +0100
    20.2 +++ b/libgweather-dev/receipt	Mon Nov 02 07:47:23 2015 +0100
    20.3 @@ -19,3 +19,4 @@
    20.4  	cp -a $install/usr/lib/pkgconfig $fs/usr/lib
    20.5  	cp -a $install/usr/include $fs/usr
    20.6  }
    20.7 +
    21.1 --- a/libgweather/receipt	Mon Nov 02 06:14:54 2015 +0100
    21.2 +++ b/libgweather/receipt	Mon Nov 02 07:47:23 2015 +0100
    21.3 @@ -11,7 +11,7 @@
    21.4  WGET_URL="http://ftp.gnome.org/pub/gnome/sources/$PACKAGE/${VERSION%.*}/$TARBALL"
    21.5  
    21.6  DEPENDS="GConf gtk+ libsoup"
    21.7 -BUILD_DEPENDS="GConf-dev gtk+-dev libsoup-dev glib-dev sqlite-dev"
    21.8 +BUILD_DEPENDS="GConf-dev gtk+-dev libsoup-dev glib-dev sqlite-dev libgio-dev"
    21.9  
   21.10  # Rules to configure and make the package.
   21.11  compile_rules()
    22.1 --- a/mplayer/receipt	Mon Nov 02 06:14:54 2015 +0100
    22.2 +++ b/mplayer/receipt	Mon Nov 02 07:47:23 2015 +0100
    22.3 @@ -18,7 +18,7 @@
    22.4  BUILD_DEPENDS="gtk+-dev libmad-dev xorg-libXv-dev \
    22.5  alsa-lib-dev ncurses-dev xorg-libXdamage-dev giflib-dev \
    22.6  xorg-libXxf86vm-dev enca-dev \
    22.7 -zlib-dev xorg-xextproto pkg-config yasm glib-dev"
    22.8 +zlib-dev xorg-xextproto pkg-config yasm glib-dev libgio-dev"
    22.9  
   22.10  # Rules to configure and make the package.
   22.11  compile_rules()
   22.12 @@ -31,7 +31,7 @@
   22.13  		--confdir=/etc/mplayer \
   22.14  		--libdir=/usr/lib/mplayer \
   22.15  		--enable-gui \
   22.16 -	--disable-mencoder \
   22.17 +		--disable-mencoder \
   22.18  		--language="en de es fr it ru" \
   22.19  		--disable-gl \
   22.20  		--disable-jack \