audk/ArmPlatformPkg/Documentation/patches/0002-BaseTools-tools_def.te...

227 lines
14 KiB
Diff
Raw Normal View History

From c6145f7d18b59722beeed14a1b0a97dcad8456f0 Mon Sep 17 00:00:00 2001
From: Olivier Martin <olivier.martin@arm.com>
Date: Thu, 22 Sep 2011 20:43:54 +0100
Subject: [PATCH 2/3] BaseTools/tools_def.template: Replace RVCT31
toolchains by Generic RVCT toolchains
This generic 'RVCT' toolchain is compatible with RVCT 3.1, 4.0, 4.1 and 5.0.
---
BaseTools/Conf/tools_def.template | 157 ++++++++++++++++++++++++-------------
1 files changed, 101 insertions(+), 56 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 4dffd21..049f29b 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -161,8 +161,6 @@ DEFINE ICC_WIN_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcp
DEFINE ICC_WIN_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE /NODEFAULTLIB:libmmt /NODEFAULTLIB:libirc
DEFINE IPHONE_TOOLS = /Developer/Platforms/iPhoneOS.platform/Developer
-DEFINE RVCT31_TOOLS_PATH = c:/Program Files/ARM/RVCT/Programs/3.1/569/win_32-pentium
-DEFINE RVCT31CYGWIN_TOOLS_PATH = /cygdrive/c/Program Files/ARM/RVCT/Programs/3.1/569/win_32-pentium
DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G++ Lite/bin
@@ -3986,97 +3984,144 @@ RELEASE_XCLANG_X64_CC_FLAGS = -ccc-host-triple x86_64-pc-win32-macho -c -Os
####################################################################################
+# RVCT Common
+####################################################################################
+
+DEFINE RVCT_ALL_CC_FLAGS = --c90 -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167 --diag_style=ide
+DEFINE RVCT_ALL_DLINK_FLAGS = --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --diag_style=ide
+
+
+####################################################################################
#
-# ARM Tools
+# ARM RealView Tools - Windows
#
####################################################################################
-# RVCT31 - Tools from ARM
+# RVCT - Tools from ARM
-*_RVCT31_*_*_FAMILY = RVCT
+*_RVCT_*_*_FAMILY = RVCT
#
# Use default values, or override in DSC file
#
-*_RVCT31_ARM_ARCHCC_FLAGS = --thumb --cpu 7-A
-*_RVCT31_ARM_ARCHASM_FLAGS = --cpu 7-A
-*_RVCT31_ARM_ARCHDLINK_FLAGS =
-*_RVCT31_ARM_PLATFORM_FLAGS =
+*_RVCT_ARM_ARCHCC_FLAGS = --thumb
+*_RVCT_ARM_ARCHASM_FLAGS =
+*_RVCT_ARM_ARCHDLINK_FLAGS =
+*_RVCT_ARM_PLATFORM_FLAGS = --cpu 7-A
+
+ DEBUG_RVCT_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+RELEASE_RVCT_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+
+
+*_RVCT_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) --apcs /interwork
+*_RVCT_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E
+*_RVCT_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -DVFRCOMPILE --preinclude $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+*_RVCT_ARM_MAKE_PATH = nmake /NOLOGO
+*_RVCT_ARM_SLINK_FLAGS = --partial -o
+ DEBUG_RVCT_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O1 -g
+RELEASE_RVCT_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O2
+
+##################
+# ARM definitions
+##################
+*_RVCT_ARM_CC_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCT_ARM_SLINK_PATH = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCT_ARM_DLINK_PATH = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCT_ARM_ASM_PATH = ENV(RVCT_TOOLS_PATH)armasm
+*_RVCT_ARM_PP_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCT_ARM_VFRPP_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCT_ARM_FROMELF_PATH = ENV(RVCT_TOOLS_PATH)fromelf
+
+####################################################################################
+#
+# ARM RealView Tools - Linux
+#
+####################################################################################
+# RVCTLINUX - Tools from ARM in a Cygwin environment
- DEBUG_RVCT31_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map --diag_style=ide
-RELEASE_RVCT31_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map --diag_style=ide
+*_RVCTLINUX_*_*_FAMILY = RVCT
+*_RVCTLINUX_*_*_BUILDRULEFAMILY = RVCTLINUX
+#
+# Use default values, or override in DSC file
+#
+*_RVCTLINUX_ARM_ARCHCC_FLAGS = --thumb
+*_RVCTLINUX_ARM_ARCHASM_FLAGS =
+*_RVCTLINUX_ARM_ARCHDLINK_FLAGS =
+*_RVCTLINUX_ARM_PLATFORM_FLAGS = --cpu 7-A
-*_RVCT31_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) --apcs /interwork --diag_style=ide
-*_RVCT31_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E --diag_style=ide
-*_RVCT31_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -DVFRCOMPILE --preinclude $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
-*_RVCT31_ARM_MAKE_PATH = nmake
-*_RVCT31_ARM_SLINK_FLAGS = --partial --diag_style=ide -o
- DEBUG_RVCT31_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -g -Ospace -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167 --diag_style=ide
-RELEASE_RVCT31_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -Ospace -c --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --enum_is_int --preinclude AutoGen.h --diag_warning 167 --diag_style=ide
+DEBUG_RVCTLINUX_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+RELEASE_RVCTLINUX_ARM_DLINK_FLAGS = $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+
+*_RVCTLINUX_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) --apcs /interwork
+*_RVCTLINUX_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E
+*_RVCTLINUX_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -DVFRCOMPILE --preinclude $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+*_RVCTLINUX_ARM_MAKE_PATH = make
+*_RVCTLINUX_ARM_SLINK_FLAGS = --partial -o
+ DEBUG_RVCTLINUX_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O1 -g
+RELEASE_RVCTLINUX_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O2
##################
# ARM definitions
##################
-*_RVCT31_ARM_CC_PATH = DEF(RVCT31_TOOLS_PATH)/armcc
-*_RVCT31_ARM_SLINK_PATH = DEF(RVCT31_TOOLS_PATH)/armlink
-*_RVCT31_ARM_DLINK_PATH = DEF(RVCT31_TOOLS_PATH)/armlink
-*_RVCT31_ARM_ASM_PATH = DEF(RVCT31_TOOLS_PATH)/armasm
-*_RVCT31_ARM_PP_PATH = DEF(RVCT31_TOOLS_PATH)/armcc
-*_RVCT31_ARM_VFRPP_PATH = DEF(RVCT31_TOOLS_PATH)/armcc
-*_RVCT31_ARM_FROMELF_PATH = DEF(RVCT31_TOOLS_PATH)/fromelf
+*_RVCTLINUX_ARM_CC_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTLINUX_ARM_SLINK_PATH = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCTLINUX_ARM_DLINK_PATH = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCTLINUX_ARM_ASM_PATH = ENV(RVCT_TOOLS_PATH)armasm
+*_RVCTLINUX_ARM_PP_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTLINUX_ARM_VFRPP_PATH = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTLINUX_ARM_FROMELF_PATH = ENV(RVCT_TOOLS_PATH)fromelf
####################################################################################
#
-# ARM Tools & Cygwin
+# ARM RealView Tools - Cygwin
#
####################################################################################
# ARMCYGWIN - Tools from ARM in a Cygwin environment
-*_RVCT31CYGWIN_*_*_FAMILY = RVCT
-*_RVCT31CYGWIN_*_*_BUILDRULEFAMILY = RVCTCYGWIN
+*_RVCTCYGWIN_*_*_FAMILY = RVCT
+*_RVCTCYGWIN_*_*_BUILDRULEFAMILY = RVCTCYGWIN
-*_RVCT31CYGWIN_ARM_CCPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armcc
-*_RVCT31CYGWIN_ARM_SLINKPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armlink
-*_RVCT31CYGWIN_ARM_DLINKPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armlink
-*_RVCT31CYGWIN_ARM_ASMPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armasm
-*_RVCT31CYGWIN_ARM_PPPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armcc
-*_RVCT31CYGWIN_ARM_VFRPPPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/armcc
-*_RVCT31CYGWIN_ARM_FROMELFPATH_FLAG = DEF(RVCT31CYGWIN_TOOLS_PATH)/fromelf
+*_RVCTCYGWIN_ARM_CCPATH_FLAG = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTCYGWIN_ARM_SLINKPATH_FLAG = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCTCYGWIN_ARM_DLINKPATH_FLAG = ENV(RVCT_TOOLS_PATH)armlink
+*_RVCTCYGWIN_ARM_ASMPATH_FLAG = ENV(RVCT_TOOLS_PATH)armasm
+*_RVCTCYGWIN_ARM_PPPATH_FLAG = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTCYGWIN_ARM_VFRPPPATH_FLAG = ENV(RVCT_TOOLS_PATH)armcc
+*_RVCTCYGWIN_ARM_FROMELFPATH_FLAG = ENV(RVCT_TOOLS_PATH)fromelf
#
# Use default values, or override in DSC file
#
-*_RVCT31CYGWIN_ARM_ARCHCC_FLAGS = --thumb --cpu 7-A
-*_RVCT31CYGWIN_ARM_ARCHASM_FLAGS = --cpu 7-A
-*_RVCT31CYGWIN_ARM_ARCHDLINK_FLAGS =
-*_RVCT31CYGWIN_ARM_PLATFORM_FLAGS =
+*_RVCTCYGWIN_ARM_ARCHCC_FLAGS = --thumb
+*_RVCTCYGWIN_ARM_ARCHASM_FLAGS =
+*_RVCTCYGWIN_ARM_ARCHDLINK_FLAGS =
+*_RVCTCYGWIN_ARM_PLATFORM_FLAGS = --cpu 7-A
- DEBUG_RVCT31CYGWIN_ARM_DLINK_FLAGS = "$(DLINKPATH_FLAG)" $(ARCHDLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --map --list `cygpath -m $(DEST_DIR_DEBUG)/$(BASE_NAME).map` --diag_style=ide
-RELEASE_RVCT31CYGWIN_ARM_DLINK_FLAGS = "$(DLINKPATH_FLAG)" $(ARCHDLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --ro-base 0 --no_scanlib --reloc --no_exceptions --datacompressor off --strict --symbols --map --list `cygpath -m $(DEST_DIR_DEBUG)/$(BASE_NAME).map` --diag_style=ide
+ DEBUG_RVCTCYGWIN_ARM_DLINK_FLAGS = "$(DLINKPATH_FLAG)" $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list `cygpath -m $(DEST_DIR_DEBUG)/$(BASE_NAME).map`
+RELEASE_RVCTCYGWIN_ARM_DLINK_FLAGS = "$(DLINKPATH_FLAG)" $(ARCHDLINK_FLAGS) DEF(RVCT_ALL_DLINK_FLAGS) --entry $(IMAGE_ENTRY_POINT) --map --list `cygpath -m $(DEST_DIR_DEBUG)/$(BASE_NAME).map`
-*_RVCT31CYGWIN_ARM_ASM_FLAGS = "$(ASMPATH_FLAG)" $(ARCHASM_FLAGS) --apcs /interwork --diag_style=ide
-*_RVCT31CYGWIN_ARM_PP_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E --diag_style=ide
-*_RVCT31CYGWIN_ARM_VFRPP_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -DVFRCOMPILE --preinclude `cygpath -m $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h`
-*_RVCT31CYGWIN_ARM_MAKE_PATH = make
-*_RVCT31CYGWIN_ARM_SLINK_FLAGS = "$(SLINKPATH_FLAG)" --partial --diag_style=ide -o
- DEBUG_RVCT31CYGWIN_ARM_CC_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c -g -Ospace --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167 --diag_style=ide
-RELEASE_RVCT31CYGWIN_ARM_CC_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) --c90 -c -Ospace --no_autoinline --asm --gnu --apcs /interwork --signed_chars --no_unaligned_access --split_sections --preinclude AutoGen.h --diag_warning 167 --diag_style=ide
+*_RVCTCYGWIN_ARM_ASM_FLAGS = "$(ASMPATH_FLAG)" $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) --apcs /interwork
+*_RVCTCYGWIN_ARM_PP_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E
+*_RVCTCYGWIN_ARM_VFRPP_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -E -DVFRCOMPILE --preinclude `cygpath -m $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h`
+*_RVCTCYGWIN_ARM_MAKE_PATH = make
+*_RVCTCYGWIN_ARM_SLINK_FLAGS = "$(SLINKPATH_FLAG)" --partial -o
+ DEBUG_RVCTCYGWIN_ARM_CC_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O1 -g
+RELEASE_RVCTCYGWIN_ARM_CC_FLAGS = "$(CCPATH_FLAG)" $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(RVCT_ALL_CC_FLAGS) -O2
##################
# ARM definitions
##################
-*_RVCT31CYGWIN_ARM_CC_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_SLINK_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_DLINK_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_ASM_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_PP_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_VFRPP_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
-*_RVCT31CYGWIN_ARM_FROMELF_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_CC_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_SLINK_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_DLINK_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_ASM_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_PP_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_VFRPP_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
+*_RVCTCYGWIN_ARM_FROMELF_PATH = ENV(WORKSPACE)/BaseTools/Bin/CYGWIN_NT-5.1-i686/armcc_wrapper.py
####################################################################################
#
-#
# ARM EABI GCC (www.codesourcery.com)
#
####################################################################################
--
1.7.5.1