summaryrefslogtreecommitdiff
path: root/util/xcompile
diff options
context:
space:
mode:
Diffstat (limited to 'util/xcompile')
-rwxr-xr-xutil/xcompile/xcompile14
1 files changed, 13 insertions, 1 deletions
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index c1c42afb84..4560771bfe 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -20,7 +20,19 @@
#
TMPFILE=""
-XGCCPATH=${1:-"`pwd`/util/crossgcc/xgcc/bin/"}
+XGCCPATH=$1
+
+# libpayload crossgcc path
+if [ -d "`pwd`/../../util/crossgcc/xgcc/bin/" ]
+then
+ XGCCPATH=${XGCCPATH:-"`pwd`/../../util/crossgcc/xgcc/bin/"}
+fi
+
+# coreboot crossgcc path
+if [ -d "`pwd`/util/crossgcc/xgcc/bin/" ]
+then
+ XGCCPATH=${XGCCPATH:-"`pwd`/util/crossgcc/xgcc/bin/"}
+fi
die() {
echo "ERROR: $*" >&2