From f13d4e0b09e9aa8f8a47b402438848deaf5a26d1 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sun, 11 Dec 2011 13:22:24 +0100 Subject: [PATCH] Fix detection weather a toolchain can be built on host. --- make.sh | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/make.sh b/make.sh index 8b9f48a2b..415c19588 100755 --- a/make.sh +++ b/make.sh @@ -229,9 +229,28 @@ prepareenv() { } buildtoolchain() { - if [ "$(uname -m)" = "x86_64" ]; then - exiterror "Cannot build toolchain on x86_64. Please use the download." - fi + local error=false + case "${MACHINE}:$(uname -m)" in + # x86 + i586:i586|i586:i686) + # These are working. + ;; + i586:*) + error=true + ;; + + # ARM + armv5tel:armv5tel|armv5tel:armv5tejl) + # These are working. + ;; + armv5tel:*) + error=true + ;; + esac + + ${error} && \ + exiterror "Cannot build ${MACHINE} toolchain on $(uname -m). Please use the download if any." + if [ "$(uname -r | grep ipfire)" ]; then exiterror "Cannot build toolchain on ipfire. Please use the download." fi -- 2.39.2