audk/ArmPlatformPkg/Documentation/patches/0003-BaseTools-Conf-Add-sup...

145 lines
6.3 KiB
Diff
Raw Normal View History

From 289ebaebf3c8c60c5cf09b53108c3ef671b64afe Mon Sep 17 00:00:00 2001
From: Olivier Martin <olivier.martin@arm.com>
Date: Thu, 22 Sep 2011 20:46:41 +0100
Subject: [PATCH 3/3] BaseTools/Conf: Add support for ARM GCC Linux EABI
toolchain
---
BaseTools/Conf/build_rule.template | 12 ++++----
BaseTools/Conf/tools_def.template | 58 ++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+), 6 deletions(-)
mode change 100644 => 100755 BaseTools/Conf/build_rule.template
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
old mode 100644
new mode 100755
index ff5af1c..c54b091
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -129,7 +129,7 @@
"$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
"$(SYMRENAME)" $(SYMRENAME_FLAGS) ${dst}
- <Command.ARMGCC>
+ <Command.ARMGCC, Command.ARMLINUXGCC>
"$(CC)" $(CC_FLAGS) -o ${dst} $(INC) ${src}
@@ -217,7 +217,7 @@
<Command.RVCT>
"$(SLINK)" $(SLINK_FLAGS) ${dst} --via $(OBJECT_FILES_LIST)
- <Command.RVCTCYGWIN, Command.ARMGCC>
+ <Command.RVCTCYGWIN, Command.ARMGCC, Command.ARMLINUXGCC>
# $(OBJECT_FILES_LIST) has wrong paths for cygwin
"$(SLINK)" $(SLINK_FLAGS) ${dst} $(OBJECT_FILES)
@@ -241,7 +241,7 @@
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
- <Command.ARMGCC>
+ <Command.ARMGCC, Command.ARMLINUXGCC>
"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS)
<Command.RVCT>
@@ -271,7 +271,7 @@
<Command.GCC>
"$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
- <Command.ARMGCC>
+ <Command.ARMGCC, Command.ARMLINUXGCC>
"$(DLINK)" $(DLINK_FLAGS) -\( $(DLINK_SPATH) $(STATIC_LIBRARY_FILES) -\) $(DLINK2_FLAGS)
<Command.RVCT>
@@ -292,7 +292,7 @@
<OutputFile>
$(DEBUG_DIR)(+)$(MODULE_NAME).efi
- <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC>
+ <Command.MSFT, Command.INTEL, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
$(CP) ${dst} $(BIN_DIR)
@@ -536,7 +536,7 @@
"$(GENFW)" -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES) $(GENFW_FLAGS)
"$(RC)" $(RC_FLAGS) $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc ${dst}
- <Command.XCODE, Command.RVCT, Command.ARMGCC>
+ <Command.XCODE, Command.RVCT, Command.ARMGCC, Command.ARMLINUXGCC>
GenFw -o $(OUTPUT_DIR)(+)$(MODULE_NAME)hii.rc -g $(MODULE_GUID) --hiibinpackage $(HII_BINARY_PACKAGES)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 049f29b..20c0033 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -4178,6 +4178,64 @@ RELEASE_ARMGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-end
DEBUG_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -combine -O0
RELEASE_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -combine -Wno-unused
+####################################################################################
+#
+# ARM GNU/Linux GCC
+#
+####################################################################################
+# ARMLINUXGCC - ARM version of the GCC cross compiler
+
+*_ARMLINUXGCC_*_*_FAMILY = GCC
+*_ARMLINUXGCC_*_*_BUILDRULEFAMILY = ARMLINUXGCC
+
+*_ARMLINUXGCC_*_MAKE_PATH = make
+*_ARMLINUXGCC_*_MAKE_FLAGS = --no-print-directory
+
+##################
+# ASL definitions
+##################
+*_ARMLINUXGCC_*_ASL_PATH = DEF(UNIX_IASL_BIN)
+*_ARMLINUXGCC_*_ASL_FLAGS = DEF(IASL_FLAGS)
+*_ARMLINUXGCC_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
+*_ARMLINUXGCC_*_ASLPP_FLAGS = -x c -E -P
+*_ARMLINUXGCC_*_ASLCC_FLAGS = -x c
+*_ARMLINUXGCC_*_ASLDLINK_FLAGS = DEF(GCC_DLINK_FLAGS_COMMON) --entry _ReferenceAcpiTable
+
+##################
+# ARM definitions
+##################
+
+*_ARMLINUXGCC_ARM_ASLCC_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-gcc
+*_ARMLINUXGCC_ARM_ASLDLINK_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-ld
+*_ARMLINUXGCC_ARM_ASLPP_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-gcc
+
+*_ARMLINUXGCC_ARM_CC_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-gcc
+*_ARMLINUXGCC_ARM_SLINK_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-ar
+*_ARMLINUXGCC_ARM_DLINK_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-ld
+*_ARMLINUXGCC_ARM_ASM_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-as
+*_ARMLINUXGCC_ARM_PP_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-gcc
+*_ARMLINUXGCC_ARM_VFRPP_PATH = ENV(ARMLINUXGCC_TOOLS_PATH)arm-linux-gnueabi-gcc
+
+#
+# Use default values, or override in DSC file
+#
+*_ARMLINUXGCC_ARM_ARCHCC_FLAGS = -mthumb
+*_ARMLINUXGCC_ARM_ARCHASM_FLAGS =
+*_ARMLINUXGCC_ARM_ARCHDLINK_FLAGS =
+*_ARMLINUXGCC_ARM_PLATFORM_FLAGS = -march=armv7-a
+
+ DEBUG_ARMLINUXGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian -g
+RELEASE_ARMLINUXGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian
+
+*_ARMLINUXGCC_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
+*_ARMLINUXGCC_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+
+*_ARMLINUXGCC_ARM_SLINK_FLAGS = -rc
+*_ARMLINUXGCC_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) --oformat=elf32-littlearm --emit-relocs -nostdlib -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+
+ DEBUG_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -Wno-address -O0
+RELEASE_ARMLINUXGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARMGCC_CC_FLAGS) -Wno-address -Wno-unused-but-set-variable
+
#################
# ASM 16 linker defintions
#################
--
1.7.5.1