mirror of
https://github.com/rhboot/gnu-efi
synced 2026-08-26 00:26:04 -04:00
Fix ARCH setting on the cross-compilation cases.
This makes it possible to pass ARCH in correctly when cross compiling. Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
5e07f70b08
commit
193ae1aeac
2 changed files with 10 additions and 14 deletions
|
|
@ -65,13 +65,15 @@ LIBDIR := $(PREFIX)/lib
|
|||
INSTALL := install
|
||||
|
||||
# Compilation tools
|
||||
HOSTCC := $(prefix)gcc
|
||||
CC := $(prefix)$(CROSS_COMPILE)gcc
|
||||
AS := $(prefix)$(CROSS_COMPILE)as
|
||||
LD := $(prefix)$(CROSS_COMPILE)ld
|
||||
AR := $(prefix)$(CROSS_COMPILE)ar
|
||||
RANLIB := $(prefix)$(CROSS_COMPILE)ranlib
|
||||
OBJCOPY := $(prefix)$(CROSS_COMPILE)objcopy
|
||||
COMPILER ?= gcc
|
||||
ARCHIVER ?= gcc-ar
|
||||
HOSTCC := $(COMPILER)
|
||||
CC := $(CROSS_COMPILE)$(COMPILER)
|
||||
AS := $(CROSS_COMPILE)as
|
||||
LD := $(CROSS_COMPILE)ld
|
||||
AR := $(CROSS_COMPILE)$(ARCHIVER)
|
||||
RANLIB := $(CROSS_COMPILE)ranlib
|
||||
OBJCOPY := $(CROSS_COMPILE)objcopy
|
||||
|
||||
ifneq ($(CCACHE_DISABLE),)
|
||||
export CCACHE_DISABLE
|
||||
|
|
@ -80,12 +82,7 @@ endif
|
|||
# Host/target identification
|
||||
OS := $(shell uname -s)
|
||||
HOSTARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv[67].*,arm,' )
|
||||
ARCH ?= $(shell $(HOSTCC) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv[67].*,arm,' )
|
||||
|
||||
# Get ARCH from the compiler if cross compiling
|
||||
ifneq ($(CROSS_COMPILE),)
|
||||
override ARCH := $(shell $(CC) -dumpmachine | cut -f1 -d-| sed -e s,i[3456789]86,ia32, -e 's,armv[67].*,arm,' )
|
||||
endif
|
||||
ARCH ?= $(shell $(CC) $(ARCH3264) -dumpmachine | cut -f1 -d- | sed -e s,i[3456789]86,ia32, -e 's,armv[67].*,arm,' )
|
||||
|
||||
# FreeBSD (and possibly others) reports amd64 instead of x86_64
|
||||
ifeq ($(ARCH),amd64)
|
||||
|
|
|
|||
1
Makefile
1
Makefile
|
|
@ -69,7 +69,6 @@ mkvars:
|
|||
@echo LIBDIR=$(LIBDIR)
|
||||
@echo OBJCOPY=$(OBJCOPY)
|
||||
@echo OS=$(OS)
|
||||
@echo prefix=$(prefix)
|
||||
@echo PREFIX=$(PREFIX)
|
||||
@echo RANLIB=$(RANLIB)
|
||||
@echo SRCDIR=$(SRCDIR)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue