]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Fix detection weather a toolchain can be built on host.
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Dec 2011 12:22:24 +0000 (13:22 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 11 Dec 2011 12:22:24 +0000 (13:22 +0100)
make.sh

diff --git a/make.sh b/make.sh
index 8b9f48a2ba47d706ea6e86c0b726725adb81da55..415c19588a503d8e208372dc639adb58ad5114a9 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -229,9 +229,28 @@ prepareenv() {
 }
 
 buildtoolchain() {
 }
 
 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
     if [ "$(uname -r | grep ipfire)" ]; then
         exiterror "Cannot build toolchain on ipfire. Please use the download."
     fi