wok rev 10024

glibc: dont build with -Os and better use default CFLAGS also need --build and --host
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 19 18:19:46 2011 +0200 (2011-05-19)
parents d45b76bbf023
children 614a9e8d90a4
files glibc/receipt
line diff
     1.1 --- a/glibc/receipt	Thu May 19 14:30:25 2011 +0000
     1.2 +++ b/glibc/receipt	Thu May 19 18:19:46 2011 +0200
     1.3 @@ -27,6 +27,7 @@
     1.4  	mkdir ../glibc-build && cd ../glibc-build
     1.5  
     1.6  	# glibc no longer support i386, so use -march=i486 for better compatibility.
     1.7 +	# If i686 ???
     1.8  	case $ARCH in
     1.9  		i?86) echo "CFLAGS += -march=i486 -mtune=native" > configparms ;;
    1.10  	esac
    1.11 @@ -78,12 +79,22 @@
    1.12  	# to the source tree to keep $src and $_pkg for genpkg.
    1.13  	mkdir -p $WOK/$PACKAGE/install/etc
    1.14  	touch $WOK/$PACKAGE/install/etc/ld.so.conf
    1.15 -	echo "CFLAGS += $CFLAGS" > configparms
    1.16 +	# Use -march=i486 for better compatibility. Also Glibc dont build with -Os.
    1.17 +	unset CFLAGS
    1.18 +	case $ARCH in
    1.19 +		i386|i486)
    1.20 +			echo "CFLAGS += -O2 -march=i486 -pipe -fomit-frame-pointer" > \
    1.21 +				configparms ;;
    1.22 +		*)
    1.23 +			echo "CFLAGS += -O2 -march=$ARCH -pipe -fomit-frame-pointer" > \
    1.24 +				configparms ;;
    1.25 +	esac
    1.26  	{ $src/configure \
    1.27  		--disable-profile \
    1.28  		--enable-add-ons \
    1.29  		--enable-kernel=2.6.22.5 \
    1.30 -		--libexecdir=/usr/lib/glibc &&
    1.31 +		--libexecdir=/usr/lib/glibc \
    1.32 +		$CONFIGURE_ARGS &&
    1.33  	make &&
    1.34  	make install_root=$DESTDIR install
    1.35  	} || return 1