cookutils rev 675

Make it cross compile for armv6hf
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 26 04:50:37 2014 +0200 (2014-04-26)
parents 5c75485e8406
children d39012c42de3
files cook cross
line diff
     1.1 --- a/cook	Fri Apr 25 14:14:16 2014 +0200
     1.2 +++ b/cook	Sat Apr 26 04:50:37 2014 +0200
     1.3 @@ -493,7 +493,7 @@
     1.4  
     1.5  	# Handle cross-tools.
     1.6  	case "$ARCH" in
     1.7 -		arm|x86_64)
     1.8 +		arm*|x86_64)
     1.9  			# CROSS_COMPILE is used by at least Busybox and the kernel to set
    1.10  			# the cross-tools prefix. Sysroot is the root of our target arch
    1.11  			sysroot=$CROSS_TREE/sysroot
    1.12 @@ -1474,7 +1474,8 @@
    1.13  		# Some packages are not included in some arch or fail to cross compile.
    1.14  		: ${HOST_ARCH=i486}
    1.15  		debug "Host arch $HOST_ARCH"
    1.16 -		if ! $(echo "$HOST_ARCH" | egrep -q "$ARCH|any"); then
    1.17 +		# Handle arm{v6hf,v7,..}
    1.18 +		if ! $(echo "$HOST_ARCH" | egrep -q "${ARCH%v[0-9]*}|any"); then
    1.19  			_ "cook: HOST_ARCH=\$HOST_ARCH"
    1.20  			_ "cook: \$pkg doesn't cook or is not included in: \$ARCH"
    1.21  			[ "$CROSS_BUGS" ] && _ "bugs: \$CROSS_BUGS"
     2.1 --- a/cross	Fri Apr 25 14:14:16 2014 +0200
     2.2 +++ b/cross	Sat Apr 26 04:50:37 2014 +0200
     2.3 @@ -492,7 +492,7 @@
     2.4  		# cross compilation fail. Some receipt may got hack to force
     2.5  		# use of libs in sysroot but 'cross libhack' should be prefered.
     2.6  		echo "Libdir: $sysroot/usr/lib" 
     2.7 -		for la in $(fgrep -l libdir= $sysroot/usr/lib/*.la)
     2.8 +		for la in $(fgrep -l libdir= $sysroot/usr/lib/*.la 2>/dev/null)
     2.9  		do
    2.10  			if fgrep -q "libdir='/usr/lib'" ${la}; then
    2.11  				echo "Cross fixing: $(basename $la)"