summaryrefslogtreecommitdiff
path: root/BaseTools/Source
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-08-12 05:22:49 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-08-12 05:22:49 +0000
commitad2a2e5623a4a4ac5f24ae827f7842995ef4c2a9 (patch)
treecf12a64d36e629ef05a83d64fc720793e4c35910 /BaseTools/Source
parent9979bab783aaffb52bf1266e1f852891401686a4 (diff)
downloadedk2-platforms-ad2a2e5623a4a4ac5f24ae827f7842995ef4c2a9.tar.xz
BaseTools: add ARCH detection for AARCH64 and ARM
Add auto detection for the ARCH variable for AARCH64 and ARM systems. This allows us to do a native build of the BaseTools without the need to set ARCH externally. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18206 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Source')
-rw-r--r--BaseTools/Source/C/GNUmakefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/BaseTools/Source/C/GNUmakefile b/BaseTools/Source/C/GNUmakefile
index 6aa37e49fb..66baabb3f0 100644
--- a/BaseTools/Source/C/GNUmakefile
+++ b/BaseTools/Source/C/GNUmakefile
@@ -25,6 +25,12 @@ ifndef ARCH
ifeq ($(patsubst i%86,IA32,$(uname_m)),IA32)
ARCH=IA32
endif
+ ifneq (,$(findstring aarch64,$(uname_m)))
+ ARCH=AARCH64
+ endif
+ ifneq (,$(findstring arm,$(uname_m)))
+ ARCH=ARM
+ endif
ifndef ARCH
$(info Could not detected ARCH from uname results)
$(error ARCH is not defined!)