aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cross.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/cross.sh b/scripts/cross.sh
index 34fef0f7..f6bbb4b3 100755
--- a/scripts/cross.sh
+++ b/scripts/cross.sh
@@ -43,10 +43,11 @@ fi
# Call command with CROSS_COMPILE= as its first argument
+Y=$(echo "$CCC/$X"-*cross)
+Z=$(basename "$Y")
Y=$(readlink -f "$CCC"/$X-*cross)
-X=$(basename "$Y")
-export TARGET="${X/-*/}"
-X="$Y/bin/${X/-cross/-}"
+export TARGET="${Z/-*/}"
+X="$Y/bin/${Z/-cross/-}"
[ ! -e "${X}cc" ] && echo "${X}cc not found" && exit 1
CROSS_COMPILE="$X" "$@"