summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2013-05-26 05:33:35 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-05-26 18:18:52 +0200
commitb460a66aa96a42349ebbd2e6e8d450787437e0e3 (patch)
tree9a1823943344e59d6eb0b9d99ca5a7182bc40155
parentac6ea04b627e9a045a1600fa36e44150e9e5622b (diff)
downloadcoreboot-b460a66aa96a42349ebbd2e6e8d450787437e0e3.tar.xz
Get buildgcc to behave reasonably with the -p choice.
buildgcc has many wrong choices, and two right ones, but you would never guess that. It's even more frustrating when it spends lots of time building a full tool chain and you find out it's not the one you wanted and, still worse, you've forgotten what it does want and, even worse, it won't f-ing tell you what the two right choices are!. Have it tell you when you've done something wrong, and have it make reasonable decisions when you say things like -p arm instead of -p armv7a-eabi This change lowers my blood pressure 10 points. Change-Id: I44a59d7cb7a6260894d8bcb692a693ed25681ff8 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: http://review.coreboot.org/3292 Tested-by: build bot (Jenkins)
-rwxr-xr-xutil/crossgcc/buildgcc10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 7d416c29bd..c436f8edc7 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -221,6 +221,16 @@ while true ; do
esac
done
+case "$TARGETARCH" in
+ armv7a-eabi) break;;
+ i386-elf) break;;
+ i386-mingw32) break;;
+ i386*) TARGETARCH=i386-elf;;
+ arm*) TARGETARCH=armv7a-eabi;;
+ *) printf "Invalid architecture\n\n"; myhelp; exit 1;;
+esac
+
+echo "Target arch is now $TARGETARCH"
GDB_PACKAGE="GDB"
PYTHON_PACKAGE="PYTHON"
EXPAT_PACKAGE="EXPAT"