Sfoglia il codice sorgente

The information needed is not really the host architecture as given by
the kernel arch. The information actually needed is the default target
of gcc.

Signed-off-by: Nigel Croxon <nigel.croxon@hp.com>
Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>

Nigel Croxon 11 anni fa
parent
commit
aeee09cc6a
1 ha cambiato i file con 10 aggiunte e 10 eliminazioni
  1. 10 10
      gnu-efi-3.0/Make.defaults

+ 10 - 10
gnu-efi-3.0/Make.defaults

@@ -50,16 +50,6 @@ PREFIX       := /usr/local
 LIBDIR 	     := $(PREFIX)/lib
 INSTALL	     := install
 
-# Host/target identification
-OS	     := $(shell uname -s)
-HOSTARCH     := $(shell uname -m | sed s,i[3456789]86,ia32,)
-ARCH	     := $(shell uname -m | sed s,i[3456789]86,ia32,)
-
-# FreeBSD (and possibly others) reports amd64 instead of x86_64
-ifeq ($(ARCH),amd64)
-  override ARCH := x86_64
-endif
-
 # Compilation tools
 prefix       := /usr/bin/
 CC           := $(prefix)gcc
@@ -70,6 +60,16 @@ RANLIB       := $(prefix)ranlib
 OBJCOPY      := $(prefix)objcopy
 
 
+# Host/target identification
+OS	     := $(shell uname -s)
+HOSTARCH     := $(shell $(CC) -dumpmachine | cut -f1 -d- | sed s,i[3456789]86,ia32,)
+ARCH	     := $(shell uname -m | sed s,i[3456789]86,ia32,)
+
+# FreeBSD (and possibly others) reports amd64 instead of x86_64
+ifeq ($(ARCH),amd64)
+  override ARCH := x86_64
+endif
+
 #
 # Variables below derived from variables above
 #