summaryrefslogtreecommitdiff
path: root/BaseTools/Conf
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-11 10:26:49 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-11 10:26:49 +0000
commitda92f27632d2c89fa8726948ac9b02461ca8b61e (patch)
tree5d81f058c42e5be0d57287a7ddd8e3e4325eda7a /BaseTools/Conf
parente472e8d3cca67f5e058f26fb6edc214b01114a3c (diff)
downloadedk2-platforms-da92f27632d2c89fa8726948ac9b02461ca8b61e.tar.xz
Sync BaseTools Branch (version r2149) to EDKII main trunk.
BaseTool Branch: https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11640 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'BaseTools/Conf')
-rw-r--r--BaseTools/Conf/XMLSchema/DistributionPackage.xsd101
-rw-r--r--BaseTools/Conf/build_rule.template12
-rw-r--r--BaseTools/Conf/tools_def.template102
3 files changed, 181 insertions, 34 deletions
diff --git a/BaseTools/Conf/XMLSchema/DistributionPackage.xsd b/BaseTools/Conf/XMLSchema/DistributionPackage.xsd
index b7cda67cda..dfb4d382d9 100644
--- a/BaseTools/Conf/XMLSchema/DistributionPackage.xsd
+++ b/BaseTools/Conf/XMLSchema/DistributionPackage.xsd
@@ -2,7 +2,7 @@
<!--
Filename: DistributionPackage.xsd
-Copyright (c) 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2008, 2011 Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License which may be found at
@@ -13,8 +13,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified" targetNamespace="http://www.uefi.org/2008/1.0"
- xmlns="http://www.uefi.org/2008/1.0">
+ elementFormDefault="qualified" targetNamespace="http://www.uefi.org/2011/1.1"
+ xmlns="http://www.uefi.org/2011/1.1">
<xs:element name="DistributionPackage">
<xs:annotation>
<xs:documentation xml:lang="en-us"> This schema defines the UEFI/PI
@@ -253,18 +253,29 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Signature" type="Md5Sum">
<xs:annotation>
- <xs:documentation xml:lang="en-us"> The packaging utilities will use
- this MD5 sum value of the included ZIP file containing files
- and/or code. If this element is not present, then installation
- tools should assume that the content is correct, or that other
- methods may be needed to verify content. </xs:documentation>
+ <xs:documentation xml:lang="en-us"> The packaging utilities will use this
+ MD5 sum value of the included ZIP file containing files and/or code. If
+ this element is not present, then installation tools should assume that
+ the content is correct, or that other methods may be needed to verify
+ content. </xs:documentation>
</xs:annotation>
</xs:element>
- <xs:element minOccurs="1" maxOccurs="1" name="XmlSpecification"
- type="xs:decimal" default="1.0">
+ <xs:element minOccurs="1" maxOccurs="1" name="XmlSpecification" type="xs:decimal"
+ default="1.1">
<xs:annotation>
- <xs:documentation xml:lang="en-us"> This version of this XML Schema
- is 1.0 </xs:documentation>
+ <xs:documentation xml:lang="en-us"> This version of this XML Schema is 1.1 </xs:documentation>
+ <xs:documentation xml:lang="en-us"> Changes to 1.1 from 1.0 </xs:documentation>
+ <xs:documentation xml:lang="en-us"> #1 Updated to present date and new
+ version which is important to reflect the present state of the
+ matter</xs:documentation>
+ <xs:documentation xml:lang="en-us"> #2 Added definition/enumeration of
+ UNDEFIND type 2 is important since there is a large body of legacy code
+ for which the GUID’s and other code/data objects were not decorated with
+ their usage. This document will allow for importing today’s source
+ artifacts and producing decorations using the ‘Undefined’ versus having
+ an error</xs:documentation>
+ <xs:documentation xml:lang="en-us">#3 Allow for inclusion of ARM and future
+ architecture types</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
@@ -1088,7 +1099,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:annotation>
<xs:documentation xml:lang="en-us"> This is only required if
the Copyright is different from either the Package or
- Distribution copyright. </xs:documentation>
+ Distribution copyright. Multiple copyright lines are
+ permitted within this section. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="License"
@@ -1096,7 +1108,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:annotation>
<xs:documentation xml:lang="en-us"> This is only required if
the license is different from either the Package or
- Distribution license. </xs:documentation>
+ Distribution license. Multiple licenses are permitted
+ within this section. </xs:documentation>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" maxOccurs="1" name="Abstract"
@@ -1226,6 +1239,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="RECOVERY_S4_RESUME" />
<xs:enumeration value="RECOVERY_S5_RESUME" />
<xs:enumeration value="RECOVERY_FLASH_UPDATE" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
</xs:list>
@@ -1265,6 +1279,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="UNDEFINED">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> The package
+ creator does not know how the boot mode is used.
+ </xs:documentation>
+ <xs:/annotation>
+ </xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1322,6 +1343,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
execution paths. </xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="UNDEFINED">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> The package
+ creator does not know how an event is used.
+ </xs:documentation>
+ <xs:/annotation>
+ </xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1330,6 +1358,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:restriction base="xs:NCName">
<xs:enumeration value="EVENT_TYPE_PERIODIC_TIMER" />
<xs:enumeration value="EVENT_TYPE_RELATIVE_TIMER" />
+ <xs:enumeration value="UNDEFINED"/>
</xs:restriction>
</xs:simpleType>
@@ -1362,6 +1391,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="RESOURCE_DESCRIPTOR" />
<xs:enumeration value="FIRMWARE_VOLUME" />
<xs:enumeration value="LOAD_PEIM" />
+ <xs:enumeratino value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1393,6 +1423,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="UNDEFINED">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> The package
+ creator knows that a HOB is used, but does not
+ know how it is used.
+ </xs:documentation>
+ <xs:/annotation>
+ </xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1513,6 +1551,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="PRODUCES" />
<xs:enumeration value="CONSUMES" />
<xs:enumeration value="SOMETIMES_CONSUMES" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -1993,6 +2032,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
</xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="UNDEFINED">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> The package
+ creator knows that a GUID is used, but does not
+ know how it is used. </xs:documentation>
+ </xs:annotation>
+ </xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -2034,6 +2080,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="SOMETIMES_CONSUMES" />
<xs:enumeration value="TO_START" />
<xs:enumeration value="BY_START" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -2072,6 +2119,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="SOMETIMES_PRODUCES" />
<xs:enumeration value="CONSUMES" />
<xs:enumeration value="SOMETIMES_CONSUMES" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
@@ -2154,6 +2202,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="SOMETIMES_PRODUCES" />
<xs:enumeration value="CONSUMES" />
<xs:enumeration value="SOMETIMES_CONSUMES" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
@@ -2583,6 +2632,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
<xs:enumeration value="SystemTable" />
<xs:enumeration value="TokenSpaceGuid" />
<xs:enumeration value="Variable" />
+ <xs:enumeration value="UNDEFINED" />
</xs:restriction>
</xs:simpleType>
@@ -2682,12 +2732,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
applications. </xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="SMM_CORE">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> This module is only applicable to the SMM
+ core.</xs:documentation>
+ </xs:annotation>
+ </xs:enumeration>
<xs:enumeration value="USER_DEFINED">
<xs:annotation>
- <xs:documentation xml:lang="en-us"> This content is restricted to a
- specific implementation. </xs:documentation>
+ <xs:documentation xml:lang="en-us"> This content is restricted to a specific
+ implementation. </xs:documentation>
</xs:annotation>
</xs:enumeration>
+ <xs:enumeration value="UNDEFINED">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> This enumeration is for use in a list that
+ where the package creator does not know the what module types are supported
+ by a module. </xs:documentation>
+ </xs:annotation>
+ </xs:enumeration>
+ <xs:pattern value="([A-Z])([a-zA-Z0-9])*">
+ <xs:annotation>
+ <xs:documentation xml:lang="en-us"> This pattern has been added for use in a
+ module lists - for future expansion. </xs:documentation>
+ </xs:annotation>
+ </xs:pattern>
</xs:restriction>
</xs:simpleType>
diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
index 7c765d46b0..528bdb985a 100644
--- a/BaseTools/Conf/build_rule.template
+++ b/BaseTools/Conf/build_rule.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -299,9 +299,15 @@
-$(CP) $(DEBUG_DIR)(+)*.map $(OUTPUT_DIR)
<Command.GCC>
- $(OBJCOPY) --only-keep-debug ${src} $(BIN_DIR)(+)$(MODULE_NAME).debug
+ $(OBJCOPY) --only-keep-debug ${src} $(DEBUG_DIR)(+)$(MODULE_NAME).debug
$(OBJCOPY) --strip-unneeded ${src}
- $(OBJCOPY) --add-gnu-debuglink=$(BIN_DIR)(+)$(MODULE_NAME).debug ${src}
+
+ #
+ #The below 2 lines are only needed for UNIXGCC tool chain, which genereates PE image directly
+ #
+ -$(OBJCOPY) --add-gnu-debuglink=$(DEBUG_DIR)(+)$(MODULE_NAME).debug ${src}
+ -$(CP) $(DEBUG_DIR)(+)$(MODULE_NAME).debug $(BIN_DIR)
+
"$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
$(CP) ${dst} $(OUTPUT_DIR)
$(CP) ${dst} $(BIN_DIR)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index f54d507783..495f55de74 100644
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
#
# This program and the accompanying materials
@@ -154,11 +154,11 @@ DEFINE DEFAULT_WIN_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
DEFINE MSFT_ASLPP_FLAGS = /nologo /E /C /FIAutoGen.h
DEFINE MSFT_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcpiTable
-DEFINE MSFT_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
+DEFINE MSFT_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE
DEFINE ICC_WIN_ASLPP_FLAGS = /nologo /E /C /FIAutoGen.h
DEFINE ICC_WIN_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcpiTable
-DEFINE ICC_WIN_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /NODEFAULTLIB:libmmt /NODEFAULTLIB:libirc
+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
@@ -167,6 +167,11 @@ DEFINE RVCT31CYGWIN_TOOLS_PATH = /cygdrive/c/Program Files/ARM/RVCT/Programs/3.1
DEFINE SOURCERY_TOOLS = c:/Program Files/CodeSourcery/Sourcery G++ Lite/bin
DEFINE SOURCERY_CYGWIN_TOOLS = /cygdrive/c/Program Files/CodeSourcery/Sourcery G++ Lite/bin
+#
+# Change to the location clang was built
+#
+DEFINE CLANG_BIN = /usr/bin/
+
####################################################################################
#
# format: TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE = <string>
@@ -1598,10 +1603,10 @@ DEFINE GCC_IPF_RC_FLAGS = -I binary -O elf64-ia64-little -B ia64 --re
DEFINE GCC44_ALL_CC_FLAGS = -g -fshort-wchar -fno-stack-protector -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -Wno-array-bounds -ffunction-sections -fdata-sections -c -include AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
DEFINE GCC44_IA32_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m32 -malign-double -D EFI32
DEFINE GCC44_X64_CC_FLAGS = DEF(GCC44_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone -Wno-address -mcmodel=large
-DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections
+DEFINE GCC44_IA32_X64_DLINK_COMMON = -nostdlib -n -q --gc-sections --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script
DEFINE GCC44_IA32_X64_ASLDLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry ReferenceAcpiTable -u ReferenceAcpiTable
DEFINE GCC44_IA32_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_COMMON) --entry $(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
-DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64 --script=$(EDK_TOOLS_PATH)/Scripts/gcc4.4-ld-script
+DEFINE GCC44_X64_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -melf_x86_64 --oformat=elf64-x86-64
DEFINE GCC44_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
DEFINE GCC45_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS)
@@ -1720,6 +1725,7 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
##################
# GCC44 IA32 definitions
##################
+*_GCC44_IA32_OBJCOPY_PATH = DEF(GCC44_IA32_PREFIX)objcopy
*_GCC44_IA32_CC_PATH = DEF(GCC44_IA32_PREFIX)gcc
*_GCC44_IA32_SLINK_PATH = DEF(GCC44_IA32_PREFIX)ar
*_GCC44_IA32_DLINK_PATH = DEF(GCC44_IA32_PREFIX)ld
@@ -1737,10 +1743,12 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
*_GCC44_IA32_CC_FLAGS = DEF(GCC44_IA32_CC_FLAGS) -Os
*_GCC44_IA32_DLINK_FLAGS = DEF(GCC44_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
*_GCC44_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+*_GCC44_IA32_OBJCOPY_FLAGS =
##################
# GCC44 X64 definitions
##################
+*_GCC44_X64_OBJCOPY_PATH = DEF(GCC44_X64_PREFIX)objcopy
*_GCC44_X64_CC_PATH = DEF(GCC44_X64_PREFIX)gcc
*_GCC44_X64_SLINK_PATH = DEF(GCC44_X64_PREFIX)ar
*_GCC44_X64_DLINK_PATH = DEF(GCC44_X64_PREFIX)ld
@@ -1758,7 +1766,7 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
*_GCC44_X64_CC_FLAGS = DEF(GCC44_X64_CC_FLAGS)
*_GCC44_X64_DLINK_FLAGS = DEF(GCC44_X64_DLINK_FLAGS)
*_GCC44_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
-
+*_GCC44_X64_OBJCOPY_FLAGS =
####################################################################################
#
@@ -1782,6 +1790,7 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
##################
# GCC45 IA32 definitions
##################
+*_GCC45_IA32_OBJCOPY_PATH = DEF(GCC45_IA32_PREFIX)objcopy
*_GCC45_IA32_CC_PATH = DEF(GCC45_IA32_PREFIX)gcc
*_GCC45_IA32_SLINK_PATH = DEF(GCC45_IA32_PREFIX)ar
*_GCC45_IA32_DLINK_PATH = DEF(GCC45_IA32_PREFIX)ld
@@ -1799,10 +1808,12 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
*_GCC45_IA32_CC_FLAGS = DEF(GCC45_IA32_CC_FLAGS) -Os
*_GCC45_IA32_DLINK_FLAGS = DEF(GCC45_IA32_X64_DLINK_FLAGS) -m elf_i386 --oformat=elf32-i386
*_GCC45_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
+*_GCC45_IA32_OBJCOPY_FLAGS =
##################
# GCC45 X64 definitions
##################
+*_GCC45_X64_OBJCOPY_PATH = DEF(GCC45_X64_PREFIX)objcopy
*_GCC45_X64_CC_PATH = DEF(GCC45_X64_PREFIX)gcc
*_GCC45_X64_SLINK_PATH = DEF(GCC45_X64_PREFIX)ar
*_GCC45_X64_DLINK_PATH = DEF(GCC45_X64_PREFIX)ld
@@ -1820,7 +1831,7 @@ DEFINE GCC45_ASM_FLAGS = DEF(GCC44_ASM_FLAGS)
*_GCC45_X64_CC_FLAGS = DEF(GCC45_X64_CC_FLAGS)
*_GCC45_X64_DLINK_FLAGS = DEF(GCC45_X64_DLINK_FLAGS)
*_GCC45_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
-
+*_GCC45_X64_OBJCOPY_FLAGS =
####################################################################################
#
@@ -3387,6 +3398,71 @@ RELEASE_XCODE32_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mthumb-inter
####################################################################################
#
+# Clang Support for building on Mac OS X
+#
+####################################################################################
+# CLANG - clang that produce Mach-O with EFI x86_64 ABI
+*_XCLANG_*_*_FAMILY = GCC
+*_XCLANG_*_*_BUILDRULEFAMILY = XCODE
+
+*_XCLANG_*_ASL_PATH = /usr/bin/iasl
+
+*_XCLANG_*_MAKE_PATH = make
+*_XCLANG_*_DSYMUTIL_PATH = /usr/bin/dsymutil
+
+ *_*_*_MTOC_PATH = /usr/local/bin/mtoc
+
+ DEBUG_XCLANG_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
+RELEASE_XCLANG_*_MTOC_FLAGS = -align 0x20
+
+
+*_XCLANG_*_CC_PATH = DEF(CLANG_BIN)clang
+*_XCLANG_*_SLINK_PATH = libtool
+*_XCLANG_*_DLINK_PATH = ld
+*_XCLANG_*_ASM_PATH = as
+*_XCLANG_*_PP_PATH = DEF(CLANG_BIN)clang
+*_XCLANG_*_VFRPP_PATH = DEF(CLANG_BIN)clang
+*_XCLANG_*_ASL_PATH = iasl
+*_XCLANG_*_ASLCC_PATH = DEF(CLANG_BIN)clang
+*_XCLANG_*_ASLPP_PATH = DEF(CLANG_BIN)clang
+*_XCLANG_*_ASLDLINK_PATH = ld
+
+####################
+# IA-32 definitions
+####################
+ DEBUG_XCLANG_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$(IMAGE_ENTRY_POINT) -preload -segalign 0x20 -pie -all_load -dead_strip -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+RELEASE_XCLANG_IA32_DLINK_FLAGS = -arch i386 -u _$(IMAGE_ENTRY_POINT) -e _$(IMAGE_ENTRY_POINT) -preload -segalign 0x20 -pie -all_load -dead_strip -seg1addr 0x220 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+*_XCLANG_IA32_SLINK_FLAGS = -static -o
+ DEBUG_XCLANG_IA32_ASM_FLAGS = -arch i386 -g
+RELEASE_XCLANG_IA32_ASM_FLAGS = -arch i386
+
+
+ DEBUG_XCLANG_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -fno-stack-protector -fno-builtin -fshort-wchar -mdynamic-no-pic -mno-sse -mno-mmx -Wno-empty-body -Wno-pointer-sign -Wno-unused-function -Wno-unused-value -Wno-missing-braces -Wno-tautological-compare -Wreturn-type -Wno-unused-variable
+RELEASE_XCLANG_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -fno-stack-protector -fno-builtin -fshort-wchar -mdynamic-no-pic -mno-sse -mno-mmx -Wno-empty-body -Wno-pointer-sign -Wno-unused-function -Wno-unused-value -Wno-missing-braces -Wno-tautological-compare -Wreturn-type -Wno-unused-variable
+
+
+##################
+# X64 definitions
+##################
+ DEBUG_XCLANG_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _$(IMAGE_ENTRY_POINT) -preload -segalign 0x20 -pie -all_load -dead_strip -seg1addr 0x240 -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+RELEASE_XCLANG_X64_DLINK_FLAGS = -arch x86_64 -u _$(IMAGE_ENTRY_POINT) -e _$(IMAGE_ENTRY_POINT) -preload -segalign 0x20 -pie -all_load -dead_strip -seg1addr 0x220 -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+*_XCLANG_X64_SLINK_FLAGS = -static -o
+ DEBUG_XCLANG_X64_ASM_FLAGS = -arch x86_64 -g
+RELEASE_XCLANG_X64_ASM_FLAGS = -arch x86_64
+*_XCLANG_*_PP_FLAGS = -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
+*_XCLANG_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(DEST_DIR_DEBUG)/$(MODULE_NAME)StrDefs.h
+
+
+ DEBUG_XCLANG_X64_CC_FLAGS = -ccc-host-triple x86_64-pc-win32-macho -c -g -O0 -Wall -Werror -include AutoGen.h -fno-stack-protector -fno-builtin -fshort-wchar -mdynamic-no-pic -mno-sse -mno-mmx -Wno-empty-body -Wno-pointer-sign -Wno-unused-function -Wno-unused-value -Wno-missing-braces -Wno-tautological-compare -Wreturn-type -Wno-unused-variable
+RELEASE_XCLANG_X64_CC_FLAGS = -ccc-host-triple x86_64-pc-win32-macho -c -Os -Wall -Werror -include AutoGen.h -fno-stack-protector -fno-builtin -fshort-wchar -mdynamic-no-pic -mno-sse -mno-mmx -Wno-empty-body -Wno-pointer-sign -Wno-unused-function -Wno-unused-value -Wno-missing-braces -Wno-tautological-compare -Wreturn-type -Wno-unused-variable
+*_XCLANG_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h -mdynamic-no-pic
+*_XCLANG_*_ASLDLINK_FLAGS = -e _main -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
+*_XCLANG_*_ASLPP_FLAGS = -x c -E
+*_XCLANG_*_ASL_FLAGS =
+
+
+####################################################################################
+#
# ARM Tools
#
####################################################################################
@@ -3527,14 +3603,10 @@ RELEASE_ARMGCC_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) -mlittle-endian
*_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 -nostdlib -u $(IMAGE_ENTRY_POINT) -e $(IMAGE_ENTRY_POINT) -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
-#
-# Had to remove --emit-relocs to get compile working. Images don't work correctly (linked at 0, no relocations)
-# --emit-relocs
-#
+*_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
- DEBUG_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mfpu=fpa -mlittle-endian -g -O2 -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fsigned-char -fshort-wchar -fno-strict-aliasing -ffunction-sections -fdata-sections -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h
-RELEASE_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mfpu=fpa -mlittle-endian -O2 -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fsigned-char -fshort-wchar -fno-strict-aliasing -ffunction-sections -fdata-sections -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h
+ DEBUG_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian -g -O0 -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fsigned-char -fshort-wchar -fno-strict-aliasing -ffunction-sections -fdata-sections -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h
+RELEASE_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mlittle-endian -Os -mabi=aapcs -mapcs -fno-short-enums -save-temps -combine -fsigned-char -fshort-wchar -fno-strict-aliasing -ffunction-sections -fdata-sections -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include AutoGen.h
#################
# ASM 16 linker defintions
@@ -3564,7 +3636,7 @@ RELEASE_ARMGCC_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mfpu=fpa -mlitt
# Asl Compiler definitions
##################
*_*_*_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcpiTable
-*_*_*_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER
+*_*_*_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE
*_*_*_ASLPP_FLAGS = /nologo /EP /C
*_*_*_ASL_FLAGS =