cookutils rev 406

cook: setup set gcc path if sysroot is used
author Christophe Lincoln <pankso@slitaz.org>
date Sun May 13 18:29:41 2012 +0200 (2012-05-13)
parents a20fac3c915f
children 2e5c6cfad4ed
files cook
line diff
     1.1 --- a/cook	Sun May 13 17:59:11 2012 +0200
     1.2 +++ b/cook	Sun May 13 18:29:41 2012 +0200
     1.3 @@ -957,7 +957,12 @@
     1.4  		. /etc/slitaz/cook.conf
     1.5  		echo "Target arch   : $ARCH"
     1.6  		echo "Configure args: $CONFIGURE_ARGS"
     1.7 -		if [ -x /usr/cross/$ARCH/bin/${HOST_SYSTEM}-gcc ]; then
     1.8 +		if [ "$SYSROOT" ]; then
     1.9 +			CC=/usr/bin/${HOST_SYSTEM}-gcc
    1.10 +		else
    1.11 +			CC=/usr/cross/$ARCH/bin/${HOST_SYSTEM}-gcc
    1.12 +		fi
    1.13 +		if [ -x $CC ]; then
    1.14  			echo "Cross compiler: ${HOST_SYSTEM}-gcc"
    1.15  		else
    1.16  			echo "WARNING: C compiler is missing: ${HOST_SYSTEM}-gcc"