summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-08-10 07:55:26 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-08-10 07:55:26 +0000
commit5c02fc49aea514609bdb6ee21d6375fc66f0d4d6 (patch)
tree9026b4ebcafb55db6f0b4a18230c38f3dc0d7e94 /BaseTools
parent24d610e67752ac0325c7027e2fea2f8f2ff110e2 (diff)
downloadedk2-platforms-5c02fc49aea514609bdb6ee21d6375fc66f0d4d6.tar.xz
BaseTools: add CLANG35 toolchain with AARCH64 support
This adds support for building the AARCH64 platforms using the Clang compiler and assembler combined with the GNU (cross-)linker. The chosen name CLANG35 is based on version 3.5 being the oldest supported version, but no issues are known that should prevent its use with any later version. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org> Tested-by: Leif Lindholm <leif.lindholm@linaro.org> Reviewed-by: Liming Gao <liming.gao@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18198 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Conf/tools_def.template58
1 files changed, 58 insertions, 0 deletions
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index eeb488fb35..0c41c862af 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -344,6 +344,12 @@ DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G
# Required to build platforms or ACPI tables:
# Intel(r) ACPI Compiler from
# https://acpica.org/downloads
+# CLANG35 -Linux,Windows- Requires:
+# Clang v3.5 or later, and GNU binutils targeting aarch64-linux-gnu
+# Optional:
+# Required to build platforms or ACPI tables:
+# Intel(r) ACPI Compiler from
+# https://acpica.org/downloads
# ELFGCC -Linux- Requires:
# GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
# Optional:
@@ -4644,6 +4650,58 @@ RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-s
####################################################################################
#
+# CLANG35 - This configuration is used to compile under Linux to produce
+# PE/COFF binaries using the clang compiler and assembler (v3.5 and up)
+# and GNU linker
+#
+####################################################################################
+*_CLANG35_*_*_FAMILY = GCC
+
+*_CLANG35_*_MAKE_PATH = make
+*_CLANG35_*_*_DLL = ENV(CLANG35_DLL)
+*_CLANG35_*_ASL_PATH = DEF(UNIX_IASL_BIN)
+
+*_CLANG35_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
+*_CLANG35_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
+*_CLANG35_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
+*_CLANG35_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
+*_CLANG35_*_APP_FLAGS =
+*_CLANG35_*_ASL_FLAGS = DEF(IASL_FLAGS)
+*_CLANG35_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
+
+*_CLANG35_*_CC_PATH = ENV(CLANG35_BIN)clang
+*_CLANG35_*_ASM_PATH = ENV(CLANG35_BIN)clang
+*_CLANG35_*_PP_PATH = ENV(CLANG35_BIN)clang
+*_CLANG35_*_VFRPP_PATH = ENV(CLANG35_BIN)clang
+*_CLANG35_*_ASLCC_PATH = ENV(CLANG35_BIN)clang
+*_CLANG35_*_ASLPP_PATH = ENV(CLANG35_BIN)clang
+
+DEFINE CLANG35_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body
+DEFINE CLANG35_AARCH64_CC_FLAGS = DEF(GCC_AARCH64_CC_FLAGS) -target aarch64 -mcmodel=small -mstrict-align DEF(CLANG35_WARNING_OVERRIDES)
+
+##################
+# CLANG35 AARCH64 definitions
+##################
+*_CLANG35_AARCH64_SLINK_PATH = ENV(CLANG35_AARCH64_PREFIX)ar
+*_CLANG35_AARCH64_DLINK_PATH = ENV(CLANG35_AARCH64_PREFIX)ld
+*_CLANG35_AARCH64_ASLDLINK_PATH = ENV(CLANG35_AARCH64_PREFIX)ld
+*_CLANG35_AARCH64_RC_PATH = ENV(CLANG35_AARCH64_PREFIX)objcopy
+
+*_CLANG35_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
+*_CLANG35_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_ASLDLINK_FLAGS)
+*_CLANG35_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -target aarch64 -Qunused-arguments
+*_CLANG35_AARCH64_DLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
+*_CLANG35_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) --defsym=PECOFF_HEADER_SIZE=0x228
+*_CLANG35_AARCH64_PLATFORM_FLAGS =
+*_CLANG35_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG35_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
+*_CLANG35_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+
+ DEBUG_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0
+RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz
+
+####################################################################################
+#
# Cygwin GCC And Intel ACPI Compiler
#
####################################################################################