wok-undigest rev 685

Remove toolchain packages now in cooking
author Christophe Lincoln <pankso@slitaz.org>
date Fri Apr 13 12:17:50 2012 +0200 (2012-04-13)
parents 534f7e1d302d
children c2fb75825917
files binutils/description.txt binutils/receipt gcc-lib-base/description.txt gcc-lib-base/receipt gcc/description.txt gcc/receipt gcc/stuff/gcc-4.5.2-startfiles_fix-1.patch gfortran/receipt glibc-base/receipt glibc-base/stuff/mkdir.list glibc-base/stuff/wanted-files.list glibc-dev/receipt glibc-extra-samba/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 libgfortran/receipt libgomp/receipt libobjc/receipt linux-api-headers/receipt mpc-library/receipt slitaz-toolchain/receipt
line diff
     1.1 --- a/binutils/description.txt	Fri Apr 13 09:36:37 2012 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,4 +0,0 @@
     1.4 -The GNU Binutils are a collection of binary tools. The main ones are:
     1.5 -
     1.6 -    ld - the GNU linker.
     1.7 -    as - the GNU assembler.
     2.1 --- a/binutils/receipt	Fri Apr 13 09:36:37 2012 +0200
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,89 +0,0 @@
     2.4 -# SliTaz package receipt.
     2.5 -
     2.6 -PACKAGE="binutils"
     2.7 -VERSION="2.22"
     2.8 -CATEGORY="development"
     2.9 -SHORT_DESC="GNU assembler, linker and binary utilities."
    2.10 -MAINTAINER="pankso@slitaz.org"
    2.11 -TARBALL="$PACKAGE-$VERSION.tar.bz2"
    2.12 -WEB_SITE="http://www.gnu.org/software/binutils/"
    2.13 -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    2.14 -PROVIDE="libbfd"
    2.15 -TAGS="assembler linker"
    2.16 -
    2.17 -DEPENDS="glibc zlib"
    2.18 -BUILD_DEPENDS="glibc-dev zlib-dev"
    2.19 -
    2.20 -# Rules to compile & install the temporary toolchain.
    2.21 -precook_tmp_toolchain()
    2.22 -{
    2.23 -	mkdir -p binutils-build && cd binutils-build
    2.24 -	{ $src/configure \
    2.25 -		--target=$HOST_SYSTEM --disable-nls \
    2.26 -		--disable-werror &&
    2.27 -	make
    2.28 -	 } || return 1
    2.29 -
    2.30 -	#If building on x86_64, create a symlink to ensure the sanity of the toolchain.
    2.31 -	[ "$ARCH" = x86_64 ] && mkdir /tools/lib && ln -s lib /tools/lib64
    2.32 -
    2.33 -	make install
    2.34 -}
    2.35 -
    2.36 -cook_tmp_toolchain()
    2.37 -{
    2.38 -	mkdir -p binutils-build && cd binutils-build
    2.39 -	{ CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
    2.40 -		AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
    2.41 -		$src/configure $CONFIGURE_ARGS \
    2.42 -		--disable-nls --with-lib-path=/tools/lib &&
    2.43 -	make &&
    2.44 -	make install &&
    2.45 -	make -C ld clean &&
    2.46 -	make -C ld LIB_PATH=/usr/lib:/lib 
    2.47 -	} || return 1
    2.48 -	cp ld/ld-new /tools/bin
    2.49 -}
    2.50 -
    2.51 -# Rules to configure and make the package.
    2.52 -compile_rules()
    2.53 -{
    2.54 -	cd $src
    2.55 -	mkdir -p ../binutils-build && cd ../binutils-build
    2.56 -	$src/configure \
    2.57 -		--program-prefix=$TOOLPREFIX \
    2.58 -		--enable-shared \
    2.59 -		$CONFIGURE_ARGS &&
    2.60 -	make tooldir=/usr &&
    2.61 -	make tooldir=/usr install &&
    2.62 -	# This is the default binutils, so create symlinks to the target platform
    2.63 -	# binutil binaries. Delete duplicate binaries to save space.
    2.64 -	for binutil in $(ls -1 $DESTDIR/usr/bin | grep "${TOOLPREFIX}") ; do
    2.65 -		path="$DESTDIR/usr/bin/$(echo "$binutil" | sed "s:$TOOLPREFIX::g")"
    2.66 -		if [ -e $path ] ; then
    2.67 -			rm -f $path
    2.68 -		fi
    2.69 -		ln -s $binutil $path
    2.70 -	done
    2.71 -}
    2.72 -
    2.73 -# Rules to gen a SliTaz package suitable for Tazpkg.
    2.74 -genpkg_rules()
    2.75 -{
    2.76 -	mkdir -p $fs/usr/lib
    2.77 -	cp -a $install/usr/bin $fs/usr
    2.78 -	cp -a $install/usr/lib/*.so* $fs/usr/lib
    2.79 -	cp -a $install/usr/lib/*.a $fs/usr/lib
    2.80 -	cp -a $install/usr/include $fs/usr
    2.81 -	
    2.82 -	# libiberty.h
    2.83 -	cp -a $src/include/libiberty.h $fs/usr/include
    2.84 -	
    2.85 -	# Remove 'strings' (Busybox).
    2.86 -	#rm $fs/usr/lib/libiberty.a
    2.87 -	rm $fs/usr/bin/strings $fs/usr/bin/*-strings
    2.88 -	
    2.89 -	# Remove build directory (cookutils and tazwok path).
    2.90 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
    2.91 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
    2.92 -}
     3.1 --- a/gcc-lib-base/description.txt	Fri Apr 13 09:36:37 2012 +0200
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,3 +0,0 @@
     3.4 -The GNU Compiler Collection includes front ends for C, C++, Objective-C, 
     3.5 -Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++,
     3.6 -libgcj,...). 
     4.1 --- a/gcc-lib-base/receipt	Fri Apr 13 09:36:37 2012 +0200
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,19 +0,0 @@
     4.4 -# SliTaz package receipt.
     4.5 -
     4.6 -PACKAGE="gcc-lib-base"
     4.7 -VERSION="4.6.2"
     4.8 -CATEGORY="development"
     4.9 -SHORT_DESC="GCC base libraries, libgcc_s and libstdc++."
    4.10 -WEB_SITE="http://gcc.gnu.org/"
    4.11 -MAINTAINER="pankso@slitaz.org"
    4.12 -WANTED="gcc"
    4.13 -
    4.14 -# Rules to gen a SliTaz package suitable for Tazpkg.
    4.15 -genpkg_rules()
    4.16 -{
    4.17 -	mkdir -p $fs/usr/lib
    4.18 -	cp -a $install/usr/lib/libgcc_s.so* $fs/usr/lib
    4.19 -	cp -a $install/usr/lib/libstdc++.so* $fs/usr/lib
    4.20 -	rm $fs/usr/lib/*-gdb.py
    4.21 -}
    4.22 -
     5.1 --- a/gcc/description.txt	Fri Apr 13 09:36:37 2012 +0200
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,3 +0,0 @@
     5.4 -The GNU Compiler Collection includes front ends for C, C++, Objective-C, 
     5.5 -Fortran, Java, Ada, and Go, as well as libraries for these languages (libstdc++,
     5.6 -libgcj,...). 
     6.1 --- a/gcc/receipt	Fri Apr 13 09:36:37 2012 +0200
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,228 +0,0 @@
     6.4 -# SliTaz package receipt.
     6.5 -
     6.6 -PACKAGE="gcc"
     6.7 -VERSION="4.6.2"
     6.8 -CATEGORY="development"
     6.9 -SHORT_DESC="The the GNU Compiler Collection."
    6.10 -MAINTAINER="pankso@slitaz.org"
    6.11 -TARBALL="$PACKAGE-$VERSION.tar.bz2"
    6.12 -WEB_SITE="http://gcc.gnu.org/"
    6.13 -WGET_URL="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$VERSION/$TARBALL"
    6.14 -
    6.15 -# We need gawk since busybox awk is not sufficient. We have BUILD_DEPENDS
    6.16 -# for cookutils that are not used by tazwok/cook-toolchain since it install
    6.17 -# and use it's own copy.
    6.18 -DEPENDS="binutils libgomp libobjc gcc-lib-base mpc-library elfutils"
    6.19 -BUILD_DEPENDS="elfutils mpc-library mpfr mpfr-dev gmp gmp-dev \
    6.20 -elfutils-dev"
    6.21 -
    6.22 -# Rules to compile & install the temporary toolchain.
    6.23 -precook_tmp_toolchain()
    6.24 -{
    6.25 -	report open-bloc
    6.26 -	cd $src
    6.27 -
    6.28 -	# GCC requires the GMP, MPFR and MPC packages.
    6.29 -	tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; }
    6.30 -	tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; }
    6.31 -	tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; }
    6.32 -
    6.33 -	report step "Running compilation"
    6.34 -
    6.35 -	# Use libiberty.a from binutils.
    6.36 -	sed -i 's/install_to_$(INSTALL_DEST) //' \
    6.37 -		libiberty/Makefile.in || return 1
    6.38 -
    6.39 -	# Build it in a separate directory.
    6.40 -	mkdir ../gcc-build
    6.41 -	cd ../gcc-build
    6.42 -
    6.43 -	{ $src/configure \
    6.44 -		--target=$HOST_SYSTEM \
    6.45 -		--disable-nls --disable-shared --disable-multilib \
    6.46 -		--disable-decimal-float --disable-threads \
    6.47 -		--disable-libmudflap --disable-libssp \
    6.48 -		--disable-libgomp --enable-languages=c \
    6.49 -		--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \
    6.50 -		--without-ppl --without-cloog &&
    6.51 -	make &&
    6.52 -	make install
    6.53 -	} || { report close-bloc; return 1; }
    6.54 -
    6.55 -	# See LFS for more detais about this.
    6.56 -	ln -s libgcc.a `$HOST_SYSTEM-gcc -print-libgcc-file-name | \
    6.57 -    		sed 's/libgcc/&_eh/'`
    6.58 -	report close-bloc
    6.59 -}
    6.60 -
    6.61 -cook_tmp_toolchain()
    6.62 -{
    6.63 -	report open-bloc
    6.64 -	cd $src
    6.65 -	patch -Np1 -i $stuff/gcc-$VERSION-startfiles_fix-1.patch || { report close-bloc; return 1; }
    6.66 -
    6.67 -	# Details about theses lines are in LFS book.
    6.68 -	sed 's@\./fixinc\.sh@-c true@' -i gcc/Makefile.in
    6.69 -	sed 's/^T_CFLAGS =$/& -fomit-frame-pointer/' -i gcc/Makefile.in
    6.70 -	for file in \
    6.71 -		$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
    6.72 -	do
    6.73 -		sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
    6.74 -			-e 's@/usr@/tools@g' -i $file
    6.75 -		echo '
    6.76 -#undef STANDARD_INCLUDE_DIR
    6.77 -#define STANDARD_INCLUDE_DIR 0
    6.78 -#define STANDARD_STARTFILE_PREFIX_1 ""
    6.79 -#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
    6.80 -	done
    6.81 -
    6.82 -	if [ "$ARCH" = x86_64 ]; then
    6.83 -		for file in $(find gcc/config -name t-linux64) ; do
    6.84 -			sed '/MULTILIB_OSDIRNAMES/d' -i $file
    6.85 -		done
    6.86 -	fi
    6.87 -	
    6.88 -	# GCC requires the GMP, MPFR and MPC packages.
    6.89 -	tazwok get-src mpfr --target=$PWD/mpfr || { report close-bloc; return 1; }
    6.90 -	tazwok get-src gmp --target=$PWD/gmp || { report close-bloc; return 1; }
    6.91 -	tazwok get-src mpc-library --target=$PWD/mpc || { report close-bloc; return 1; }
    6.92 -
    6.93 -	report step "Running compilation"
    6.94 -
    6.95 -	# Use libiberty.a from binutils.
    6.96 -	sed -i 's/install_to_$(INSTALL_DEST) //' \
    6.97 -		libiberty/Makefile.in || return 1
    6.98 -
    6.99 -	# Build it in a separate directory.
   6.100 -	mkdir ../gcc-build
   6.101 -	cd ../gcc-build
   6.102 -
   6.103 -	{ CC="$HOST_SYSTEM-gcc -B/tools/lib/" \
   6.104 -		AR=$HOST_SYSTEM-ar RANLIB=$HOST_SYSTEM-ranlib \
   6.105 -		$src/configure \
   6.106 -		--with-local-prefix=/tools --enable-clocale=gnu \
   6.107 -		--enable-shared --enable-threads=posix \
   6.108 -		--enable-__cxa_atexit --enable-languages=c,c++ \
   6.109 -		--disable-libstdcxx-pch --disable-multilib \
   6.110 -		--disable-bootstrap --disable-libgomp \
   6.111 -		--with-gmp-include=$(pwd)/gmp --with-gmp-lib=$(pwd)/gmp/.libs \
   6.112 -		--without-ppl --without-cloog &&
   6.113 -	make &&
   6.114 -	make install
   6.115 -	} || { report close-bloc; return 1; }
   6.116 -	ln -s gcc /tools/bin/cc
   6.117 -	report close-bloc
   6.118 -}
   6.119 -
   6.120 -# Rules to configure and make the package.
   6.121 -compile_rules()
   6.122 -{
   6.123 -	cd $src
   6.124 -
   6.125 -	# SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
   6.126 -	# default to build package will not ensure package work with Busybox awk
   6.127 -	# and so should NOT be use to cook.
   6.128 -	if [ -x /usr/bin/cook ]; then
   6.129 -		[ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
   6.130 -	fi
   6.131 -
   6.132 -	# Package slitaz-toolchain use 'cook --options' when rebuilding
   6.133 -	# the full SliTaz toolchain.
   6.134 -	[ "$2" == "--first-pass" ] && opt=$2
   6.135 -	[ "$3" == "--first-pass" ] && opt=$3
   6.136 -	
   6.137 -	# Use libiberty.a from binutils.
   6.138 -	sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
   6.139 -	
   6.140 -	case $ARCH in
   6.141 -		i?86) sed -i 's/^T_CFLAGS =$/& -fomit-frame-pointer/' \
   6.142 -			gcc/Makefile.in ;;
   6.143 -	esac
   6.144 -	
   6.145 -	#sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
   6.146 -	
   6.147 -	mkdir -p ../gcc-build && cd ../gcc-build
   6.148 -
   6.149 -	# This is the default GCC and we want a native build to cross compile after.
   6.150 -	# SliTaz target i486 host so we need a native i486 build for GCC.
   6.151 -	case "$opt" in
   6.152 -		--first-pass)
   6.153 -			# Used by slitaz-toolchain when rebuilding the full toolchain.
   6.154 -			echo "cook: configure GCC for: toolchain first pass"
   6.155 -			$src/configure \
   6.156 -				--libexecdir=/usr/lib \
   6.157 -				--disable-nls \
   6.158 -				--enable-shared \
   6.159 -				--enable-languages=c,c++ \
   6.160 -				--disable-libstdcxx-pch \
   6.161 -				--enable-__cxa_atexit \
   6.162 -				--enable-clocale=gnu \
   6.163 -				--enable-threads=posix \
   6.164 -				--disable-bootstrap \
   6.165 -				--build=$HOST_SYSTEM \
   6.166 -				--host=$HOST_SYSTEM &&
   6.167 -			make && make install ;;
   6.168 -		*)
   6.169 -			# Used by default to produce a full featured X86 GCC compiler.
   6.170 -			echo "cook: configure GCC for: final/full build"
   6.171 -			$src/configure \
   6.172 -				--libexecdir=/usr/lib \
   6.173 -				--enable-nls \
   6.174 -				--enable-languages=c,c++,objc,fortran \
   6.175 -				--enable-shared \
   6.176 -				--with-system-zlib \
   6.177 -				--enable-clocale=gnu \
   6.178 -				--enable-objc-gc \
   6.179 -				--enable-__cxa_atexit \
   6.180 -				--enable-lto \
   6.181 -				--enable-threads=posix \
   6.182 -				--disable-bootstrap \
   6.183 -				--with-pkgversion="SliTaz" \
   6.184 -				--with-tune=$ARCH \
   6.185 -				--build=$HOST_SYSTEM \
   6.186 -				--host=$HOST_SYSTEM &&
   6.187 -			make && make install ;;
   6.188 -	esac
   6.189 -}
   6.190 -
   6.191 -# Rules to gen a SliTaz package suitable for Tazpkg.
   6.192 -genpkg_rules()
   6.193 -{
   6.194 -	mkdir -p  $fs/usr/share
   6.195 -	cp -a $install/usr/bin $fs/usr
   6.196 -	
   6.197 -	# Copy all libs. Remove libgcc_s.so and libstdc++.so they goes in
   6.198 -	# the gcc-lib-base package.
   6.199 -	cp -a $install/usr/lib $fs/usr
   6.200 -	rm -f $fs/usr/lib/libgcc_s.so*
   6.201 -	rm -f $fs/usr/lib/libstdc++.so*
   6.202 -	rm -f $fs/usr/lib/libgomp.so*
   6.203 -	rm -f $fs/usr/lib/libobjc.so*
   6.204 -
   6.205 -	# Include files.
   6.206 -	cp -a $install/usr/include $fs/usr
   6.207 -	
   6.208 -	# Gfortran goes in gfortran package.
   6.209 -	rm -f $fs/usr/bin/*gfortran
   6.210 -	rm -f $fs/usr/lib/libgfortran*
   6.211 -	rm -f $fs/usr/lib/gcc/*/$VERSION/libgfortran*
   6.212 -	rm -rf $fs/usr/lib/gcc/*/$VERSION/f*
   6.213 -	
   6.214 -	# Remove build directory.
   6.215 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
   6.216 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
   6.217 -}
   6.218 -
   6.219 -# Post install commands for Tazpkg.
   6.220 -post_install()
   6.221 -{
   6.222 -	local root
   6.223 -	root=$1
   6.224 -	echo "Processing post-install commands..."
   6.225 -	if [ ! -f "$root/lib/cpp" ]; then
   6.226 -		ln -s ../usr/bin/cpp $root/lib
   6.227 -	fi
   6.228 -	if [ ! -f "$root/usr/bin/cc" ]; then
   6.229 -		ln -s gcc $root/usr/bin/cc
   6.230 -	fi
   6.231 -}
     7.1 --- a/gcc/stuff/gcc-4.5.2-startfiles_fix-1.patch	Fri Apr 13 09:36:37 2012 +0200
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,33 +0,0 @@
     7.4 -Submitted By: Jeremy Huntwork (jhuntwork AT linuxfromscratch DOT org)
     7.5 -Date: 2008-12-05
     7.6 -Initial Package Version: 4.3.2
     7.7 -Upstream Status: See below.
     7.8 -Origin: DIY Linux, See below.
     7.9 -Description: Original patch follows:
    7.10 -
    7.11 -# DIY Linux Patch
    7.12 -Date: 2008-09-09
    7.13 -Author: Refer Origin.
    7.14 -Origin: Partial revert of http://gcc.gnu.org/ml/gcc-cvs/2006-11/msg00416.html
    7.15 -Maker: Greg Schafer <gschafer@zip.com.au>
    7.16 -Upstream Status: Not applicable. Tweak only for Temptools phase GCC-Pass2.
    7.17 -Description: Partially revert GCC driver to pre-GCC-4.3 state to allow startfiles to be
    7.18 -  found in $prefix when GCC is configured for a non-standard prefix eg: /temptools. Full
    7.19 -  background info in thread starting here: http://gcc.gnu.org/ml/gcc/2008-03/msg00095.html
    7.20 -  and GCC bugzilla here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35532
    7.21 -
    7.22 -diff -Naur gcc-4.3.0-RC-20080222.orig/gcc/gcc.c gcc-4.3.0-RC-20080222/gcc/gcc.c
    7.23 ---- gcc-4.3.0-RC-20080222.orig/gcc/gcc.c	2008-01-24 18:57:12.000000000 +0000
    7.24 -+++ gcc-4.3.0-RC-20080222/gcc/gcc.c	2008-03-02 06:07:36.000000000 +0000
    7.25 -@@ -6370,6 +6370,11 @@
    7.26 - 			      machine_suffix, 
    7.27 - 			      standard_startfile_prefix, NULL),
    7.28 - 		      NULL, PREFIX_PRIORITY_LAST, 0, 1);
    7.29 -+	  add_prefix (&startfile_prefixes,
    7.30 -+		      concat (standard_exec_prefix,
    7.31 -+			      machine_suffix,
    7.32 -+			      standard_startfile_prefix, NULL),
    7.33 -+		      NULL, PREFIX_PRIORITY_LAST, 0, 1);
    7.34 - 	}
    7.35 - 
    7.36 -       /* Sysrooted prefixes are relocated because target_system_root is
     8.1 --- a/gfortran/receipt	Fri Apr 13 09:36:37 2012 +0200
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,22 +0,0 @@
     8.4 -# SliTaz package receipt.
     8.5 -
     8.6 -PACKAGE="gfortran"
     8.7 -VERSION="4.6.2"
     8.8 -CATEGORY="development"
     8.9 -SHORT_DESC="GCC fortran extension."
    8.10 -WEB_SITE="http://gcc.gnu.org/"
    8.11 -MAINTAINER="pascal.bellard@slitaz.org"
    8.12 -DEPENDS="gcc libgfortran"
    8.13 -WANTED="gcc"
    8.14 -
    8.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
    8.16 -genpkg_rules()
    8.17 -{
    8.18 -	mkdir -p $fs/usr/lib/gcc/$HOST_SYSTEM/$VERSION $fs/usr/bin
    8.19 -	cp -a $install/usr/bin/*gfortran $fs/usr/bin
    8.20 -	cp -a $install/usr/lib/libgfortran*a $fs/usr/lib
    8.21 -	cp -a $install/usr/lib/gcc/$HOST_SYSTEM/$VERSION/f* \
    8.22 -		$fs/usr/lib/gcc/$HOST_SYSTEM/$VERSION
    8.23 -	cp -a $install/usr/lib/gcc/$HOST_SYSTEM/$VERSION/libgfortran* \
    8.24 -		$fs/usr/lib/gcc/$HOST_SYSTEM/$VERSION
    8.25 -}
     9.1 --- a/glibc-base/receipt	Fri Apr 13 09:36:37 2012 +0200
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,43 +0,0 @@
     9.4 -# SliTaz package receipt.
     9.5 -
     9.6 -PACKAGE="glibc-base"
     9.7 -VERSION="2.14.1"
     9.8 -CATEGORY="base-system"
     9.9 -SHORT_DESC="GNU libc minimal libraries and UTF-8 support for SliTaz."
    9.10 -WEB_SITE="http://www.gnu.org/software/libc/"
    9.11 -WANTED="glibc"
    9.12 -MAINTAINER="pankso@slitaz.org"
    9.13 -
    9.14 -DEFAULT_LOCALE="de_DE en_US en_GB es_ES fr_FR it_IT pt_BR pt_PT ru_RU"
    9.15 -
    9.16 -# Rules to gen a SliTaz package suitable for Tazpkg.
    9.17 -#
    9.18 -# Full glibc is very long to compile (see package glibc for more
    9.19 -# informations). You can use the precompiled package available on
    9.20 -# SliTaz mirror to build a distro without recompiling glibc.
    9.21 -#
    9.22 -genpkg_rules()
    9.23 -{
    9.24 -	# Mkdir's.
    9.25 -	for dir in $(cat $stuff/mkdir.list)
    9.26 -	do
    9.27 -		mkdir -p ${fs}$dir
    9.28 -	done
    9.29 -    # Copy all files specified in stuff/files.list. We get the files
    9.30 -    # from glibc package.
    9.31 -    for file in $(cat $stuff/wanted-files.list)
    9.32 -    do
    9.33 -    	cp -a ${_pkg}$file ${fs}$file
    9.34 -    done
    9.35 -    # i18n
    9.36 -    for i in $DEFAULT_LOCALE
    9.37 -	do
    9.38 -		cp $install/usr/share/i18n/locales/$i $fs/usr/share/i18n/locales
    9.39 -	done
    9.40 -}
    9.41 -
    9.42 -# Remove an eventual locale-archive since we use directories.
    9.43 -pre_install()
    9.44 -{
    9.45 -	rm -f $1/usr/lib/locale/locale-archive
    9.46 -}
    10.1 --- a/glibc-base/stuff/mkdir.list	Fri Apr 13 09:36:37 2012 +0200
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,10 +0,0 @@
    10.4 -/etc
    10.5 -/lib
    10.6 -/usr/bin
    10.7 -/usr/lib/gconv
    10.8 -/usr/lib/locale
    10.9 -/usr/share/zoneinfo/America
   10.10 -/usr/share/zoneinfo/Europe
   10.11 -/usr/share/i18n/locales
   10.12 -/usr/share/i18n/charmaps
   10.13 -/usr/share/locale
    11.1 --- a/glibc-base/stuff/wanted-files.list	Fri Apr 13 09:36:37 2012 +0200
    11.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.3 @@ -1,88 +0,0 @@
    11.4 -/lib/libutil-2.14.1.so
    11.5 -/lib/libnss_dns-2.14.1.so
    11.6 -/lib/libnsl-2.14.1.so
    11.7 -/lib/libanl-2.14.1.so
    11.8 -/lib/libm-2.14.1.so
    11.9 -/lib/libpthread-2.14.1.so
   11.10 -/lib/libthread_db-1.0.so
   11.11 -/lib/libnss_compat-2.14.1.so
   11.12 -/lib/libc-2.14.1.so
   11.13 -/lib/librt-2.14.1.so
   11.14 -/lib/libcrypt-2.14.1.so
   11.15 -/lib/ld-2.14.1.so
   11.16 -/lib/libresolv-2.14.1.so
   11.17 -/lib/libnss_files-2.14.1.so
   11.18 -/lib/libdl-2.14.1.so
   11.19 -
   11.20 -/usr/lib/gconv/UNICODE.so
   11.21 -/usr/lib/gconv/gconv-modules
   11.22 -/usr/lib/gconv/ANSI_X3.110.so
   11.23 -/usr/lib/gconv/ISO8859-1.so
   11.24 -/usr/lib/gconv/UTF-16.so
   11.25 -/usr/lib/gconv/CP1252.so
   11.26 -
   11.27 -/usr/bin/locale
   11.28 -/usr/bin/localedef
   11.29 -
   11.30 -/usr/share/locale/locale.alias
   11.31 -/usr/share/i18n/charmaps/UTF-8.gz
   11.32 -
   11.33 -/usr/share/i18n/locales/i18n
   11.34 -/usr/share/i18n/locales/iso14651_t1 
   11.35 -/usr/share/i18n/locales/iso14651_t1_common 
   11.36 -/usr/share/i18n/locales/translit_neutral 
   11.37 -/usr/share/i18n/locales/translit_combining
   11.38 -/usr/share/i18n/locales/translit_circle 
   11.39 -/usr/share/i18n/locales/translit_cjk_compat 
   11.40 -/usr/share/i18n/locales/translit_compat 
   11.41 -/usr/share/i18n/locales/translit_font 
   11.42 -/usr/share/i18n/locales/translit_fraction
   11.43 -/usr/share/i18n/locales/translit_narrow
   11.44 -/usr/share/i18n/locales/translit_small
   11.45 -/usr/share/i18n/locales/translit_wide
   11.46 -
   11.47 -/usr/share/zoneinfo/Europe/Madrid
   11.48 -/usr/share/zoneinfo/Europe/Moscow
   11.49 -/usr/share/zoneinfo/Europe/London
   11.50 -/usr/share/zoneinfo/Europe/Zurich
   11.51 -/usr/share/zoneinfo/Europe/Paris
   11.52 -/usr/share/zoneinfo/UTC
   11.53 -/usr/share/zoneinfo/CET
   11.54 -/usr/share/zoneinfo/America/Montreal
   11.55 -/usr/share/zoneinfo/America/New_York
   11.56 -/usr/share/zoneinfo/America/Los_Angeles
   11.57 -/usr/share/zoneinfo/America/Sao_Paulo
   11.58 -/usr/share/zoneinfo/America/Mexico_City
   11.59 -
   11.60 -/etc/rpc
   11.61 -/etc/ld.so.conf
   11.62 -/etc/ld.so.cache
   11.63 -
   11.64 -/lib/libc.so.6
   11.65 -/lib/librt.so.1
   11.66 -/lib/libdl.so.2
   11.67 -/lib/libanl.so.1
   11.68 -/lib/libutil.so.1
   11.69 -/lib/libnss_dns.so.2
   11.70 -/lib/libnss_compat.so.2
   11.71 -/lib/libcrypt.so.1
   11.72 -/lib/libpthread.so.0
   11.73 -/lib/libthread_db.so.1
   11.74 -/lib/libm.so.6
   11.75 -/lib/ld-linux.so.2
   11.76 -/lib/libresolv.so.2
   11.77 -/lib/libnsl.so.1
   11.78 -/lib/libnss_files.so.2
   11.79 -
   11.80 -/usr/lib/libnss_dns.so
   11.81 -/usr/lib/libnss_files.so
   11.82 -/usr/lib/libcrypt.so
   11.83 -/usr/lib/libnss_compat.so
   11.84 -/usr/lib/libdl.so
   11.85 -/usr/lib/libm.so
   11.86 -/usr/lib/librt.so
   11.87 -/usr/lib/libresolv.so
   11.88 -/usr/lib/libnsl.so
   11.89 -/usr/lib/libutil.so
   11.90 -/usr/lib/libanl.so
   11.91 -/usr/lib/libthread_db.so
    12.1 --- a/glibc-dev/receipt	Fri Apr 13 09:36:37 2012 +0200
    12.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    12.3 @@ -1,40 +0,0 @@
    12.4 -# SliTaz package receipt.
    12.5 -
    12.6 -PACKAGE="glibc-dev"
    12.7 -VERSION="2.14.1"
    12.8 -CATEGORY="development"
    12.9 -SHORT_DESC="The GNU C libraries devel files (Part of SliTaz toolchain)."
   12.10 -MAINTAINER="pankso@slitaz.org"
   12.11 -DEPENDS="glibc-base"
   12.12 -WANTED="glibc"
   12.13 -WEB_SITE="http://www.gnu.org/software/libc/"
   12.14 -
   12.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
   12.16 -#
   12.17 -# This package is part of the toolchain. We use list to mkdir and cp files.
   12.18 -#
   12.19 -genpkg_rules()
   12.20 -{
   12.21 -    # Mass copy and then remove all files specified in stuff/base-files.list.
   12.22 -    # We get the files from glibc-base. Locale files are in: glibc-locale.
   12.23 -    cp -a $install/* $fs
   12.24 -    
   12.25 -    # Rm base files.
   12.26 -    echo -n "Removing all base files..."
   12.27 -    for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list`
   12.28 -    do
   12.29 -    	rm -f ${fs}$file
   12.30 -    done
   12.31 -    rm -rf $fs/etc
   12.32 -    rm -rf $fs/usr/share
   12.33 -    status
   12.34 -    
   12.35 -    # Rm locale.
   12.36 -    echo -n "Removing all locale files..."
   12.37 -    for file in `cat $WOK/glibc-locale/taz/glibc-locale-$VERSION/files.list`
   12.38 -    do
   12.39 -    	rm -f ${fs}$file
   12.40 -    done
   12.41 -    rm -rf $fs/usr/lib/gconv
   12.42 -    status
   12.43 -}
    13.1 --- a/glibc-extra-samba/receipt	Fri Apr 13 09:36:37 2012 +0200
    13.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    13.3 @@ -1,19 +0,0 @@
    13.4 -# SliTaz package receipt.
    13.5 -
    13.6 -PACKAGE="glibc-extra-samba"
    13.7 -VERSION="2.14.1"
    13.8 -CATEGORY="base-system"
    13.9 -SHORT_DESC="GNU libc extra gconv modules for samba."
   13.10 -WEB_SITE="http://gcc.gnu.org/"
   13.11 -WANTED="glibc"
   13.12 -MAINTAINER="pascal.bellard@slitaz.org"
   13.13 -
   13.14 -# Rules to gen a SliTaz package suitable for Tazpkg.
   13.15 -#
   13.16 -genpkg_rules()
   13.17 -{
   13.18 -	mkdir -p $fs/usr/lib/gconv
   13.19 -	for i in IBM850.so IBM437.so; do
   13.20 -		cp $install/usr/lib/gconv/$i $fs/usr/lib/gconv/$i
   13.21 -	done
   13.22 -}
    14.1 --- a/glibc-locale/receipt	Fri Apr 13 09:36:37 2012 +0200
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,51 +0,0 @@
    14.4 -# SliTaz package receipt.
    14.5 -
    14.6 -PACKAGE="glibc-locale"
    14.7 -VERSION="2.14.1"
    14.8 -CATEGORY="system-tools"
    14.9 -SHORT_DESC="The GNU C libraries locale files and utilities (see also locale-*)."
   14.10 -MAINTAINER="pankso@slitaz.org"
   14.11 -DEPENDS="glibc-base glibc-extra-samba"
   14.12 -WANTED="glibc"
   14.13 -WEB_SITE="http://www.gnu.org/software/libc/"
   14.14 -
   14.15 -LOCALE_PACK="cs de es fr hu id it pt ru sl zh_CN zh_TW"
   14.16 -
   14.17 -# Rules to gen a SliTaz package suitable for Tazpkg.
   14.18 -genpkg_rules()
   14.19 -{
   14.20 -	mkdir -p $fs/usr/share $fs/usr/lib $fs/usr/bin
   14.21 -
   14.22 -	cp -a $install/usr/lib/gconv $fs/usr/lib
   14.23 -	cp -a $install/usr/share/locale $fs/usr/share
   14.24 -	cp -a $install/usr/share/i18n $fs/usr/share
   14.25 -	cp -a $install/usr/share/zoneinfo $fs/usr/share
   14.26 -
   14.27 -	# Utilities and tools
   14.28 -	cp -a $install/usr/bin/iconv $fs/usr/bin
   14.29 -	cp -a $install/usr/bin/tzselect $fs/usr/bin
   14.30 -
   14.31 -	# Rm base files.
   14.32 -	echo -n "* Removing all base files..."
   14.33 -	for file in `cat $WOK/glibc-base/taz/glibc-base-$VERSION/files.list`
   14.34 -	do
   14.35 -		rm -f ${fs}$file
   14.36 -	done
   14.37 -	status
   14.38 -	
   14.39 -	# Rm glibc-extra-samba files.
   14.40 -	echo -n "* Removing extra samba files..."
   14.41 -	for file in `cat $WOK/glibc-extra-samba/taz/glibc-extra-samba-$VERSION/files.list`
   14.42 -	do
   14.43 -		rm -f ${fs}$file
   14.44 -	done
   14.45 -	status
   14.46 -
   14.47 -	# Rm files provided by locale-pack.
   14.48 -	for i in $LOCALE_PACK
   14.49 -	do
   14.50 -		echo -n "* Removing locale: $i"
   14.51 -		rm -rf $fs/usr/share/locale/$i
   14.52 -		status
   14.53 -	done
   14.54 -}
    15.1 --- a/glibc/receipt	Fri Apr 13 09:36:37 2012 +0200
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,148 +0,0 @@
    15.4 -# SliTaz package receipt.
    15.5 -
    15.6 -PACKAGE="glibc"
    15.7 -VERSION="2.14.1"
    15.8 -CATEGORY="meta"
    15.9 -SHORT_DESC="The GNU C libraries. This package is used to compile the libc."
   15.10 -MAINTAINER="pankso@slitaz.org"
   15.11 -TARBALL="$PACKAGE-$VERSION.tar.gz"
   15.12 -WEB_SITE="http://www.gnu.org/software/libc/"
   15.13 -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
   15.14 -
   15.15 -DEPENDS="glibc-base glibc-locale glibc-dev"
   15.16 -BUILD_DEPENDS="linux-api-headers autoconf bash"
   15.17 -
   15.18 -# Genpkg order for tazwok.
   15.19 -COOK_OPT="genpkg=glibc-base:glibc-extra-samba:glib-locale:glibc-dev"
   15.20 -	
   15.21 -# Rules to compile & install the temporary toolchain.
   15.22 -cook_tmp_toolchain()
   15.23 -{
   15.24 -	cd $src
   15.25 -	
   15.26 -	# Glibc Bug Fixes Patch from LFS
   15.27 -	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
   15.28 -	# Glibc Bug Sort Relocatable Objects Patch
   15.29 -	patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
   15.30 -	# Fix a bug that prevents Glibc from building with GCC-4.6.2
   15.31 -	patch -Np1 -i stuff/glibc-2.14.1-gcc_fix-1.patch
   15.32 -
   15.33 -	# Build in a separate directory.
   15.34 -	mkdir ../glibc-build && cd ../glibc-build
   15.35 -
   15.36 -	# glibc no longer support i386, so use -march=i486 for better compatibility.
   15.37 -	# If i686 ???
   15.38 -	unset CFLAGS CXXFLAGS
   15.39 -	case $ARCH in
   15.40 -		i386|i486)
   15.41 -			echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
   15.42 -		*)
   15.43 -			echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
   15.44 -	esac
   15.45 -
   15.46 -	{ $src/configure \
   15.47 -		--host=$HOST_SYSTEM \
   15.48 -		--build=$($src/scripts/config.guess) \
   15.49 -		--disable-profile --enable-add-ons \
   15.50 -		--enable-kernel=2.6.30 --with-headers=/tools/include \
   15.51 -		libc_cv_forced_unwind=yes libc_cv_c_cleanup=yes &&
   15.52 -	make &&
   15.53 -	make install
   15.54 -	} || return 1
   15.55 -
   15.56 -	# Link compiler to this new glibc.
   15.57 -	SPECS=`dirname $($HOST_SYSTEM-gcc -print-libgcc-file-name)`/specs
   15.58 -	$HOST_SYSTEM-gcc -dumpspecs | sed \
   15.59 -		-e 's@/lib\(64\)\?/ld@/tools&@g' \
   15.60 -		-e "/^\*cpp:$/{n;s,$, -isystem /tools/include,}" > $SPECS 
   15.61 -	unset SPECS
   15.62 -}
   15.63 -
   15.64 -# Rules to configure and make the package.
   15.65 -compile_rules()
   15.66 -{
   15.67 -	cd $src
   15.68 -
   15.69 -	# SliTaz is a Busybox based OS, why we so small and fast. Using gawk by
   15.70 -	# default to build package will not ensure package work with Busybox awk
   15.71 -	# and so should NOT be use to cook.
   15.72 -	if [ -x /usr/bin/cook ]; then
   15.73 -		[ -d "/var/lib/tazpkg/installed/gawk" ] || tazpkg get-install gawk
   15.74 -	fi
   15.75 -
   15.76 -	# Fixes and patches from LFS, Redhat
   15.77 -	sed -i -e 's/"db1"/& \&\& $name ne "nss_test1"/' scripts/test-installation.pl
   15.78 -	sed -i 's|@BASH@|/bin/bash|' elf/ldd.bash.in
   15.79 -
   15.80 -	# Glibc misc Bug Fixes
   15.81 -	patch -Np1 -i $stuff/glibc-2.14.1-fixes-1.patch
   15.82 -	
   15.83 -	# Glibc Bug Sort Relocatable Objects Patch
   15.84 -	#patch -Np1 -i $stuff/glibc-2.14.1-sort-1.patch
   15.85 -	
   15.86 -	# Fix a bug that prevents Glibc from building with GCC-4.6.2
   15.87 -	patch -Np1 -i $stuff/glibc-2.14.1-gcc_fix-1.patch
   15.88 -	
   15.89 -	# Revert commit causing issues with crappy DNS servers
   15.90 -	patch -Np1 -i $stuff/glibc-2.14-revert-4768ae77.patch
   15.91 -	
   15.92 -	# re-export RPC interface until libtirpc is ready as a replacement
   15.93 -	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=acee4873 (only fedora branch...)
   15.94 -	patch -Np1 -i $stuff/glibc-2.14-reexport-rpc-interface.patch
   15.95 -	# http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=bdd816a3 (only fedora branch...)
   15.96 -	patch -Np1 -i $stuff/glibc-2.14-reinstall-nis-rpc-headers.patch
   15.97 -
   15.98 -	# Fix a stack imbalance that occurs under some conditions:
   15.99 -	sed -i '195,213 s/PRIVATE_FUTEX/FUTEX_CLOCK_REALTIME/' \
  15.100 -		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
  15.101 -		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
  15.102 -
  15.103 -	# Glibc needs ld.so.conf in the install destdir.
  15.104 -	mkdir -p $WOK/$PACKAGE/install/etc
  15.105 -	touch $WOK/$PACKAGE/install/etc/ld.so.conf
  15.106 -	mkdir ../glibc-build && cd ../glibc-build
  15.107 -	
  15.108 -	# Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
  15.109 -	# --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
  15.110 -	# "The higher the VERSION number is, the less compatibility code is
  15.111 -	# added, and the faster the code gets."
  15.112 -	unset CFLAGS CXXFLAGS
  15.113 -	case "$ARCH" in
  15.114 -		i386|i486)
  15.115 -			echo "CFLAGS += -O2 -march=i486 -mtune=i486" > configparms ;;
  15.116 -		*)
  15.117 -			echo "CFLAGS += -O2 -march=$ARCH -mtune=$ARCH" > configparms ;;
  15.118 -	esac
  15.119 -	{ $src/configure \
  15.120 -		--disable-profile \
  15.121 -		--enable-add-ons \
  15.122 -		--enable-kernel=2.6.30 \
  15.123 -		--libexecdir=/usr/lib/glibc \
  15.124 -		--build=$HOST_SYSTEM \
  15.125 -		--host=$HOST_SYSTEM \
  15.126 -		--target=$BUILD_SYSTEM &&
  15.127 -	make && make install_root=$DESTDIR install
  15.128 -	} || return 1
  15.129 -
  15.130 -	# If temporary toolchain was previously used, switch to regular toolchain.
  15.131 -	[ -d /tools ] || return
  15.132 -	mv /tools/bin/ld /tools/bin/ld-old
  15.133 -	mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old
  15.134 -	mv /tools/bin/ld-new /tools/bin/ld
  15.135 -	ln -s /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld
  15.136 -	gcc -dumpspecs | sed -e 's@/tools@@g' \
  15.137 -		-e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \
  15.138 -		-e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \
  15.139 -		`dirname $(gcc --print-libgcc-file-name)`/specs
  15.140 -}
  15.141 -
  15.142 -# Rules to gen a SliTaz package suitable for Tazpkg.
  15.143 -genpkg_rules()
  15.144 -{
  15.145 -	LOCALE=""
  15.146 -	mkdir -p $fs/var
  15.147 -
  15.148 -	# Remove build directory.
  15.149 -	rm -rf $WOK/$PACKAGE/source/$PACKAGE-build
  15.150 -	rm -rf $WOK/$PACKAGE/$PACKAGE-build
  15.151 -}
    16.1 --- a/glibc/stuff/glibc-2.13-gcc_fix-1.patch	Fri Apr 13 09:36:37 2012 +0200
    16.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.3 @@ -1,49 +0,0 @@
    16.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
    16.5 -Date:                    2010-04-18
    16.6 -Initial Package Version: 2.11.1
    16.7 -Upstream Status:         Not Submitted
    16.8 -Origin:                  http://www.eglibc.org/archives/patches/msg00073.html
    16.9 -Description:             Fixes the following build problem with GCC-4.5.0:
   16.10 -
   16.11 -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
   16.12 -./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
   16.13 -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
   16.14 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   16.15 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   16.16 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   16.17 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
   16.18 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   16.19 -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
   16.20 -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
   16.21 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
   16.22 -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
   16.23 -
   16.24 -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
   16.25 ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c	2009-12-08 20:10:20.000000000 +0000
   16.26 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c	2010-04-17 11:34:06.882681001 +0000
   16.27 -@@ -45,6 +45,11 @@
   16.28 - /* Embed an #include to pull in the alignment and .end directives. */
   16.29 - asm ("\n#include \"defs.h\"");
   16.30 - 
   16.31 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
   16.32 -+asm ("\n#undef __i686");
   16.33 -+asm ("\n#define __i686 __i686");
   16.34 -+asm ("\n#endif");
   16.35 -+
   16.36 - /* The initial common code ends here. */
   16.37 - asm ("\n/*@HEADER_ENDS*/");
   16.38 - 
   16.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
   16.40 ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2009-12-08 20:10:20.000000000 +0000
   16.41 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h	2010-04-17 11:34:06.882681001 +0000
   16.42 -@@ -29,6 +29,10 @@
   16.43 - #include <dl-sysdep.h>
   16.44 - #include <tls.h>
   16.45 - 
   16.46 -+#if defined __i686 && defined __ASSEMBLER__
   16.47 -+#undef __i686
   16.48 -+#define __i686 __i686
   16.49 -+#endif
   16.50 - 
   16.51 - /* For Linux we can use the system call table in the header file
   16.52 - 	/usr/include/asm/unistd.h
    17.1 --- a/glibc/stuff/glibc-2.14-reexport-rpc-interface.patch	Fri Apr 13 09:36:37 2012 +0200
    17.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    17.3 @@ -1,26 +0,0 @@
    17.4 -diff --git a/include/libc-symbols.h b/include/libc-symbols.h
    17.5 -index 67e1ca2..5e7cca5 100644
    17.6 ---- a/include/libc-symbols.h
    17.7 -+++ b/include/libc-symbols.h
    17.8 -@@ -635,7 +635,7 @@ for linking")
    17.9 - # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
   17.10 - # define libc_hidden_def(name) hidden_def (name)
   17.11 - # define libc_hidden_weak(name) hidden_weak (name)
   17.12 --# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
   17.13 -+# define libc_hidden_nolink(name, version) hidden_def (name)
   17.14 - # define libc_hidden_ver(local, name) hidden_ver (local, name)
   17.15 - # define libc_hidden_data_def(name) hidden_data_def (name)
   17.16 - # define libc_hidden_data_weak(name) hidden_data_weak (name)
   17.17 -diff --git a/sunrpc/Makefile b/sunrpc/Makefile
   17.18 -index 5134ce9..40c73d1 100644
   17.19 ---- a/sunrpc/Makefile
   17.20 -+++ b/sunrpc/Makefile
   17.21 -@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
   17.22 - 				    des_crypt.h)
   17.23 - headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
   17.24 - 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
   17.25 --headers = rpc/netdb.h
   17.26 -+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
   17.27 - install-others = $(inst_sysconfdir)/rpc
   17.28 - generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
   17.29 - 	    $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
    18.1 --- a/glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch	Fri Apr 13 09:36:37 2012 +0200
    18.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    18.3 @@ -1,28 +0,0 @@
    18.4 -From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
    18.5 -From: Andreas Schwab <schwab@redhat.com>
    18.6 -Date: Tue, 17 May 2011 17:42:30 +0200
    18.7 -Subject: [PATCH] Reinstall NIS RPC headers
    18.8 -
    18.9 ----
   18.10 - nis/Makefile |    4 ++--
   18.11 - 1 files changed, 2 insertions(+), 2 deletions(-)
   18.12 -
   18.13 -diff --git a/nis/Makefile b/nis/Makefile
   18.14 -index b5c9609..d2934d9 100644
   18.15 ---- a/nis/Makefile
   18.16 -+++ b/nis/Makefile
   18.17 -@@ -23,9 +23,9 @@ subdir	:= nis
   18.18 - 
   18.19 - aux			:= nis_hash
   18.20 - 
   18.21 -+headers			:= $(wildcard rpcsvc/*.[hx])
   18.22 - distribute		:= nss-nis.h nss-nisplus.h nis_intern.h Banner \
   18.23 --			   nisplus-parser.h nis_xdr.h nss \
   18.24 --			   $(wildcard rpcsvc/*.[hx])
   18.25 -+			   nisplus-parser.h nis_xdr.h nss
   18.26 - 
   18.27 - # These are the databases available for the nis (and perhaps later nisplus)
   18.28 - # service.  This must be a superset of the services in nss.
   18.29 --- 
   18.30 -1.7.5.4
   18.31 -
    19.1 --- a/glibc/stuff/glibc-2.14-revert-4768ae77.patch	Fri Apr 13 09:36:37 2012 +0200
    19.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.3 @@ -1,37 +0,0 @@
    19.4 -diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
    19.5 ---- glibc-orig//resolv/res_send.c	2011-06-10 18:59:03.041436996 +1000
    19.6 -+++ glibc/resolv/res_send.c	2011-06-10 19:08:09.379309323 +1000
    19.7 -@@ -549,7 +549,7 @@
    19.8 -				    ns, ansp, ansp2, nansp2, resplen2);
    19.9 -			if (n < 0)
   19.10 -				return (-1);
   19.11 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   19.12 -+			if (n == 0)
   19.13 -				goto next_ns;
   19.14 -		} else {
   19.15 -			/* Use datagrams. */
   19.16 -@@ -559,7 +559,7 @@
   19.17 -				    ansp2, nansp2, resplen2);
   19.18 -			if (n < 0)
   19.19 -				return (-1);
   19.20 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
   19.21 -+			if (n == 0)
   19.22 -				goto next_ns;
   19.23 -			if (v_circuit)
   19.24 -			  // XXX Check whether both requests failed or
   19.25 -@@ -1275,14 +1275,10 @@
   19.26 -				(*thisresplenp > *thisanssizp)
   19.27 -				? *thisanssizp : *thisresplenp);
   19.28 -
   19.29 --			if (recvresp1 || (buf2 != NULL && recvresp2)) {
   19.30 --			  *resplen2 = 0;
   19.31 -+			if (recvresp1 || (buf2 != NULL && recvresp2))
   19.32 -			  return resplen;
   19.33 --			}
   19.34 -			if (buf2 != NULL)
   19.35 -			  {
   19.36 --			    /* No data from the first reply.  */
   19.37 --			    resplen = 0;
   19.38 -			    /* We are waiting for a possible second reply.  */
   19.39 -			    if (hp->id == anhp->id)
   19.40 -			      recvresp1 = 1;
    20.1 --- a/glibc/stuff/glibc-2.14.1-fixes-1.patch	Fri Apr 13 09:36:37 2012 +0200
    20.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    20.3 @@ -1,159 +0,0 @@
    20.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
    20.5 -Date:                    2011-10-07
    20.6 -Initial Package Version: 2.14.1
    20.7 -Upstream Status:         From upstream
    20.8 -Origin:                  Matt Burgess
    20.9 -Description:             Fixes Firefox crashes and a bug when programs link to
   20.10 -                         SDL.
   20.11 -
   20.12 -diff -Naur glibc-2.14.1.orig/elf/dl-close.c glibc-2.14.1/elf/dl-close.c
   20.13 ---- glibc-2.14.1.orig/elf/dl-close.c	2011-10-07 09:48:55.000000000 +0000
   20.14 -+++ glibc-2.14.1/elf/dl-close.c	2011-10-07 19:43:10.346411120 +0000
   20.15 -@@ -119,17 +119,8 @@
   20.16 -   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
   20.17 -       || dl_close_state != not_pending)
   20.18 -     {
   20.19 --      if (map->l_direct_opencount == 0)
   20.20 --	{
   20.21 --	  if (map->l_type == lt_loaded)
   20.22 --	    dl_close_state = rerun;
   20.23 --	  else if (map->l_type == lt_library)
   20.24 --	    {
   20.25 --	      struct link_map **oldp = map->l_initfini;
   20.26 --	      map->l_initfini = map->l_orig_initfini;
   20.27 --	      _dl_scope_free (oldp);
   20.28 --	    }
   20.29 --	}
   20.30 -+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
   20.31 -+	dl_close_state = rerun;
   20.32 - 
   20.33 -       /* There are still references to this object.  Do nothing more.  */
   20.34 -       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
   20.35 -diff -Naur glibc-2.14.1.orig/elf/dl-deps.c glibc-2.14.1/elf/dl-deps.c
   20.36 ---- glibc-2.14.1.orig/elf/dl-deps.c	2011-10-07 09:48:55.000000000 +0000
   20.37 -+++ glibc-2.14.1/elf/dl-deps.c	2011-10-07 19:43:10.348432639 +0000
   20.38 -@@ -478,6 +478,7 @@
   20.39 - 		  nneeded * sizeof needed[0]);
   20.40 - 	  atomic_write_barrier ();
   20.41 - 	  l->l_initfini = l_initfini;
   20.42 -+	  l->l_free_initfini = 1;
   20.43 - 	}
   20.44 - 
   20.45 -       /* If we have no auxiliary objects just go on to the next map.  */
   20.46 -@@ -678,6 +679,7 @@
   20.47 -   l_initfini[nlist] = NULL;
   20.48 -   atomic_write_barrier ();
   20.49 -   map->l_initfini = l_initfini;
   20.50 -+  map->l_free_initfini = 1;
   20.51 -   if (l_reldeps != NULL)
   20.52 -     {
   20.53 -       atomic_write_barrier ();
   20.54 -@@ -686,7 +688,7 @@
   20.55 -       _dl_scope_free (old_l_reldeps);
   20.56 -     }
   20.57 -   if (old_l_initfini != NULL)
   20.58 --      map->l_orig_initfini = old_l_initfini;
   20.59 -+    _dl_scope_free (old_l_initfini);
   20.60 - 
   20.61 -   if (errno_reason)
   20.62 -     _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
   20.63 -diff -Naur glibc-2.14.1.orig/elf/dl-libc.c glibc-2.14.1/elf/dl-libc.c
   20.64 ---- glibc-2.14.1.orig/elf/dl-libc.c	2011-10-07 09:48:55.000000000 +0000
   20.65 -+++ glibc-2.14.1/elf/dl-libc.c	2011-10-07 19:43:10.352411141 +0000
   20.66 -@@ -279,6 +279,10 @@
   20.67 - 	      if (! old->dont_free)
   20.68 - 		free (old);
   20.69 - 	    }
   20.70 -+
   20.71 -+	  /* Free the initfini dependency list.  */
   20.72 -+	  if (l->l_free_initfini)
   20.73 -+	    free (l->l_initfini);
   20.74 - 	}
   20.75 - 
   20.76 -       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
   20.77 -diff -Naur glibc-2.14.1.orig/elf/rtld.c glibc-2.14.1/elf/rtld.c
   20.78 ---- glibc-2.14.1.orig/elf/rtld.c	2011-10-07 09:48:55.000000000 +0000
   20.79 -+++ glibc-2.14.1/elf/rtld.c	2011-10-07 19:43:10.355406263 +0000
   20.80 -@@ -2263,6 +2263,7 @@
   20.81 - 	      lnp->dont_free = 1;
   20.82 - 	      lnp = lnp->next;
   20.83 - 	    }
   20.84 -+	  l->l_free_initfini = 0;
   20.85 - 
   20.86 - 	  if (l != &GL(dl_rtld_map))
   20.87 - 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
   20.88 -diff -Naur glibc-2.14.1.orig/include/link.h glibc-2.14.1/include/link.h
   20.89 ---- glibc-2.14.1.orig/include/link.h	2011-10-07 09:48:55.000000000 +0000
   20.90 -+++ glibc-2.14.1/include/link.h	2011-10-07 19:43:10.357462703 +0000
   20.91 -@@ -192,6 +192,9 @@
   20.92 - 						 during LD_TRACE_PRELINKING=1
   20.93 - 						 contains any DT_SYMBOLIC
   20.94 - 						 libraries.  */
   20.95 -+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
   20.96 -+				       freed, ie. not allocated with
   20.97 -+				       the dummy malloc in ld.so.  */
   20.98 - 
   20.99 -     /* Collected information about own RPATH directories.  */
  20.100 -     struct r_search_path_struct l_rpath_dirs;
  20.101 -@@ -240,9 +243,6 @@
  20.102 - 
  20.103 -     /* List of object in order of the init and fini calls.  */
  20.104 -     struct link_map **l_initfini;
  20.105 --    /* The init and fini list generated at startup, saved when the
  20.106 --       object is also loaded dynamically.  */
  20.107 --    struct link_map **l_orig_initfini;
  20.108 - 
  20.109 -     /* List of the dependencies introduced through symbol binding.  */
  20.110 -     struct link_map_reldeps
  20.111 -diff -Naur glibc-2.14.1.orig/resolv/res_query.c glibc-2.14.1/resolv/res_query.c
  20.112 ---- glibc-2.14.1.orig/resolv/res_query.c	2011-10-07 09:48:55.000000000 +0000
  20.113 -+++ glibc-2.14.1/resolv/res_query.c	2011-10-07 19:43:10.361412711 +0000
  20.114 -@@ -122,6 +122,7 @@
  20.115 - 		  int *resplen2)
  20.116 - {
  20.117 - 	HEADER *hp = (HEADER *) answer;
  20.118 -+	HEADER *hp2;
  20.119 - 	int n, use_malloc = 0;
  20.120 - 	u_int oflags = statp->_flags;
  20.121 - 
  20.122 -@@ -239,26 +240,25 @@
  20.123 - 	  /* __libc_res_nsend might have reallocated the buffer.  */
  20.124 - 	  hp = (HEADER *) *answerp;
  20.125 - 
  20.126 --	/* We simplify the following tests by assigning HP to HP2.  It
  20.127 --	   is easy to verify that this is the same as ignoring all
  20.128 --	   tests of HP2.  */
  20.129 --	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
  20.130 --
  20.131 --	if (n < (int) sizeof (HEADER) && answerp2 != NULL
  20.132 --	    && *resplen2 > (int) sizeof (HEADER))
  20.133 -+	/* We simplify the following tests by assigning HP to HP2 or
  20.134 -+	   vice versa.  It is easy to verify that this is the same as
  20.135 -+	   ignoring all tests of HP or HP2.  */
  20.136 -+	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
  20.137 - 	  {
  20.138 --	    /* Special case of partial answer.  */
  20.139 --	    assert (hp != hp2);
  20.140 --	    hp = hp2;
  20.141 -+	    hp2 = hp;
  20.142 - 	  }
  20.143 --	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
  20.144 --		 && n > (int) sizeof (HEADER))
  20.145 -+	else
  20.146 - 	  {
  20.147 --	    /* Special case of partial answer.  */
  20.148 --	    assert (hp != hp2);
  20.149 --	    hp2 = hp;
  20.150 -+	    hp2 = (HEADER *) *answerp2;
  20.151 -+	    if (n < (int) sizeof (HEADER))
  20.152 -+	      {
  20.153 -+	        hp = hp2;
  20.154 -+	      }
  20.155 - 	  }
  20.156 - 
  20.157 -+	/* Make sure both hp and hp2 are defined */
  20.158 -+	assert((hp != NULL) && (hp2 != NULL));
  20.159 -+
  20.160 - 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
  20.161 - 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
  20.162 - #ifdef DEBUG
    21.1 --- a/glibc/stuff/glibc-2.14.1-gcc_fix-1.patch	Fri Apr 13 09:36:37 2012 +0200
    21.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    21.3 @@ -1,49 +0,0 @@
    21.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
    21.5 -Date:                    2010-04-18
    21.6 -Initial Package Version: 2.11.1
    21.7 -Upstream Status:         Not Submitted
    21.8 -Origin:                  http://www.eglibc.org/archives/patches/msg00073.html
    21.9 -Description:             Fixes the following build problem with GCC-4.5.0:
   21.10 -
   21.11 -/mnt/lfs/sources/libc-build/math/s_frexp.os.dt -MT /mnt/lfs/sources/libc-build/math/s_frexp.os
   21.12 -./sysdeps/i386/fpu/s_frexp.S: Assembler messages:
   21.13 -./sysdeps/i386/fpu/s_frexp.S:66: Error: invalid identifier for ".ifdef"
   21.14 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   21.15 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   21.16 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   21.17 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `.'
   21.18 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk at end of line, first unrecognized character is `1'
   21.19 -./sysdeps/i386/fpu/s_frexp.S:66: Error: expected comma after name `' in .size directive
   21.20 -./sysdeps/i386/fpu/s_frexp.S:66: Error: ".endif" without ".if"
   21.21 -./sysdeps/i386/fpu/s_frexp.S:66: Error: junk `.get_pc_thunk.dx' after expression
   21.22 -make[2]: *** [/mnt/lfs/sources/libc-build/math/s_frexp.os] Error 1
   21.23 -
   21.24 -diff -Naur glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c
   21.25 ---- glibc-2.11.1.orig/nptl/sysdeps/pthread/pt-initfini.c	2009-12-08 20:10:20.000000000 +0000
   21.26 -+++ glibc-2.11.1/nptl/sysdeps/pthread/pt-initfini.c	2010-04-17 11:34:06.882681001 +0000
   21.27 -@@ -45,6 +45,11 @@
   21.28 - /* Embed an #include to pull in the alignment and .end directives. */
   21.29 - asm ("\n#include \"defs.h\"");
   21.30 - 
   21.31 -+asm ("\n#if defined __i686 && defined __ASSEMBLER__");
   21.32 -+asm ("\n#undef __i686");
   21.33 -+asm ("\n#define __i686 __i686");
   21.34 -+asm ("\n#endif");
   21.35 -+
   21.36 - /* The initial common code ends here. */
   21.37 - asm ("\n/*@HEADER_ENDS*/");
   21.38 - 
   21.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
   21.40 ---- glibc-2.11.1.orig/sysdeps/unix/sysv/linux/i386/sysdep.h	2009-12-08 20:10:20.000000000 +0000
   21.41 -+++ glibc-2.11.1/sysdeps/unix/sysv/linux/i386/sysdep.h	2010-04-17 11:34:06.882681001 +0000
   21.42 -@@ -29,6 +29,10 @@
   21.43 - #include <dl-sysdep.h>
   21.44 - #include <tls.h>
   21.45 - 
   21.46 -+#if defined __i686 && defined __ASSEMBLER__
   21.47 -+#undef __i686
   21.48 -+#define __i686 __i686
   21.49 -+#endif
   21.50 - 
   21.51 - /* For Linux we can use the system call table in the header file
   21.52 - 	/usr/include/asm/unistd.h
    22.1 --- a/glibc/stuff/glibc-2.14.1-sort-1.patch	Fri Apr 13 09:36:37 2012 +0200
    22.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.3 @@ -1,273 +0,0 @@
    22.4 -Submitted By:            Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
    22.5 -Date:                    2012-02-24
    22.6 -Initial Package Version: 2.14.1
    22.7 -Upstream Status:         From upstream
    22.8 -Origin:                  Upstream
    22.9 -Description:             Sort objects by dependency before relocation.
   22.10 -                         Fixes segfault in dlopen for several programs.
   22.11 -
   22.12 -diff --git a/Makeconfig b/Makeconfig
   22.13 -index 2db2821..68547b2 100644
   22.14 ---- a/Makeconfig
   22.15 -+++ b/Makeconfig
   22.16 -@@ -938,6 +938,12 @@ libdl =
   22.17 - endif
   22.18 - endif
   22.19 - 
   22.20 -+ifeq ($(build-shared),yes)
   22.21 -+libm = $(common-objpfx)math/libm.so$(libm.so-version)
   22.22 -+else
   22.23 -+libm = $(common-objpfx)math/libm.a
   22.24 -+endif
   22.25 -+
   22.26 - # These are the subdirectories containing the library source.  The order
   22.27 - # is more or less arbitrary.  The sorting step will take care of the
   22.28 - # dependencies.
   22.29 -diff --git a/elf/Makefile b/elf/Makefile
   22.30 -index 052e763..3f1772a 100644
   22.31 ---- a/elf/Makefile
   22.32 -+++ b/elf/Makefile
   22.33 -@@ -124,7 +124,8 @@ distribute	:= rtld-Rules \
   22.34 - 		   tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
   22.35 - 		   tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
   22.36 - 		   tst-initorder.c \
   22.37 --		   tst-initorder2.c
   22.38 -+		   tst-initorder2.c \
   22.39 -+		   tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
   22.40 - 
   22.41 - CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
   22.42 - CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
   22.43 -@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
   22.44 - 	 tst-audit1 tst-audit2 \
   22.45 - 	 tst-stackguard1 tst-addr1 tst-thrlock \
   22.46 - 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
   22.47 --	 tst-initorder tst-initorder2
   22.48 -+	 tst-initorder tst-initorder2 tst-relsort1
   22.49 - #	 reldep9
   22.50 - test-srcs = tst-pathopt
   22.51 - selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
   22.52 -@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
   22.53 - 		tst-initordera1 tst-initorderb1 \
   22.54 - 		tst-initordera2 tst-initorderb2 \
   22.55 - 		tst-initordera3 tst-initordera4 \
   22.56 --		tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
   22.57 -+		tst-initorder2a tst-initorder2b tst-initorder2c \
   22.58 -+		tst-initorder2d \
   22.59 -+		tst-relsort1mod1 tst-relsort1mod2
   22.60 - ifeq (yes,$(have-initfini-array))
   22.61 - modules-names += tst-array2dep tst-array5dep
   22.62 - endif
   22.63 -@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
   22.64 - CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
   22.65 - CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
   22.66 - endif
   22.67 -+
   22.68 -+$(objpfx)tst-relsort1: $(libdl)
   22.69 -+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
   22.70 -+$(objpfx)tst-relsort1mod2.so: $(libm)
   22.71 -+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
   22.72 -+			   $(objpfx)tst-relsort1mod2.so
   22.73 -diff --git a/elf/dl-open.c b/elf/dl-open.c
   22.74 -index a0b5c50..a56bdc1 100644
   22.75 ---- a/elf/dl-open.c
   22.76 -+++ b/elf/dl-open.c
   22.77 -@@ -1,5 +1,5 @@
   22.78 - /* Load a shared object at runtime, relocate it, and run its initializer.
   22.79 --   Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
   22.80 -+   Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
   22.81 -    This file is part of the GNU C Library.
   22.82 - 
   22.83 -    The GNU C Library is free software; you can redistribute it and/or
   22.84 -@@ -303,45 +303,109 @@ dl_open_worker (void *a)
   22.85 -   if (GLRO(dl_lazy))
   22.86 -     reloc_mode |= mode & RTLD_LAZY;
   22.87 - 
   22.88 --  /* Relocate the objects loaded.  We do this in reverse order so that copy
   22.89 --     relocs of earlier objects overwrite the data written by later objects.  */
   22.90 --
   22.91 -+  /* Sort the objects by dependency for the relocation process.  This
   22.92 -+     allows IFUNC relocations to work and it also means copy
   22.93 -+     relocation of dependencies are if necessary overwritten.  */
   22.94 -+  size_t nmaps = 0;
   22.95 -   struct link_map *l = new;
   22.96 --  while (l->l_next)
   22.97 --    l = l->l_next;
   22.98 --  while (1)
   22.99 -+  do
  22.100 -+    {
  22.101 -+      if (! l->l_real->l_relocated)
  22.102 -+	++nmaps;
  22.103 -+      l = l->l_next;
  22.104 -+    }
  22.105 -+  while (l != NULL);
  22.106 -+  struct link_map *maps[nmaps];
  22.107 -+  nmaps = 0;
  22.108 -+  l = new;
  22.109 -+  do
  22.110 -     {
  22.111 -       if (! l->l_real->l_relocated)
  22.112 -+	maps[nmaps++] = l;
  22.113 -+      l = l->l_next;
  22.114 -+    }
  22.115 -+  while (l != NULL);
  22.116 -+  if (nmaps > 1)
  22.117 -+    {
  22.118 -+      char seen[nmaps];
  22.119 -+      memset (seen, '\0', nmaps);
  22.120 -+      size_t i = 0;
  22.121 -+      while (1)
  22.122 - 	{
  22.123 --#ifdef SHARED
  22.124 --	  if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
  22.125 -+	  ++seen[i];
  22.126 -+	  struct link_map *thisp = maps[i];
  22.127 -+
  22.128 -+	  /* Find the last object in the list for which the current one is
  22.129 -+	     a dependency and move the current object behind the object
  22.130 -+	     with the dependency.  */
  22.131 -+	  size_t k = nmaps - 1;
  22.132 -+	  while (k > i)
  22.133 - 	    {
  22.134 --	      /* If this here is the shared object which we want to profile
  22.135 --		 make sure the profile is started.  We can find out whether
  22.136 --		 this is necessary or not by observing the `_dl_profile_map'
  22.137 --		 variable.  If was NULL but is not NULL afterwars we must
  22.138 --		 start the profiling.  */
  22.139 --	      struct link_map *old_profile_map = GL(dl_profile_map);
  22.140 -+	      struct link_map **runp = maps[k]->l_initfini;
  22.141 -+	      if (runp != NULL)
  22.142 -+		/* Look through the dependencies of the object.  */
  22.143 -+		while (*runp != NULL)
  22.144 -+		  if (__builtin_expect (*runp++ == thisp, 0))
  22.145 -+		    {
  22.146 -+		      /* Move the current object to the back past the last
  22.147 -+			 object with it as the dependency.  */
  22.148 -+		      memmove (&maps[i], &maps[i + 1],
  22.149 -+			       (k - i) * sizeof (maps[0]));
  22.150 -+		      maps[k] = thisp;
  22.151 -+
  22.152 -+		      if (seen[i + 1] > 1)
  22.153 -+			{
  22.154 -+			  ++i;
  22.155 -+			  goto next_clear;
  22.156 -+			}
  22.157 -+
  22.158 -+		      char this_seen = seen[i];
  22.159 -+		      memmove (&seen[i], &seen[i + 1],
  22.160 -+			       (k - i) * sizeof (seen[0]));
  22.161 -+		      seen[k] = this_seen;
  22.162 -+
  22.163 -+		      goto next;
  22.164 -+		    }
  22.165 -+
  22.166 -+	      --k;
  22.167 -+	    }
  22.168 - 
  22.169 --	      _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
  22.170 -+	  if (++i == nmaps)
  22.171 -+	    break;
  22.172 -+	next_clear:
  22.173 -+	  memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
  22.174 -+	next:;
  22.175 -+	}
  22.176 -+    }
  22.177 - 
  22.178 --	      if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
  22.179 --		{
  22.180 --		  /* We must prepare the profiling.  */
  22.181 --		  _dl_start_profile ();
  22.182 -+  for (size_t i = nmaps; i-- > 0; )
  22.183 -+    {
  22.184 -+      l = maps[i];
  22.185 - 
  22.186 --		  /* Prevent unloading the object.  */
  22.187 --		  GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
  22.188 --		}
  22.189 -+#ifdef SHARED
  22.190 -+      if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
  22.191 -+	{
  22.192 -+	  /* If this here is the shared object which we want to profile
  22.193 -+	     make sure the profile is started.  We can find out whether
  22.194 -+	     this is necessary or not by observing the `_dl_profile_map'
  22.195 -+	     variable.  If it was NULL but is not NULL afterwars we must
  22.196 -+	     start the profiling.  */
  22.197 -+	  struct link_map *old_profile_map = GL(dl_profile_map);
  22.198 -+
  22.199 -+	  _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
  22.200 -+
  22.201 -+	  if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
  22.202 -+	    {
  22.203 -+	      /* We must prepare the profiling.  */
  22.204 -+	      _dl_start_profile ();
  22.205 -+
  22.206 -+	      /* Prevent unloading the object.  */
  22.207 -+	      GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
  22.208 - 	    }
  22.209 --	  else
  22.210 --#endif
  22.211 --	    _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
  22.212 - 	}
  22.213 --
  22.214 --      if (l == new)
  22.215 --	break;
  22.216 --      l = l->l_prev;
  22.217 -+      else
  22.218 -+#endif
  22.219 -+	_dl_relocate_object (l, l->l_scope, reloc_mode, 0);
  22.220 -     }
  22.221 - 
  22.222 -   /* If the file is not loaded now as a dependency, add the search
  22.223 -diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
  22.224 -new file mode 100644
  22.225 -index 0000000..972100c
  22.226 ---- /dev/null
  22.227 -+++ b/elf/tst-relsort1.c
  22.228 -@@ -0,0 +1,19 @@
  22.229 -+#include <dlfcn.h>
  22.230 -+#include <stdio.h>
  22.231 -+
  22.232 -+
  22.233 -+static int
  22.234 -+do_test ()
  22.235 -+{
  22.236 -+  const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
  22.237 -+  void *h = dlopen (lib, RTLD_NOW);
  22.238 -+  if (h == NULL)
  22.239 -+    {
  22.240 -+      puts (dlerror ());
  22.241 -+      return 1;
  22.242 -+    }
  22.243 -+  return 0;
  22.244 -+}
  22.245 -+
  22.246 -+#define TEST_FUNCTION do_test ()
  22.247 -+#include "../test-skeleton.c"
  22.248 -diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
  22.249 -new file mode 100644
  22.250 -index 0000000..9e4a943
  22.251 ---- /dev/null
  22.252 -+++ b/elf/tst-relsort1mod1.c
  22.253 -@@ -0,0 +1,7 @@
  22.254 -+extern int foo (double);
  22.255 -+
  22.256 -+int
  22.257 -+bar (void)
  22.258 -+{
  22.259 -+  return foo (1.2);
  22.260 -+}
  22.261 -diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
  22.262 -new file mode 100644
  22.263 -index 0000000..a2c3e55
  22.264 ---- /dev/null
  22.265 -+++ b/elf/tst-relsort1mod2.c
  22.266 -@@ -0,0 +1,7 @@
  22.267 -+#include <math.h>
  22.268 -+
  22.269 -+int
  22.270 -+foo (double d)
  22.271 -+{
  22.272 -+  return floor (d) != 0.0;
  22.273 -+}
  22.274 --- 
  22.275 -1.7.3.4
  22.276 -
    23.1 --- a/libgfortran/receipt	Fri Apr 13 09:36:37 2012 +0200
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,16 +0,0 @@
    23.4 -# SliTaz package receipt.
    23.5 -
    23.6 -PACKAGE="libgfortran"
    23.7 -VERSION="4.6.2"
    23.8 -CATEGORY="misc"
    23.9 -SHORT_DESC="GCC fortran runtime."
   23.10 -WEB_SITE="http://gcc.gnu.org/"
   23.11 -MAINTAINER="pascal.bellard@slitaz.org"
   23.12 -WANTED="gcc"
   23.13 -
   23.14 -# Rules to gen a SliTaz package suitable for Tazpkg.
   23.15 -genpkg_rules()
   23.16 -{
   23.17 -	mkdir -p $fs/usr/lib
   23.18 -	cp -a $install/usr/lib/libgfortran.so* $fs/usr/lib
   23.19 -}
    24.1 --- a/libgomp/receipt	Fri Apr 13 09:36:37 2012 +0200
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,16 +0,0 @@
    24.4 -# SliTaz package receipt.
    24.5 -
    24.6 -PACKAGE="libgomp"
    24.7 -VERSION="4.6.2"
    24.8 -CATEGORY="development"
    24.9 -SHORT_DESC="API specification for parallel programming."
   24.10 -MAINTAINER="pascal.bellard@slitaz.org"
   24.11 -WEB_SITE="http://gcc.gnu.org/"
   24.12 -WANTED="gcc"
   24.13 -
   24.14 -# Rules to gen a SliTaz package suitable for Tazpkg.
   24.15 -genpkg_rules()
   24.16 -{
   24.17 -    mkdir -p  $fs/usr/lib
   24.18 -    cp -a $install/usr/lib/libgomp.so* $fs/usr/lib
   24.19 -}
    25.1 --- a/libobjc/receipt	Fri Apr 13 09:36:37 2012 +0200
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,18 +0,0 @@
    25.4 -# SliTaz package receipt.
    25.5 -
    25.6 -PACKAGE="libobjc"
    25.7 -VERSION="4.6.2"
    25.8 -CATEGORY="development"
    25.9 -SHORT_DESC="API for gcc object"
   25.10 -MAINTAINER="slaxemulator@gmail.com"
   25.11 -WEB_SITE="http://gcc.gnu.org/"
   25.12 -DEPENDS="gcc-lib-base"
   25.13 -WANTED="gcc"
   25.14 -
   25.15 -# Rules to gen a SliTaz package suitable for Tazpkg.
   25.16 -genpkg_rules()
   25.17 -{
   25.18 -	mkdir -p $fs/usr/lib
   25.19 -	cp -a $install/usr/lib/libobjc.so* $fs/usr/lib
   25.20 -}
   25.21 -
    26.1 --- a/linux-api-headers/receipt	Fri Apr 13 09:36:37 2012 +0200
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,60 +0,0 @@
    26.4 -# SliTaz package receipt.
    26.5 -
    26.6 -PACKAGE="linux-api-headers"
    26.7 -VERSION="3.2.14"
    26.8 -KBASEVER="${VERSION:0:3}"
    26.9 -CATEGORY="development"
   26.10 -SHORT_DESC="Kernel headers sanitized for use in userspace."
   26.11 -MAINTAINER="devel@slitaz.org"
   26.12 -SOURCE="linux"
   26.13 -TARBALL="$SOURCE-$KBASEVER.tar.xz"
   26.14 -WEB_SITE="http://www.kernel.org/"
   26.15 -WGET_URL="http://www.kernel.org/pub/linux/kernel/v3.0/$TARBALL"
   26.16 -
   26.17 -BUILD_DEPENDS="bash"
   26.18 -
   26.19 -[ "$KBASEVER" != "$VERSION" ] && PATCH="http://www.kernel.org/pub/linux/kernel/v3.0/patch-$VERSION.xz"
   26.20 -
   26.21 -# Rules to compile & install the temporary toolchain.
   26.22 -cook_tmp_toolchain()
   26.23 -{
   26.24 -	cd $src
   26.25 -	make mrproper &&
   26.26 -	make headers_check &&
   26.27 -	make INSTALL_HDR_PATH=dest headers_install &&
   26.28 -	cp -r dest/include/* /tools/include
   26.29 -}
   26.30 -
   26.31 -# Rules to configure and make the package.
   26.32 -compile_rules()
   26.33 -{
   26.34 -	cd $src
   26.35 -	
   26.36 -	if [ "$KBASEVER" != "$VERSION" ]; then
   26.37 -		if [ -f $SOURCES_REPOSITORY/$(basename $PATCH) ]; then
   26.38 -			xzcat $SOURCES_REPOSITORY/$(basename $PATCH) | patch -Np1
   26.39 -		else
   26.40 -			wget $PATCH -O $SRC/$(basename $PATCH)
   26.41 -			xzcat $SRC/$(basename $PATCH) | patch -Np1
   26.42 -		fi
   26.43 -	fi
   26.44 -
   26.45 -	make mrproper &&
   26.46 -	make headers_check &&
   26.47 -	make INSTALL_HDR_PATH=$DESTDIR/usr headers_install
   26.48 -}
   26.49 -
   26.50 -# Rules to gen a SliTaz package suitable for Tazpkg.
   26.51 -genpkg_rules()
   26.52 -{
   26.53 -	mkdir -p $fs/usr
   26.54 -	cp -a $_pkg/usr/include $fs/usr
   26.55 -	rm -f $(find ${fs} -name .install -or -name ..install.cmd)
   26.56 -}
   26.57 -
   26.58 -# Post install commands for Tazpkg.
   26.59 -post_install()
   26.60 -{
   26.61 -	# Removed old linux-headers
   26.62 -	rm -rf ${1}${INSTALLED}/linux-headers 2>/dev/null
   26.63 -}
    27.1 --- a/mpc-library/receipt	Fri Apr 13 09:36:37 2012 +0200
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,29 +0,0 @@
    27.4 -# SliTaz package receipt.
    27.5 -
    27.6 -PACKAGE="mpc-library"
    27.7 -VERSION="0.9"
    27.8 -CATEGORY="development"
    27.9 -SHORT_DESC="MPC is a C library for the arithmetic of complex numbers."
   27.10 -MAINTAINER="pankso@slitaz.org"
   27.11 -SOURCE="mpc"
   27.12 -TARBALL="$SOURCE-$VERSION.tar.gz"
   27.13 -WEB_SITE="http://www.multiprecision.org/"
   27.14 -WGET_URL="http://www.multiprecision.org/mpc/download/$TARBALL"
   27.15 -
   27.16 -DEPENDS="mpfr gmp"
   27.17 -BUILD_DEPENDS="mpfr-dev gmp-dev"
   27.18 -
   27.19 -compile_rules()
   27.20 -{
   27.21 -	cd $src
   27.22 -	./configure $CONFIGURE_ARGS && make && make install
   27.23 -}
   27.24 -
   27.25 -# Rules to gen a SliTaz package suitable for Tazpkg.
   27.26 -genpkg_rules()
   27.27 -{
   27.28 -	mkdir -p $fs/usr
   27.29 -	cp -a $install/usr/lib $fs/usr
   27.30 -	cp -a $install/usr/include $fs/usr
   27.31 -}
   27.32 -
    28.1 --- a/slitaz-toolchain/receipt	Fri Apr 13 09:36:37 2012 +0200
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,112 +0,0 @@
    28.4 -# SliTaz package receipt.
    28.5 -
    28.6 -PACKAGE="slitaz-toolchain"
    28.7 -VERSION="4.0"
    28.8 -CATEGORY="meta"
    28.9 -SHORT_DESC="SliTaz meta package to rebuild or install current toolchain."
   28.10 -MAINTAINER="pankso@slitaz.org"
   28.11 -WEB_SITE="http://www.slitaz.org/"
   28.12 -
   28.13 -DEPENDS="binutils linux-api-headers glibc-dev gcc make elfkickers"
   28.14 -
   28.15 -# The goal here is to build and install SliTaz toolchain. We build the toolchain
   28.16 -# from SliTaz packages, on SliTaz and for SliTaz so in case of new and important
   28.17 -# toolchain upgrade we must build Binutils a first time, then GCC so it use the
   28.18 -# new Binutils. After we cook Glibc and then rebuild Binutils + GCC a second
   28.19 -# time so they are linked with the new main GNU libc. We usually also due a
   28.20 -# bootstrap by recooking slitaz-toolchain a second time so we are sure it can
   28.21 -# rebuild itself.
   28.22 -#
   28.23 -# SliTaz does one big toolchain by year just after the stable release, any change
   28.24 -# here or in the toolchain packages version must be discuss on the mailing list.
   28.25 -
   28.26 -# Rules to configure and make the package.
   28.27 -compile_rules()
   28.28 -{
   28.29 -	[ -x /usr/bin/cook ] || return 0
   28.30 -	tmplog=$LOGS/$PACKAGE.tmplog
   28.31 -	echo "Cook: $PACKAGE $VERSION" > $tmplog
   28.32 -	separator >> $tmplog
   28.33 -	cat >> $tmplog << EOT
   28.34 -Cook toolchain : started $(date "+%Y-%m-%d %H:%M")
   28.35 -Architecture   : $ARCH
   28.36 -Build system   : $BUILD_SYSTEM
   28.37 -Host  system   : $HOST_SYSTEM
   28.38 -EOT
   28.39 -	
   28.40 -	# 1. binutils (first pass)
   28.41 -	echo "cook: binutils first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.42 -	cook binutils --install
   28.43 -
   28.44 -	# 2. gcc (first pass)
   28.45 -	echo "cook: GCC first pass: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.46 -	cook gcc --install --first-pass
   28.47 -	cook gcc-lib-base --install
   28.48 -	
   28.49 -	# 3. linux-api-headers
   28.50 -	echo "cook: linux API headers: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.51 -	cook linux-api-headers --install
   28.52 -	
   28.53 -	# 4. glibc
   28.54 -	for i in glibc glibc-base glibc-extra-samba glibc-locale glibc-dev
   28.55 -	do
   28.56 -		echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.57 -		cook $i --install
   28.58 -	done
   28.59 -
   28.60 -	# 5. binutils (final)
   28.61 -	echo "cook: binutils final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.62 -	cook binutils --install
   28.63 -	
   28.64 -	# 6. gcc (final)
   28.65 -	echo "cook: GCC final: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.66 -	for i in gcc gcc-lib-base libobjc libgomp
   28.67 -	do
   28.68 -		echo "cook: $i: $(date '+%Y-%m-%d %H:%M')" >> $tmplog
   28.69 -		cook $i --install
   28.70 -	done
   28.71 -	cook libgfortran
   28.72 -	cook gfortran
   28.73 -	separator >> $tmplog
   28.74 -
   28.75 -	# GCC info in toolchain.log
   28.76 -	echo -e "\nGCC compiler information" >> $tmplog
   28.77 -	separator >> $tmplog
   28.78 -	gcc -v 2>> $tmplog
   28.79 -
   28.80 -	# All packages cooked got ther own log so we dont keep them.
   28.81 -	separator >> $tmplog && echo "" >> $tmplog
   28.82 -	mv -f $tmplog $LOGS/$PACKAGE.log 
   28.83 -}
   28.84 -
   28.85 -# Rules to gen a SliTaz package suitable for Tazpkg.
   28.86 -genpkg_rules()
   28.87 -{
   28.88 -	binutils=$(grep ^VERSION $WOK/binutils/receipt | cut -d '"' -f 2)
   28.89 -	linux=$(grep ^VERSION $WOK/linux/receipt | cut -d '"' -f 2)
   28.90 -	gcc=$(grep ^VERSION $WOK/gcc/receipt | cut -d '"' -f 2)
   28.91 -	glibc=$(grep ^VERSION $WOK/glibc/receipt | cut -d '"' -f 2)
   28.92 -	
   28.93 -	mkdir -p $fs/usr/share/doc/slitaz
   28.94 -	cat > $fs/usr/share/doc/slitaz/toolchain.txt << EOT
   28.95 -SliTaz GNU/Linux toolchain
   28.96 -================================================================================
   28.97 -
   28.98 -Build date   : $(date "+%Y-%m-%d")
   28.99 -Architecture : $ARCH
  28.100 -Build system : $BUILD_SYSTEM
  28.101 -Host  system : $HOST_SYSTEM
  28.102 -
  28.103 -Packages:
  28.104 -
  28.105 -    * Binutils $binutils
  28.106 -    * Linux API headers $linux
  28.107 -    * GCC $gcc
  28.108 -    * Glibc $glibc
  28.109 -
  28.110 -Toolchain documentation: http://doc.slitaz.org/en:cookbook:toolchain
  28.111 -
  28.112 -================================================================================
  28.113 -
  28.114 -EOT
  28.115 -}