mirror of https://github.com/acidanthera/audk.git
BaseTools: Replace ARCH with HOST_ARCH in C Makefile to avoid conflict
https://bugzilla.tianocore.org/show_bug.cgi?id=793 ARCH is too generic. It may cause confuse of target arch or host arch. To be clarified, replace it with HOST_ARCH in BaseTools C Makefile. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
parent
43e12eeac8
commit
a9f6e0a4dc
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = BootSectImage
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = Brotli
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
# VPATH = ..
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = EfiLdrImage
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = EfiRom
|
||||
|
|
|
@ -12,40 +12,40 @@
|
|||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
||||
ifndef ARCH
|
||||
ifndef HOST_ARCH
|
||||
#
|
||||
# If ARCH is not defined, then we use 'uname -m' to attempt
|
||||
# try to figure out the appropriate ARCH.
|
||||
# If HOST_ARCH is not defined, then we use 'uname -m' to attempt
|
||||
# try to figure out the appropriate HOST_ARCH.
|
||||
#
|
||||
uname_m = $(shell uname -m)
|
||||
$(info Attempting to detect ARCH from 'uname -m': $(uname_m))
|
||||
$(info Attempting to detect HOST_ARCH from 'uname -m': $(uname_m))
|
||||
ifneq (,$(strip $(filter $(uname_m), x86_64 amd64)))
|
||||
ARCH=X64
|
||||
HOST_ARCH=X64
|
||||
endif
|
||||
ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)
|
||||
ARCH=IA32
|
||||
HOST_ARCH=IA32
|
||||
endif
|
||||
ifneq (,$(findstring aarch64,$(uname_m)))
|
||||
ARCH=AARCH64
|
||||
HOST_ARCH=AARCH64
|
||||
endif
|
||||
ifneq (,$(findstring arm,$(uname_m)))
|
||||
ARCH=ARM
|
||||
HOST_ARCH=ARM
|
||||
endif
|
||||
ifndef ARCH
|
||||
$(info Could not detected ARCH from uname results)
|
||||
$(error ARCH is not defined!)
|
||||
ifndef HOST_ARCH
|
||||
$(info Could not detected HOST_ARCH from uname results)
|
||||
$(error HOST_ARCH is not defined!)
|
||||
endif
|
||||
$(info Detected ARCH of $(ARCH) using uname.)
|
||||
$(info Detected HOST_ARCH of $(HOST_ARCH) using uname.)
|
||||
endif
|
||||
|
||||
export ARCH
|
||||
export HOST_ARCH
|
||||
|
||||
MAKEROOT = .
|
||||
|
||||
include Makefiles/header.makefile
|
||||
|
||||
all: makerootdir subdirs $(MAKEROOT)/libs
|
||||
@echo Finished building BaseTools C Tools with ARCH=$(ARCH)
|
||||
@echo Finished building BaseTools C Tools with HOST_ARCH=$(HOST_ARCH)
|
||||
|
||||
LIBRARIES = Common
|
||||
# NON_BUILDABLE_APPLICATIONS = GenBootSector BootSectImage
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenCrc32
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenFfs
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenFv
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenFw
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenPage
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenSec
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GenVtf
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = GnuGenBootSector
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = LzmaCompress
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH = IA32
|
||||
HOST_ARCH = IA32
|
||||
|
||||
!INCLUDE Makefiles\ms.common
|
||||
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
DEPFILES = $(OBJECTS:%.o=%.d)
|
||||
|
||||
$(MAKEROOT)/libs-$(ARCH):
|
||||
mkdir -p $(MAKEROOT)/libs-$(ARCH)
|
||||
$(MAKEROOT)/libs-$(HOST_ARCH):
|
||||
mkdir -p $(MAKEROOT)/libs-$(HOST_ARCH)
|
||||
|
||||
.PHONY: install
|
||||
install: $(MAKEROOT)/libs-$(ARCH) $(LIBRARY)
|
||||
cp $(LIBRARY) $(MAKEROOT)/libs-$(ARCH)
|
||||
install: $(MAKEROOT)/libs-$(HOST_ARCH) $(LIBRARY)
|
||||
cp $(LIBRARY) $(MAKEROOT)/libs-$(HOST_ARCH)
|
||||
|
||||
$(LIBRARY): $(OBJECTS)
|
||||
$(BUILD_AR) crs $@ $^
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
## @file
|
||||
#
|
||||
# The makefile can be invoked with
|
||||
# ARCH = x86_64 or x64 for EM64T build
|
||||
# ARCH = ia32 or IA32 for IA32 build
|
||||
# ARCH = ia64 or IA64 for IA64 build
|
||||
# ARCH = Arm or ARM for ARM build
|
||||
# HOST_ARCH = x86_64 or x64 for EM64T build
|
||||
# HOST_ARCH = ia32 or IA32 for IA32 build
|
||||
# HOST_ARCH = ia64 or IA64 for IA64 build
|
||||
# HOST_ARCH = Arm or ARM for ARM build
|
||||
#
|
||||
# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
|
@ -15,7 +15,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
|
||||
CYGWIN:=$(findstring CYGWIN, $(shell uname -s))
|
||||
LINUX:=$(findstring Linux, $(shell uname -s))
|
||||
|
@ -27,19 +27,19 @@ BUILD_AS ?= gcc
|
|||
BUILD_AR ?= ar
|
||||
BUILD_LD ?= ld
|
||||
LINKER ?= $(BUILD_CC)
|
||||
ifeq ($(ARCH), IA32)
|
||||
ifeq ($(HOST_ARCH), IA32)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Ia32/
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), X64)
|
||||
ifeq ($(HOST_ARCH), X64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/X64/
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), ARM)
|
||||
ifeq ($(HOST_ARCH), ARM)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/Arm/
|
||||
endif
|
||||
|
||||
ifeq ($(ARCH), AARCH64)
|
||||
ifeq ($(HOST_ARCH), AARCH64)
|
||||
ARCH_INCLUDE = -I $(MAKEROOT)/Include/AArch64/
|
||||
endif
|
||||
|
||||
|
@ -54,7 +54,7 @@ endif
|
|||
BUILD_LFLAGS =
|
||||
BUILD_CXXFLAGS = -Wno-unused-result
|
||||
|
||||
ifeq ($(ARCH), IA32)
|
||||
ifeq ($(HOST_ARCH), IA32)
|
||||
#
|
||||
# Snow Leopard is a 32-bit and 64-bit environment. uname -m returns i386, but gcc defaults
|
||||
# to x86_64. So make sure tools match uname -m. You can manual have a 64-bit kernal on Snow Leopard
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
!ERROR "BASE_TOOLS_PATH is not set! Please run build_tools.bat at first!"
|
||||
!ENDIF
|
||||
|
||||
!IFNDEF ARCH
|
||||
ARCH = IA32
|
||||
!IFNDEF HOST_ARCH
|
||||
HOST_ARCH = IA32
|
||||
!ENDIF
|
||||
|
||||
MAKE = nmake -nologo
|
||||
|
@ -36,7 +36,7 @@ LIB_PATH = $(BASE_TOOLS_PATH)\Lib
|
|||
SYS_BIN_PATH=$(EDK_TOOLS_PATH)\Bin
|
||||
SYS_LIB_PATH=$(EDK_TOOLS_PATH)\Lib
|
||||
|
||||
!IF "$(ARCH)"=="IA32"
|
||||
!IF "$(HOST_ARCH)"=="IA32"
|
||||
ARCH_INCLUDE = $(SOURCE_PATH)\Include\Ia32
|
||||
BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win32
|
||||
LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win32
|
||||
|
@ -44,7 +44,7 @@ SYS_BIN_PATH = $(EDK_TOOLS_PATH)\Bin\Win32
|
|||
SYS_LIB_PATH = $(EDK_TOOLS_PATH)\Lib\Win32
|
||||
!ENDIF
|
||||
|
||||
!IF "$(ARCH)"=="X64"
|
||||
!IF "$(HOST_ARCH)"=="X64"
|
||||
ARCH_INCLUDE = $(SOURCE_PATH)\Include\X64
|
||||
BIN_PATH = $(BASE_TOOLS_PATH)\Bin\Win64
|
||||
LIB_PATH = $(BASE_TOOLS_PATH)\Lib\Win64
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = Split
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = TianoCompress
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = VfrCompile
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#
|
||||
ARCH ?= IA32
|
||||
HOST_ARCH ?= IA32
|
||||
MAKEROOT ?= ..
|
||||
|
||||
APPNAME = VolInfo
|
||||
|
|
Loading…
Reference in New Issue