cookutils rev 650

Some more ARM support
author Christophe Lincoln <pankso@slitaz.org>
date Tue Mar 04 00:10:07 2014 +0100 (2014-03-04)
parents af5a93d961f0
children 8e8237a1e876
files cook cross
line diff
     1.1 --- a/cook	Mon Mar 03 23:18:29 2014 +0100
     1.2 +++ b/cook	Tue Mar 04 00:10:07 2014 +0100
     1.3 @@ -1123,17 +1123,22 @@
     1.4  			/etc/slitaz/cook.conf
     1.5  		case "$arch" in
     1.6  			arm)
     1.7 -				sed -i \
     1.8 -					-e s'/CFLAGS=.*/CFLAGS="-march=armv6 -O2"/' \
     1.9 -					-e s'/HOST_SYSTEM=.*/HOST_SYSTEM=$ARCH-slitaz-linux-gnueabi/' \
    1.10 -					-e s'/xorg-dev/""/' \
    1.11 -					/etc/slitaz/cook.conf ;;
    1.12 +				flags="-O2 -march=armv6"
    1.13 +				host="$ARCH-slitaz-linux-gnueabi" ;;
    1.14 +			armv6hf)
    1.15 +				flags="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard"
    1.16 +				host="$ARCH-slitaz-linux-gnueabi" ;;
    1.17 +			armv7)
    1.18 +				flags="-Os -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -pipe"
    1.19 +				host="$ARCH-slitaz-linux-gnueabi" ;;
    1.20  			x86_64)
    1.21 -				sed -i \
    1.22 -					-e s'/CFLAGS=.*/CFLAGS=""/' \
    1.23 -					-e s'/HOST_SYSTEM=.*/HOST_SYSTEM=$ARCH-slitaz-linux/' \
    1.24 -					/etc/slitaz/cook.conf ;;
    1.25 +				flags="-march=nocona -O2 -pipe"
    1.26 +				host="$ARCH-slitaz-linux" ;;
    1.27  		esac
    1.28 +		sed -i \
    1.29 +			-e s"/CFLAGS=.*/CFLAGS=\"$flags\"/" \
    1.30 +			-e s"/HOST_SYSTEM=.*/HOST_SYSTEM=$host/" \
    1.31 +			/etc/slitaz/cook.conf
    1.32  		. /etc/slitaz/cook.conf
    1.33  		sysroot=$CROSS_TREE/sysroot
    1.34  		tools=/cross/$arch/tools
    1.35 @@ -1142,6 +1147,7 @@
    1.36  		# L10n: keep the same width of translations to get a consistent view
    1.37  		_ "Target arch     : \$ARCH"
    1.38  		_ "Configure args  : \$CONFIGURE_ARGS"
    1.39 +		_ "Build flags     : \$flags"
    1.40  		_ "Arch sysroot    : \$sysroot"
    1.41  		_ "Tools prefix    : \$tools/bin"
    1.42  		# Tell the packages manager where to find packages.
     2.1 --- a/cross	Mon Mar 03 23:18:29 2014 +0100
     2.2 +++ b/cross	Tue Mar 04 00:10:07 2014 +0100
     2.3 @@ -201,7 +201,7 @@
     2.4  	echo "Configure: $GLIBC_ARGS"
     2.5  	# Some arch may need glibc-ports and custom CFLAGS
     2.6  	case "$ARCH" in
     2.7 -		arm)
     2.8 +		arm*)
     2.9  			export CFLAGS="-march=armv6 -O2"
    2.10  			[ -f "$SRC/glibc-ports-$GLIBC_VERSION.tar.bz2" ] || wget \
    2.11  				http://ftp.gnu.org/gnu/libc/glibc-ports-$GLIBC_VERSION.tar.bz2 \
    2.12 @@ -258,8 +258,12 @@
    2.13  	tar xjf $SRC/$eglibc_tarball || exit 1
    2.14  	# Some arch may need glibc-ports and custom CFLAGS
    2.15  	case "$ARCH" in
    2.16 -		arm)
    2.17 -			export CFLAGS="-march=armv6 -O2"
    2.18 +		arm) export CFLAGS="-march=armv6 -O2" ;;
    2.19 +		armv6hf) export CFLAGS="-O2 -march=armv6j -mfpu=vfp -mfloat-abi=hard" ;;
    2.20 +		armv7) export CFLAGS="-Os -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=softfp -pipe" ;;
    2.21 +	esac
    2.22 +	case "$ARCH" in
    2.23 +		arm*)
    2.24  			if [ ! -d "$source/eglibc-ports-$EGLIBC_VERSION" ]; then
    2.25  				echo "Cloning $eglibc_wget/ports"
    2.26  				svn co $eglibc_wget/ports eglibc-ports-$EGLIBC_VERSION >/dev/null