summaryrefslogtreecommitdiff
path: root/BaseTools/Conf
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-25 06:21:03 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-25 06:21:03 +0000
commit2bcc713e74b944bb5aefb433ef33fb4002a62d76 (patch)
tree7aa002279415c1fafbedbf287d256177746e0a4a /BaseTools/Conf
parentc32dcd284c19bbb0b1db3606a243d9d69d37d6ab (diff)
downloadedk2-platforms-2bcc713e74b944bb5aefb433ef33fb4002a62d76.tar.xz
Sync BaseTool trunk (version r2423) into EDKII BaseTools. The change mainly includes:
1. Fix !include issues 2. Fix Trim to skip the postfix 'U' for hexadecimal and decimal numbers 3. Fix building error C2733 when building C++ code. 4. Add GCC46 tool chain definition 5. Add new RVCT and RVCTLINUX tool chains Signed-off-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12782 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf')
-rw-r--r--BaseTools/Conf/build_rule.template20
-rw-r--r--BaseTools/Conf/tools_def.template149
2 files changed, 156 insertions, 13 deletions
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 652c9f3ee7..257f732cd0 100644
--- 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}
@@ -195,10 +195,8 @@
$(DEBUG_DIR)(+)${s_dir}(+)${s_base}.c
<Command>
- -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1
- "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
- -$(MD) ${d_path} > NUL 2>&1
- "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
+ "$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_base}.i
+ "$(VFR)" $(VFR_FLAGS) --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_base}.i
[Object-File]
<InputFile>
@@ -217,7 +215,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 +239,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 +269,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 +290,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)
@@ -513,9 +511,7 @@
$(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.hpk
<Command>
- -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1
"$(VFRPP)" $(VFRPP_FLAGS) $(INC) ${src} > $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
- -$(MD) $(OUTPUT_DIR)(+)${s_dir} > NUL 2>&1
"$(VFR)" $(VFR_FLAGS) --create-ifr-package --string-db $(OUTPUT_DIR)(+)$(MODULE_NAME)StrDefs.hpk --output-directory $(OUTPUT_DIR)(+)${s_dir} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.i
[Hii-Binary-Package.UEFI_HII]
@@ -536,7 +532,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 5b9cff464e..ee7e23eee8 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -134,6 +134,9 @@ DEFINE GCC44_X64_PREFIX = /usr/bin/
DEFINE GCC45_IA32_PREFIX = /usr/bin/
DEFINE GCC45_X64_PREFIX = /usr/bin/
+DEFINE GCC46_IA32_PREFIX = /usr/bin/
+DEFINE GCC46_X64_PREFIX = /usr/bin/
+
DEFINE UNIX_IASL_BIN = /usr/bin/iasl
#DEFINE UNIX_IASL_BIN = $(HOME)/programs/iasl
DEFINE WIN_ASL_BIN_DIR = C:\ASL
@@ -243,6 +246,18 @@ DEFINE CLANG_BIN = /usr/bin/
# Required to build platforms or ACPI tables:
# Intel(r) ACPI Compiler v20101013 from
# http://www.acpica.org/downloads/previous_releases.php
+# GCC45 -Linux- Requires:
+# GCC 4.5 (Native)
+# Optional:
+# Required to build platforms or ACPI tables:
+# Intel(r) ACPI Compiler v20101013 from
+# http://www.acpica.org/downloads/previous_releases.php
+# GCC46 -Linux- Requires:
+# GCC 4.6 (Native)
+# Optional:
+# Required to build platforms or ACPI tables:
+# Intel(r) ACPI Compiler v20101013 from
+# http://www.acpica.org/downloads/previous_releases.php
# ELFGCC -Linux- Requires:
# GCC(this tool chain uses whatever version of gcc and binutils that is installed in /usr/bin)
# Optional:
@@ -467,6 +482,7 @@ DEFINE CLANG_BIN = /usr/bin/
# MSFT - Microsoft
# GCC - GNU GCC
# INTEL - INTEL
+# RVCT - ARM RealView Toolchain
####################################################################################
####################################################################################
#
@@ -2011,6 +2027,14 @@ DEFINE GCC45_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS)
DEFINE GCC45_X64_DLINK_FLAGS = DEF(GCC44_X64_DLINK_FLAGS)
DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
+DEFINE GCC46_IA32_CC_FLAGS = DEF(GCC45_IA32_CC_FLAGS) -Wno-address -Wno-unused-but-set-variable
+DEFINE GCC46_X64_CC_FLAGS = DEF(GCC45_X64_CC_FLAGS) -Wno-address -Wno-unused-but-set-variable
+DEFINE GCC46_IA32_X64_DLINK_COMMON = DEF(GCC45_IA32_X64_DLINK_COMMON)
+DEFINE GCC46_IA32_X64_ASLDLINK_FLAGS = DEF(GCC45_IA32_X64_ASLDLINK_FLAGS)
+DEFINE GCC46_IA32_X64_DLINK_FLAGS = DEF(GCC45_IA32_X64_DLINK_FLAGS)
+DEFINE GCC46_X64_DLINK_FLAGS = DEF(GCC45_X64_DLINK_FLAGS)
+DEFINE GCC46_ASM_FLAGS = DEF(GCC45_ASM_FLAGS)
+
####################################################################################
#
# Unix GCC And Intel Linux ACPI Compiler
@@ -2229,6 +2253,71 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
####################################################################################
#
+# GCC 4.6 - This configuration is used to compile under Linux to produce
+# PE/COFF binaries using GCC 4.6.
+#
+####################################################################################
+*_GCC46_*_*_FAMILY = GCC
+
+*_GCC46_*_MAKE_PATH = make
+*_GCC46_*_ASL_PATH = DEF(UNIX_IASL_BIN)
+
+*_GCC46_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
+*_GCC46_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
+*_GCC46_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
+*_GCC46_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
+*_GCC46_*_APP_FLAGS =
+*_GCC46_*_ASL_FLAGS = DEF(IASL_FLAGS)
+*_GCC46_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
+
+##################
+# GCC46 IA32 definitions
+##################
+*_GCC46_IA32_OBJCOPY_PATH = DEF(GCC46_IA32_PREFIX)objcopy
+*_GCC46_IA32_CC_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_SLINK_PATH = DEF(GCC46_IA32_PREFIX)ar
+*_GCC46_IA32_DLINK_PATH = DEF(GCC46_IA32_PREFIX)ld
+*_GCC46_IA32_ASLDLINK_PATH = DEF(GCC46_IA32_PREFIX)ld
+*_GCC46_IA32_ASM_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_PP_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_VFRPP_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_ASLCC_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_ASLPP_PATH = DEF(GCC46_IA32_PREFIX)gcc
+*_GCC46_IA32_RC_PATH = DEF(GCC46_IA32_PREFIX)objcopy
+
+*_GCC46_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32
+*_GCC46_IA32_ASLDLINK_FLAGS = DEF(GCC46_IA32_X64_ASLDLINK_FLAGS) -m elf_i386
+*_GCC46_IA32_ASM_FLAGS = DEF(GCC46_ASM_FLAGS) -m32 -march=i386
+*_GCC46_IA32_CC_FLAGS = DEF(GCC46_IA32_CC_FLAGS) -Os
+*_GCC46_IA32_DLINK_FLAGS = DEF(GCC46_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
+*_GCC46_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+*_GCC46_IA32_OBJCOPY_FLAGS =
+
+##################
+# GCC46 X64 definitions
+##################
+*_GCC46_X64_OBJCOPY_PATH = DEF(GCC46_X64_PREFIX)objcopy
+*_GCC46_X64_CC_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_SLINK_PATH = DEF(GCC46_X64_PREFIX)ar
+*_GCC46_X64_DLINK_PATH = DEF(GCC46_X64_PREFIX)ld
+*_GCC46_X64_ASLDLINK_PATH = DEF(GCC46_X64_PREFIX)ld
+*_GCC46_X64_ASM_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_PP_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_VFRPP_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_ASLCC_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_ASLPP_PATH = DEF(GCC46_X64_PREFIX)gcc
+*_GCC46_X64_RC_PATH = DEF(GCC46_X64_PREFIX)objcopy
+
+*_GCC46_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64
+*_GCC46_X64_ASLDLINK_FLAGS = DEF(GCC46_IA32_X64_ASLDLINK_FLAGS) -m elf_x86_64
+*_GCC46_X64_ASM_FLAGS = DEF(GCC46_ASM_FLAGS) -m64 -melf_x86_64
+*_GCC46_X64_CC_FLAGS = DEF(GCC46_X64_CC_FLAGS)
+*_GCC46_X64_DLINK_FLAGS = DEF(GCC46_X64_DLINK_FLAGS)
+*_GCC46_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
+*_GCC46_X64_OBJCOPY_FLAGS =
+
+####################################################################################
+#
# Cygwin GCC And Intel ACPI Compiler
#
####################################################################################
@@ -4173,11 +4262,69 @@ RELEASE_ARMGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -mlittle-end
*_ARMGCC_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -x c -E -P -DVFRCOMPILE --include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
*_ARMGCC_ARM_SLINK_FLAGS = -rc
-*_ARMGCC_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
+*_ARMGCC_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) -Ttext=0x0 --oformat=elf32-littlearm --emit-relocs -nostdlib -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
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
#################