wok rev 10031

glibc: make it cross compilable
author Christophe Lincoln <pankso@slitaz.org>
date Fri May 20 02:51:43 2011 +0200 (2011-05-20)
parents 5a24b1cc7c00
children 311258b900d3
files glibc/receipt
line diff
     1.1 --- a/glibc/receipt	Fri May 20 01:50:57 2011 +0200
     1.2 +++ b/glibc/receipt	Fri May 20 02:51:43 2011 +0200
     1.3 @@ -53,10 +53,9 @@
     1.4  # Rules to configure and make the package.
     1.5  compile_rules()
     1.6  {
     1.7 -	# Some patch are needed to make things work correctly.
     1.8 -	# Following patches and sed fixes comes from LFS development book :
     1.9 +	cd $src
    1.10 +	# Following patches and sed fixes comes from LFS development book:
    1.11  	# http://www.linuxfromscratch.org/lfs/view/development/chapter06/glibc.html
    1.12 -	cd $src
    1.13  	DL=$(readelf -l /bin/sh | sed -n 's@.*interpret.*/tools\(.*\)]$@\1@p')
    1.14  	sed -i "s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=$DL -o|" \
    1.15  		scripts/test-installation.pl
    1.16 @@ -72,35 +71,32 @@
    1.17  		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedrdlock.S \
    1.18  		nptl/sysdeps/unix/sysv/linux/x86_64/pthread_rwlock_timedwrlock.S
    1.19  
    1.20 -	mkdir ../glibc-build
    1.21 -	cd ../glibc-build
    1.22 -
    1.23 -	# Install in the build tree and then move all files
    1.24 -	# to the source tree to keep $src and $_pkg for genpkg.
    1.25 +	# Glibc needs ld.so.conf in the install destdir.
    1.26  	mkdir -p $WOK/$PACKAGE/install/etc
    1.27  	touch $WOK/$PACKAGE/install/etc/ld.so.conf
    1.28 -	# Use -march=i486 for better compatibility. Also Glibc dont build with -Os.
    1.29 -	unset CFLAGS
    1.30 -	case $ARCH in
    1.31 +	mkdir ../glibc-build && cd ../glibc-build
    1.32 +	
    1.33 +	# Read the INSTALL file in glibc. Also Glibc dont build with -Os flag.
    1.34 +	# --enale-kernel use latest SliTaz Kernel version. From Glibc INSTALL:
    1.35 +	# "The higher the VERSION number is, the less compatibility code is
    1.36 +	# added, and the faster the code gets."
    1.37 +	unset CFLAGS CXXFLAGS
    1.38 +	case "$ARCH" in
    1.39  		i386|i486)
    1.40 -			echo "CFLAGS += -O2 -march=i486 -pipe -fomit-frame-pointer" > \
    1.41 -				configparms ;;
    1.42 +			echo "CFLAGS += -O2 -march=i486 -mtune=native" > configparms ;;
    1.43  		*)
    1.44 -			echo "CFLAGS += -O2 -march=$ARCH -pipe -fomit-frame-pointer" > \
    1.45 -				configparms ;;
    1.46 +			echo "CFLAGS += -O2 -march=$ARCH -mtune=native" > configparms ;;
    1.47  	esac
    1.48  	{ $src/configure \
    1.49  		--disable-profile \
    1.50  		--enable-add-ons \
    1.51 -		--enable-kernel=2.6.22.5 \
    1.52 +		--enable-kernel=2.6.37 \
    1.53  		--libexecdir=/usr/lib/glibc \
    1.54  		$CONFIGURE_ARGS &&
    1.55 -	make &&
    1.56 -	make install_root=$DESTDIR install
    1.57 +	make && make install_root=$DESTDIR install
    1.58  	} || return 1
    1.59  
    1.60 -	# If temporary toolchain was previously used, switch to
    1.61 -	# regular toolchain.
    1.62 +	# If temporary toolchain was previously used, switch to regular toolchain.
    1.63  	[ -d /tools ] || return
    1.64  	mv /tools/bin/ld /tools/bin/ld-old
    1.65  	mv /tools/$(gcc -dumpmachine)/bin/ld /tools/$(gcc -dumpmachine)/bin/ld-old