]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/coreutils
toolchain: cpu-type fixes.
[ipfire-2.x.git] / lfs / coreutils
index 9b6ddc7c4fa96175090125402dba01a8da0f2601..71282333a6cba26c8070fa2bc13953c66a4d4df4 100644 (file)
@@ -40,11 +40,13 @@ ifeq "$(ROOT)" ""
   EXTRA_INSTALL =
 else
   TARGET = $(DIR_INFO)/$(THISAPP)-tools
-  EXTRA_CONFIG = --prefix=/tools --disable-nls --host=$(MACHINE)
+  EXTRA_CONFIG = --prefix=/tools --disable-nls
   EXTRA_MAKE = 
   EXTRA_INSTALL = 
 endif
 
+EXTRA_CONFIG += --build=$(BUILDTARGET)
+
 ###############################################################################
 # Top-level Rules
 ###############################################################################
@@ -105,14 +107,16 @@ ifeq "$(ROOT)" ""
        #ln -sf ../../bin/install /usr/bin
        mv -f /bin/uname /bin/uname.bak
        echo '#!/bin/bash'                              >  /bin/uname
-       echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g'' >> /bin/uname
+       echo 'kernel=`/bin/uname.bak -r`' >> /bin/uname
+       echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g' | sed "s/$$kernel/2.6.32.45-ipfire/g"' >> /bin/uname
        chmod 755 /bin/uname
        dircolors -p > /etc/dircolors
 else
        rm /tools/bin/hostname
        mv -f /tools/bin/uname /tools/bin/uname.bak
        echo '#!/bin/bash'                                      >  /tools/bin/uname
-       echo '/tools/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g''     >> /tools/bin/uname
+       echo 'kernel=`/tools/bin/uname.bak -r`' >> /tools/bin/uname
+       echo '/tools/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g' | sed "s/$$kernel/2.6.32.45-ipfire/g"' >> /tools/bin/uname
        chmod 755 /tools/bin/uname
 endif
        @rm -rf $(DIR_APP)