wok-undigest rev 1090

Remove obsolete cross-* pkgs (cross from cookutils is used)
author Christophe Lincoln <pankso@slitaz.org>
date Thu Jan 02 18:03:34 2014 +0100 (2014-01-02)
parents 0468b8dbcb0f
children 3f059c1d154b
files cross-arm-binutils/receipt cross-arm-gcc/receipt cross-arm-glibc/receipt cross-arm-glibc/stuff/glibc-2.14-reexport-rpc-interface.patch cross-arm-glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch cross-arm-glibc/stuff/glibc-2.14-revert-4768ae77.patch cross-arm-glibc/stuff/glibc-2.14.1-fixes-1.patch cross-arm-glibc/stuff/glibc-2.14.1-gcc_fix-1.patch cross-arm-glibc/stuff/glibc-2.14.1-sort-1.patch cross-x86_64-binutils/receipt
line diff
     1.1 --- a/cross-arm-binutils/receipt	Mon Dec 30 16:29:37 2013 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,60 +0,0 @@
     1.4 -# SliTaz package receipt.
     1.5 -
     1.6 -PACKAGE="cross-arm-binutils"
     1.7 -VERSION="2.22"
     1.8 -CATEGORY="system-tools"
     1.9 -SHORT_DESC="Cross compilation linker targeting ARM platform."
    1.10 -MAINTAINER="pankso@slitaz.org"
    1.11 -LICENSE="GPL2"
    1.12 -SOURCE="binutils"
    1.13 -WEB_SITE="http://www.gnu.org/software/binutils/"
    1.14 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    1.15 -WGET_URL="$GNU_MIRROR/$SOURCE/$TARBALL"
    1.16 -
    1.17 -DEPENDS=""
    1.18 -BUILD_DEPENDS=""
    1.19 -
    1.20 -# Cross toolchain variables.
    1.21 -CROSS_TARGET="arm-slitaz-linux-gnueabi"
    1.22 -CROSS_PREFIX="/usr/cross/arm"
    1.23 -CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
    1.24 -
    1.25 -# CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
    1.26 -unset CFLAGS CXXFLAGS CONFIG_SITE
    1.27 -
    1.28 -# Rules to configure and make the package.
    1.29 -compile_rules()
    1.30 -{
    1.31 -	cd $src
    1.32 -	mkdir ../build && cd ../build
    1.33 -	#--with-sysroot=$CROSS_PREFIX
    1.34 -	$src/configure \
    1.35 -		--prefix=$CROSS_PREFIX \
    1.36 -		--program-prefix=${CROSS_TARGET}- \
    1.37 -		--enable-targets=$ARCH-slitaz-linux \
    1.38 -		--enable-shared \
    1.39 -		--disable-multilib \
    1.40 -		--disable-werror \
    1.41 -		--disable-nls \
    1.42 -		$CROSS_TRIPLET &&
    1.43 -	make configure-host &&
    1.44 -	make && make install
    1.45 -	#make tooldir=$CROSS_PREFIX &&
    1.46 -	#make tooldir=$CROSS_PREFIX install
    1.47 -}
    1.48 -
    1.49 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.50 -genpkg_rules()
    1.51 -{
    1.52 -	mkdir -p ${fs}${CROSS_PREFIX}/include
    1.53 -	cp -a $install/usr/cross $fs/usr
    1.54 -	#rm ${fs}${CROSS_PREFIX}/lib/libiberty.a
    1.55 -
    1.56 -	# libiberty.h
    1.57 -	cp -a $src/include/libiberty.h ${fs}${CROSS_PREFIX}/include
    1.58 -
    1.59 -	# Move ldscripts and create symlink
    1.60 -	cd ${fs}${CROSS_PREFIX}/$CROSS_TARGET
    1.61 -	mv lib/ldscripts ../lib
    1.62 -	rmdir lib && ln -s ../lib .
    1.63 -}
     2.1 --- a/cross-arm-gcc/receipt	Mon Dec 30 16:29:37 2013 +0000
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,112 +0,0 @@
     2.4 -# SliTaz package receipt.
     2.5 -
     2.6 -PACKAGE="cross-arm-gcc"
     2.7 -VERSION="4.6.3"
     2.8 -CATEGORY="system-tools"
     2.9 -SHORT_DESC="Cross compiler for targeting ARM platform."
    2.10 -MAINTAINER="pankso@slitaz.org"
    2.11 -LICENSE="GPL2"
    2.12 -SOURCE="gcc"
    2.13 -WEB_SITE="http://gcc.gnu.org/"
    2.14 -TARBALL="$SOURCE-$VERSION.tar.bz2"
    2.15 -WGET_URL="$GNU_MIRROR/gcc/gcc-$VERSION/$TARBALL"
    2.16 -
    2.17 -DEPENDS="mpc-library elfutils linux-arm-api-headers cross-arm-binutils"
    2.18 -BUILD_DEPENDS="linux-arm-api-headers cross-arm-binutils gmp gmp-dev \
    2.19 -mpfr mpfr-dev mpc-library elfutils-dev glibc-dev"
    2.20 -
    2.21 -# Cross toolchain variables.
    2.22 -CROSS_TARGET="arm-slitaz-linux-gnueabi"
    2.23 -CROSS_PREFIX="/usr/cross/arm"
    2.24 -CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
    2.25 -
    2.26 -# CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
    2.27 -unset CFLAGS CXXFLAGS CONFIG_SITE
    2.28 -
    2.29 -# Path to cross tools
    2.30 -export PATH=$PATH:$CROSS_PREFIX/bin
    2.31 -
    2.32 -# Rules to configure and make the package.
    2.33 -compile_rules()
    2.34 -{
    2.35 -	cd $src
    2.36 -
    2.37 -	# Package cross-arm-toolchain use 'cook --options' when rebuilding
    2.38 -	# the full SliTaz ARM cross toolchain.
    2.39 -	[ "$2" == "--first-pass" ] && opt=$2
    2.40 -	[ "$3" == "--first-pass" ] && opt=$3
    2.41 -
    2.42 -	# Use libiberty.a from binutils.
    2.43 -	sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in || return 1
    2.44 -
    2.45 -	mkdir -p ../build && cd ../build
    2.46 -
    2.47 -	case $opt in
    2.48 -		--first-pass)
    2.49 -			# Used by cross-arm-toolchain when rebuilding the full toolchain.
    2.50 -			echo "cook: configure GCC for: cross toolchain first pass"
    2.51 -			$src/configure \
    2.52 -				--prefix=$CROSS_PREFIX \
    2.53 -				--libexec=$CROSS_PREFIX/lib \
    2.54 -				--disable-shared \
    2.55 -				--enable-languages=c \
    2.56 -				--disable-threads \
    2.57 -				--disable-multilib \
    2.58 -				--disable-nls \
    2.59 -				--without-headers \
    2.60 -				--disable-libgomp \
    2.61 -				--disable-libmudflap \
    2.62 -				--disable-libssp \
    2.63 -				$CROSS_TRIPLET &&
    2.64 -			make all-gcc all-target-libgcc &&
    2.65 -			make install-gcc install-target-libgcc &&
    2.66 -			cd ${install}${CROSS_PREFIX}/lib/gcc/$CROSS_TARGET/$VERSION &&
    2.67 -			ln -s libgcc.a libgcc_eh.a ;;
    2.68 -		*)
    2.69 -			# Used to produce a full featured ARM GCC cross compiler.
    2.70 -			echo "cook: configure GCC for: final/full cross compiler"
    2.71 -
    2.72 -			# We cant't have cross-arm-glibc it in DEPENDS since it not build
    2.73 -			# when we compile GCC --first-pass
    2.74 -			if [ ! "/var/lib/tazpkg/installed/cross-arm-glibc" ]; then
    2.75 -				tazpkg -i /home/slitaz/packages/cross-arm-glibc-2.14.1.tazpkg
    2.76 -			fi
    2.77 -
    2.78 -			$src/configure \
    2.79 -				--prefix=$CROSS_PREFIX \
    2.80 -				--libexec=$CROSS_PREFIX/lib \
    2.81 -				--enable-shared \
    2.82 -				--enable-languages=c,c++ \
    2.83 -				--enable-c99 \
    2.84 -				--enable-long-long \
    2.85 -				--enable-__cxa_atexit \
    2.86 -				--enable-threads=posix \
    2.87 -				--with-pkgversion="SliTaz" \
    2.88 -				$CROSS_TRIPLET &&
    2.89 -			make && make install &&
    2.90 -			make all-target-libgcc &&
    2.91 -			make install-target-libgcc ;;
    2.92 -	esac
    2.93 -
    2.94 -	# Some configure options we could use
    2.95 -	#--enable-multilib
    2.96 -	#--enable-addons
    2.97 -	#--with-newlib
    2.98 -}
    2.99 -
   2.100 -# Rules to gen a SliTaz package suitable for Tazpkg.
   2.101 -genpkg_rules()
   2.102 -{
   2.103 -	mkdir -p $fs/usr
   2.104 -	cp -a $install/usr/cross $fs/usr
   2.105 -	rm -rf ${fs}${CROSS_PREFIX}/share
   2.106 -
   2.107 -	# This will fix GCC final build since we dont use --with-sysroot=
   2.108 -	# Without that we go errors such as: cannot find crtn.o
   2.109 -	cd ${fs}${CROSS_PREFIX}/$CROSS_TARGET
   2.110 -	for dir in lib include; do
   2.111 -		mv -f $dir/* ../$dir 2>/dev/null
   2.112 -		rmdir $dir 2>/dev/null
   2.113 -		ln -s ../$dir .
   2.114 -	done
   2.115 -}
     3.1 --- a/cross-arm-glibc/receipt	Mon Dec 30 16:29:37 2013 +0000
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,68 +0,0 @@
     3.4 -# SliTaz package receipt.
     3.5 -
     3.6 -PACKAGE="cross-arm-glibc"
     3.7 -VERSION="2.14.1"
     3.8 -CATEGORY="system-tools"
     3.9 -SHORT_DESC="The GNU C libraries for the ARM cross toolchain"
    3.10 -MAINTAINER="pankso@slitaz.org"
    3.11 -LICENSE="GPL2"
    3.12 -SOURCE="glibc"
    3.13 -TARBALL="$SOURCE-$VERSION.tar.gz"
    3.14 -WEB_SITE="http://www.gnu.org/software/libc/"
    3.15 -WGET_URL="$GNU_MIRROR/$PACKAGE/$TARBALL"
    3.16 -
    3.17 -DEPENDS=""
    3.18 -BUILD_DEPENDS="linux-arm-api-headers cross-arm-binutils cross-arm-gcc \
    3.19 -autoconf bash gawk"
    3.20 -
    3.21 -# Cross toolchain variables. We dont use CROSS_TRIPLET here, we cross build
    3.22 -# with: --build=$HOST_SYSTEM --host=$CROSS_TARGET
    3.23 -CROSS_TARGET="arm-slitaz-linux-gnueabi"
    3.24 -CROSS_PREFIX="/usr/cross/arm"
    3.25 -
    3.26 -# CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
    3.27 -unset CFLAGS CXXFLAGS CONFIG_SITE
    3.28 -
    3.29 -# Path to cross tools
    3.30 -export PATH=$PATH:$CROSS_PREFIX/bin
    3.31 -
    3.32 -# Rules to configure and make the package.
    3.33 -compile_rules()
    3.34 -{
    3.35 -	cd $src
    3.36 -
    3.37 -	# Glibc ports.
    3.38 -	if [ ! -f "$SRC/glibc-ports-$VERSION.tar.bz2" ]; then
    3.39 -		wget $GNU_MIRROR/$SOURCE/glibc-ports-$VERSION.tar.bz2 \
    3.40 -			-O $SRC/glibc-ports-$VERSION.tar.bz2
    3.41 -	fi
    3.42 -	echo "Extracting: glibc-ports-$VERSION.tar.bz2"
    3.43 -	tar xjf $SRC/glibc-ports-$VERSION.tar.bz2
    3.44 -	mv glibc-ports-$VERSION ports
    3.45 -
    3.46 -	mkdir ../build && cd ../build
    3.47 -
    3.48 -	CC=$CROSS_PREFIX/bin/$CROSS_TARGET-gcc
    3.49 -	echo "libc_cv_forced_unwind=yes" > config.cache
    3.50 -	echo "libc_cv_c_cleanup=yes" >> config.cache
    3.51 -	#--enable-add-ons
    3.52 -	$src/configure \
    3.53 -		--prefix=$CROSS_PREFIX \
    3.54 -		--libexecdir=$CROSS_PREFIX/lib/glibc \
    3.55 -		--with-headers=$CROSS_PREFIX/include \
    3.56 -		--with-binutils=$CROSS_PREFIX/bin \
    3.57 -		--config-cache \
    3.58 -		--disable-sanity-checks \
    3.59 -		--disable-profile \
    3.60 -		--enable-kernel=2.6.30 \
    3.61 -		--build=$HOST_SYSTEM \
    3.62 -		--host=$CROSS_TARGET &&
    3.63 -	make && make install_root=$DESTDIR install
    3.64 -}
    3.65 -
    3.66 -# Rules to gen a SliTaz package suitable for Tazpkg.
    3.67 -genpkg_rules()
    3.68 -{
    3.69 -	mkdir -p $fs/usr
    3.70 -	cp -a $install/usr/cross $fs/usr
    3.71 -}
     4.1 --- a/cross-arm-glibc/stuff/glibc-2.14-reexport-rpc-interface.patch	Mon Dec 30 16:29:37 2013 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,26 +0,0 @@
     4.4 -diff --git a/include/libc-symbols.h b/include/libc-symbols.h
     4.5 -index 67e1ca2..5e7cca5 100644
     4.6 ---- a/include/libc-symbols.h
     4.7 -+++ b/include/libc-symbols.h
     4.8 -@@ -635,7 +635,7 @@ for linking")
     4.9 - # define libc_hidden_proto(name, attrs...) hidden_proto (name, ##attrs)
    4.10 - # define libc_hidden_def(name) hidden_def (name)
    4.11 - # define libc_hidden_weak(name) hidden_weak (name)
    4.12 --# define libc_hidden_nolink(name, version) hidden_nolink (name, libc, version)
    4.13 -+# define libc_hidden_nolink(name, version) hidden_def (name)
    4.14 - # define libc_hidden_ver(local, name) hidden_ver (local, name)
    4.15 - # define libc_hidden_data_def(name) hidden_data_def (name)
    4.16 - # define libc_hidden_data_weak(name) hidden_data_weak (name)
    4.17 -diff --git a/sunrpc/Makefile b/sunrpc/Makefile
    4.18 -index 5134ce9..40c73d1 100644
    4.19 ---- a/sunrpc/Makefile
    4.20 -+++ b/sunrpc/Makefile
    4.21 -@@ -53,7 +53,7 @@ headers-in-tirpc = $(addprefix rpc/,auth.h auth_unix.h clnt.h pmap_clnt.h \
    4.22 - 				    des_crypt.h)
    4.23 - headers-not-in-tirpc = $(addprefix rpc/,key_prot.h rpc_des.h) \
    4.24 - 		       $(rpcsvc:%=rpcsvc/%) rpcsvc/bootparam.h
    4.25 --headers = rpc/netdb.h
    4.26 -+headers = rpc/netdb.h $(headers-in-tirpc) $(headers-not-in-tirpc)
    4.27 - install-others = $(inst_sysconfdir)/rpc
    4.28 - generated = $(rpcsvc:%.x=rpcsvc/%.h) $(rpcsvc:%.x=x%.c) $(rpcsvc:%.x=x%.stmp) \
    4.29 - 	    $(rpcsvc:%.x=rpcsvc/%.stmp) rpcgen
     5.1 --- a/cross-arm-glibc/stuff/glibc-2.14-reinstall-nis-rpc-headers.patch	Mon Dec 30 16:29:37 2013 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,28 +0,0 @@
     5.4 -From bdd816a366c4e5bba5de7157d948e0c0737fb4fb Mon Sep 17 00:00:00 2001
     5.5 -From: Andreas Schwab <schwab@redhat.com>
     5.6 -Date: Tue, 17 May 2011 17:42:30 +0200
     5.7 -Subject: [PATCH] Reinstall NIS RPC headers
     5.8 -
     5.9 ----
    5.10 - nis/Makefile |    4 ++--
    5.11 - 1 files changed, 2 insertions(+), 2 deletions(-)
    5.12 -
    5.13 -diff --git a/nis/Makefile b/nis/Makefile
    5.14 -index b5c9609..d2934d9 100644
    5.15 ---- a/nis/Makefile
    5.16 -+++ b/nis/Makefile
    5.17 -@@ -23,9 +23,9 @@ subdir	:= nis
    5.18 - 
    5.19 - aux			:= nis_hash
    5.20 - 
    5.21 -+headers			:= $(wildcard rpcsvc/*.[hx])
    5.22 - distribute		:= nss-nis.h nss-nisplus.h nis_intern.h Banner \
    5.23 --			   nisplus-parser.h nis_xdr.h nss \
    5.24 --			   $(wildcard rpcsvc/*.[hx])
    5.25 -+			   nisplus-parser.h nis_xdr.h nss
    5.26 - 
    5.27 - # These are the databases available for the nis (and perhaps later nisplus)
    5.28 - # service.  This must be a superset of the services in nss.
    5.29 --- 
    5.30 -1.7.5.4
    5.31 -
     6.1 --- a/cross-arm-glibc/stuff/glibc-2.14-revert-4768ae77.patch	Mon Dec 30 16:29:37 2013 +0000
     6.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.3 @@ -1,37 +0,0 @@
     6.4 -diff -Naur glibc-orig//resolv/res_send.c glibc/resolv/res_send.c
     6.5 ---- glibc-orig//resolv/res_send.c	2011-06-10 18:59:03.041436996 +1000
     6.6 -+++ glibc/resolv/res_send.c	2011-06-10 19:08:09.379309323 +1000
     6.7 -@@ -549,7 +549,7 @@
     6.8 -				    ns, ansp, ansp2, nansp2, resplen2);
     6.9 -			if (n < 0)
    6.10 -				return (-1);
    6.11 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
    6.12 -+			if (n == 0)
    6.13 -				goto next_ns;
    6.14 -		} else {
    6.15 -			/* Use datagrams. */
    6.16 -@@ -559,7 +559,7 @@
    6.17 -				    ansp2, nansp2, resplen2);
    6.18 -			if (n < 0)
    6.19 -				return (-1);
    6.20 --			if (n == 0 && (buf2 == NULL || *resplen2 == 0))
    6.21 -+			if (n == 0)
    6.22 -				goto next_ns;
    6.23 -			if (v_circuit)
    6.24 -			  // XXX Check whether both requests failed or
    6.25 -@@ -1275,14 +1275,10 @@
    6.26 -				(*thisresplenp > *thisanssizp)
    6.27 -				? *thisanssizp : *thisresplenp);
    6.28 -
    6.29 --			if (recvresp1 || (buf2 != NULL && recvresp2)) {
    6.30 --			  *resplen2 = 0;
    6.31 -+			if (recvresp1 || (buf2 != NULL && recvresp2))
    6.32 -			  return resplen;
    6.33 --			}
    6.34 -			if (buf2 != NULL)
    6.35 -			  {
    6.36 --			    /* No data from the first reply.  */
    6.37 --			    resplen = 0;
    6.38 -			    /* We are waiting for a possible second reply.  */
    6.39 -			    if (hp->id == anhp->id)
    6.40 -			      recvresp1 = 1;
     7.1 --- a/cross-arm-glibc/stuff/glibc-2.14.1-fixes-1.patch	Mon Dec 30 16:29:37 2013 +0000
     7.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.3 @@ -1,159 +0,0 @@
     7.4 -Submitted By:            Matt Burgess <matthew_at_linuxfromscratch_dot_org>
     7.5 -Date:                    2011-10-07
     7.6 -Initial Package Version: 2.14.1
     7.7 -Upstream Status:         From upstream
     7.8 -Origin:                  Matt Burgess
     7.9 -Description:             Fixes Firefox crashes and a bug when programs link to
    7.10 -                         SDL.
    7.11 -
    7.12 -diff -Naur glibc-2.14.1.orig/elf/dl-close.c glibc-2.14.1/elf/dl-close.c
    7.13 ---- glibc-2.14.1.orig/elf/dl-close.c	2011-10-07 09:48:55.000000000 +0000
    7.14 -+++ glibc-2.14.1/elf/dl-close.c	2011-10-07 19:43:10.346411120 +0000
    7.15 -@@ -119,17 +119,8 @@
    7.16 -   if (map->l_direct_opencount > 0 || map->l_type != lt_loaded
    7.17 -       || dl_close_state != not_pending)
    7.18 -     {
    7.19 --      if (map->l_direct_opencount == 0)
    7.20 --	{
    7.21 --	  if (map->l_type == lt_loaded)
    7.22 --	    dl_close_state = rerun;
    7.23 --	  else if (map->l_type == lt_library)
    7.24 --	    {
    7.25 --	      struct link_map **oldp = map->l_initfini;
    7.26 --	      map->l_initfini = map->l_orig_initfini;
    7.27 --	      _dl_scope_free (oldp);
    7.28 --	    }
    7.29 --	}
    7.30 -+      if (map->l_direct_opencount == 0 && map->l_type == lt_loaded)
    7.31 -+	dl_close_state = rerun;
    7.32 - 
    7.33 -       /* There are still references to this object.  Do nothing more.  */
    7.34 -       if (__builtin_expect (GLRO(dl_debug_mask) & DL_DEBUG_FILES, 0))
    7.35 -diff -Naur glibc-2.14.1.orig/elf/dl-deps.c glibc-2.14.1/elf/dl-deps.c
    7.36 ---- glibc-2.14.1.orig/elf/dl-deps.c	2011-10-07 09:48:55.000000000 +0000
    7.37 -+++ glibc-2.14.1/elf/dl-deps.c	2011-10-07 19:43:10.348432639 +0000
    7.38 -@@ -478,6 +478,7 @@
    7.39 - 		  nneeded * sizeof needed[0]);
    7.40 - 	  atomic_write_barrier ();
    7.41 - 	  l->l_initfini = l_initfini;
    7.42 -+	  l->l_free_initfini = 1;
    7.43 - 	}
    7.44 - 
    7.45 -       /* If we have no auxiliary objects just go on to the next map.  */
    7.46 -@@ -678,6 +679,7 @@
    7.47 -   l_initfini[nlist] = NULL;
    7.48 -   atomic_write_barrier ();
    7.49 -   map->l_initfini = l_initfini;
    7.50 -+  map->l_free_initfini = 1;
    7.51 -   if (l_reldeps != NULL)
    7.52 -     {
    7.53 -       atomic_write_barrier ();
    7.54 -@@ -686,7 +688,7 @@
    7.55 -       _dl_scope_free (old_l_reldeps);
    7.56 -     }
    7.57 -   if (old_l_initfini != NULL)
    7.58 --      map->l_orig_initfini = old_l_initfini;
    7.59 -+    _dl_scope_free (old_l_initfini);
    7.60 - 
    7.61 -   if (errno_reason)
    7.62 -     _dl_signal_error (errno_reason == -1 ? 0 : errno_reason, objname,
    7.63 -diff -Naur glibc-2.14.1.orig/elf/dl-libc.c glibc-2.14.1/elf/dl-libc.c
    7.64 ---- glibc-2.14.1.orig/elf/dl-libc.c	2011-10-07 09:48:55.000000000 +0000
    7.65 -+++ glibc-2.14.1/elf/dl-libc.c	2011-10-07 19:43:10.352411141 +0000
    7.66 -@@ -279,6 +279,10 @@
    7.67 - 	      if (! old->dont_free)
    7.68 - 		free (old);
    7.69 - 	    }
    7.70 -+
    7.71 -+	  /* Free the initfini dependency list.  */
    7.72 -+	  if (l->l_free_initfini)
    7.73 -+	    free (l->l_initfini);
    7.74 - 	}
    7.75 - 
    7.76 -       if (__builtin_expect (GL(dl_ns)[ns]._ns_global_scope_alloc, 0) != 0
    7.77 -diff -Naur glibc-2.14.1.orig/elf/rtld.c glibc-2.14.1/elf/rtld.c
    7.78 ---- glibc-2.14.1.orig/elf/rtld.c	2011-10-07 09:48:55.000000000 +0000
    7.79 -+++ glibc-2.14.1/elf/rtld.c	2011-10-07 19:43:10.355406263 +0000
    7.80 -@@ -2263,6 +2263,7 @@
    7.81 - 	      lnp->dont_free = 1;
    7.82 - 	      lnp = lnp->next;
    7.83 - 	    }
    7.84 -+	  l->l_free_initfini = 0;
    7.85 - 
    7.86 - 	  if (l != &GL(dl_rtld_map))
    7.87 - 	    _dl_relocate_object (l, l->l_scope, GLRO(dl_lazy) ? RTLD_LAZY : 0,
    7.88 -diff -Naur glibc-2.14.1.orig/include/link.h glibc-2.14.1/include/link.h
    7.89 ---- glibc-2.14.1.orig/include/link.h	2011-10-07 09:48:55.000000000 +0000
    7.90 -+++ glibc-2.14.1/include/link.h	2011-10-07 19:43:10.357462703 +0000
    7.91 -@@ -192,6 +192,9 @@
    7.92 - 						 during LD_TRACE_PRELINKING=1
    7.93 - 						 contains any DT_SYMBOLIC
    7.94 - 						 libraries.  */
    7.95 -+    unsigned int l_free_initfini:1; /* Nonzero if l_initfini can be
    7.96 -+				       freed, ie. not allocated with
    7.97 -+				       the dummy malloc in ld.so.  */
    7.98 - 
    7.99 -     /* Collected information about own RPATH directories.  */
   7.100 -     struct r_search_path_struct l_rpath_dirs;
   7.101 -@@ -240,9 +243,6 @@
   7.102 - 
   7.103 -     /* List of object in order of the init and fini calls.  */
   7.104 -     struct link_map **l_initfini;
   7.105 --    /* The init and fini list generated at startup, saved when the
   7.106 --       object is also loaded dynamically.  */
   7.107 --    struct link_map **l_orig_initfini;
   7.108 - 
   7.109 -     /* List of the dependencies introduced through symbol binding.  */
   7.110 -     struct link_map_reldeps
   7.111 -diff -Naur glibc-2.14.1.orig/resolv/res_query.c glibc-2.14.1/resolv/res_query.c
   7.112 ---- glibc-2.14.1.orig/resolv/res_query.c	2011-10-07 09:48:55.000000000 +0000
   7.113 -+++ glibc-2.14.1/resolv/res_query.c	2011-10-07 19:43:10.361412711 +0000
   7.114 -@@ -122,6 +122,7 @@
   7.115 - 		  int *resplen2)
   7.116 - {
   7.117 - 	HEADER *hp = (HEADER *) answer;
   7.118 -+	HEADER *hp2;
   7.119 - 	int n, use_malloc = 0;
   7.120 - 	u_int oflags = statp->_flags;
   7.121 - 
   7.122 -@@ -239,26 +240,25 @@
   7.123 - 	  /* __libc_res_nsend might have reallocated the buffer.  */
   7.124 - 	  hp = (HEADER *) *answerp;
   7.125 - 
   7.126 --	/* We simplify the following tests by assigning HP to HP2.  It
   7.127 --	   is easy to verify that this is the same as ignoring all
   7.128 --	   tests of HP2.  */
   7.129 --	HEADER *hp2 = answerp2 ? (HEADER *) *answerp2 : hp;
   7.130 --
   7.131 --	if (n < (int) sizeof (HEADER) && answerp2 != NULL
   7.132 --	    && *resplen2 > (int) sizeof (HEADER))
   7.133 -+	/* We simplify the following tests by assigning HP to HP2 or
   7.134 -+	   vice versa.  It is easy to verify that this is the same as
   7.135 -+	   ignoring all tests of HP or HP2.  */
   7.136 -+	if (answerp2 == NULL || *resplen2 < (int) sizeof (HEADER))
   7.137 - 	  {
   7.138 --	    /* Special case of partial answer.  */
   7.139 --	    assert (hp != hp2);
   7.140 --	    hp = hp2;
   7.141 -+	    hp2 = hp;
   7.142 - 	  }
   7.143 --	else if (answerp2 != NULL && *resplen2 < (int) sizeof (HEADER)
   7.144 --		 && n > (int) sizeof (HEADER))
   7.145 -+	else
   7.146 - 	  {
   7.147 --	    /* Special case of partial answer.  */
   7.148 --	    assert (hp != hp2);
   7.149 --	    hp2 = hp;
   7.150 -+	    hp2 = (HEADER *) *answerp2;
   7.151 -+	    if (n < (int) sizeof (HEADER))
   7.152 -+	      {
   7.153 -+	        hp = hp2;
   7.154 -+	      }
   7.155 - 	  }
   7.156 - 
   7.157 -+	/* Make sure both hp and hp2 are defined */
   7.158 -+	assert((hp != NULL) && (hp2 != NULL));
   7.159 -+
   7.160 - 	if ((hp->rcode != NOERROR || ntohs(hp->ancount) == 0)
   7.161 - 	    && (hp2->rcode != NOERROR || ntohs(hp2->ancount) == 0)) {
   7.162 - #ifdef DEBUG
     8.1 --- a/cross-arm-glibc/stuff/glibc-2.14.1-gcc_fix-1.patch	Mon Dec 30 16:29:37 2013 +0000
     8.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.3 @@ -1,49 +0,0 @@
     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 --- a/cross-arm-glibc/stuff/glibc-2.14.1-sort-1.patch	Mon Dec 30 16:29:37 2013 +0000
     9.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     9.3 @@ -1,273 +0,0 @@
     9.4 -Submitted By:            Bruce Dubbs <bdubbs_at_linuxfromscratch_dot_org>
     9.5 -Date:                    2012-02-24
     9.6 -Initial Package Version: 2.14.1
     9.7 -Upstream Status:         From upstream
     9.8 -Origin:                  Upstream
     9.9 -Description:             Sort objects by dependency before relocation.
    9.10 -                         Fixes segfault in dlopen for several programs.
    9.11 -
    9.12 -diff --git a/Makeconfig b/Makeconfig
    9.13 -index 2db2821..68547b2 100644
    9.14 ---- a/Makeconfig
    9.15 -+++ b/Makeconfig
    9.16 -@@ -938,6 +938,12 @@ libdl =
    9.17 - endif
    9.18 - endif
    9.19 - 
    9.20 -+ifeq ($(build-shared),yes)
    9.21 -+libm = $(common-objpfx)math/libm.so$(libm.so-version)
    9.22 -+else
    9.23 -+libm = $(common-objpfx)math/libm.a
    9.24 -+endif
    9.25 -+
    9.26 - # These are the subdirectories containing the library source.  The order
    9.27 - # is more or less arbitrary.  The sorting step will take care of the
    9.28 - # dependencies.
    9.29 -diff --git a/elf/Makefile b/elf/Makefile
    9.30 -index 052e763..3f1772a 100644
    9.31 ---- a/elf/Makefile
    9.32 -+++ b/elf/Makefile
    9.33 -@@ -124,7 +124,8 @@ distribute	:= rtld-Rules \
    9.34 - 		   tst-initordera1.c tst-initordera2.c tst-initorderb1.c \
    9.35 - 		   tst-initorderb2.c tst-initordera3.c tst-initordera4.c \
    9.36 - 		   tst-initorder.c \
    9.37 --		   tst-initorder2.c
    9.38 -+		   tst-initorder2.c \
    9.39 -+		   tst-relsort1.c tst-relsort1mod1.c tst-relsort1mod2.c
    9.40 - 
    9.41 - CFLAGS-dl-runtime.c = -fexceptions -fasynchronous-unwind-tables
    9.42 - CFLAGS-dl-lookup.c = -fexceptions -fasynchronous-unwind-tables
    9.43 -@@ -227,7 +228,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
    9.44 - 	 tst-audit1 tst-audit2 \
    9.45 - 	 tst-stackguard1 tst-addr1 tst-thrlock \
    9.46 - 	 tst-unique1 tst-unique2 tst-unique3 tst-unique4 \
    9.47 --	 tst-initorder tst-initorder2
    9.48 -+	 tst-initorder tst-initorder2 tst-relsort1
    9.49 - #	 reldep9
    9.50 - test-srcs = tst-pathopt
    9.51 - selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
    9.52 -@@ -290,7 +291,9 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
    9.53 - 		tst-initordera1 tst-initorderb1 \
    9.54 - 		tst-initordera2 tst-initorderb2 \
    9.55 - 		tst-initordera3 tst-initordera4 \
    9.56 --		tst-initorder2a tst-initorder2b tst-initorder2c tst-initorder2d
    9.57 -+		tst-initorder2a tst-initorder2b tst-initorder2c \
    9.58 -+		tst-initorder2d \
    9.59 -+		tst-relsort1mod1 tst-relsort1mod2
    9.60 - ifeq (yes,$(have-initfini-array))
    9.61 - modules-names += tst-array2dep tst-array5dep
    9.62 - endif
    9.63 -@@ -1195,3 +1198,9 @@ CFLAGS-tst-auditmod6b.c += $(AVX-CFLAGS)
    9.64 - CFLAGS-tst-auditmod6c.c += $(AVX-CFLAGS)
    9.65 - CFLAGS-tst-auditmod7b.c += $(AVX-CFLAGS)
    9.66 - endif
    9.67 -+
    9.68 -+$(objpfx)tst-relsort1: $(libdl)
    9.69 -+$(objpfx)tst-relsort1mod1.so: $(libm) $(objpfx)tst-relsort1mod2.so
    9.70 -+$(objpfx)tst-relsort1mod2.so: $(libm)
    9.71 -+$(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \
    9.72 -+			   $(objpfx)tst-relsort1mod2.so
    9.73 -diff --git a/elf/dl-open.c b/elf/dl-open.c
    9.74 -index a0b5c50..a56bdc1 100644
    9.75 ---- a/elf/dl-open.c
    9.76 -+++ b/elf/dl-open.c
    9.77 -@@ -1,5 +1,5 @@
    9.78 - /* Load a shared object at runtime, relocate it, and run its initializer.
    9.79 --   Copyright (C) 1996-2007, 2009, 2010, 2011 Free Software Foundation, Inc.
    9.80 -+   Copyright (C) 1996-2007, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
    9.81 -    This file is part of the GNU C Library.
    9.82 - 
    9.83 -    The GNU C Library is free software; you can redistribute it and/or
    9.84 -@@ -303,45 +303,109 @@ dl_open_worker (void *a)
    9.85 -   if (GLRO(dl_lazy))
    9.86 -     reloc_mode |= mode & RTLD_LAZY;
    9.87 - 
    9.88 --  /* Relocate the objects loaded.  We do this in reverse order so that copy
    9.89 --     relocs of earlier objects overwrite the data written by later objects.  */
    9.90 --
    9.91 -+  /* Sort the objects by dependency for the relocation process.  This
    9.92 -+     allows IFUNC relocations to work and it also means copy
    9.93 -+     relocation of dependencies are if necessary overwritten.  */
    9.94 -+  size_t nmaps = 0;
    9.95 -   struct link_map *l = new;
    9.96 --  while (l->l_next)
    9.97 --    l = l->l_next;
    9.98 --  while (1)
    9.99 -+  do
   9.100 -+    {
   9.101 -+      if (! l->l_real->l_relocated)
   9.102 -+	++nmaps;
   9.103 -+      l = l->l_next;
   9.104 -+    }
   9.105 -+  while (l != NULL);
   9.106 -+  struct link_map *maps[nmaps];
   9.107 -+  nmaps = 0;
   9.108 -+  l = new;
   9.109 -+  do
   9.110 -     {
   9.111 -       if (! l->l_real->l_relocated)
   9.112 -+	maps[nmaps++] = l;
   9.113 -+      l = l->l_next;
   9.114 -+    }
   9.115 -+  while (l != NULL);
   9.116 -+  if (nmaps > 1)
   9.117 -+    {
   9.118 -+      char seen[nmaps];
   9.119 -+      memset (seen, '\0', nmaps);
   9.120 -+      size_t i = 0;
   9.121 -+      while (1)
   9.122 - 	{
   9.123 --#ifdef SHARED
   9.124 --	  if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
   9.125 -+	  ++seen[i];
   9.126 -+	  struct link_map *thisp = maps[i];
   9.127 -+
   9.128 -+	  /* Find the last object in the list for which the current one is
   9.129 -+	     a dependency and move the current object behind the object
   9.130 -+	     with the dependency.  */
   9.131 -+	  size_t k = nmaps - 1;
   9.132 -+	  while (k > i)
   9.133 - 	    {
   9.134 --	      /* If this here is the shared object which we want to profile
   9.135 --		 make sure the profile is started.  We can find out whether
   9.136 --		 this is necessary or not by observing the `_dl_profile_map'
   9.137 --		 variable.  If was NULL but is not NULL afterwars we must
   9.138 --		 start the profiling.  */
   9.139 --	      struct link_map *old_profile_map = GL(dl_profile_map);
   9.140 -+	      struct link_map **runp = maps[k]->l_initfini;
   9.141 -+	      if (runp != NULL)
   9.142 -+		/* Look through the dependencies of the object.  */
   9.143 -+		while (*runp != NULL)
   9.144 -+		  if (__builtin_expect (*runp++ == thisp, 0))
   9.145 -+		    {
   9.146 -+		      /* Move the current object to the back past the last
   9.147 -+			 object with it as the dependency.  */
   9.148 -+		      memmove (&maps[i], &maps[i + 1],
   9.149 -+			       (k - i) * sizeof (maps[0]));
   9.150 -+		      maps[k] = thisp;
   9.151 -+
   9.152 -+		      if (seen[i + 1] > 1)
   9.153 -+			{
   9.154 -+			  ++i;
   9.155 -+			  goto next_clear;
   9.156 -+			}
   9.157 -+
   9.158 -+		      char this_seen = seen[i];
   9.159 -+		      memmove (&seen[i], &seen[i + 1],
   9.160 -+			       (k - i) * sizeof (seen[0]));
   9.161 -+		      seen[k] = this_seen;
   9.162 -+
   9.163 -+		      goto next;
   9.164 -+		    }
   9.165 -+
   9.166 -+	      --k;
   9.167 -+	    }
   9.168 - 
   9.169 --	      _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
   9.170 -+	  if (++i == nmaps)
   9.171 -+	    break;
   9.172 -+	next_clear:
   9.173 -+	  memset (&seen[i], 0, (nmaps - i) * sizeof (seen[0]));
   9.174 -+	next:;
   9.175 -+	}
   9.176 -+    }
   9.177 - 
   9.178 --	      if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
   9.179 --		{
   9.180 --		  /* We must prepare the profiling.  */
   9.181 --		  _dl_start_profile ();
   9.182 -+  for (size_t i = nmaps; i-- > 0; )
   9.183 -+    {
   9.184 -+      l = maps[i];
   9.185 - 
   9.186 --		  /* Prevent unloading the object.  */
   9.187 --		  GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
   9.188 --		}
   9.189 -+#ifdef SHARED
   9.190 -+      if (__builtin_expect (GLRO(dl_profile) != NULL, 0))
   9.191 -+	{
   9.192 -+	  /* If this here is the shared object which we want to profile
   9.193 -+	     make sure the profile is started.  We can find out whether
   9.194 -+	     this is necessary or not by observing the `_dl_profile_map'
   9.195 -+	     variable.  If it was NULL but is not NULL afterwars we must
   9.196 -+	     start the profiling.  */
   9.197 -+	  struct link_map *old_profile_map = GL(dl_profile_map);
   9.198 -+
   9.199 -+	  _dl_relocate_object (l, l->l_scope, reloc_mode | RTLD_LAZY, 1);
   9.200 -+
   9.201 -+	  if (old_profile_map == NULL && GL(dl_profile_map) != NULL)
   9.202 -+	    {
   9.203 -+	      /* We must prepare the profiling.  */
   9.204 -+	      _dl_start_profile ();
   9.205 -+
   9.206 -+	      /* Prevent unloading the object.  */
   9.207 -+	      GL(dl_profile_map)->l_flags_1 |= DF_1_NODELETE;
   9.208 - 	    }
   9.209 --	  else
   9.210 --#endif
   9.211 --	    _dl_relocate_object (l, l->l_scope, reloc_mode, 0);
   9.212 - 	}
   9.213 --
   9.214 --      if (l == new)
   9.215 --	break;
   9.216 --      l = l->l_prev;
   9.217 -+      else
   9.218 -+#endif
   9.219 -+	_dl_relocate_object (l, l->l_scope, reloc_mode, 0);
   9.220 -     }
   9.221 - 
   9.222 -   /* If the file is not loaded now as a dependency, add the search
   9.223 -diff --git a/elf/tst-relsort1.c b/elf/tst-relsort1.c
   9.224 -new file mode 100644
   9.225 -index 0000000..972100c
   9.226 ---- /dev/null
   9.227 -+++ b/elf/tst-relsort1.c
   9.228 -@@ -0,0 +1,19 @@
   9.229 -+#include <dlfcn.h>
   9.230 -+#include <stdio.h>
   9.231 -+
   9.232 -+
   9.233 -+static int
   9.234 -+do_test ()
   9.235 -+{
   9.236 -+  const char lib[] = "$ORIGIN/tst-relsort1mod1.so";
   9.237 -+  void *h = dlopen (lib, RTLD_NOW);
   9.238 -+  if (h == NULL)
   9.239 -+    {
   9.240 -+      puts (dlerror ());
   9.241 -+      return 1;
   9.242 -+    }
   9.243 -+  return 0;
   9.244 -+}
   9.245 -+
   9.246 -+#define TEST_FUNCTION do_test ()
   9.247 -+#include "../test-skeleton.c"
   9.248 -diff --git a/elf/tst-relsort1mod1.c b/elf/tst-relsort1mod1.c
   9.249 -new file mode 100644
   9.250 -index 0000000..9e4a943
   9.251 ---- /dev/null
   9.252 -+++ b/elf/tst-relsort1mod1.c
   9.253 -@@ -0,0 +1,7 @@
   9.254 -+extern int foo (double);
   9.255 -+
   9.256 -+int
   9.257 -+bar (void)
   9.258 -+{
   9.259 -+  return foo (1.2);
   9.260 -+}
   9.261 -diff --git a/elf/tst-relsort1mod2.c b/elf/tst-relsort1mod2.c
   9.262 -new file mode 100644
   9.263 -index 0000000..a2c3e55
   9.264 ---- /dev/null
   9.265 -+++ b/elf/tst-relsort1mod2.c
   9.266 -@@ -0,0 +1,7 @@
   9.267 -+#include <math.h>
   9.268 -+
   9.269 -+int
   9.270 -+foo (double d)
   9.271 -+{
   9.272 -+  return floor (d) != 0.0;
   9.273 -+}
   9.274 --- 
   9.275 -1.7.3.4
   9.276 -
    10.1 --- a/cross-x86_64-binutils/receipt	Mon Dec 30 16:29:37 2013 +0000
    10.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    10.3 @@ -1,63 +0,0 @@
    10.4 -# SliTaz package receipt.
    10.5 -
    10.6 -PACKAGE="cross-x86_64-binutils"
    10.7 -VERSION="2.22"
    10.8 -CATEGORY="system-tools"
    10.9 -SHORT_DESC="Cross compilation linker targeting x86_64 platform."
   10.10 -MAINTAINER="erjo@slitaz.org"
   10.11 -LICENSE="GPL2"
   10.12 -SOURCE="binutils"
   10.13 -WEB_SITE="http://www.gnu.org/software/binutils/"
   10.14 -TARBALL="$SOURCE-$VERSION.tar.bz2"
   10.15 -WGET_URL="$GNU_MIRROR/$SOURCE/$TARBALL"
   10.16 -
   10.17 -DEPENDS=""
   10.18 -BUILD_DEPENDS=""
   10.19 -
   10.20 -# Cross toolchain variables.
   10.21 -CROSS_TARGET="x86_64-slitaz-linux"
   10.22 -CROSS_PREFIX="/usr/cross/x86_64"
   10.23 -CROSS_TRIPLET="--build=$HOST_SYSTEM --host=$HOST_SYSTEM --target=$CROSS_TARGET"
   10.24 -BUILD64="-m64"
   10.25 -
   10.26 -# CFLAGS and CXXFLAGS must not be set during the building of cross-tools.
   10.27 -unset CFLAGS CXXFLAGS CONFIG_SITE
   10.28 -
   10.29 -# Rules to configure and make the package.
   10.30 -compile_rules()
   10.31 -{
   10.32 -	cd $src
   10.33 -	mkdir ../build && cd ../build
   10.34 -	#--with-sysroot=$CROSS_PREFIX
   10.35 -	#--enable-shared
   10.36 -	$src/configure \
   10.37 -		--prefix=$CROSS_PREFIX \
   10.38 -		--program-prefix=${CROSS_TARGET}- \
   10.39 -		--enable-targets=$ARCH-slitaz-linux \
   10.40 -		--enable-64-bit-bfd \
   10.41 -		--disable-multilib \
   10.42 -		--disable-werror \
   10.43 -		--disable-nls \
   10.44 -		$CROSS_TRIPLET &&
   10.45 -	make configure-host &&
   10.46 -	make && make install
   10.47 -	#make tooldir=$CROSS_PREFIX &&
   10.48 -	#make tooldir=$CROSS_PREFIX install
   10.49 -}
   10.50 -
   10.51 -# Rules to gen a SliTaz package suitable for Tazpkg.
   10.52 -genpkg_rules()
   10.53 -{
   10.54 -	mkdir -p ${fs}${CROSS_PREFIX}/include
   10.55 -	cp -a $install/usr/cross $fs/usr
   10.56 -	rm -rf ${fs}${CROSS_PREFIX}/share
   10.57 -
   10.58 -	# libiberty.h
   10.59 -	cp -a $src/include/libiberty.h ${fs}${CROSS_PREFIX}/include
   10.60 -
   10.61 -	# Move ldscripts and create symlink
   10.62 -	cd ${fs}${CROSS_PREFIX}/$CROSS_TARGET
   10.63 -	mv lib/ldscripts ../lib
   10.64 -	rmdir lib && ln -s ../lib .
   10.65 -	chown -R root.root $fs
   10.66 -}