]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Merge remote-tracking branch 'ms/fake-uname'
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 29 Dec 2011 12:50:55 +0000 (13:50 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 29 Dec 2011 12:50:55 +0000 (13:50 +0100)
Conflicts:
lfs/fake-environ

lfs/fake-environ
make.sh
tools/make-functions

index 7a0f1a4d395fd6f0a779830921bc90cf0fa915a6..b724912538d1ea0e20b282a491feba06b1edebdf 100644 (file)
@@ -52,7 +52,7 @@ $(TARGET) :
        cp -rvf $(DIR_SRC)/src/$(THISAPP) $(DIR_APP)
 
        cd $(DIR_APP) && make install CFLAGS="$(CFLAGS)" \
-               TOOLS_DIR="$(TOOLS_DIR)"
+               TOOLS_DIR="/tools"
 
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
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() {
-    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
index 144411cd31a4471ffbf9c6de6b035393024b5886..783b46e141b5ba02a1626a5c5794554abe77bd91 100644 (file)
@@ -225,17 +225,17 @@ if [ 'x86_64' = $MACHINE -o 'i686' = $MACHINE -o 'i586' = $MACHINE ]; then
        CXXFLAGS="-O2 -march=i586 -pipe -fomit-frame-pointer"
        C2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
        CXX2FLAGS="-O2 -march=i586 -mtune=i586 -pipe -fomit-frame-pointer"
-elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE ]; then
+elif [ 'armv5tejl' = $MACHINE -o 'armv5tel' = $MACHINE -o 'armv7l' = $MACHINE ]; then
        echo "`date -u '+%b %e %T'`: Machine is ARM (or equivalent)" >> $LOGFILE
        MACHINE=armv5tel
        MACHINE_TYPE=arm
        BUILDTARGET=${MACHINE}-unknown-linux-gnueabi
-       CFLAGS="-O2 -march=armv5te -fomit-frame-pointer -pipe"
+       CFLAGS="-O2 -march=armv5te -mfloat-abi=soft -fomit-frame-pointer -pipe"
        CXXFLAGS="$CFLAGS"
        C2FLAGS="$CFLAGS"
        CXX2FLAGS="$CXXFLAGS"
 else
-       echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE" >> $LOGFILE
+       echo "`date -u '+%b %e %T'`: Can't determine your architecture - $MACHINE"
        exit 1
 fi