Allow XGCCPATH to be set on the make command line.
authorMarc Jones <marcj303@gmail.com>
Fri, 7 Oct 2011 23:20:30 +0000 (17:20 -0600)
committerPatrick Georgi <patrick@georgi-clan.de>
Sun, 23 Oct 2011 16:55:27 +0000 (18:55 +0200)
The xgcc toolchain may be moved by the user and passed in on the commandline. Updates the Makefile and the xcompile script.

Change-Id: I05797b2cabce39bdd7868c2515f30d34043fc8cc
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: http://review.coreboot.org/318
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Makefile
util/xcompile/xcompile

index 44a1d63198077dede020918fedc52e1bb3da00cb..c5438979f75799fb9cdbd274f4cc7afdaaaa29d6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -34,7 +34,7 @@ ifeq ($(INNER_SCANBUILD),y)
 CC_real:=$(CC)
 endif
 
 CC_real:=$(CC)
 endif
 
-$(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile > .xcompile)))
+$(if $(wildcard .xcompile),,$(eval $(shell bash util/xcompile/xcompile $(XGCCPATH) > .xcompile)))
 include .xcompile
 
 ifeq ($(INNER_SCANBUILD),y)
 include .xcompile
 
 ifeq ($(INNER_SCANBUILD),y)
index b68e1b3a7910aa1ea28f86565d31709e2f385d9a..9a0a295c75d86e2a91b9bf09978e5db1bce23aa8 100644 (file)
@@ -35,7 +35,8 @@ for make in make gmake gnumake; do
 done
 
 GCCPREFIX=invalid
 done
 
 GCCPREFIX=invalid
-XGCCPATH="`pwd`/util/crossgcc/xgcc/bin/"
+XGCCPATH=${1:-"`pwd`/util/crossgcc/xgcc/bin/"}
+echo '#XGCCPATH='${XGCCPATH}
 TMPFILE=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz`
 touch $TMPFILE
 
 TMPFILE=`mktemp /tmp/temp.XXXX 2>/dev/null || echo /tmp/temp.78gOIUGz`
 touch $TMPFILE