VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/BaseTools/Conf/tools_def.template

Last change on this file was 105670, checked in by vboxsync, 5 months ago

Devices/EFI/FirmwareNew: Merge edk2-stable-202405 and make it build on aarch64, bugref:4643

  • Property svn:eol-style set to native
File size: 137.3 KB
Line 
1#
2# Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>
3# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
4# Portions copyright (c) 2011 - 2019, ARM Ltd. All rights reserved.<BR>
5# Copyright (c) 2015, Hewlett-Packard Development Company, L.P.<BR>
6# (C) Copyright 2020, Hewlett Packard Enterprise Development LP<BR>
7# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR>
8# Copyright (c) Microsoft Corporation
9#
10# SPDX-License-Identifier: BSD-2-Clause-Patent
11#
12#
13# Increase this version tag any time you want user to get warning about updating this
14# file in the Conf dir. By default it does not do update existing conf dirs.
15#
16# 2.00 - Initial version with changes for CI
17# - Change RC path to use plugin
18# 3.00 - Update toolchains
19# - Add support for ARM and AARCH64 to CLANGDWARF
20# - Remove VS2008, VS2010, VS2012, VS2013, CLANG35, CLANG38, EBC
21# - Add GCC and GCCNOLTO
22# - Deprecate GCC48, GCC49 and GCC5.
23#
24#!VERSION=3.00
25
26IDENTIFIER = Default TOOL_CHAIN_CONF
27
28# common path macros
29DEFINE VS2015_BIN = ENV(VS2015_PREFIX)Vc\bin
30DEFINE VS2015_DLL = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015_BIN)
31DEFINE VS2015_BINX64 = DEF(VS2015_BIN)\x86_amd64
32
33DEFINE VS2015x86_BIN = ENV(VS2015_PREFIX)Vc\bin
34DEFINE VS2015x86_DLL = ENV(VS2015_PREFIX)Common7\IDE;DEF(VS2015x86_BIN)
35DEFINE VS2015x86_BINX64 = DEF(VS2015x86_BIN)\x86_amd64
36
37DEFINE VS_HOST = x86
38
39DEFINE VS2017_BIN = ENV(VS2017_PREFIX)bin
40DEFINE VS2017_BIN_HOST = DEF(VS2017_BIN)\HostDEF(VS_HOST)\DEF(VS_HOST)
41DEFINE VS2017_BIN_IA32 = DEF(VS2017_BIN)\HostDEF(VS_HOST)\x86
42DEFINE VS2017_BIN_X64 = DEF(VS2017_BIN)\HostDEF(VS_HOST)\x64
43DEFINE VS2017_BIN_ARM = DEF(VS2017_BIN)\HostDEF(VS_HOST)\arm
44DEFINE VS2017_BIN_AARCH64 = DEF(VS2017_BIN)\HostDEF(VS_HOST)\arm64
45
46DEFINE VS2019_BIN = ENV(VS2019_PREFIX)bin
47DEFINE VS2019_BIN_HOST = DEF(VS2019_BIN)\HostDEF(VS_HOST)\DEF(VS_HOST)
48DEFINE VS2019_BIN_IA32 = DEF(VS2019_BIN)\HostDEF(VS_HOST)\x86
49DEFINE VS2019_BIN_X64 = DEF(VS2019_BIN)\HostDEF(VS_HOST)\x64
50DEFINE VS2019_BIN_ARM = DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm
51DEFINE VS2019_BIN_AARCH64 = DEF(VS2019_BIN)\HostDEF(VS_HOST)\arm64
52
53#
54# Resource compiler
55#
56DEFINE RC_PATH = ENV(WINSDK_PATH_FOR_RC_EXE)\rc.exe
57
58DEFINE WINSDK_BIN = ENV(WINSDK_PREFIX)
59DEFINE WINSDKx86_BIN = ENV(WINSDKx86_PREFIX)
60
61# Microsoft Visual Studio 2015 Professional Edition
62DEFINE WINSDK81_BIN = ENV(WINSDK81_PREFIX)x86\
63DEFINE WINSDK81x86_BIN = ENV(WINSDK81x86_PREFIX)x64
64
65# Microsoft Visual Studio 2017/2019 Professional Edition
66DEFINE WINSDK10_BIN = ENV(WINSDK10_PREFIX)DEF(VS_HOST)
67
68# These defines are needed for certain Microsoft Visual Studio tools that
69# are used by other toolchains. An example is that ICC on Windows normally
70# uses Microsoft's nmake.exe.
71
72DEFINE WINDDK_BIN16 = ENV(WINDDK3790_PREFIX)bin16
73DEFINE WINDDK_BINX64 = ENV(WINDDK3790_PREFIX)win64\x86\amd64
74
75DEFINE CYGWIN_BIN = c:/cygwin/bin
76DEFINE CYGWIN_BINIA32 = c:/cygwin/opt/tiano/i386-tiano-pe/i386-tiano-pe/bin/
77DEFINE CYGWIN_BINX64 = c:/cygwin/opt/tiano/x86_64-pc-mingw64/x86_64-pc-mingw64/bin/
78
79DEFINE GCC48_IA32_PREFIX = ENV(GCC48_BIN)
80DEFINE GCC48_X64_PREFIX = ENV(GCC48_BIN)
81
82DEFINE GCC49_IA32_PREFIX = ENV(GCC49_BIN)
83DEFINE GCC49_X64_PREFIX = ENV(GCC49_BIN)
84
85DEFINE GCCNOLTO_IA32_PREFIX = ENV(GCCNOLTO_BIN)
86DEFINE GCCNOLTO_X64_PREFIX = ENV(GCCNOLTO_BIN)
87
88DEFINE GCC5_IA32_PREFIX = ENV(GCC5_BIN)
89DEFINE GCC5_X64_PREFIX = ENV(GCC5_BIN)
90DEFINE GCC_IA32_PREFIX = ENV(GCC_BIN)
91DEFINE GCC_X64_PREFIX = ENV(GCC_BIN)
92DEFINE GCC_HOST_PREFIX = ENV(GCC_HOST_BIN)
93
94DEFINE UNIX_IASL_BIN = ENV(IASL_PREFIX)iasl
95DEFINE WIN_IASL_BIN = ENV(IASL_PREFIX)iasl.exe
96
97DEFINE IASL_FLAGS =
98DEFINE IASL_OUTFLAGS = -p
99
100DEFINE DEFAULT_WIN_ASL_BIN = DEF(WIN_IASL_BIN)
101DEFINE DEFAULT_WIN_ASL_FLAGS = DEF(IASL_FLAGS)
102DEFINE DEFAULT_WIN_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
103
104# MSFT Build Flag for included header file list generation
105DEFINE MSFT_DEPS_FLAGS = /showIncludes
106
107DEFINE MSFT_ASLPP_FLAGS = /nologo /E /C /FIAutoGen.h
108DEFINE MSFT_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcpiTable
109DEFINE MSFT_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE
110
111DEFINE DTCPP_BIN = ENV(DTCPP_PREFIX)cpp
112DEFINE DTC_BIN = ENV(DTC_PREFIX)dtc
113
114####################################################################################
115#
116# format: TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE = <string>
117# priority:
118# TARGET_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE (Highest)
119# ******_TOOLCHAIN_ARCH_COMMANDTYPE_ATTRIBUTE
120# TARGET_*********_ARCH_COMMANDTYPE_ATTRIBUTE
121# ******_*********_ARCH_COMMANDTYPE_ATTRIBUTE
122# TARGET_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE
123# ******_TOOLCHAIN_****_COMMANDTYPE_ATTRIBUTE
124# TARGET_*********_****_COMMANDTYPE_ATTRIBUTE
125# ******_*********_****_COMMANDTYPE_ATTRIBUTE
126# TARGET_TOOLCHAIN_ARCH_***********_ATTRIBUTE
127# ******_TOOLCHAIN_ARCH_***********_ATTRIBUTE
128# TARGET_*********_ARCH_***********_ATTRIBUTE
129# ******_*********_ARCH_***********_ATTRIBUTE
130# TARGET_TOOLCHAIN_****_***********_ATTRIBUTE
131# ******_TOOLCHAIN_****_***********_ATTRIBUTE
132# TARGET_*********_****_***********_ATTRIBUTE
133# ******_*********_****_***********_ATTRIBUTE (Lowest)
134#
135####################################################################################
136####################################################################################
137#
138# Supported Tool Chains
139# =====================
140# VS2015 -win32- Requires:
141# Microsoft Visual Studio 2015 Professional Edition, Update 3
142# Optional:
143# Required to build platforms or ACPI tables:
144# Intel(r) ACPI Compiler (iasl.exe) from
145# https://acpica.org/downloads
146# VS2017 -win32- Requires:
147# Microsoft Visual Studio 2017 version 15.2 (15.4 for ARM64) or later
148# Optional:
149# Required to build platforms or ACPI tables:
150# Intel(r) ACPI Compiler (iasl.exe) from
151# https://acpica.org/downloads
152# Note:
153# Building of XIP firmware images for ARM/ARM64 is not currently supported (only applications).
154# /FILEALIGN:4096 and other changes are needed for ARM firmware builds.
155# VS2019 -win32- Requires:
156# Microsoft Visual Studio 2019 version 16.2 or later
157# Optional:
158# Required to build platforms or ACPI tables:
159# Intel(r) ACPI Compiler (iasl.exe) from
160# https://acpica.org/downloads
161# Note:
162# Building of XIP firmware images for ARM/ARM64 is not currently supported (only applications).
163# /FILEALIGN:4096 and other changes are needed for ARM firmware builds.
164# GCCNOLTO -Linux,Windows- Requires:
165# GCC 4.9 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
166# Optional:
167# Required to build platforms or ACPI tables:
168# Intel(r) ACPI Compiler from
169# https://acpica.org/downloads
170# GCC -Linux,Windows- Requires:
171# GCC 5 with LTO support, targeting x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabi, riscv64-linux-gnu or loongarch64-linux-gnu
172# Optional:
173# Required to build platforms or ACPI tables:
174# Intel(r) ACPI Compiler from
175# https://acpica.org/downloads
176#
177# CLANGPDB -Linux, Windows, Mac- Requires:
178# Clang 9 or above from http://releases.llvm.org/
179# Optional:
180# Required to compile nasm source:
181# nasm compiler from
182# NASM -- http://www.nasm.us/
183# CLANGDWARF -Linux, Windows, Mac- Requires:
184# Clang 9 or above from http://releases.llvm.org/
185# Optional:
186# Required to compile nasm source:
187# nasm compiler from
188# NASM -- http://www.nasm.us/
189# VS2015x86 -win64- Requires:
190# Microsoft Visual Studio 2015 (x86) Update 3 or above
191# Optional:
192# Required to build platforms or ACPI tables:
193# Intel(r) ACPI Compiler (iasl.exe) from
194# https://acpica.org/downloads
195#
196# Deprecated Tool Chains
197# ======================
198# GCC48 -Linux,Windows- Requires:
199# GCC 4.8 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
200# Optional:
201# Required to build platforms or ACPI tables:
202# Intel(r) ACPI Compiler from
203# https://acpica.org/downloads
204# GCC49 -Linux,Windows- Requires:
205# GCC 4.9 targeting x86_64-linux-gnu, aarch64-linux-gnu, or arm-linux-gnueabi
206# Optional:
207# Required to build platforms or ACPI tables:
208# Intel(r) ACPI Compiler from
209# https://acpica.org/downloads
210# GCC5 -Linux,Windows- Requires:
211# GCC 5 with LTO support, targeting x86_64-linux-gnu, aarch64-linux-gnu, arm-linux-gnueabi, riscv64-linux-gnu or loongarch64-linux-gnu
212# Optional:
213# Required to build platforms or ACPI tables:
214# Intel(r) ACPI Compiler from
215# https://acpica.org/downloads
216#
217####################################################################################
218####################################################################################
219#
220# Supported Tool Chain Family
221# ===========================
222# MSFT - Microsoft
223# GCC - GNU GCC
224# INTEL - INTEL
225####################################################################################
226####################################################################################
227#
228# Other Supported Tools
229# =====================
230# NASM -- http://www.nasm.us/
231# - NASM 2.15.05 or later for use with the GCC toolchain family
232# - NASM 2.15.05 or later for use with all other toolchain families
233#
234####################################################################################
235####################################################################################
236#
237# Intel ACPI Source Language Compiler (Template)
238#
239####################################################################################
240# *_*_*_ASL_FAMILY = INTEL
241#
242# *_*_*_ASL_PATH = C:\ASL\iasl.exe
243#
244####################################################################################
245#
246# Microsoft ACPI Source Language Compiler (Template)
247#
248####################################################################################
249# *_*_*_ASL_FAMILY = MSFT
250#
251# *_*_*_ASL_PATH = C:\ASL\asl.exe
252#
253####################################################################################
254
255####################################################################################
256#
257# Microsoft Visual Studio 2015
258#
259# VS2015 - Microsoft Visual Studio 2015 Professional Edition with Intel ASL
260# ASL - Intel ACPI Source Language Compiler
261####################################################################################
262# VS2015 - Microsoft Visual Studio 2015 Professional Edition
263*_VS2015_*_*_FAMILY = MSFT
264
265*_VS2015_*_MAKE_PATH = DEF(VS2015_BIN)\nmake.exe
266*_VS2015_*_MAKE_FLAGS = /nologo
267*_VS2015_*_RC_PATH = DEF(WINSDK81_BIN)\rc.exe
268
269*_VS2015_*_SLINK_FLAGS = /NOLOGO /LTCG
270*_VS2015_*_APP_FLAGS = /nologo /E /TC
271*_VS2015_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
272*_VS2015_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
273*_VS2015_*_DLINK2_FLAGS =
274*_VS2015_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS)
275*_VS2015_*_ASM16_PATH = DEF(VS2015_BIN)\ml.exe
276
277##################
278# ASL definitions
279##################
280*_VS2015_*_ASL_PATH = DEF(DEFAULT_WIN_ASL_BIN)
281*_VS2015_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
282*_VS2015_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
283*_VS2015_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
284*_VS2015_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
285*_VS2015_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
286
287##################
288# IA32 definitions
289##################
290*_VS2015_IA32_*_DLL = DEF(VS2015_DLL)
291
292*_VS2015_IA32_CC_PATH = DEF(VS2015_BIN)\cl.exe
293*_VS2015_IA32_VFRPP_PATH = DEF(VS2015_BIN)\cl.exe
294*_VS2015_IA32_SLINK_PATH = DEF(VS2015_BIN)\lib.exe
295*_VS2015_IA32_DLINK_PATH = DEF(VS2015_BIN)\link.exe
296*_VS2015_IA32_APP_PATH = DEF(VS2015_BIN)\cl.exe
297*_VS2015_IA32_PP_PATH = DEF(VS2015_BIN)\cl.exe
298*_VS2015_IA32_ASM_PATH = DEF(VS2015_BIN)\ml.exe
299*_VS2015_IA32_ASLCC_PATH = DEF(VS2015_BIN)\cl.exe
300*_VS2015_IA32_ASLPP_PATH = DEF(VS2015_BIN)\cl.exe
301*_VS2015_IA32_ASLDLINK_PATH = DEF(VS2015_BIN)\link.exe
302
303 DEBUG_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw
304RELEASE_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw
305NOOPT_VS2015_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od
306
307 DEBUG_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
308RELEASE_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
309NOOPT_VS2015_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
310
311 DEBUG_VS2015_IA32_NASM_FLAGS = -Ox -f win32 -g
312RELEASE_VS2015_IA32_NASM_FLAGS = -Ox -f win32
313NOOPT_VS2015_IA32_NASM_FLAGS = -O0 -f win32 -g
314
315 DEBUG_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
316RELEASE_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
317NOOPT_VS2015_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
318
319##################
320# X64 definitions
321##################
322*_VS2015_X64_*_DLL = DEF(VS2015_DLL)
323
324*_VS2015_X64_CC_PATH = DEF(VS2015_BINX64)\cl.exe
325*_VS2015_X64_PP_PATH = DEF(VS2015_BINX64)\cl.exe
326*_VS2015_X64_APP_PATH = DEF(VS2015_BINX64)\cl.exe
327*_VS2015_X64_VFRPP_PATH = DEF(VS2015_BINX64)\cl.exe
328*_VS2015_X64_ASM_PATH = DEF(VS2015_BINX64)\ml64.exe
329*_VS2015_X64_SLINK_PATH = DEF(VS2015_BINX64)\lib.exe
330*_VS2015_X64_DLINK_PATH = DEF(VS2015_BINX64)\link.exe
331*_VS2015_X64_ASLCC_PATH = DEF(VS2015_BINX64)\cl.exe
332*_VS2015_X64_ASLPP_PATH = DEF(VS2015_BINX64)\cl.exe
333*_VS2015_X64_ASLDLINK_PATH = DEF(VS2015_BINX64)\link.exe
334
335 DEBUG_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw
336RELEASE_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw
337NOOPT_VS2015_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od
338
339 DEBUG_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
340RELEASE_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
341NOOPT_VS2015_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
342
343 DEBUG_VS2015_X64_NASM_FLAGS = -Ox -f win64 -g
344RELEASE_VS2015_X64_NASM_FLAGS = -Ox -f win64
345NOOPT_VS2015_X64_NASM_FLAGS = -O0 -f win64 -g
346
347 DEBUG_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
348RELEASE_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
349NOOPT_VS2015_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
350
351####################################################################################
352# VS2015x86 - Microsoft Visual Studio 2015 (x86) professional with Intel ASL
353# ASL - Intel ACPI Source Language Compiler (iasl.exe)
354####################################################################################
355# VS2015x86 - Microsoft Visual Studio 2015 (x86) professional Edition with Intel ASL
356*_VS2015x86_*_*_FAMILY = MSFT
357
358*_VS2015x86_*_MAKE_PATH = DEF(VS2015x86_BIN)\nmake.exe
359*_VS2015x86_*_MAKE_FLAGS = /nologo
360*_VS2015x86_*_RC_PATH = DEF(WINSDK81x86_BIN)\rc.exe
361
362*_VS2015x86_*_SLINK_FLAGS = /NOLOGO /LTCG
363*_VS2015x86_*_APP_FLAGS = /nologo /E /TC
364*_VS2015x86_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
365*_VS2015x86_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
366*_VS2015x86_*_DLINK2_FLAGS =
367*_VS2015x86_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS)
368*_VS2015x86_*_ASM16_PATH = DEF(VS2015x86_BIN)\ml.exe
369
370##################
371# ASL definitions
372##################
373*_VS2015x86_*_ASL_PATH = DEF(WIN_IASL_BIN)
374*_VS2015x86_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
375*_VS2015x86_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
376*_VS2015x86_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
377*_VS2015x86_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
378*_VS2015x86_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
379
380##################
381# IA32 definitions
382##################
383*_VS2015x86_IA32_*_DLL = DEF(VS2015x86_DLL)
384
385*_VS2015x86_IA32_CC_PATH = DEF(VS2015x86_BIN)\cl.exe
386*_VS2015x86_IA32_VFRPP_PATH = DEF(VS2015x86_BIN)\cl.exe
387*_VS2015x86_IA32_ASLCC_PATH = DEF(VS2015x86_BIN)\cl.exe
388*_VS2015x86_IA32_ASLPP_PATH = DEF(VS2015x86_BIN)\cl.exe
389*_VS2015x86_IA32_SLINK_PATH = DEF(VS2015x86_BIN)\lib.exe
390*_VS2015x86_IA32_DLINK_PATH = DEF(VS2015x86_BIN)\link.exe
391*_VS2015x86_IA32_ASLDLINK_PATH= DEF(VS2015x86_BIN)\link.exe
392*_VS2015x86_IA32_APP_PATH = DEF(VS2015x86_BIN)\cl.exe
393*_VS2015x86_IA32_PP_PATH = DEF(VS2015x86_BIN)\cl.exe
394*_VS2015x86_IA32_ASM_PATH = DEF(VS2015x86_BIN)\ml.exe
395
396 DEBUG_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw
397RELEASE_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw
398NOOPT_VS2015x86_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od
399
400 DEBUG_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
401RELEASE_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
402NOOPT_VS2015x86_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
403
404 DEBUG_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32 -g
405RELEASE_VS2015x86_IA32_NASM_FLAGS = -Ox -f win32
406NOOPT_VS2015x86_IA32_NASM_FLAGS = -O0 -f win32 -g
407
408 DEBUG_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
409RELEASE_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
410NOOPT_VS2015x86_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
411
412##################
413# X64 definitions
414##################
415*_VS2015x86_X64_*_DLL = DEF(VS2015x86_DLL)
416
417*_VS2015x86_X64_CC_PATH = DEF(VS2015x86_BINX64)\cl.exe
418*_VS2015x86_X64_PP_PATH = DEF(VS2015x86_BINX64)\cl.exe
419*_VS2015x86_X64_APP_PATH = DEF(VS2015x86_BINX64)\cl.exe
420*_VS2015x86_X64_VFRPP_PATH = DEF(VS2015x86_BINX64)\cl.exe
421*_VS2015x86_X64_ASLCC_PATH = DEF(VS2015x86_BINX64)\cl.exe
422*_VS2015x86_X64_ASLPP_PATH = DEF(VS2015x86_BINX64)\cl.exe
423*_VS2015x86_X64_ASM_PATH = DEF(VS2015x86_BINX64)\ml64.exe
424*_VS2015x86_X64_SLINK_PATH = DEF(VS2015x86_BINX64)\lib.exe
425*_VS2015x86_X64_DLINK_PATH = DEF(VS2015x86_BINX64)\link.exe
426*_VS2015x86_X64_ASLDLINK_PATH = DEF(VS2015x86_BINX64)\link.exe
427
428 DEBUG_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw
429RELEASE_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw
430NOOPT_VS2015x86_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od
431
432 DEBUG_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
433RELEASE_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
434NOOPT_VS2015x86_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
435
436 DEBUG_VS2015x86_X64_NASM_FLAGS = -Ox -f win64 -g
437RELEASE_VS2015x86_X64_NASM_FLAGS = -Ox -f win64
438NOOPT_VS2015x86_X64_NASM_FLAGS = -O0 -f win64 -g
439
440 DEBUG_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
441RELEASE_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
442NOOPT_VS2015x86_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
443
444####################################################################################
445# VS2017 - Microsoft Visual Studio 2017 with Intel ASL
446# ASL - Intel ACPI Source Language Compiler (iasl.exe)
447####################################################################################
448# VS2017 - Microsoft Visual Studio 2017 professional Edition with Intel ASL
449*_VS2017_*_*_FAMILY = MSFT
450*_VS2017_*_*_DLL = DEF(VS2017_BIN_HOST)
451
452*_VS2017_*_MAKE_PATH = DEF(VS2017_BIN_HOST)\nmake.exe
453*_VS2017_*_MAKE_FLAGS = /nologo
454*_VS2017_*_RC_PATH = DEF(RC_PATH)
455
456*_VS2017_*_SLINK_FLAGS = /NOLOGO /LTCG
457*_VS2017_*_APP_FLAGS = /nologo /E /TC
458*_VS2017_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
459*_VS2017_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
460*_VS2017_*_DLINK2_FLAGS = /WHOLEARCHIVE
461*_VS2017_*_ASM16_PATH = DEF(VS2017_BIN_IA32)\ml.exe
462*_VS2017_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS)
463##################
464# ASL definitions
465##################
466*_VS2017_*_ASL_PATH = DEF(WIN_IASL_BIN)
467*_VS2017_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
468*_VS2017_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
469*_VS2017_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
470*_VS2017_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
471*_VS2017_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
472
473##################
474# IA32 definitions
475##################
476*_VS2017_IA32_CC_PATH = DEF(VS2017_BIN_IA32)\cl.exe
477*_VS2017_IA32_VFRPP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
478*_VS2017_IA32_ASLCC_PATH = DEF(VS2017_BIN_IA32)\cl.exe
479*_VS2017_IA32_ASLPP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
480*_VS2017_IA32_SLINK_PATH = DEF(VS2017_BIN_IA32)\lib.exe
481*_VS2017_IA32_DLINK_PATH = DEF(VS2017_BIN_IA32)\link.exe
482*_VS2017_IA32_ASLDLINK_PATH= DEF(VS2017_BIN_IA32)\link.exe
483*_VS2017_IA32_APP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
484*_VS2017_IA32_PP_PATH = DEF(VS2017_BIN_IA32)\cl.exe
485*_VS2017_IA32_ASM_PATH = DEF(VS2017_BIN_IA32)\ml.exe
486
487 DEBUG_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw
488RELEASE_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw
489NOOPT_VS2017_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od
490
491 DEBUG_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
492RELEASE_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
493NOOPT_VS2017_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
494
495 DEBUG_VS2017_IA32_NASM_FLAGS = -Ox -f win32 -g
496RELEASE_VS2017_IA32_NASM_FLAGS = -Ox -f win32
497NOOPT_VS2017_IA32_NASM_FLAGS = -O0 -f win32 -g
498
499 DEBUG_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
500RELEASE_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
501NOOPT_VS2017_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
502
503##################
504# X64 definitions
505##################
506*_VS2017_X64_CC_PATH = DEF(VS2017_BIN_X64)\cl.exe
507*_VS2017_X64_PP_PATH = DEF(VS2017_BIN_X64)\cl.exe
508*_VS2017_X64_APP_PATH = DEF(VS2017_BIN_X64)\cl.exe
509*_VS2017_X64_VFRPP_PATH = DEF(VS2017_BIN_X64)\cl.exe
510*_VS2017_X64_ASLCC_PATH = DEF(VS2017_BIN_X64)\cl.exe
511*_VS2017_X64_ASLPP_PATH = DEF(VS2017_BIN_X64)\cl.exe
512*_VS2017_X64_ASM_PATH = DEF(VS2017_BIN_X64)\ml64.exe
513*_VS2017_X64_SLINK_PATH = DEF(VS2017_BIN_X64)\lib.exe
514*_VS2017_X64_DLINK_PATH = DEF(VS2017_BIN_X64)\link.exe
515*_VS2017_X64_ASLDLINK_PATH = DEF(VS2017_BIN_X64)\link.exe
516
517 DEBUG_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw
518RELEASE_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw
519NOOPT_VS2017_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od
520
521 DEBUG_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
522RELEASE_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
523NOOPT_VS2017_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
524
525 DEBUG_VS2017_X64_NASM_FLAGS = -Ox -f win64 -g
526RELEASE_VS2017_X64_NASM_FLAGS = -Ox -f win64
527NOOPT_VS2017_X64_NASM_FLAGS = -O0 -f win64 -g
528
529 DEBUG_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
530RELEASE_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
531NOOPT_VS2017_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
532
533#################
534# ARM definitions
535#################
536*_VS2017_ARM_CC_PATH = DEF(VS2017_BIN_ARM)\cl.exe
537*_VS2017_ARM_VFRPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
538*_VS2017_ARM_SLINK_PATH = DEF(VS2017_BIN_ARM)\lib.exe
539*_VS2017_ARM_DLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe
540*_VS2017_ARM_APP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
541*_VS2017_ARM_PP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
542*_VS2017_ARM_ASM_PATH = DEF(VS2017_BIN_ARM)\armasm.exe
543*_VS2017_ARM_ASLCC_PATH = DEF(VS2017_BIN_ARM)\cl.exe
544*_VS2017_ARM_ASLPP_PATH = DEF(VS2017_BIN_ARM)\cl.exe
545*_VS2017_ARM_ASLDLINK_PATH = DEF(VS2017_BIN_ARM)\link.exe
546
547 DEBUG_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gw /Oi-
548RELEASE_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
549NOOPT_VS2017_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Od /Oi-
550
551 DEBUG_VS2017_ARM_ASM_FLAGS = /nologo /g
552RELEASE_VS2017_ARM_ASM_FLAGS = /nologo
553NOOPT_VS2017_ARM_ASM_FLAGS = /nologo
554
555 DEBUG_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
556RELEASE_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
557NOOPT_VS2017_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
558
559#####################
560# AARCH64 definitions
561#####################
562*_VS2017_AARCH64_CC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
563*_VS2017_AARCH64_VFRPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
564*_VS2017_AARCH64_SLINK_PATH = DEF(VS2017_BIN_AARCH64)\lib.exe
565*_VS2017_AARCH64_DLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe
566*_VS2017_AARCH64_APP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
567*_VS2017_AARCH64_PP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
568*_VS2017_AARCH64_ASM_PATH = DEF(VS2017_BIN_AARCH64)\armasm64.exe
569*_VS2017_AARCH64_ASLCC_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
570*_VS2017_AARCH64_ASLPP_PATH = DEF(VS2017_BIN_AARCH64)\cl.exe
571*_VS2017_AARCH64_ASLDLINK_PATH = DEF(VS2017_BIN_AARCH64)\link.exe
572
573 DEBUG_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gw /Oi-
574RELEASE_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
575NOOPT_VS2017_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Od /Oi-
576
577 DEBUG_VS2017_AARCH64_ASM_FLAGS = /nologo /g
578RELEASE_VS2017_AARCH64_ASM_FLAGS = /nologo
579NOOPT_VS2017_AARCH64_ASM_FLAGS = /nologo
580
581 DEBUG_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG
582RELEASE_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /MERGE:.rdata=.data
583NOOPT_VS2017_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG
584
585####################################################################################
586# VS2019 - Microsoft Visual Studio 2019 with Intel ASL
587# ASL - Intel ACPI Source Language Compiler (iasl.exe)
588####################################################################################
589# VS2019 - Microsoft Visual Studio 2017 professional Edition with Intel ASL
590*_VS2019_*_*_FAMILY = MSFT
591*_VS2019_*_*_DLL = DEF(VS2019_BIN_HOST)
592
593*_VS2019_*_MAKE_PATH = DEF(VS2019_BIN_HOST)\nmake.exe
594*_VS2019_*_MAKE_FLAGS = /nologo
595*_VS2019_*_RC_PATH = DEF(RC_PATH)
596
597*_VS2019_*_SLINK_FLAGS = /NOLOGO /LTCG
598*_VS2019_*_APP_FLAGS = /nologo /E /TC
599*_VS2019_*_PP_FLAGS = /nologo /E /TC /FIAutoGen.h
600*_VS2019_*_VFRPP_FLAGS = /nologo /E /TC /DVFRCOMPILE /FI$(MODULE_NAME)StrDefs.h
601*_VS2019_*_DLINK2_FLAGS = /WHOLEARCHIVE
602*_VS2019_*_ASM16_PATH = DEF(VS2019_BIN_IA32)\ml.exe
603*_VS2019_*_DEPS_FLAGS = DEF(MSFT_DEPS_FLAGS)
604##################
605# ASL definitions
606##################
607*_VS2019_*_ASL_PATH = DEF(WIN_IASL_BIN)
608*_VS2019_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
609*_VS2019_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
610*_VS2019_*_ASLCC_FLAGS = DEF(MSFT_ASLCC_FLAGS)
611*_VS2019_*_ASLPP_FLAGS = DEF(MSFT_ASLPP_FLAGS)
612*_VS2019_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
613
614##################
615# IA32 definitions
616##################
617*_VS2019_IA32_CC_PATH = DEF(VS2019_BIN_IA32)\cl.exe
618*_VS2019_IA32_VFRPP_PATH = DEF(VS2019_BIN_IA32)\cl.exe
619*_VS2019_IA32_ASLCC_PATH = DEF(VS2019_BIN_IA32)\cl.exe
620*_VS2019_IA32_ASLPP_PATH = DEF(VS2019_BIN_IA32)\cl.exe
621*_VS2019_IA32_SLINK_PATH = DEF(VS2019_BIN_IA32)\lib.exe
622*_VS2019_IA32_DLINK_PATH = DEF(VS2019_BIN_IA32)\link.exe
623*_VS2019_IA32_ASLDLINK_PATH= DEF(VS2019_BIN_IA32)\link.exe
624*_VS2019_IA32_APP_PATH = DEF(VS2019_BIN_IA32)\cl.exe
625*_VS2019_IA32_PP_PATH = DEF(VS2019_BIN_IA32)\cl.exe
626*_VS2019_IA32_ASM_PATH = DEF(VS2019_BIN_IA32)\ml.exe
627
628 DEBUG_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Gw
629RELEASE_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw
630NOOPT_VS2019_IA32_CC_FLAGS = /nologo /arch:IA32 /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Z7 /Od
631
632 DEBUG_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
633RELEASE_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd
634NOOPT_VS2019_IA32_ASM_FLAGS = /nologo /c /WX /W3 /Cx /coff /Zd /Zi
635
636 DEBUG_VS2019_IA32_NASM_FLAGS = -Ox -f win32 -g
637RELEASE_VS2019_IA32_NASM_FLAGS = -Ox -f win32
638NOOPT_VS2019_IA32_NASM_FLAGS = -O0 -f win32 -g
639
640 DEBUG_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
641RELEASE_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
642NOOPT_VS2019_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
643
644##################
645# X64 definitions
646##################
647*_VS2019_X64_CC_PATH = DEF(VS2019_BIN_X64)\cl.exe
648*_VS2019_X64_PP_PATH = DEF(VS2019_BIN_X64)\cl.exe
649*_VS2019_X64_APP_PATH = DEF(VS2019_BIN_X64)\cl.exe
650*_VS2019_X64_VFRPP_PATH = DEF(VS2019_BIN_X64)\cl.exe
651*_VS2019_X64_ASLCC_PATH = DEF(VS2019_BIN_X64)\cl.exe
652*_VS2019_X64_ASLPP_PATH = DEF(VS2019_BIN_X64)\cl.exe
653*_VS2019_X64_ASM_PATH = DEF(VS2019_BIN_X64)\ml64.exe
654*_VS2019_X64_SLINK_PATH = DEF(VS2019_BIN_X64)\lib.exe
655*_VS2019_X64_DLINK_PATH = DEF(VS2019_BIN_X64)\link.exe
656*_VS2019_X64_ASLDLINK_PATH = DEF(VS2019_BIN_X64)\link.exe
657
658 DEBUG_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Gw
659RELEASE_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /GL /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Gw
660NOOPT_VS2019_X64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /Gy /FIAutoGen.h /EHs-c- /GR- /GF /Z7 /Od
661
662 DEBUG_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
663RELEASE_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd
664NOOPT_VS2019_X64_ASM_FLAGS = /nologo /c /WX /W3 /Cx /Zd /Zi
665
666 DEBUG_VS2019_X64_NASM_FLAGS = -Ox -f win64 -g
667RELEASE_VS2019_X64_NASM_FLAGS = -Ox -f win64
668NOOPT_VS2019_X64_NASM_FLAGS = -O0 -f win64 -g
669
670 DEBUG_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
671RELEASE_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
672NOOPT_VS2019_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4281 /OPT:REF /OPT:ICF=10 /MAP /ALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
673
674#################
675# ARM definitions
676#################
677*_VS2019_ARM_CC_PATH = DEF(VS2019_BIN_ARM)\cl.exe
678*_VS2019_ARM_VFRPP_PATH = DEF(VS2019_BIN_ARM)\cl.exe
679*_VS2019_ARM_SLINK_PATH = DEF(VS2019_BIN_ARM)\lib.exe
680*_VS2019_ARM_DLINK_PATH = DEF(VS2019_BIN_ARM)\link.exe
681*_VS2019_ARM_APP_PATH = DEF(VS2019_BIN_ARM)\cl.exe
682*_VS2019_ARM_PP_PATH = DEF(VS2019_BIN_ARM)\cl.exe
683*_VS2019_ARM_ASM_PATH = DEF(VS2019_BIN_ARM)\armasm.exe
684*_VS2019_ARM_ASLCC_PATH = DEF(VS2019_BIN_ARM)\cl.exe
685*_VS2019_ARM_ASLPP_PATH = DEF(VS2019_BIN_ARM)\cl.exe
686*_VS2019_ARM_ASLDLINK_PATH = DEF(VS2019_BIN_ARM)\link.exe
687
688 DEBUG_VS2019_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gw /Oi-
689RELEASE_VS2019_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
690NOOPT_VS2019_ARM_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Od /Oi-
691
692 DEBUG_VS2019_ARM_ASM_FLAGS = /nologo /g
693RELEASE_VS2019_ARM_ASM_FLAGS = /nologo
694NOOPT_VS2019_ARM_ASM_FLAGS = /nologo
695
696 DEBUG_VS2019_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
697RELEASE_VS2019_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /MERGE:.rdata=.data
698NOOPT_VS2019_ARM_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DRIVER /DEBUG
699
700#####################
701# AARCH64 definitions
702#####################
703*_VS2019_AARCH64_CC_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
704*_VS2019_AARCH64_VFRPP_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
705*_VS2019_AARCH64_SLINK_PATH = DEF(VS2019_BIN_AARCH64)\lib.exe
706*_VS2019_AARCH64_DLINK_PATH = DEF(VS2019_BIN_AARCH64)\link.exe
707*_VS2019_AARCH64_APP_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
708*_VS2019_AARCH64_PP_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
709*_VS2019_AARCH64_ASM_PATH = DEF(VS2019_BIN_AARCH64)\armasm64.exe
710*_VS2019_AARCH64_ASLCC_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
711*_VS2019_AARCH64_ASLPP_PATH = DEF(VS2019_BIN_AARCH64)\cl.exe
712*_VS2019_AARCH64_ASLDLINK_PATH = DEF(VS2019_BIN_AARCH64)\link.exe
713
714 DEBUG_VS2019_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gw /Oi-
715RELEASE_VS2019_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /GL /FIAutoGen.h /EHs-c- /GR- /GF /Gw /Oi-
716NOOPT_VS2019_AARCH64_CC_FLAGS = /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Od /Oi-
717
718 DEBUG_VS2019_AARCH64_ASM_FLAGS = /nologo /g
719RELEASE_VS2019_AARCH64_ASM_FLAGS = /nologo
720NOOPT_VS2019_AARCH64_ASM_FLAGS = /nologo
721
722 DEBUG_VS2019_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG
723RELEASE_VS2019_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /MERGE:.rdata=.data
724NOOPT_VS2019_AARCH64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /MAP /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:ARM64 /LTCG /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /DRIVER /DEBUG
725
726####################################################################################
727# GCC Common
728####################################################################################
729
730*_*_*_OBJCOPY_PATH = echo
731*_*_*_OBJCOPY_FLAGS = objcopy not needed for
732*_*_*_SYMRENAME_PATH = echo
733*_*_*_SYMRENAME_FLAGS = Symbol renaming not needed for
734DEBUG_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink="$(DEBUG_DIR)/$(MODULE_NAME).debug"
735RELEASE_*_*_OBJCOPY_ADDDEBUGFLAG =
736NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink="$(DEBUG_DIR)/$(MODULE_NAME).debug"
737*_*_*_OBJCOPY_STRIPFLAG = --strip-unneeded -R .eh_frame
738*_*_*_DTC_FLAGS = -H epapr
739*_*_*_DTCPP_PATH = DEF(DTCPP_BIN)
740*_*_*_DTC_PATH = DEF(DTC_BIN)
741
742DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
743DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie
744DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections
745DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
746DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
747DEFINE GCC_AARCH64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only
748DEFINE GCC_RISCV64_CC_XIPFLAGS = -mstrict-align -mgeneral-regs-only
749DEFINE GCC_DLINK_FLAGS_COMMON = -nostdlib --pie
750DEFINE GCC_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
751DEFINE GCC_IA32_X64_DLINK_COMMON = DEF(GCC_DLINK_FLAGS_COMMON) --gc-sections
752DEFINE GCC_ARM_AARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
753DEFINE GCC_LOONGARCH64_DLINK_COMMON= -Wl,--emit-relocs -nostdlib -Wl,--gc-sections -u $(IMAGE_ENTRY_POINT) -Wl,-e,$(IMAGE_ENTRY_POINT),-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
754DEFINE GCC_ARM_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20 -Wl,--pic-veneer
755DEFINE GCC_AARCH64_DLINK_FLAGS = DEF(GCC_ARM_AARCH64_DLINK_COMMON) -z common-page-size=0x20
756DEFINE GCC_LOONGARCH64_DLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_COMMON) -z common-page-size=0x20
757DEFINE GCC_ARM_AARCH64_ASLDLINK_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) -z common-page-size=0x20
758DEFINE GCC_IA32_X64_ASLDLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
759DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
760DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
761DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
762DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
763DEFINE GCC_ASM_FLAGS = -c -x assembler -imacros AutoGen.h
764DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
765DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
766DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
767DEFINE GCC_ASLCC_FLAGS = -x c
768DEFINE GCC_WINDRES_FLAGS = -J rc -O coff
769DEFINE GCC_DTCPP_FLAGS = -E -x assembler-with-cpp -imacros AutoGen.h -nostdinc -undef
770DEFINE GCC_IA32_RC_FLAGS = -I binary -O elf32-i386 -B i386 --rename-section .data=.hii
771DEFINE GCC_X64_RC_FLAGS = -I binary -O elf64-x86-64 -B i386 --rename-section .data=.hii
772DEFINE GCC_ARM_RC_FLAGS = -I binary -O elf32-littlearm -B arm --rename-section .data=.hii
773DEFINE GCC_AARCH64_RC_FLAGS = -I binary -O elf64-littleaarch64 -B aarch64 --rename-section .data=.hii
774DEFINE GCC_AARCH64_RC_BTI_FLAGS = --add-section .note.gnu.property=$(WORKSPACE)/ArmPkg/Library/GnuNoteBti.bin --set-section-flags .note.gnu.property=alloc,readonly
775DEFINE GCC_RISCV64_RC_FLAGS = -I binary -O elf64-littleriscv -B riscv --rename-section .data=.hii
776DEFINE GCC_LOONGARCH64_RC_FLAGS = -I binary -O elf64-loongarch -B loongarch64 --rename-section .data=.hii
777
778# GCC Build Flag for included header file list generation
779DEFINE GCC_DEPS_FLAGS = -MMD -MF [email protected]
780
781DEFINE GCC48_ALL_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -ffunction-sections -fdata-sections -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
782DEFINE GCC48_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x20
783DEFINE GCC48_IA32_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m32 -march=i586 -malign-double -fno-stack-protector -D EFI32 -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer
784DEFINE GCC48_X64_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) -m64 -fno-stack-protector "-DEFIAPI=__attribute__((ms_abi))" -maccumulate-outgoing-args -mno-red-zone -Wno-address -mcmodel=small -fpie -fno-asynchronous-unwind-tables -Wno-address -fno-omit-frame-pointer
785DEFINE GCC48_IA32_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
786DEFINE GCC48_IA32_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
787DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(GCC_DLINK2_FLAGS_COMMON)
788DEFINE GCC48_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie
789DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON)
790DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
791DEFINE GCC48_ARM_ASM_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
792DEFINE GCC48_AARCH64_ASM_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
793DEFINE GCC48_ARM_CC_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
794DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
795DEFINE GCC48_AARCH64_CC_FLAGS = $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
796DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
797DEFINE GCC48_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm
798DEFINE GCC48_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
799DEFINE GCC48_AARCH64_DLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS)
800DEFINE GCC48_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
801DEFINE GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_ASLDLINK_FLAGS) -Wl,--oformat=elf32-littlearm
802DEFINE GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_ASLDLINK_FLAGS)
803DEFINE GCC48_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
804
805DEFINE GCC49_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -fno-pic -fno-pie
806DEFINE GCC49_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
807DEFINE GCC49_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
808DEFINE GCC49_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
809DEFINE GCC49_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive
810DEFINE GCC49_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
811DEFINE GCC49_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie
812DEFINE GCC49_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
813DEFINE GCC49_ASM_FLAGS = DEF(GCC48_ASM_FLAGS)
814DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS)
815DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS)
816DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS)
817DEFINE GCC49_ARM_CC_XIPFLAGS = DEF(GCC48_ARM_CC_XIPFLAGS)
818DEFINE GCC49_AARCH64_CC_FLAGS = $(PLATFORM_FLAGS) DEF(GCC48_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS) -mcmodel=small
819DEFINE GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS)
820DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS)
821DEFINE GCC49_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
822DEFINE GCC49_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
823DEFINE GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS)
824DEFINE GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS)
825DEFINE GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
826DEFINE GCC49_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS)
827
828DEFINE GCC5_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
829DEFINE GCC5_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
830DEFINE GCC5_IA32_X64_DLINK_COMMON = DEF(GCC49_IA32_X64_DLINK_COMMON)
831DEFINE GCC5_IA32_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS)
832DEFINE GCC5_IA32_X64_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS)
833DEFINE GCC5_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS) -Wno-error
834DEFINE GCC5_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS)
835DEFINE GCC5_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS) -Wno-error
836DEFINE GCC5_ASM_FLAGS = DEF(GCC49_ASM_FLAGS)
837DEFINE GCC5_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
838DEFINE GCC5_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS)
839DEFINE GCC5_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS)
840DEFINE GCC5_ARM_CC_XIPFLAGS = DEF(GCC49_ARM_CC_XIPFLAGS)
841DEFINE GCC5_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS)
842DEFINE GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS)
843DEFINE GCC5_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
844DEFINE GCC5_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS) -Wno-error
845DEFINE GCC5_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
846DEFINE GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS) -Wno-error
847DEFINE GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
848DEFINE GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
849DEFINE GCC5_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -fno-lto
850
851DEFINE GCC5_RISCV_ALL_CC_FLAGS = -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections -fdata-sections -include AutoGen.h -fno-common -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings -msmall-data-limit=0
852DEFINE GCC5_RISCV_ALL_DLINK_COMMON = -nostdlib -Wl,-n,-q,--gc-sections -z common-page-size=0x40
853DEFINE GCC5_RISCV_ALL_DLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
854DEFINE GCC5_RISCV_ALL_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220,--script=$(EDK_TOOLS_PATH)/Scripts/GccBase.lds
855DEFINE GCC5_RISCV_ALL_ASM_FLAGS = -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
856DEFINE GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE = -Wno-tautological-compare -Wno-pointer-compare
857
858DEFINE GCC5_RISCV_OPENSBI_TYPES = -DOPENSBI_EXTERNAL_SBI_TYPES=OpensbiTypes.h
859
860DEFINE GCC5_RISCV64_ARCH = rv64gc
861DEFINE GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
862DEFINE GCC5_RISCV64_CC_FLAGS = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax
863DEFINE GCC5_RISCV64_DLINK_FLAGS = DEF(GCC5_RISCV_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax
864DEFINE GCC5_RISCV64_DLINK2_FLAGS = DEF(GCC5_RISCV_ALL_DLINK2_FLAGS)
865DEFINE GCC5_RISCV64_ASM_FLAGS = DEF(GCC5_RISCV_ALL_ASM_FLAGS) -march=DEF(GCC5_RISCV64_ARCH) -mcmodel=medany -mabi=lp64
866
867DEFINE GCC5_LOONGARCH64_CC_FLAGS = DEF(GCC_LOONGARCH64_CC_FLAGS) -march=loongarch64 -mno-memcpy -Werror -Wno-maybe-uninitialized -Wno-stringop-overflow -Wno-pointer-to-int-cast -no-pie -fno-stack-protector -mno-explicit-relocs
868DEFINE GCC5_LOONGARCH64_DLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS)
869DEFINE GCC5_LOONGARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
870DEFINE GCC5_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_ASLDLINK_FLAGS) DEF(GCC5_LOONGARCH64_DLINK2_FLAGS)
871DEFINE GCC5_LOONGARCH64_ASM_FLAGS = -x assembler-with-cpp -mabi=lp64d -march=loongarch64 -fno-builtin -c -Wall -mno-explicit-relocs
872DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF(GCC_PP_FLAGS)
873
874####################################################################################
875#
876# GCC 4.8 - This configuration is used to compile under Linux to produce
877# PE/COFF binaries using GCC 4.8.
878#
879####################################################################################
880*_GCC48_*_*_FAMILY = GCC
881
882*_GCC48_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
883*_GCC48_*_*_DLL = ENV(GCC48_DLL)
884*_GCC48_*_ASL_PATH = DEF(UNIX_IASL_BIN)
885
886*_GCC48_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
887*_GCC48_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
888*_GCC48_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
889*_GCC48_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
890*_GCC48_*_APP_FLAGS =
891*_GCC48_*_ASL_FLAGS = DEF(IASL_FLAGS)
892*_GCC48_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
893*_GCC48_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
894
895##################
896# GCC48 IA32 definitions
897##################
898*_GCC48_IA32_OBJCOPY_PATH = DEF(GCC48_IA32_PREFIX)objcopy
899*_GCC48_IA32_CC_PATH = DEF(GCC48_IA32_PREFIX)gcc
900*_GCC48_IA32_SLINK_PATH = DEF(GCC48_IA32_PREFIX)ar
901*_GCC48_IA32_DLINK_PATH = DEF(GCC48_IA32_PREFIX)gcc
902*_GCC48_IA32_ASLDLINK_PATH = DEF(GCC48_IA32_PREFIX)gcc
903*_GCC48_IA32_ASM_PATH = DEF(GCC48_IA32_PREFIX)gcc
904*_GCC48_IA32_PP_PATH = DEF(GCC48_IA32_PREFIX)gcc
905*_GCC48_IA32_VFRPP_PATH = DEF(GCC48_IA32_PREFIX)gcc
906*_GCC48_IA32_ASLCC_PATH = DEF(GCC48_IA32_PREFIX)gcc
907*_GCC48_IA32_ASLPP_PATH = DEF(GCC48_IA32_PREFIX)gcc
908*_GCC48_IA32_RC_PATH = DEF(GCC48_IA32_PREFIX)objcopy
909
910*_GCC48_IA32_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) -m32
911*_GCC48_IA32_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
912*_GCC48_IA32_ASM_FLAGS = DEF(GCC48_ASM_FLAGS) -m32 -march=i386
913*_GCC48_IA32_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
914*_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
915*_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
916*_GCC48_IA32_OBJCOPY_FLAGS =
917*_GCC48_IA32_NASM_FLAGS = -f elf32
918
919 DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS)
920RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable
921 NOOPT_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -O0
922
923##################
924# GCC48 X64 definitions
925##################
926*_GCC48_X64_OBJCOPY_PATH = DEF(GCC48_X64_PREFIX)objcopy
927*_GCC48_X64_CC_PATH = DEF(GCC48_X64_PREFIX)gcc
928*_GCC48_X64_SLINK_PATH = DEF(GCC48_X64_PREFIX)ar
929*_GCC48_X64_DLINK_PATH = DEF(GCC48_X64_PREFIX)gcc
930*_GCC48_X64_ASLDLINK_PATH = DEF(GCC48_X64_PREFIX)gcc
931*_GCC48_X64_ASM_PATH = DEF(GCC48_X64_PREFIX)gcc
932*_GCC48_X64_PP_PATH = DEF(GCC48_X64_PREFIX)gcc
933*_GCC48_X64_VFRPP_PATH = DEF(GCC48_X64_PREFIX)gcc
934*_GCC48_X64_ASLCC_PATH = DEF(GCC48_X64_PREFIX)gcc
935*_GCC48_X64_ASLPP_PATH = DEF(GCC48_X64_PREFIX)gcc
936*_GCC48_X64_RC_PATH = DEF(GCC48_X64_PREFIX)objcopy
937
938*_GCC48_X64_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS) -m64
939*_GCC48_X64_ASLDLINK_FLAGS = DEF(GCC48_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
940*_GCC48_X64_ASM_FLAGS = DEF(GCC48_ASM_FLAGS) -m64
941*_GCC48_X64_DLINK_FLAGS = DEF(GCC48_X64_DLINK_FLAGS)
942*_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
943*_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
944*_GCC48_X64_OBJCOPY_FLAGS =
945*_GCC48_X64_NASM_FLAGS = -f elf64
946
947 DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
948RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable
949 NOOPT_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -O0
950
951##################
952# GCC48 ARM definitions
953##################
954*_GCC48_ARM_CC_PATH = ENV(GCC48_ARM_PREFIX)gcc
955*_GCC48_ARM_SLINK_PATH = ENV(GCC48_ARM_PREFIX)ar
956*_GCC48_ARM_DLINK_PATH = ENV(GCC48_ARM_PREFIX)gcc
957*_GCC48_ARM_ASLDLINK_PATH = ENV(GCC48_ARM_PREFIX)gcc
958*_GCC48_ARM_ASM_PATH = ENV(GCC48_ARM_PREFIX)gcc
959*_GCC48_ARM_PP_PATH = ENV(GCC48_ARM_PREFIX)gcc
960*_GCC48_ARM_VFRPP_PATH = ENV(GCC48_ARM_PREFIX)gcc
961*_GCC48_ARM_ASLCC_PATH = ENV(GCC48_ARM_PREFIX)gcc
962*_GCC48_ARM_ASLPP_PATH = ENV(GCC48_ARM_PREFIX)gcc
963*_GCC48_ARM_RC_PATH = ENV(GCC48_ARM_PREFIX)objcopy
964
965*_GCC48_ARM_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS)
966*_GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS)
967*_GCC48_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS)
968*_GCC48_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS)
969*_GCC48_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
970*_GCC48_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
971*_GCC48_ARM_PLATFORM_FLAGS = -march=armv7-a
972*_GCC48_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
973*_GCC48_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
974*_GCC48_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
975*_GCC48_ARM_CC_XIPFLAGS = DEF(GCC48_ARM_CC_XIPFLAGS)
976
977 DEBUG_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -O0
978RELEASE_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-variable
979 NOOPT_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -O0
980
981##################
982# GCC48 AARCH64 definitions
983##################
984*_GCC48_AARCH64_CC_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
985*_GCC48_AARCH64_SLINK_PATH = ENV(GCC48_AARCH64_PREFIX)ar
986*_GCC48_AARCH64_DLINK_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
987*_GCC48_AARCH64_ASLDLINK_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
988*_GCC48_AARCH64_ASM_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
989*_GCC48_AARCH64_PP_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
990*_GCC48_AARCH64_VFRPP_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
991*_GCC48_AARCH64_ASLCC_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
992*_GCC48_AARCH64_ASLPP_PATH = ENV(GCC48_AARCH64_PREFIX)gcc
993*_GCC48_AARCH64_RC_PATH = ENV(GCC48_AARCH64_PREFIX)objcopy
994
995*_GCC48_AARCH64_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS)
996*_GCC48_AARCH64_ASLDLINK_FLAGS = DEF(GCC48_AARCH64_ASLDLINK_FLAGS)
997*_GCC48_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS)
998*_GCC48_AARCH64_DLINK_FLAGS = DEF(GCC48_AARCH64_DLINK_FLAGS)
999*_GCC48_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS)
1000*_GCC48_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1001*_GCC48_AARCH64_PLATFORM_FLAGS =
1002*_GCC48_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1003*_GCC48_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
1004*_GCC48_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1005*_GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS)
1006
1007 DEBUG_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -O0
1008RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable
1009 NOOPT_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -O0
1010
1011####################################################################################
1012#
1013# GCC 4.9 - This configuration is used to compile under Linux to produce
1014# PE/COFF binaries using GCC 4.9.
1015#
1016####################################################################################
1017*_GCC49_*_*_FAMILY = GCC
1018
1019*_GCC49_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
1020*_GCC49_*_*_DLL = ENV(GCC49_DLL)
1021*_GCC49_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1022
1023*_GCC49_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
1024*_GCC49_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
1025*_GCC49_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1026*_GCC49_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
1027*_GCC49_*_APP_FLAGS =
1028*_GCC49_*_ASL_FLAGS = DEF(IASL_FLAGS)
1029*_GCC49_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1030*_GCC49_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
1031
1032##################
1033# GCC49 IA32 definitions
1034##################
1035*_GCC49_IA32_OBJCOPY_PATH = DEF(GCC49_IA32_PREFIX)objcopy
1036*_GCC49_IA32_CC_PATH = DEF(GCC49_IA32_PREFIX)gcc
1037*_GCC49_IA32_SLINK_PATH = DEF(GCC49_IA32_PREFIX)ar
1038*_GCC49_IA32_DLINK_PATH = DEF(GCC49_IA32_PREFIX)gcc
1039*_GCC49_IA32_ASLDLINK_PATH = DEF(GCC49_IA32_PREFIX)gcc
1040*_GCC49_IA32_ASM_PATH = DEF(GCC49_IA32_PREFIX)gcc
1041*_GCC49_IA32_PP_PATH = DEF(GCC49_IA32_PREFIX)gcc
1042*_GCC49_IA32_VFRPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
1043*_GCC49_IA32_ASLCC_PATH = DEF(GCC49_IA32_PREFIX)gcc
1044*_GCC49_IA32_ASLPP_PATH = DEF(GCC49_IA32_PREFIX)gcc
1045*_GCC49_IA32_RC_PATH = DEF(GCC49_IA32_PREFIX)objcopy
1046
1047*_GCC49_IA32_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m32
1048*_GCC49_IA32_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
1049*_GCC49_IA32_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
1050*_GCC49_IA32_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
1051*_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
1052*_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
1053*_GCC49_IA32_OBJCOPY_FLAGS =
1054*_GCC49_IA32_NASM_FLAGS = -f elf32
1055
1056 DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
1057RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1058 NOOPT_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -O0
1059
1060##################
1061# GCC49 X64 definitions
1062##################
1063*_GCC49_X64_OBJCOPY_PATH = DEF(GCC49_X64_PREFIX)objcopy
1064*_GCC49_X64_CC_PATH = DEF(GCC49_X64_PREFIX)gcc
1065*_GCC49_X64_SLINK_PATH = DEF(GCC49_X64_PREFIX)ar
1066*_GCC49_X64_DLINK_PATH = DEF(GCC49_X64_PREFIX)gcc
1067*_GCC49_X64_ASLDLINK_PATH = DEF(GCC49_X64_PREFIX)gcc
1068*_GCC49_X64_ASM_PATH = DEF(GCC49_X64_PREFIX)gcc
1069*_GCC49_X64_PP_PATH = DEF(GCC49_X64_PREFIX)gcc
1070*_GCC49_X64_VFRPP_PATH = DEF(GCC49_X64_PREFIX)gcc
1071*_GCC49_X64_ASLCC_PATH = DEF(GCC49_X64_PREFIX)gcc
1072*_GCC49_X64_ASLPP_PATH = DEF(GCC49_X64_PREFIX)gcc
1073*_GCC49_X64_RC_PATH = DEF(GCC49_X64_PREFIX)objcopy
1074
1075*_GCC49_X64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m64
1076*_GCC49_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
1077*_GCC49_X64_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m64
1078*_GCC49_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS)
1079*_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
1080*_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
1081*_GCC49_X64_OBJCOPY_FLAGS =
1082*_GCC49_X64_NASM_FLAGS = -f elf64
1083
1084 DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
1085RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1086 NOOPT_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -O0
1087
1088##################
1089# GCC49 ARM definitions
1090##################
1091*_GCC49_ARM_CC_PATH = ENV(GCC49_ARM_PREFIX)gcc
1092*_GCC49_ARM_SLINK_PATH = ENV(GCC49_ARM_PREFIX)ar
1093*_GCC49_ARM_DLINK_PATH = ENV(GCC49_ARM_PREFIX)gcc
1094*_GCC49_ARM_ASLDLINK_PATH = ENV(GCC49_ARM_PREFIX)gcc
1095*_GCC49_ARM_ASM_PATH = ENV(GCC49_ARM_PREFIX)gcc
1096*_GCC49_ARM_PP_PATH = ENV(GCC49_ARM_PREFIX)gcc
1097*_GCC49_ARM_VFRPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
1098*_GCC49_ARM_ASLCC_PATH = ENV(GCC49_ARM_PREFIX)gcc
1099*_GCC49_ARM_ASLPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
1100*_GCC49_ARM_RC_PATH = ENV(GCC49_ARM_PREFIX)objcopy
1101
1102*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS)
1103*_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
1104*_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
1105*_GCC49_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
1106*_GCC49_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS)
1107*_GCC49_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1108*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
1109*_GCC49_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1110*_GCC49_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
1111*_GCC49_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1112*_GCC49_ARM_CC_XIPFLAGS = DEF(GCC49_ARM_CC_XIPFLAGS)
1113
1114 DEBUG_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
1115RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1116 NOOPT_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
1117
1118##################
1119# GCC49 AARCH64 definitions
1120##################
1121*_GCC49_AARCH64_CC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1122*_GCC49_AARCH64_SLINK_PATH = ENV(GCC49_AARCH64_PREFIX)ar
1123*_GCC49_AARCH64_DLINK_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1124*_GCC49_AARCH64_ASLDLINK_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1125*_GCC49_AARCH64_ASM_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1126*_GCC49_AARCH64_PP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1127*_GCC49_AARCH64_VFRPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1128*_GCC49_AARCH64_ASLCC_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1129*_GCC49_AARCH64_ASLPP_PATH = ENV(GCC49_AARCH64_PREFIX)gcc
1130*_GCC49_AARCH64_RC_PATH = ENV(GCC49_AARCH64_PREFIX)objcopy
1131
1132*_GCC49_AARCH64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS)
1133*_GCC49_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
1134*_GCC49_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS)
1135*_GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS)
1136*_GCC49_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1137*_GCC49_AARCH64_PLATFORM_FLAGS =
1138*_GCC49_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1139*_GCC49_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
1140*_GCC49_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1141*_GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS)
1142
1143 DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
1144 DEBUG_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
1145 DEBUG_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1146
1147RELEASE_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1148RELEASE_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
1149RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1150
1151 NOOPT_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
1152 NOOPT_GCC49_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0
1153 NOOPT_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
1154
1155####################################################################################
1156#
1157# GCC NOLTO - This configuration is used to compile under Linux to produce
1158# PE/COFF binaries using GCC without Link Time Optimization
1159#
1160####################################################################################
1161*_GCCNOLTO_*_*_FAMILY = GCC
1162
1163*_GCCNOLTO_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
1164*_GCCNOLTO_*_*_DLL = ENV(GCCNOLTO_DLL)
1165*_GCCNOLTO_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1166
1167*_GCCNOLTO_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
1168*_GCCNOLTO_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
1169*_GCCNOLTO_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1170*_GCCNOLTO_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
1171*_GCCNOLTO_*_APP_FLAGS =
1172*_GCCNOLTO_*_ASL_FLAGS = DEF(IASL_FLAGS)
1173*_GCCNOLTO_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1174*_GCCNOLTO_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
1175
1176##################
1177# GCCNOLTO IA32 definitions
1178##################
1179*_GCCNOLTO_IA32_OBJCOPY_PATH = DEF(GCCNOLTO_IA32_PREFIX)objcopy
1180*_GCCNOLTO_IA32_CC_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1181*_GCCNOLTO_IA32_SLINK_PATH = DEF(GCCNOLTO_IA32_PREFIX)ar
1182*_GCCNOLTO_IA32_DLINK_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1183*_GCCNOLTO_IA32_ASLDLINK_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1184*_GCCNOLTO_IA32_ASM_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1185*_GCCNOLTO_IA32_PP_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1186*_GCCNOLTO_IA32_VFRPP_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1187*_GCCNOLTO_IA32_ASLCC_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1188*_GCCNOLTO_IA32_ASLPP_PATH = DEF(GCCNOLTO_IA32_PREFIX)gcc
1189*_GCCNOLTO_IA32_RC_PATH = DEF(GCCNOLTO_IA32_PREFIX)objcopy
1190
1191*_GCCNOLTO_IA32_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m32
1192*_GCCNOLTO_IA32_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
1193*_GCCNOLTO_IA32_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
1194*_GCCNOLTO_IA32_DLINK_FLAGS = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
1195*_GCCNOLTO_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
1196*_GCCNOLTO_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
1197*_GCCNOLTO_IA32_OBJCOPY_FLAGS =
1198*_GCCNOLTO_IA32_NASM_FLAGS = -f elf32
1199
1200 DEBUG_GCCNOLTO_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
1201RELEASE_GCCNOLTO_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1202 NOOPT_GCCNOLTO_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -O0
1203
1204##################
1205# GCCNOLTO X64 definitions
1206##################
1207*_GCCNOLTO_X64_OBJCOPY_PATH = DEF(GCCNOLTO_X64_PREFIX)objcopy
1208*_GCCNOLTO_X64_CC_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1209*_GCCNOLTO_X64_SLINK_PATH = DEF(GCCNOLTO_X64_PREFIX)ar
1210*_GCCNOLTO_X64_DLINK_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1211*_GCCNOLTO_X64_ASLDLINK_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1212*_GCCNOLTO_X64_ASM_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1213*_GCCNOLTO_X64_PP_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1214*_GCCNOLTO_X64_VFRPP_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1215*_GCCNOLTO_X64_ASLCC_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1216*_GCCNOLTO_X64_ASLPP_PATH = DEF(GCCNOLTO_X64_PREFIX)gcc
1217*_GCCNOLTO_X64_RC_PATH = DEF(GCCNOLTO_X64_PREFIX)objcopy
1218
1219*_GCCNOLTO_X64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS) -m64
1220*_GCCNOLTO_X64_ASLDLINK_FLAGS = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
1221*_GCCNOLTO_X64_ASM_FLAGS = DEF(GCC49_ASM_FLAGS) -m64
1222*_GCCNOLTO_X64_DLINK_FLAGS = DEF(GCC49_X64_DLINK_FLAGS)
1223*_GCCNOLTO_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
1224*_GCCNOLTO_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
1225*_GCCNOLTO_X64_OBJCOPY_FLAGS =
1226*_GCCNOLTO_X64_NASM_FLAGS = -f elf64
1227
1228 DEBUG_GCCNOLTO_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
1229RELEASE_GCCNOLTO_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1230 NOOPT_GCCNOLTO_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -O0
1231
1232##################
1233# GCCNOLTO ARM definitions
1234##################
1235*_GCCNOLTO_ARM_CC_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1236*_GCCNOLTO_ARM_SLINK_PATH = ENV(GCCNOLTO_ARM_PREFIX)ar
1237*_GCCNOLTO_ARM_DLINK_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1238*_GCCNOLTO_ARM_ASLDLINK_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1239*_GCCNOLTO_ARM_ASM_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1240*_GCCNOLTO_ARM_PP_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1241*_GCCNOLTO_ARM_VFRPP_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1242*_GCCNOLTO_ARM_ASLCC_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1243*_GCCNOLTO_ARM_ASLPP_PATH = ENV(GCCNOLTO_ARM_PREFIX)gcc
1244*_GCCNOLTO_ARM_RC_PATH = ENV(GCCNOLTO_ARM_PREFIX)objcopy
1245
1246*_GCCNOLTO_ARM_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS)
1247*_GCCNOLTO_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
1248*_GCCNOLTO_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
1249*_GCCNOLTO_ARM_DLINK_FLAGS = DEF(GCC49_ARM_DLINK_FLAGS)
1250*_GCCNOLTO_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS)
1251*_GCCNOLTO_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1252*_GCCNOLTO_ARM_PLATFORM_FLAGS = -march=armv7-a
1253*_GCCNOLTO_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1254*_GCCNOLTO_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
1255*_GCCNOLTO_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1256*_GCCNOLTO_ARM_CC_XIPFLAGS = DEF(GCC49_ARM_CC_XIPFLAGS)
1257
1258 DEBUG_GCCNOLTO_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
1259RELEASE_GCCNOLTO_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1260 NOOPT_GCCNOLTO_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
1261
1262##################
1263# GCCNOLTO AARCH64 definitions
1264##################
1265*_GCCNOLTO_AARCH64_CC_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1266*_GCCNOLTO_AARCH64_SLINK_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)ar
1267*_GCCNOLTO_AARCH64_DLINK_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1268*_GCCNOLTO_AARCH64_ASLDLINK_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1269*_GCCNOLTO_AARCH64_ASM_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1270*_GCCNOLTO_AARCH64_PP_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1271*_GCCNOLTO_AARCH64_VFRPP_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1272*_GCCNOLTO_AARCH64_ASLCC_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1273*_GCCNOLTO_AARCH64_ASLPP_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
1274*_GCCNOLTO_AARCH64_RC_PATH = ENV(GCCNOLTO_AARCH64_PREFIX)objcopy
1275
1276*_GCCNOLTO_AARCH64_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS)
1277*_GCCNOLTO_AARCH64_ASLDLINK_FLAGS = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
1278*_GCCNOLTO_AARCH64_ASM_FLAGS = DEF(GCC49_AARCH64_ASM_FLAGS)
1279*_GCCNOLTO_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS)
1280*_GCCNOLTO_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1281*_GCCNOLTO_AARCH64_PLATFORM_FLAGS =
1282*_GCCNOLTO_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1283*_GCCNOLTO_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
1284*_GCCNOLTO_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1285*_GCCNOLTO_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS)
1286
1287 DEBUG_GCCNOLTO_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
1288 DEBUG_GCCNOLTO_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
1289 DEBUG_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1290
1291RELEASE_GCCNOLTO_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
1292RELEASE_GCCNOLTO_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS)
1293RELEASE_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1294
1295 NOOPT_GCCNOLTO_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
1296 NOOPT_GCCNOLTO_AARCH64_DLINK_FLAGS = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0
1297 NOOPT_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
1298
1299####################################################################################
1300#
1301# GCC 5 - This configuration is used to compile under Linux to produce
1302# PE/COFF binaries using GCC 5
1303#
1304####################################################################################
1305*_GCC5_*_*_FAMILY = GCC
1306
1307*_GCC5_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
1308*_GCC5_*_*_DLL = ENV(GCC5_DLL)
1309*_GCC5_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1310
1311*_GCC5_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
1312*_GCC5_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
1313*_GCC5_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1314*_GCC5_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
1315*_GCC5_*_APP_FLAGS =
1316*_GCC5_*_ASL_FLAGS = DEF(IASL_FLAGS)
1317*_GCC5_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1318*_GCC5_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
1319
1320##################
1321# GCC5 IA32 definitions
1322##################
1323*_GCC5_IA32_OBJCOPY_PATH = DEF(GCC5_IA32_PREFIX)objcopy
1324*_GCC5_IA32_CC_PATH = DEF(GCC5_IA32_PREFIX)gcc
1325*_GCC5_IA32_SLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc-ar
1326*_GCC5_IA32_DLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc
1327*_GCC5_IA32_ASLDLINK_PATH = DEF(GCC5_IA32_PREFIX)gcc
1328*_GCC5_IA32_ASM_PATH = DEF(GCC5_IA32_PREFIX)gcc
1329*_GCC5_IA32_PP_PATH = DEF(GCC5_IA32_PREFIX)gcc
1330*_GCC5_IA32_VFRPP_PATH = DEF(GCC5_IA32_PREFIX)gcc
1331*_GCC5_IA32_ASLCC_PATH = DEF(GCC5_IA32_PREFIX)gcc
1332*_GCC5_IA32_ASLPP_PATH = DEF(GCC5_IA32_PREFIX)gcc
1333*_GCC5_IA32_RC_PATH = DEF(GCC5_IA32_PREFIX)objcopy
1334
1335*_GCC5_IA32_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m32
1336*_GCC5_IA32_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie
1337*_GCC5_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386
1338*_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
1339*_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
1340*_GCC5_IA32_OBJCOPY_FLAGS =
1341*_GCC5_IA32_NASM_FLAGS = -f elf32
1342
1343 DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto
1344 DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
1345
1346RELEASE_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1347RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
1348
1349 NOOPT_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -O0
1350 NOOPT_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0
1351
1352##################
1353# GCC5 X64 definitions
1354##################
1355*_GCC5_X64_OBJCOPY_PATH = DEF(GCC5_X64_PREFIX)objcopy
1356*_GCC5_X64_CC_PATH = DEF(GCC5_X64_PREFIX)gcc
1357*_GCC5_X64_SLINK_PATH = DEF(GCC5_X64_PREFIX)gcc-ar
1358*_GCC5_X64_DLINK_PATH = DEF(GCC5_X64_PREFIX)gcc
1359*_GCC5_X64_ASLDLINK_PATH = DEF(GCC5_X64_PREFIX)gcc
1360*_GCC5_X64_ASM_PATH = DEF(GCC5_X64_PREFIX)gcc
1361*_GCC5_X64_PP_PATH = DEF(GCC5_X64_PREFIX)gcc
1362*_GCC5_X64_VFRPP_PATH = DEF(GCC5_X64_PREFIX)gcc
1363*_GCC5_X64_ASLCC_PATH = DEF(GCC5_X64_PREFIX)gcc
1364*_GCC5_X64_ASLPP_PATH = DEF(GCC5_X64_PREFIX)gcc
1365*_GCC5_X64_RC_PATH = DEF(GCC5_X64_PREFIX)objcopy
1366
1367*_GCC5_X64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m64
1368*_GCC5_X64_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
1369*_GCC5_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
1370*_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
1371*_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
1372*_GCC5_X64_OBJCOPY_FLAGS =
1373*_GCC5_X64_NASM_FLAGS = -f elf64
1374
1375 DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO
1376 DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
1377
1378RELEASE_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Wno-unused-but-set-variable -Wno-unused-const-variable
1379RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
1380
1381 NOOPT_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -O0
1382 NOOPT_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -O0
1383
1384##################
1385# GCC5 ARM definitions
1386##################
1387*_GCC5_ARM_CC_PATH = ENV(GCC5_ARM_PREFIX)gcc
1388*_GCC5_ARM_SLINK_PATH = ENV(GCC5_ARM_PREFIX)gcc-ar
1389*_GCC5_ARM_DLINK_PATH = ENV(GCC5_ARM_PREFIX)gcc
1390*_GCC5_ARM_ASLDLINK_PATH = ENV(GCC5_ARM_PREFIX)gcc
1391*_GCC5_ARM_ASM_PATH = ENV(GCC5_ARM_PREFIX)gcc
1392*_GCC5_ARM_PP_PATH = ENV(GCC5_ARM_PREFIX)gcc
1393*_GCC5_ARM_VFRPP_PATH = ENV(GCC5_ARM_PREFIX)gcc
1394*_GCC5_ARM_ASLCC_PATH = ENV(GCC5_ARM_PREFIX)gcc
1395*_GCC5_ARM_ASLPP_PATH = ENV(GCC5_ARM_PREFIX)gcc
1396*_GCC5_ARM_RC_PATH = ENV(GCC5_ARM_PREFIX)objcopy
1397
1398*_GCC5_ARM_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS)
1399*_GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC5_ARM_ASLDLINK_FLAGS)
1400*_GCC5_ARM_ASM_FLAGS = DEF(GCC5_ARM_ASM_FLAGS)
1401*_GCC5_ARM_DLINK2_FLAGS = DEF(GCC5_ARM_DLINK2_FLAGS)
1402*_GCC5_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1403*_GCC5_ARM_PLATFORM_FLAGS = -march=armv7-a -mfloat-abi=soft
1404*_GCC5_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1405*_GCC5_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
1406*_GCC5_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1407*_GCC5_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS)
1408
1409 DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1410 DEBUG_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
1411
1412RELEASE_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1413RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
1414
1415 NOOPT_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0
1416 NOOPT_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0
1417
1418##################
1419# GCC5 AARCH64 definitions
1420##################
1421*_GCC5_AARCH64_CC_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1422*_GCC5_AARCH64_SLINK_PATH = ENV(GCC5_AARCH64_PREFIX)gcc-ar
1423*_GCC5_AARCH64_DLINK_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1424*_GCC5_AARCH64_ASLDLINK_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1425*_GCC5_AARCH64_ASM_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1426*_GCC5_AARCH64_PP_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1427*_GCC5_AARCH64_VFRPP_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1428*_GCC5_AARCH64_ASLCC_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1429*_GCC5_AARCH64_ASLPP_PATH = ENV(GCC5_AARCH64_PREFIX)gcc
1430*_GCC5_AARCH64_RC_PATH = ENV(GCC5_AARCH64_PREFIX)objcopy
1431
1432*_GCC5_AARCH64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS)
1433*_GCC5_AARCH64_ASLDLINK_FLAGS = DEF(GCC5_AARCH64_ASLDLINK_FLAGS)
1434*_GCC5_AARCH64_ASM_FLAGS = DEF(GCC5_AARCH64_ASM_FLAGS)
1435*_GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC5_AARCH64_DLINK2_FLAGS)
1436*_GCC5_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1437*_GCC5_AARCH64_PLATFORM_FLAGS =
1438*_GCC5_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1439*_GCC5_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
1440*_GCC5_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1441*_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS)
1442
1443 DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1444 DEBUG_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch
1445 DEBUG_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1446
1447RELEASE_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1448RELEASE_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch
1449RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1450
1451 NOOPT_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0
1452 NOOPT_GCC5_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -O0
1453 NOOPT_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
1454
1455####################################################################################
1456#
1457# GCC RISC-V This configuration is used to compile under Linux to produce
1458# PE/COFF binaries using GCC RISC-V tool chain
1459#
1460####################################################################################
1461
1462##################
1463# GCC5 RISCV64 definitions
1464##################
1465*_GCC5_RISCV64_OBJCOPY_PATH = ENV(GCC5_RISCV64_PREFIX)objcopy
1466*_GCC5_RISCV64_CC_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1467*_GCC5_RISCV64_SLINK_PATH = ENV(GCC5_RISCV64_PREFIX)gcc-ar
1468*_GCC5_RISCV64_DLINK_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1469*_GCC5_RISCV64_ASLDLINK_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1470*_GCC5_RISCV64_ASM_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1471*_GCC5_RISCV64_PP_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1472*_GCC5_RISCV64_VFRPP_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1473*_GCC5_RISCV64_ASLCC_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1474*_GCC5_RISCV64_ASLPP_PATH = ENV(GCC5_RISCV64_PREFIX)gcc
1475*_GCC5_RISCV64_RC_PATH = ENV(GCC5_RISCV64_PREFIX)objcopy
1476
1477*_GCC5_RISCV64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1478*_GCC5_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS)
1479*_GCC5_RISCV64_ASM_FLAGS = DEF(GCC5_RISCV64_ASM_FLAGS)
1480*_GCC5_RISCV64_CC_FLAGS = DEF(GCC5_RISCV64_CC_FLAGS) -save-temps
1481*_GCC5_RISCV64_DLINK_FLAGS = DEF(GCC5_RISCV64_DLINK_FLAGS)
1482*_GCC5_RISCV64_DLINK2_FLAGS = DEF(GCC5_RISCV64_DLINK2_FLAGS)
1483*_GCC5_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
1484*_GCC5_RISCV64_OBJCOPY_FLAGS =
1485*_GCC5_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1486*_GCC5_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(GCC5_RISCV_OPENSBI_TYPES)
1487
1488##################
1489# GCC5 LOONGARCH64 definitions
1490##################
1491*_GCC5_LOONGARCH64_OBJCOPY_PATH = ENV(GCC5_LOONGARCH64_PREFIX)objcopy
1492*_GCC5_LOONGARCH64_CC_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1493*_GCC5_LOONGARCH64_SLINK_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc-ar
1494*_GCC5_LOONGARCH64_DLINK_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1495*_GCC5_LOONGARCH64_ASLDLINK_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1496*_GCC5_LOONGARCH64_ASM_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1497*_GCC5_LOONGARCH64_PP_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1498*_GCC5_LOONGARCH64_VFRPP_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1499*_GCC5_LOONGARCH64_ASLCC_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1500*_GCC5_LOONGARCH64_ASLPP_PATH = ENV(GCC5_LOONGARCH64_PREFIX)gcc
1501*_GCC5_LOONGARCH64_RC_PATH = ENV(GCC5_LOONGARCH64_PREFIX)objcopy
1502
1503*_GCC5_LOONGARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1504*_GCC5_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC5_LOONGARCH64_ASLDLINK_FLAGS)
1505*_GCC5_LOONGARCH64_ASM_FLAGS = DEF(GCC5_LOONGARCH64_ASM_FLAGS)
1506*_GCC5_LOONGARCH64_DLINK_FLAGS = DEF(GCC5_LOONGARCH64_DLINK_FLAGS)
1507*_GCC5_LOONGARCH64_DLINK2_FLAGS = DEF(GCC5_LOONGARCH64_DLINK2_FLAGS)
1508*_GCC5_LOONGARCH64_RC_FLAGS = DEF(GCC_LOONGARCH64_RC_FLAGS)
1509*_GCC5_LOONGARCH64_OBJCOPY_FLAGS =
1510*_GCC5_LOONGARCH64_NASM_FLAGS = -f elf32
1511*_GCC5_LOONGARCH64_PP_FLAGS = DEF(GCC5_LOONGARCH64_PP_FLAGS)
1512
1513DEBUG_GCC5_LOONGARCH64_CC_FLAGS = DEF(GCC5_LOONGARCH64_CC_FLAGS)
1514RELEASE_GCC5_LOONGARCH64_CC_FLAGS = DEF(GCC5_LOONGARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-variable
1515
1516####################################################################################
1517#
1518# GCC - This configuration is used to compile under Linux to produce
1519# PE/COFF binaries using GCC 5 or newer
1520#
1521####################################################################################
1522*_GCC_*_*_FAMILY = GCC
1523
1524*_GCC_*_MAKE_PATH = DEF(GCC_HOST_PREFIX)make
1525*_GCC_*_*_DLL = ENV(GCC_DLL)
1526*_GCC_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1527
1528*_GCC_*_PP_FLAGS = DEF(GCC_PP_FLAGS)
1529*_GCC_*_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS)
1530*_GCC_*_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1531*_GCC_*_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS)
1532*_GCC_*_APP_FLAGS =
1533*_GCC_*_ASL_FLAGS = DEF(IASL_FLAGS)
1534*_GCC_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1535*_GCC_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
1536
1537##################
1538# GCC IA32 definitions
1539##################
1540*_GCC_IA32_OBJCOPY_PATH = DEF(GCC_IA32_PREFIX)objcopy
1541*_GCC_IA32_CC_PATH = DEF(GCC_IA32_PREFIX)gcc
1542*_GCC_IA32_SLINK_PATH = DEF(GCC_IA32_PREFIX)gcc-ar
1543*_GCC_IA32_DLINK_PATH = DEF(GCC_IA32_PREFIX)gcc
1544*_GCC_IA32_ASLDLINK_PATH = DEF(GCC_IA32_PREFIX)gcc
1545*_GCC_IA32_ASM_PATH = DEF(GCC_IA32_PREFIX)gcc
1546*_GCC_IA32_PP_PATH = DEF(GCC_IA32_PREFIX)gcc
1547*_GCC_IA32_VFRPP_PATH = DEF(GCC_IA32_PREFIX)gcc
1548*_GCC_IA32_ASLCC_PATH = DEF(GCC_IA32_PREFIX)gcc
1549*_GCC_IA32_ASLPP_PATH = DEF(GCC_IA32_PREFIX)gcc
1550*_GCC_IA32_RC_PATH = DEF(GCC_IA32_PREFIX)objcopy
1551
1552*_GCC_IA32_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m32
1553*_GCC_IA32_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie
1554*_GCC_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386
1555*_GCC_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
1556*_GCC_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
1557*_GCC_IA32_OBJCOPY_FLAGS =
1558*_GCC_IA32_NASM_FLAGS = -f elf32
1559
1560 DEBUG_GCC_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto
1561 DEBUG_GCC_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
1562
1563RELEASE_GCC_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1564RELEASE_GCC_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
1565
1566 NOOPT_GCC_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -O0
1567 NOOPT_GCC_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0
1568
1569##################
1570# GCC X64 definitions
1571##################
1572*_GCC_X64_OBJCOPY_PATH = DEF(GCC_X64_PREFIX)objcopy
1573*_GCC_X64_CC_PATH = DEF(GCC_X64_PREFIX)gcc
1574*_GCC_X64_SLINK_PATH = DEF(GCC_X64_PREFIX)gcc-ar
1575*_GCC_X64_DLINK_PATH = DEF(GCC_X64_PREFIX)gcc
1576*_GCC_X64_ASLDLINK_PATH = DEF(GCC_X64_PREFIX)gcc
1577*_GCC_X64_ASM_PATH = DEF(GCC_X64_PREFIX)gcc
1578*_GCC_X64_PP_PATH = DEF(GCC_X64_PREFIX)gcc
1579*_GCC_X64_VFRPP_PATH = DEF(GCC_X64_PREFIX)gcc
1580*_GCC_X64_ASLCC_PATH = DEF(GCC_X64_PREFIX)gcc
1581*_GCC_X64_ASLPP_PATH = DEF(GCC_X64_PREFIX)gcc
1582*_GCC_X64_RC_PATH = DEF(GCC_X64_PREFIX)objcopy
1583
1584*_GCC_X64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS) -m64
1585*_GCC_X64_ASLDLINK_FLAGS = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
1586*_GCC_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64
1587*_GCC_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
1588*_GCC_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
1589*_GCC_X64_OBJCOPY_FLAGS =
1590*_GCC_X64_NASM_FLAGS = -f elf64
1591
1592 DEBUG_GCC_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO
1593 DEBUG_GCC_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
1594
1595RELEASE_GCC_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Wno-unused-but-set-variable -Wno-unused-const-variable
1596RELEASE_GCC_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
1597
1598 NOOPT_GCC_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -O0
1599 NOOPT_GCC_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -O0
1600
1601##################
1602# GCC ARM definitions
1603##################
1604*_GCC_ARM_CC_PATH = ENV(GCC_ARM_PREFIX)gcc
1605*_GCC_ARM_SLINK_PATH = ENV(GCC_ARM_PREFIX)gcc-ar
1606*_GCC_ARM_DLINK_PATH = ENV(GCC_ARM_PREFIX)gcc
1607*_GCC_ARM_ASLDLINK_PATH = ENV(GCC_ARM_PREFIX)gcc
1608*_GCC_ARM_ASM_PATH = ENV(GCC_ARM_PREFIX)gcc
1609*_GCC_ARM_PP_PATH = ENV(GCC_ARM_PREFIX)gcc
1610*_GCC_ARM_VFRPP_PATH = ENV(GCC_ARM_PREFIX)gcc
1611*_GCC_ARM_ASLCC_PATH = ENV(GCC_ARM_PREFIX)gcc
1612*_GCC_ARM_ASLPP_PATH = ENV(GCC_ARM_PREFIX)gcc
1613*_GCC_ARM_RC_PATH = ENV(GCC_ARM_PREFIX)objcopy
1614
1615*_GCC_ARM_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS)
1616*_GCC_ARM_ASLDLINK_FLAGS = DEF(GCC5_ARM_ASLDLINK_FLAGS)
1617*_GCC_ARM_ASM_FLAGS = DEF(GCC5_ARM_ASM_FLAGS)
1618*_GCC_ARM_DLINK2_FLAGS = DEF(GCC5_ARM_DLINK2_FLAGS)
1619*_GCC_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1620*_GCC_ARM_PLATFORM_FLAGS = -march=armv7-a -mfloat-abi=soft
1621*_GCC_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1622*_GCC_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
1623*_GCC_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1624*_GCC_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS)
1625
1626 DEBUG_GCC_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1627 DEBUG_GCC_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
1628
1629RELEASE_GCC_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1630RELEASE_GCC_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
1631
1632 NOOPT_GCC_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -O0
1633 NOOPT_GCC_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -O0
1634
1635##################
1636# GCC AARCH64 definitions
1637##################
1638*_GCC_AARCH64_CC_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1639*_GCC_AARCH64_SLINK_PATH = ENV(GCC_AARCH64_PREFIX)gcc-ar
1640*_GCC_AARCH64_DLINK_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1641*_GCC_AARCH64_ASLDLINK_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1642*_GCC_AARCH64_ASM_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1643*_GCC_AARCH64_PP_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1644*_GCC_AARCH64_VFRPP_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1645*_GCC_AARCH64_ASLCC_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1646*_GCC_AARCH64_ASLPP_PATH = ENV(GCC_AARCH64_PREFIX)gcc
1647*_GCC_AARCH64_RC_PATH = ENV(GCC_AARCH64_PREFIX)objcopy
1648
1649*_GCC_AARCH64_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS)
1650*_GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC5_AARCH64_ASLDLINK_FLAGS)
1651*_GCC_AARCH64_ASM_FLAGS = DEF(GCC5_AARCH64_ASM_FLAGS)
1652*_GCC_AARCH64_DLINK2_FLAGS = DEF(GCC5_AARCH64_DLINK2_FLAGS)
1653*_GCC_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1654*_GCC_AARCH64_PLATFORM_FLAGS =
1655*_GCC_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
1656*_GCC_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
1657*_GCC_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
1658*_GCC_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS)
1659
1660 DEBUG_GCC_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1661 DEBUG_GCC_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch
1662 DEBUG_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1663
1664RELEASE_GCC_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
1665RELEASE_GCC_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -flto -Os -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wno-lto-type-mismatch
1666RELEASE_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
1667
1668 NOOPT_GCC_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -O0
1669 NOOPT_GCC_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -O0
1670 NOOPT_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
1671
1672####################################################################################
1673#
1674# GCC RISC-V This configuration is used to compile under Linux to produce
1675# PE/COFF binaries using GCC RISC-V tool chain
1676#
1677####################################################################################
1678
1679##################
1680# GCC RISCV64 definitions
1681##################
1682*_GCC_RISCV64_OBJCOPY_PATH = ENV(GCC_RISCV64_PREFIX)objcopy
1683*_GCC_RISCV64_CC_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1684*_GCC_RISCV64_SLINK_PATH = ENV(GCC_RISCV64_PREFIX)gcc-ar
1685*_GCC_RISCV64_DLINK_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1686*_GCC_RISCV64_ASLDLINK_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1687*_GCC_RISCV64_ASM_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1688*_GCC_RISCV64_PP_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1689*_GCC_RISCV64_VFRPP_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1690*_GCC_RISCV64_ASLCC_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1691*_GCC_RISCV64_ASLPP_PATH = ENV(GCC_RISCV64_PREFIX)gcc
1692*_GCC_RISCV64_RC_PATH = ENV(GCC_RISCV64_PREFIX)objcopy
1693
1694*_GCC_RISCV64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1695*_GCC_RISCV64_ASLDLINK_FLAGS = DEF(GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS)
1696*_GCC_RISCV64_ASM_FLAGS = DEF(GCC5_RISCV64_ASM_FLAGS)
1697*_GCC_RISCV64_CC_FLAGS = DEF(GCC5_RISCV64_CC_FLAGS) -save-temps
1698*_GCC_RISCV64_DLINK_FLAGS = DEF(GCC5_RISCV64_DLINK_FLAGS)
1699*_GCC_RISCV64_DLINK2_FLAGS = DEF(GCC5_RISCV64_DLINK2_FLAGS)
1700*_GCC_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
1701*_GCC_RISCV64_OBJCOPY_FLAGS =
1702*_GCC_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1703*_GCC_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(GCC5_RISCV_OPENSBI_TYPES)
1704
1705##################
1706# GCC LOONGARCH64 definitions
1707##################
1708*_GCC_LOONGARCH64_OBJCOPY_PATH = ENV(GCC_LOONGARCH64_PREFIX)objcopy
1709*_GCC_LOONGARCH64_CC_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1710*_GCC_LOONGARCH64_SLINK_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc-ar
1711*_GCC_LOONGARCH64_DLINK_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1712*_GCC_LOONGARCH64_ASLDLINK_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1713*_GCC_LOONGARCH64_ASM_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1714*_GCC_LOONGARCH64_PP_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1715*_GCC_LOONGARCH64_VFRPP_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1716*_GCC_LOONGARCH64_ASLCC_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1717*_GCC_LOONGARCH64_ASLPP_PATH = ENV(GCC_LOONGARCH64_PREFIX)gcc
1718*_GCC_LOONGARCH64_RC_PATH = ENV(GCC_LOONGARCH64_PREFIX)objcopy
1719
1720*_GCC_LOONGARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1721*_GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC5_LOONGARCH64_ASLDLINK_FLAGS)
1722*_GCC_LOONGARCH64_ASM_FLAGS = DEF(GCC5_LOONGARCH64_ASM_FLAGS)
1723*_GCC_LOONGARCH64_DLINK_FLAGS = DEF(GCC5_LOONGARCH64_DLINK_FLAGS)
1724*_GCC_LOONGARCH64_DLINK2_FLAGS = DEF(GCC5_LOONGARCH64_DLINK2_FLAGS)
1725*_GCC_LOONGARCH64_RC_FLAGS = DEF(GCC_LOONGARCH64_RC_FLAGS)
1726*_GCC_LOONGARCH64_OBJCOPY_FLAGS =
1727*_GCC_LOONGARCH64_NASM_FLAGS = -f elf32
1728*_GCC_LOONGARCH64_PP_FLAGS = DEF(GCC5_LOONGARCH64_PP_FLAGS)
1729
1730DEBUG_GCC_LOONGARCH64_CC_FLAGS = DEF(GCC5_LOONGARCH64_CC_FLAGS)
1731RELEASE_GCC_LOONGARCH64_CC_FLAGS = DEF(GCC5_LOONGARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-variable
1732
1733####################################################################################
1734#
1735# CLANGPDB - This configuration is used to compile under Windows/Linux/Mac to produce
1736# PE/COFF binaries using LLVM/Clang/LLD with Link Time Optimization enabled
1737#
1738####################################################################################
1739*_CLANGPDB_*_*_FAMILY = GCC
1740*_CLANGPDB_*_*_BUILDRULEFAMILY = CLANGPDB
1741*_CLANGPDB_*_MAKE_PATH = ENV(CLANG_HOST_BIN)make
1742*_CLANGPDB_*_*_DLL = ENV(CLANGPDB_DLL)
1743*_CLANGPDB_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1744
1745*_CLANGPDB_*_APP_FLAGS =
1746*_CLANGPDB_*_ASL_FLAGS = DEF(DEFAULT_WIN_ASL_FLAGS)
1747*_CLANGPDB_*_ASL_OUTFLAGS = DEF(DEFAULT_WIN_ASL_OUTFLAGS)
1748*_CLANGPDB_*_ASLDLINK_FLAGS = DEF(MSFT_ASLDLINK_FLAGS)
1749*_CLANGPDB_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
1750
1751DEFINE CLANGPDB_IA32_PREFIX = ENV(CLANG_BIN)
1752DEFINE CLANGPDB_X64_PREFIX = ENV(CLANG_BIN)
1753
1754DEFINE CLANGPDB_IA32_TARGET = -target i686-unknown-windows-gnu
1755DEFINE CLANGPDB_X64_TARGET = -target x86_64-unknown-windows-gnu
1756
1757DEFINE CLANGPDB_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-microsoft-enum-forward-reference
1758DEFINE CLANGPDB_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGPDB_WARNING_OVERRIDES) -fno-stack-protector -funsigned-char -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -Wno-null-dereference -mno-implicit-float -mms-bitfields -mno-stack-arg-probe -nostdlib -nostdlibinc -fseh-exceptions
1759
1760###########################
1761# CLANGPDB IA32 definitions
1762###########################
1763*_CLANGPDB_IA32_CC_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1764*_CLANGPDB_IA32_SLINK_PATH = DEF(CLANGPDB_IA32_PREFIX)llvm-lib
1765*_CLANGPDB_IA32_DLINK_PATH = DEF(CLANGPDB_IA32_PREFIX)lld-link
1766*_CLANGPDB_IA32_ASLDLINK_PATH = DEF(CLANGPDB_IA32_PREFIX)lld-link
1767*_CLANGPDB_IA32_ASM_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1768*_CLANGPDB_IA32_PP_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1769*_CLANGPDB_IA32_VFRPP_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1770*_CLANGPDB_IA32_ASLCC_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1771*_CLANGPDB_IA32_ASLPP_PATH = DEF(CLANGPDB_IA32_PREFIX)clang
1772*_CLANGPDB_IA32_RC_PATH = DEF(CLANGPDB_IA32_PREFIX)llvm-rc
1773
1774*_CLANGPDB_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGPDB_IA32_TARGET)
1775*_CLANGPDB_IA32_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m32 -march=i386 DEF(CLANGPDB_IA32_TARGET)
1776*_CLANGPDB_IA32_OBJCOPY_FLAGS =
1777*_CLANGPDB_IA32_NASM_FLAGS = -f win32
1778*_CLANGPDB_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
1779*_CLANGPDB_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
1780*_CLANGPDB_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_IA32_TARGET)
1781
1782DEBUG_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
1783DEBUG_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
1784DEBUG_CLANGPDB_IA32_DLINK2_FLAGS =
1785
1786RELEASE_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -Oz -flto -march=i586 DEF(CLANGPDB_IA32_TARGET) -malign-double
1787RELEASE_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh /lldmap
1788RELEASE_CLANGPDB_IA32_DLINK2_FLAGS =
1789
1790NOOPT_CLANGPDB_IA32_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m32 -O0 -march=i586 DEF(CLANGPDB_IA32_TARGET) -gcodeview -malign-double
1791NOOPT_CLANGPDB_IA32_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /MACHINE:X86 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
1792NOOPT_CLANGPDB_IA32_DLINK2_FLAGS =
1793
1794##########################
1795# CLANGWIN X64 definitions
1796##########################
1797*_CLANGPDB_X64_CC_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1798*_CLANGPDB_X64_SLINK_PATH = DEF(CLANGPDB_X64_PREFIX)llvm-lib
1799*_CLANGPDB_X64_DLINK_PATH = DEF(CLANGPDB_X64_PREFIX)lld-link
1800*_CLANGPDB_X64_ASLDLINK_PATH = DEF(CLANGPDB_X64_PREFIX)lld-link
1801*_CLANGPDB_X64_ASM_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1802*_CLANGPDB_X64_PP_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1803*_CLANGPDB_X64_VFRPP_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1804*_CLANGPDB_X64_ASLCC_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1805*_CLANGPDB_X64_ASLPP_PATH = DEF(CLANGPDB_X64_PREFIX)clang
1806*_CLANGPDB_X64_RC_PATH = DEF(CLANGPDB_IA32_PREFIX)llvm-rc
1807
1808*_CLANGPDB_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGPDB_X64_TARGET)
1809*_CLANGPDB_X64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) -m64 DEF(CLANGPDB_X64_TARGET)
1810*_CLANGPDB_X64_OBJCOPY_FLAGS =
1811*_CLANGPDB_X64_NASM_FLAGS = -f win64
1812*_CLANGPDB_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGPDB_X64_TARGET)
1813*_CLANGPDB_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
1814*_CLANGPDB_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGPDB_X64_TARGET)
1815
1816DEBUG_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -Oz -flto DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables
1817DEBUG_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
1818DEBUG_CLANGPDB_X64_DLINK2_FLAGS =
1819DEBUG_CLANGPDB_X64_GENFW_FLAGS = --keepexceptiontable
1820
1821RELEASE_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -Oz -flto DEF(CLANGPDB_X64_TARGET) -fno-unwind-tables
1822RELEASE_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /IGNORE:4254 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /SECTION:.xdata,D /SECTION:.pdata,D /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /MERGE:.rdata=.data /MLLVM:-exception-model=wineh /lldmap
1823RELEASE_CLANGPDB_X64_DLINK2_FLAGS =
1824RELEASE_CLANGPDB_X64_GENFW_FLAGS =
1825
1826NOOPT_CLANGPDB_X64_CC_FLAGS = DEF(CLANGPDB_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -O0 DEF(CLANGPDB_X64_TARGET) -gcodeview -funwind-tables
1827NOOPT_CLANGPDB_X64_DLINK_FLAGS = /NOLOGO /NODEFAULTLIB /IGNORE:4001 /OPT:REF /OPT:ICF=10 /ALIGN:32 /FILEALIGN:32 /Machine:X64 /DLL /ENTRY:$(IMAGE_ENTRY_POINT) /SUBSYSTEM:EFI_BOOT_SERVICE_DRIVER /SAFESEH:NO /BASE:0 /DEBUG:GHASH /MLLVM:-exception-model=wineh /lldmap
1828NOOPT_CLANGPDB_X64_DLINK2_FLAGS =
1829NOOPT_CLANGPDB_X64_GENFW_FLAGS = --keepexceptiontable
1830
1831####################################################################################
1832#
1833# CLANGDWARF - This configuration is used to compile under Windows/Linux/Mac to produce
1834# ELF binaries using LLVM/Clang/LLD with Link Time Optimization enabled
1835#
1836####################################################################################
1837*_CLANGDWARF_*_*_FAMILY = GCC
1838
1839*_CLANGDWARF_*_MAKE_PATH = ENV(CLANG_HOST_BIN)make
1840*_CLANGDWARF_*_*_DLL = ENV(CLANGDWARF_DLL)
1841*_CLANGDWARF_*_ASL_PATH = DEF(UNIX_IASL_BIN)
1842
1843*_CLANGDWARF_*_APP_FLAGS =
1844*_CLANGDWARF_*_ASL_FLAGS = DEF(IASL_FLAGS)
1845*_CLANGDWARF_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1846
1847DEFINE CLANGDWARF_IA32_PREFIX = ENV(CLANG_BIN)
1848DEFINE CLANGDWARF_X64_PREFIX = ENV(CLANG_BIN)
1849
1850# LLVM/CLANG doesn't support -n link option. So, it can't share the same IA32_X64_DLINK_COMMON flag.
1851# LLVM/CLANG doesn't support common page size. So, it can't share the same GccBase.lds script.
1852DEFINE CLANGDWARF_IA32_X64_DLINK_COMMON = -nostdlib -Wl,-q,--gc-sections -z max-page-size=0x40
1853DEFINE CLANGDWARF_DLINK2_FLAGS_COMMON = -Wl,--script=$(EDK_TOOLS_PATH)/Scripts/ClangBase.lds
1854DEFINE CLANGDWARF_IA32_X64_ASLDLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0 DEF(CLANGDWARF_DLINK2_FLAGS_COMMON) -Wl,--entry,ReferenceAcpiTable -u ReferenceAcpiTable
1855DEFINE CLANGDWARF_IA32_X64_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map,--whole-archive -Wl,-z,notext
1856DEFINE CLANGDWARF_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF(CLANGDWARF_DLINK2_FLAGS_COMMON)
1857DEFINE CLANGDWARF_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(CLANGDWARF_DLINK2_FLAGS_COMMON)
1858
1859DEFINE CLANGDWARF_IA32_TARGET = -target i686-pc-linux-gnu
1860DEFINE CLANGDWARF_X64_TARGET = -target x86_64-pc-linux-gnu
1861
1862DEFINE CLANGDWARF_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration
1863DEFINE CLANGDWARF_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
1864
1865###########################
1866# CLANGDWARF IA32 definitions
1867###########################
1868*_CLANGDWARF_IA32_CC_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1869*_CLANGDWARF_IA32_SLINK_PATH = DEF(CLANGDWARF_IA32_PREFIX)llvm-ar
1870*_CLANGDWARF_IA32_DLINK_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1871*_CLANGDWARF_IA32_ASLDLINK_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1872*_CLANGDWARF_IA32_ASM_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1873*_CLANGDWARF_IA32_PP_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1874*_CLANGDWARF_IA32_VFRPP_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1875*_CLANGDWARF_IA32_ASLCC_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1876*_CLANGDWARF_IA32_ASLPP_PATH = DEF(CLANGDWARF_IA32_PREFIX)clang
1877*_CLANGDWARF_IA32_RC_PATH = DEF(CLANGDWARF_IA32_PREFIX)llvm-objcopy
1878
1879*_CLANGDWARF_IA32_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m32 -fno-lto DEF(CLANGDWARF_IA32_TARGET)
1880*_CLANGDWARF_IA32_ASLDLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=lld -no-pie
1881*_CLANGDWARF_IA32_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m32 -march=i386 DEF(CLANGDWARF_IA32_TARGET)
1882*_CLANGDWARF_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
1883*_CLANGDWARF_IA32_OBJCOPY_FLAGS =
1884*_CLANGDWARF_IA32_NASM_FLAGS = -f elf32
1885*_CLANGDWARF_IA32_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_IA32_TARGET)
1886*_CLANGDWARF_IA32_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_IA32_TARGET)
1887*_CLANGDWARF_IA32_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_IA32_TARGET)
1888
1889DEBUG_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=i586 DEF(CLANGDWARF_IA32_TARGET) -g -malign-double
1890DEBUG_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
1891DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld -no-pie
1892
1893RELEASE_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=i586 DEF(CLANGDWARF_IA32_TARGET) -malign-double
1894RELEASE_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
1895RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=lld -no-pie
1896
1897NOOPT_CLANGDWARF_IA32_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -O0 -march=i586 DEF(CLANGDWARF_IA32_TARGET) -g -malign-double
1898NOOPT_CLANGDWARF_IA32_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 -Wl,--oformat,elf32-i386
1899NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS = DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=lld -no-pie
1900
1901##########################
1902# CLANGDWARF X64 definitions
1903##########################
1904*_CLANGDWARF_X64_CC_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1905*_CLANGDWARF_X64_SLINK_PATH = DEF(CLANGDWARF_X64_PREFIX)llvm-ar
1906*_CLANGDWARF_X64_DLINK_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1907*_CLANGDWARF_X64_ASLDLINK_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1908*_CLANGDWARF_X64_ASM_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1909*_CLANGDWARF_X64_PP_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1910*_CLANGDWARF_X64_VFRPP_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1911*_CLANGDWARF_X64_ASLCC_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1912*_CLANGDWARF_X64_ASLPP_PATH = DEF(CLANGDWARF_X64_PREFIX)clang
1913*_CLANGDWARF_X64_RC_PATH = DEF(CLANGDWARF_X64_PREFIX)llvm-objcopy
1914
1915*_CLANGDWARF_X64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -m64 -fno-lto DEF(CLANGDWARF_X64_TARGET)
1916*_CLANGDWARF_X64_ASLDLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64 -fuse-ld=lld
1917*_CLANGDWARF_X64_ASM_FLAGS = DEF(GCC5_ASM_FLAGS) -m64 DEF(CLANGDWARF_X64_TARGET)
1918*_CLANGDWARF_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
1919*_CLANGDWARF_X64_OBJCOPY_FLAGS =
1920*_CLANGDWARF_X64_NASM_FLAGS = -f elf64
1921*_CLANGDWARF_X64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_X64_TARGET)
1922*_CLANGDWARF_X64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_X64_TARGET)
1923*_CLANGDWARF_X64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_X64_TARGET)
1924
1925DEBUG_CLANGDWARF_X64_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie -fdirect-access-external-data -Oz -flto DEF(CLANGDWARF_X64_TARGET) -g
1926DEBUG_CLANGDWARF_X64_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_64 -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small -Wl,--apply-dynamic-relocs
1927DEBUG_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=lld
1928
1929RELEASE_CLANGDWARF_X64_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie -fdirect-access-external-data -Oz -flto DEF(CLANGDWARF_X64_TARGET)
1930RELEASE_CLANGDWARF_X64_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_x86_64 -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small -Wl,--apply-dynamic-relocs
1931RELEASE_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O3 -fuse-ld=lld
1932
1933NOOPT_CLANGDWARF_X64_CC_FLAGS = DEF(CLANGDWARF_ALL_CC_FLAGS) -m64 "-DEFIAPI=__attribute__((ms_abi))" -mno-red-zone -mcmodel=small -fpie -fdirect-access-external-data -O0 DEF(CLANGDWARF_X64_TARGET) -g
1934NOOPT_CLANGDWARF_X64_DLINK_FLAGS = DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_x86_64 -Wl,--oformat,elf64-x86-64 -Wl,-pie -mcmodel=small -Wl,--apply-dynamic-relocs
1935NOOPT_CLANGDWARF_X64_DLINK2_FLAGS = DEF(CLANGDWARF_X64_DLINK2_FLAGS) -O0 -fuse-ld=lld
1936
1937##################
1938# CLANGDWARF ARM definitions
1939##################
1940DEFINE CLANGDWARF_ARM_TARGET = -target arm-linux-gnueabi
1941DEFINE CLANGDWARF_ARM_CC_FLAGS = DEF(GCC_ARM_CC_FLAGS) DEF(CLANGDWARF_ARM_TARGET) DEF(CLANGDWARF_WARNING_OVERRIDES) -mno-movt
1942DEFINE CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS)
1943
1944*_CLANGDWARF_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS)
1945*_CLANGDWARF_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1946*_CLANGDWARF_ARM_APP_FLAGS =
1947*_CLANGDWARF_ARM_ASL_FLAGS = DEF(IASL_FLAGS)
1948*_CLANGDWARF_ARM_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1949*_CLANGDWARF_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1950
1951*_CLANGDWARF_ARM_CC_PATH = ENV(CLANGDWARF_BIN)clang
1952*_CLANGDWARF_ARM_ASM_PATH = ENV(CLANGDWARF_BIN)clang
1953*_CLANGDWARF_ARM_PP_PATH = ENV(CLANGDWARF_BIN)clang
1954*_CLANGDWARF_ARM_VFRPP_PATH = ENV(CLANGDWARF_BIN)clang
1955*_CLANGDWARF_ARM_ASLCC_PATH = ENV(CLANGDWARF_BIN)clang
1956*_CLANGDWARF_ARM_ASLPP_PATH = ENV(CLANGDWARF_BIN)clang
1957*_CLANGDWARF_ARM_DLINK_PATH = ENV(CLANGDWARF_BIN)clang
1958*_CLANGDWARF_ARM_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang
1959
1960*_CLANGDWARF_ARM_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar
1961*_CLANGDWARF_ARM_RC_PATH = ENV(CLANGDWARF_BIN)llvm-objcopy
1962
1963*_CLANGDWARF_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto
1964*_CLANGDWARF_ARM_ASLDLINK_FLAGS = DEF(CLANGDWARF_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS)
1965*_CLANGDWARF_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANGDWARF_ARM_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
1966*_CLANGDWARF_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
1967*_CLANGDWARF_ARM_PLATFORM_FLAGS = -march=armv7-a
1968*_CLANGDWARF_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_ARM_TARGET) $(PLATFORM_FLAGS)
1969*_CLANGDWARF_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
1970*_CLANGDWARF_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_ARM_TARGET) $(PLATFORM_FLAGS)
1971*_CLANGDWARF_ARM_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_ARM_TARGET)
1972*_CLANGDWARF_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
1973
1974 DEBUG_CLANGDWARF_ARM_CC_FLAGS = DEF(CLANGDWARF_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
1975 DEBUG_CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm -Wl,--no-pie,--no-relax
1976 NOOPT_CLANGDWARF_ARM_CC_FLAGS = DEF(CLANGDWARF_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -O0
1977 NOOPT_CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_DLINK_FLAGS) -fuse-ld=lld -Wl,--no-pie,--no-relax
1978RELEASE_CLANGDWARF_ARM_CC_FLAGS = DEF(CLANGDWARF_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
1979RELEASE_CLANGDWARF_ARM_DLINK_FLAGS = DEF(CLANGDWARF_ARM_DLINK_FLAGS) -flto -Wl,-O3 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm -Wl,--no-pie,--no-relax
1980
1981##################
1982# CLANGDWARF AARCH64 definitions
1983##################
1984DEFINE CLANGDWARF_AARCH64_TARGET = -target aarch64-linux-gnu
1985DEFINE CLANGDWARF_AARCH64_CC_FLAGS = DEF(GCC_AARCH64_CC_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) -mcmodel=small DEF(CLANGDWARF_WARNING_OVERRIDES)
1986DEFINE CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
1987
1988*_CLANGDWARF_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS)
1989*_CLANGDWARF_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
1990*_CLANGDWARF_AARCH64_APP_FLAGS =
1991*_CLANGDWARF_AARCH64_ASL_FLAGS = DEF(IASL_FLAGS)
1992*_CLANGDWARF_AARCH64_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
1993*_CLANGDWARF_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
1994
1995*_CLANGDWARF_AARCH64_CC_PATH = ENV(CLANGDWARF_BIN)clang
1996*_CLANGDWARF_AARCH64_ASM_PATH = ENV(CLANGDWARF_BIN)clang
1997*_CLANGDWARF_AARCH64_PP_PATH = ENV(CLANGDWARF_BIN)clang
1998*_CLANGDWARF_AARCH64_VFRPP_PATH = ENV(CLANGDWARF_BIN)clang
1999*_CLANGDWARF_AARCH64_ASLCC_PATH = ENV(CLANGDWARF_BIN)clang
2000*_CLANGDWARF_AARCH64_ASLPP_PATH = ENV(CLANGDWARF_BIN)clang
2001*_CLANGDWARF_AARCH64_DLINK_PATH = ENV(CLANGDWARF_BIN)clang
2002*_CLANGDWARF_AARCH64_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang
2003
2004*_CLANGDWARF_AARCH64_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar
2005*_CLANGDWARF_AARCH64_RC_PATH = ENV(CLANGDWARF_BIN)llvm-objcopy
2006
2007*_CLANGDWARF_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto
2008*_CLANGDWARF_AARCH64_ASLDLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS)
2009*_CLANGDWARF_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
2010*_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
2011*_CLANGDWARF_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
2012*_CLANGDWARF_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
2013*_CLANGDWARF_AARCH64_PLATFORM_FLAGS =
2014*_CLANGDWARF_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS)
2015*_CLANGDWARF_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
2016*_CLANGDWARF_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET) $(PLATFORM_FLAGS)
2017*_CLANGDWARF_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_AARCH64_TARGET)
2018*_CLANGDWARF_AARCH64_CC_XIPFLAGS = -mstrict-align
2019
2020 DEBUG_CLANGDWARF_AARCH64_CC_FLAGS = DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
2021 DEBUG_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax
2022 NOOPT_CLANGDWARF_AARCH64_CC_FLAGS = DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -O0
2023 NOOPT_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -fuse-ld=lld -Wl,--no-pie,--no-relax
2024RELEASE_CLANGDWARF_AARCH64_CC_FLAGS = DEF(CLANGDWARF_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
2025RELEASE_CLANGDWARF_AARCH64_DLINK_FLAGS = DEF(CLANGDWARF_AARCH64_DLINK_FLAGS) -flto -Wl,-O3 -fuse-ld=lld -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64 -Wl,--no-pie,--no-relax
2026
2027##################
2028# CLANGDWARF RISCV64 definitions
2029##################
2030DEFINE CLANGDWARF_RISCV64_TARGET = -target riscv64-linux-gnu
2031DEFINE CLANGDWARF_RISCV64_CC_COMMON = DEF(GCC5_RISCV_ALL_CC_FLAGS) DEF(GCC5_RISCV_ALL_CC_FLAGS_WARNING_DISABLE) DEF(GCC5_RISCV_OPENSBI_TYPES) -march=DEF(GCC5_RISCV64_ARCH) -fno-builtin -fno-builtin-memcpy -fno-stack-protector -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -Wno-unused-but-set-variable -fpack-struct=8 -mcmodel=medany -mabi=lp64 -mno-relax
2032DEFINE CLANGDWARF_RISCV64_CC_FLAGS = DEF(CLANGDWARF_RISCV64_CC_COMMON) DEF(CLANGDWARF_RISCV64_TARGET) DEF(CLANGDWARF_WARNING_OVERRIDES)
2033
2034# This is similar to GCC flags but without -n
2035DEFINE CLANGDWARF_RISCV64_ALL_DLINK_COMMON = -nostdlib -Wl,-q,--gc-sections -z common-page-size=0x40
2036DEFINE CLANGDWARF_RISCV64_ALL_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_ALL_DLINK_COMMON) -Wl,--entry,$(IMAGE_ENTRY_POINT) -u $(IMAGE_ENTRY_POINT) -Wl,-Map,$(DEST_DIR_DEBUG)/$(BASE_NAME).map
2037DEFINE CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_TARGET) DEF(CLANGDWARF_RISCV64_ALL_DLINK_FLAGS) -Wl,-melf64lriscv,--oformat=elf64-littleriscv,--no-relax
2038
2039*_CLANGDWARF_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS)
2040*_CLANGDWARF_RISCV64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
2041*_CLANGDWARF_RISCV64_APP_FLAGS =
2042*_CLANGDWARF_RISCV64_ASL_FLAGS = DEF(IASL_FLAGS)
2043*_CLANGDWARF_RISCV64_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
2044*_CLANGDWARF_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
2045*_CLANGDWARF_RISCV64_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
2046
2047*_CLANGDWARF_RISCV64_CC_PATH = ENV(CLANGDWARF_BIN)clang
2048*_CLANGDWARF_RISCV64_ASM_PATH = ENV(CLANGDWARF_BIN)clang
2049*_CLANGDWARF_RISCV64_PP_PATH = ENV(CLANGDWARF_BIN)clang
2050*_CLANGDWARF_RISCV64_VFRPP_PATH = ENV(CLANGDWARF_BIN)clang
2051*_CLANGDWARF_RISCV64_ASLCC_PATH = ENV(CLANGDWARF_BIN)clang
2052*_CLANGDWARF_RISCV64_ASLPP_PATH = ENV(CLANGDWARF_BIN)clang
2053*_CLANGDWARF_RISCV64_DLINK_PATH = ENV(CLANGDWARF_BIN)clang
2054*_CLANGDWARF_RISCV64_ASLDLINK_PATH = ENV(CLANGDWARF_BIN)clang
2055
2056*_CLANGDWARF_RISCV64_SLINK_PATH = ENV(CLANGDWARF_BIN)llvm-ar
2057*_CLANGDWARF_RISCV64_RC_PATH = ENV(CLANGDWARF_BIN)llvm-objcopy
2058
2059*_CLANGDWARF_RISCV64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto
2060*_CLANGDWARF_RISCV64_ASLDLINK_FLAGS = DEF(CLANGDWARF_RISCV64_TARGET) DEF(GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS)
2061*_CLANGDWARF_RISCV64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments -mabi=lp64 -mno-relax
2062*_CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_TARGET) DEF(GCC5_RISCV64_DLINK_FLAGS)
2063*_CLANGDWARF_RISCV64_DLINK_XIPFLAGS = -z common-page-size=0x20
2064*_CLANGDWARF_RISCV64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x240
2065*_CLANGDWARF_RISCV64_PLATFORM_FLAGS =
2066*_CLANGDWARF_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET) $(PLATFORM_FLAGS)
2067*_CLANGDWARF_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
2068*_CLANGDWARF_RISCV64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET) $(PLATFORM_FLAGS)
2069*_CLANGDWARF_RISCV64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANGDWARF_RISCV64_TARGET)
2070*_CLANGDWARF_RISCV64_CC_XIPFLAGS = DEF(GCC_RISCV64_CC_XIPFLAGS)
2071
2072 DEBUG_CLANGDWARF_RISCV64_CC_FLAGS = DEF(CLANGDWARF_RISCV64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
2073 DEBUG_CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_DLINK_FLAGS) -flto -Wl,-O1 -fuse-ld=lld -Wl,--no-pie,--no-relax
2074 NOOPT_CLANGDWARF_RISCV64_CC_FLAGS = DEF(CLANGDWARF_RISCV64_CC_FLAGS) $(PLATFORM_FLAGS) -O0
2075 NOOPT_CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_DLINK_FLAGS) -fuse-ld=lld -Wl,--no-pie,--no-relax
2076RELEASE_CLANGDWARF_RISCV64_CC_FLAGS = DEF(CLANGDWARF_RISCV64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
2077RELEASE_CLANGDWARF_RISCV64_DLINK_FLAGS = DEF(CLANGDWARF_RISCV64_DLINK_FLAGS) -flto -Wl,-O3 -fuse-ld=lld -Wl,--no-pie,--no-relax
2078
2079#
2080#
2081# XCODE5 support
2082#
2083
2084*_XCODE5_*_*_FAMILY = GCC
2085*_XCODE5_*_*_BUILDRULEFAMILY = XCODE
2086
2087#
2088# use xcode-select to change Xcode version of command line tools
2089#
2090*_XCODE5_*_MAKE_PATH = make
2091*_XCODE5_*_CC_PATH = clang
2092*_XCODE5_*_SLINK_PATH = libtool
2093*_XCODE5_*_DLINK_PATH = ld
2094*_XCODE5_*_ASM_PATH = as
2095*_XCODE5_*_PP_PATH = clang
2096*_XCODE5_*_VFRPP_PATH = clang
2097*_XCODE5_*_ASL_PATH = iasl
2098*_XCODE5_*_ASLCC_PATH = clang
2099*_XCODE5_*_ASLPP_PATH = clang
2100*_XCODE5_*_ASLDLINK_PATH = ld
2101*_XCODE5_*_DSYMUTIL_PATH = /usr/bin/dsymutil
2102*_XCODE5_*_MTOC_PATH = /usr/local/bin/mtoc
2103*_XCODE5_*_DEPS_FLAGS = DEF(GCC_DEPS_FLAGS)
2104
2105##################
2106# ASL definitions
2107##################
2108*_XCODE5_*_ASLCC_FLAGS = -x c -save-temps -g -O0 -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-missing-braces -c -include AutoGen.h
2109*_XCODE5_*_ASLDLINK_FLAGS = -e _ReferenceAcpiTable -preload -segalign 0x20 -pie -seg1addr 0x240 -read_only_relocs suppress -map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
2110*_XCODE5_*_ASLPP_FLAGS = -x c -E -include AutoGen.h
2111*_XCODE5_*_ASL_FLAGS =
2112*_XCODE5_*_ASL_OUTFLAGS = DEF(IASL_OUTFLAGS)
2113
2114##################
2115# MTOC definitions
2116##################
2117
2118 DEBUG_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
2119 NOOPT_XCODE5_*_MTOC_FLAGS = -align 0x20 -d $(DEBUG_DIR)/$(MODULE_NAME).dll
2120RELEASE_XCODE5_*_MTOC_FLAGS = -align 0x20
2121
2122####################
2123# IA-32 definitions
2124####################
2125 DEBUG_XCODE5_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
2126 NOOPT_XCODE5_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
2127RELEASE_XCODE5_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
2128
2129*_XCODE5_IA32_SLINK_FLAGS = -static -o
2130 DEBUG_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
2131 NOOPT_XCODE5_IA32_ASM_FLAGS = -arch i386 -g
2132RELEASE_XCODE5_IA32_ASM_FLAGS = -arch i386
2133 *_XCODE5_IA32_NASM_FLAGS = -f macho32
2134
2135
2136 DEBUG_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
2137RELEASE_XCODE5_IA32_CC_FLAGS = -arch i386 -c -Os -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
2138 NOOPT_XCODE5_IA32_CC_FLAGS = -arch i386 -c -g -O0 -Wall -Werror -include AutoGen.h -funsigned-char -fno-stack-protector -fno-builtin -fshort-wchar -fasm-blocks -mdynamic-no-pic -mno-implicit-float -mms-bitfields -msoft-float -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang $(PLATFORM_FLAGS)
2139
2140##################
2141# X64 definitions
2142##################
2143 DEBUG_XCODE5_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
2144 NOOPT_XCODE5_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
2145RELEASE_XCODE5_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
2146
2147*_XCODE5_X64_SLINK_FLAGS = -static -o
2148 DEBUG_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
2149 NOOPT_XCODE5_X64_ASM_FLAGS = -arch x86_64 -g
2150RELEASE_XCODE5_X64_ASM_FLAGS = -arch x86_64
2151 *_XCODE5_X64_NASM_FLAGS = -f macho64
2152*_XCODE5_*_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h
2153*_XCODE5_*_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE -include $(MODULE_NAME)StrDefs.h
2154
2155 DEBUG_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
2156 NOOPT_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -g -gdwarf -O0 -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
2157RELEASE_XCODE5_X64_CC_FLAGS = -target x86_64-pc-win32-macho -c -Os -Wall -Werror -Wextra -include AutoGen.h -funsigned-char -fno-ms-extensions -fno-stack-protector -fno-builtin -fshort-wchar -mno-implicit-float -mms-bitfields -Wno-unused-parameter -Wno-missing-braces -Wno-missing-field-initializers -Wno-tautological-compare -Wno-sign-compare -Wno-varargs -Wno-unused-const-variable -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -D NO_MSABI_VA_FUNCS $(PLATFORM_FLAGS)
2158
2159#################
2160# ASM 16 linker definitions
2161#################
2162*_*_*_ASMLINK_PATH = DEF(WINDDK_BIN16)\link16.exe
2163*_*_*_ASMLINK_FLAGS = /nologo /tiny
2164
2165##################
2166# VfrCompiler definitions
2167##################
2168*_*_*_VFR_PATH = VfrCompile
2169*_*_*_VFR_FLAGS = -l -n
2170
2171##################
2172# OptionRom tool definitions
2173##################
2174*_*_*_OPTROM_PATH = EfiRom
2175*_*_*_OPTROM_FLAGS = -e
2176
2177##################
2178# GenFw tool definitions
2179##################
2180*_*_*_GENFW_PATH = GenFw
2181*_*_*_GENFW_FLAGS =
2182
2183##################
2184# Asl Compiler definitions
2185##################
2186*_*_*_ASLCC_FLAGS = /nologo /c /FIAutoGen.h /TC /Dmain=ReferenceAcpiTable
2187*_*_*_ASLDLINK_FLAGS = /NODEFAULTLIB /ENTRY:ReferenceAcpiTable /SUBSYSTEM:CONSOLE
2188*_*_*_ASLPP_FLAGS = /nologo /EP /C
2189*_*_*_ASL_FLAGS =
2190
2191##################
2192# GenCrc32 tool definitions
2193##################
2194*_*_*_CRC32_PATH = GenCrc32
2195*_*_*_CRC32_GUID = FC1BCDB0-7D31-49AA-936A-A4600D9DD083
2196
2197##################
2198# Rsa2048Sha256Sign tool definitions
2199#
2200# Notes: This tool definition uses a test signing key for development purposes only.
2201# The tool Rsa2048Sha256GenerateKeys can be used to generate a new private/public key
2202# and the gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer PCD value.
2203# A custom tool/script can be implemented using the new private/public key with
2204# the Rsa2048Sha256Sign tool and this tool definition can be updated to use a
2205# custom tool/script.
2206#
2207# Generate new private/public key and gEfiSecurityPkgTokenSpaceGuid.PcdRsa2048Sha256PublicKeyBuffer PCD value
2208#
2209# Rsa2048Sha256GenerateKeys.py -o MyKey.pem --public-key-hash-c MyKey.pcd
2210#
2211# Custom script example (MyRsa2048Sha256Sign.cmd):
2212#
2213# Rsa2048Sha256Sign --private-key MyKey.pem %1 %2 %3 %4 %5 %6 %7 %8 %9
2214#
2215# WARNING: Vendors that uses private keys are responsible for proper management and protection
2216# of private keys. Vendors may choose to use infrastructure such as signing servers
2217# or signing portals to support the management and protection of private keys.
2218#
2219##################
2220*_*_*_RSA2048SHA256SIGN_PATH = Rsa2048Sha256Sign
2221*_*_*_RSA2048SHA256SIGN_GUID = A7717414-C616-4977-9420-844712A735BF
2222
2223##################
2224# BrotliCompress tool definitions
2225##################
2226*_*_*_BROTLI_PATH = BrotliCompress
2227*_*_*_BROTLI_GUID = 3D532050-5CDA-4FD0-879E-0F7F630D5AFB
2228
2229##################
2230# LzmaCompress tool definitions
2231##################
2232*_*_*_LZMA_PATH = LzmaCompress
2233*_*_*_LZMA_GUID = EE4E5898-3914-4259-9D6E-DC7BD79403CF
2234
2235##################
2236# LzmaF86Compress tool definitions with converter for x86 code.
2237# It can improve the compression ratio if the input file is IA32 or X64 PE image.
2238##################
2239*_*_*_LZMAF86_PATH = LzmaF86Compress
2240*_*_*_LZMAF86_GUID = D42AE6BD-1352-4bfb-909A-CA72A6EAE889
2241
2242##################
2243# TianoCompress tool definitions
2244##################
2245*_*_*_TIANO_PATH = TianoCompress
2246*_*_*_TIANO_GUID = A31280AD-481E-41B6-95E8-127F4C984779
2247
2248##################
2249# BPDG tool definitions
2250##################
2251*_*_*_VPDTOOL_PATH = BPDG
2252*_*_*_VPDTOOL_GUID = 8C3D856A-9BE6-468E-850A-24F7A8D38E08
2253
2254##################
2255# Pkcs7Sign tool definitions
2256##################
2257*_*_*_PKCS7SIGN_PATH = Pkcs7Sign
2258*_*_*_PKCS7SIGN_GUID = 4AAFD29D-68DF-49EE-8AA9-347D375665A7
2259
2260##################
2261# NASM tool definitions
2262##################
2263*_*_*_NASM_PATH = ENV(NASM_PREFIX)nasm
2264# NASMB uses NASM produce a .bin from a .nasmb NASM source file
2265*_*_*_NASMB_FLAGS = -f bin
2266
2267#################
2268# Build rule order
2269#################
2270*_*_*_*_BUILDRULEORDER = nasm asm Asm ASM S s nasmb asm16
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette