public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Rebecca Cran" <rebecca@bsdio.com>
To: devel@edk2.groups.io, "Liming Gao" <gaoliming@byosoft.com.cn>,
	"Bob Feng" <bob.c.feng@intel.com>,
	"Yuwei Chen" <yuwei.chen@intel.com>,
	"Michael D Kinney" <michael.d.kinney@intel.com>,
	"Michael Kubacki" <mikuback@linux.microsoft.com>,
	"Sean Brogan" <sean.brogan@microsoft.com>,
	"Chasel Chiu" <chasel.chiu@intel.com>,
	"Nate DeSimone" <nathaniel.l.desimone@intel.com>,
	"Star Zeng" <star.zeng@intel.com>,
	"Andrew Fish" <afish@apple.com>, "Ray Ni" <ray.ni@intel.com>,
	"Leif Lindholm" <quic_llindhol@quicinc.com>,
	"Zhiguang Liu" <zhiguang.liu@intel.com>,
	"Jian J Wang" <jian.j.wang@intel.com>,
	"Xiaoyu Lu" <xiaoyu1.lu@intel.com>,
	"Guomin Jiang" <guomin.jiang@intel.com>,
	"Gua Guo" <gua.guo@intel.com>, "Ard Biesheuvel" <ardb@kernel.org>,
	"Pedro Falcato" <pedro.falcato@gmail.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marvin Häuser" <mhaeuser@posteo.de>
Cc: Rebecca Cran <rebecca@bsdio.com>
Subject: [PATCH v3 09/13] BaseTools/Conf/tools_def.template: Add GCC and GCCNOLTO toolchains
Date: Sun, 16 Apr 2023 11:05:28 -0600	[thread overview]
Message-ID: <20230416170532.278338-10-rebecca@bsdio.com> (raw)
In-Reply-To: <20230416170532.278338-1-rebecca@bsdio.com>

Add a 'GCC' toolchain that's a copy of the existing GCC5 definition.
Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC48
toolchain.

Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
 UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc |   2 +
 IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc               |   9 +-
 EmulatorPkg/Unix/Host/Host.inf                        |   2 +
 BaseTools/Conf/tools_def.template                     | 366 ++++++++++++++++++++
 4 files changed, 378 insertions(+), 1 deletion(-)

diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index 7866c36e6693..b24ecdbf8661 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -31,6 +31,8 @@ [BuildOptions]
 !endif
   GCC:*_GCC5_*_CC_FLAGS = --coverage
   GCC:*_GCC5_*_DLINK_FLAGS = --coverage
+  GCC:*_GCC_*_CC_FLAGS = --coverage
+  GCC:*_GCC_*_DLINK_FLAGS = --coverage
 [BuildOptions.common.EDKII.HOST_APPLICATION]
   #
   # MSFT
diff --git a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
index 31558121185d..2db3854274c8 100644
--- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
+++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
@@ -461,10 +461,17 @@ [Components.IA32]
 ###################################################################################################
 [BuildOptions]
 # Append build options for EDK and EDKII drivers (= is Append, == is Replace)
-  # Enable link-time optimization when building with GCC49
+  # Enable link-time optimization when building with GCC49 or GCCNOLTO
   *_GCC49_IA32_CC_FLAGS = -flto
   *_GCC49_IA32_DLINK_FLAGS = -flto
+  *_GCCNOLTO_IA32_CC_FLAGS = -flto
+  *_GCCNOLTO_IA32_DLINK_FLAGS = -flto
   *_GCC5_IA32_CC_FLAGS = -fno-pic
   *_GCC5_IA32_DLINK_FLAGS = -no-pie
   *_GCC5_IA32_ASLCC_FLAGS = -fno-pic
   *_GCC5_IA32_ASLDLINK_FLAGS = -no-pie
+  *_GCC_IA32_CC_FLAGS = -fno-pic
+  *_GCC_IA32_DLINK_FLAGS = -no-pie
+  *_GCC_IA32_ASLCC_FLAGS = -fno-pic
+  *_GCC_IA32_ASLDLINK_FLAGS = -no-pie
+
diff --git a/EmulatorPkg/Unix/Host/Host.inf b/EmulatorPkg/Unix/Host/Host.inf
index f5ebbed68344..90e8c36b6186 100644
--- a/EmulatorPkg/Unix/Host/Host.inf
+++ b/EmulatorPkg/Unix/Host/Host.inf
@@ -123,7 +123,9 @@ [BuildOptions]
    GCC:*_*_X64_CC_FLAGS == -m64 -g -fshort-wchar -fno-strict-aliasing -Wall -malign-double -idirafter/usr/include -c -include $(DEST_DIR_DEBUG)/AutoGen.h -DSTRING_ARRAY_NAME=$(BASE_NAME)Strings
    GCC:*_GCC48_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
    GCC:*_GCC49_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
+   GCC:*_GCCNOLTO_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))"
    GCC:*_GCC5_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os
+   GCC:*_GCC_X64_CC_FLAGS = "-DEFIAPI=__attribute__((ms_abi))" -flto -DUSING_LTO -Os
    GCC:*_*_X64_PP_FLAGS == -m64 -E -x assembler-with-cpp -include $(DEST_DIR_DEBUG)/AutoGen.h
    GCC:*_*_X64_ASM_FLAGS == -m64 -c -x assembler -imacros $(DEST_DIR_DEBUG)/AutoGen.h
 
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 56297637d1c2..615d02f8ad9c 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -77,8 +77,13 @@ DEFINE GCC48_X64_PREFIX        = ENV(GCC48_BIN)
 DEFINE GCC49_IA32_PREFIX       = ENV(GCC49_BIN)
 DEFINE GCC49_X64_PREFIX        = ENV(GCC49_BIN)
 
+DEFINE GCCNOLTO_IA32_PREFIX    = ENV(GCCNOLTO_BIN)
+DEFINE GCCNOLTO_X64_PREFIX     = ENV(GCCNOLTO_BIN)
+
 DEFINE GCC5_IA32_PREFIX        = ENV(GCC5_BIN)
 DEFINE GCC5_X64_PREFIX         = ENV(GCC5_BIN)
+DEFINE GCC_IA32_PREFIX         = ENV(GCC_BIN)
+DEFINE GCC_X64_PREFIX          = ENV(GCC_BIN)
 DEFINE GCC_HOST_PREFIX         = ENV(GCC_HOST_BIN)
 
 DEFINE UNIX_IASL_BIN           = ENV(IASL_PREFIX)iasl
@@ -1128,6 +1133,150 @@ RELEASE_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
   NOOPT_GCC49_AARCH64_DLINK_FLAGS  = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0
   NOOPT_GCC49_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
 
+####################################################################################
+#
+# GCC NOLTO - This configuration is used to compile under Linux to produce
+#             PE/COFF binaries using GCC without Link Time Optimization
+#
+####################################################################################
+*_GCCNOLTO_*_*_FAMILY               = GCC
+
+*_GCCNOLTO_*_MAKE_PATH                    = DEF(GCC_HOST_PREFIX)make
+*_GCCNOLTO_*_*_DLL                        = ENV(GCCNOLTO_DLL)
+*_GCCNOLTO_*_ASL_PATH                     = DEF(UNIX_IASL_BIN)
+
+*_GCCNOLTO_*_PP_FLAGS                     = DEF(GCC_PP_FLAGS)
+*_GCCNOLTO_*_ASLPP_FLAGS                  = DEF(GCC_ASLPP_FLAGS)
+*_GCCNOLTO_*_ASLCC_FLAGS                  = DEF(GCC_ASLCC_FLAGS)
+*_GCCNOLTO_*_VFRPP_FLAGS                  = DEF(GCC_VFRPP_FLAGS)
+*_GCCNOLTO_*_APP_FLAGS                    =
+*_GCCNOLTO_*_ASL_FLAGS                    = DEF(IASL_FLAGS)
+*_GCCNOLTO_*_ASL_OUTFLAGS                 = DEF(IASL_OUTFLAGS)
+*_GCCNOLTO_*_DEPS_FLAGS                   = DEF(GCC_DEPS_FLAGS)
+
+##################
+# GCCNOLTO IA32 definitions
+##################
+*_GCCNOLTO_IA32_OBJCOPY_PATH         = DEF(GCCNOLTO_IA32_PREFIX)objcopy
+*_GCCNOLTO_IA32_CC_PATH              = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_SLINK_PATH           = DEF(GCCNOLTO_IA32_PREFIX)ar
+*_GCCNOLTO_IA32_DLINK_PATH           = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_ASLDLINK_PATH        = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_ASM_PATH             = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_PP_PATH              = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_VFRPP_PATH           = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_ASLCC_PATH           = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_ASLPP_PATH           = DEF(GCCNOLTO_IA32_PREFIX)gcc
+*_GCCNOLTO_IA32_RC_PATH              = DEF(GCCNOLTO_IA32_PREFIX)objcopy
+
+*_GCCNOLTO_IA32_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS) -m32
+*_GCCNOLTO_IA32_ASLDLINK_FLAGS       = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386
+*_GCCNOLTO_IA32_ASM_FLAGS            = DEF(GCC49_ASM_FLAGS) -m32 -march=i386
+*_GCCNOLTO_IA32_DLINK_FLAGS          = DEF(GCC49_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386
+*_GCCNOLTO_IA32_DLINK2_FLAGS         = DEF(GCC49_IA32_DLINK2_FLAGS)
+*_GCCNOLTO_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)
+*_GCCNOLTO_IA32_OBJCOPY_FLAGS        =
+*_GCCNOLTO_IA32_NASM_FLAGS           = -f elf32
+
+  DEBUG_GCCNOLTO_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS)
+RELEASE_GCCNOLTO_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
+  NOOPT_GCCNOLTO_IA32_CC_FLAGS       = DEF(GCC49_IA32_CC_FLAGS) -O0
+
+##################
+# GCCNOLTO X64 definitions
+##################
+*_GCCNOLTO_X64_OBJCOPY_PATH         = DEF(GCCNOLTO_X64_PREFIX)objcopy
+*_GCCNOLTO_X64_CC_PATH              = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_SLINK_PATH           = DEF(GCCNOLTO_X64_PREFIX)ar
+*_GCCNOLTO_X64_DLINK_PATH           = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_ASLDLINK_PATH        = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_ASM_PATH             = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_PP_PATH              = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_VFRPP_PATH           = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_ASLCC_PATH           = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_ASLPP_PATH           = DEF(GCCNOLTO_X64_PREFIX)gcc
+*_GCCNOLTO_X64_RC_PATH              = DEF(GCCNOLTO_X64_PREFIX)objcopy
+
+*_GCCNOLTO_X64_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS) -m64
+*_GCCNOLTO_X64_ASLDLINK_FLAGS       = DEF(GCC49_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
+*_GCCNOLTO_X64_ASM_FLAGS            = DEF(GCC49_ASM_FLAGS) -m64
+*_GCCNOLTO_X64_DLINK_FLAGS          = DEF(GCC49_X64_DLINK_FLAGS)
+*_GCCNOLTO_X64_DLINK2_FLAGS         = DEF(GCC49_X64_DLINK2_FLAGS)
+*_GCCNOLTO_X64_RC_FLAGS             = DEF(GCC_X64_RC_FLAGS)
+*_GCCNOLTO_X64_OBJCOPY_FLAGS        =
+*_GCCNOLTO_X64_NASM_FLAGS           = -f elf64
+
+  DEBUG_GCCNOLTO_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS)
+RELEASE_GCCNOLTO_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
+  NOOPT_GCCNOLTO_X64_CC_FLAGS       = DEF(GCC49_X64_CC_FLAGS) -O0
+
+##################
+# GCCNOLTO ARM definitions
+##################
+*_GCCNOLTO_ARM_CC_PATH              = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_SLINK_PATH           = ENV(GCCNOLTO_ARM_PREFIX)ar
+*_GCCNOLTO_ARM_DLINK_PATH           = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_ASLDLINK_PATH        = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_ASM_PATH             = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_PP_PATH              = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_VFRPP_PATH           = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_ASLCC_PATH           = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_ASLPP_PATH           = ENV(GCCNOLTO_ARM_PREFIX)gcc
+*_GCCNOLTO_ARM_RC_PATH              = ENV(GCCNOLTO_ARM_PREFIX)objcopy
+
+*_GCCNOLTO_ARM_ASLCC_FLAGS          = DEF(GCC49_ASLCC_FLAGS)
+*_GCCNOLTO_ARM_ASLDLINK_FLAGS       = DEF(GCC49_ARM_ASLDLINK_FLAGS)
+*_GCCNOLTO_ARM_ASM_FLAGS            = DEF(GCC49_ARM_ASM_FLAGS)
+*_GCCNOLTO_ARM_DLINK_FLAGS          = DEF(GCC49_ARM_DLINK_FLAGS)
+*_GCCNOLTO_ARM_DLINK2_FLAGS         = DEF(GCC49_ARM_DLINK2_FLAGS)
+*_GCCNOLTO_ARM_DTCPP_FLAGS          = DEF(GCC_DTCPP_FLAGS)
+*_GCCNOLTO_ARM_PLATFORM_FLAGS       = -march=armv7-a
+*_GCCNOLTO_ARM_PP_FLAGS             = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCCNOLTO_ARM_RC_FLAGS             = DEF(GCC_ARM_RC_FLAGS)
+*_GCCNOLTO_ARM_VFRPP_FLAGS          = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCCNOLTO_ARM_CC_XIPFLAGS          = DEF(GCC49_ARM_CC_XIPFLAGS)
+
+  DEBUG_GCCNOLTO_ARM_CC_FLAGS       = DEF(GCC49_ARM_CC_FLAGS) -O0
+RELEASE_GCCNOLTO_ARM_CC_FLAGS       = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
+  NOOPT_GCCNOLTO_ARM_CC_FLAGS       = DEF(GCC49_ARM_CC_FLAGS) -O0
+
+##################
+# GCCNOLTO AARCH64 definitions
+##################
+*_GCCNOLTO_AARCH64_CC_PATH          = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_SLINK_PATH       = ENV(GCCNOLTO_AARCH64_PREFIX)ar
+*_GCCNOLTO_AARCH64_DLINK_PATH       = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_ASLDLINK_PATH    = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_ASM_PATH         = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_PP_PATH          = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_VFRPP_PATH       = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_ASLCC_PATH       = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_ASLPP_PATH       = ENV(GCCNOLTO_AARCH64_PREFIX)gcc
+*_GCCNOLTO_AARCH64_RC_PATH          = ENV(GCCNOLTO_AARCH64_PREFIX)objcopy
+
+*_GCCNOLTO_AARCH64_ASLCC_FLAGS      = DEF(GCC49_ASLCC_FLAGS)
+*_GCCNOLTO_AARCH64_ASLDLINK_FLAGS   = DEF(GCC49_AARCH64_ASLDLINK_FLAGS)
+*_GCCNOLTO_AARCH64_ASM_FLAGS        = DEF(GCC49_AARCH64_ASM_FLAGS)
+*_GCCNOLTO_AARCH64_DLINK2_FLAGS     = DEF(GCC49_AARCH64_DLINK2_FLAGS)
+*_GCCNOLTO_AARCH64_DTCPP_FLAGS      = DEF(GCC_DTCPP_FLAGS)
+*_GCCNOLTO_AARCH64_PLATFORM_FLAGS   =
+*_GCCNOLTO_AARCH64_PP_FLAGS         = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCCNOLTO_AARCH64_RC_FLAGS         = DEF(GCC_AARCH64_RC_FLAGS)
+*_GCCNOLTO_AARCH64_VFRPP_FLAGS      = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCCNOLTO_AARCH64_CC_XIPFLAGS      = DEF(GCC49_AARCH64_CC_XIPFLAGS)
+
+  DEBUG_GCCNOLTO_AARCH64_CC_FLAGS     = DEF(GCC49_AARCH64_CC_FLAGS) -O0
+  DEBUG_GCCNOLTO_AARCH64_DLINK_FLAGS  = DEF(GCC49_AARCH64_DLINK_FLAGS)
+  DEBUG_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
+
+RELEASE_GCCNOLTO_AARCH64_CC_FLAGS     = DEF(GCC49_AARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
+RELEASE_GCCNOLTO_AARCH64_DLINK_FLAGS  = DEF(GCC49_AARCH64_DLINK_FLAGS)
+RELEASE_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
+
+  NOOPT_GCCNOLTO_AARCH64_CC_FLAGS     = DEF(GCC49_AARCH64_CC_FLAGS) -O0
+  NOOPT_GCCNOLTO_AARCH64_DLINK_FLAGS  = DEF(GCC49_AARCH64_DLINK_FLAGS) -O0
+  NOOPT_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
+
 ####################################################################################
 #
 # GCC 5 - This configuration is used to compile under Linux to produce
@@ -1345,6 +1494,223 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
 DEBUG_GCC5_LOONGARCH64_CC_FLAGS         = DEF(GCC5_LOONGARCH64_CC_FLAGS)
 RELEASE_GCC5_LOONGARCH64_CC_FLAGS       = DEF(GCC5_LOONGARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-variable
 
+####################################################################################
+#
+# GCC - This configuration is used to compile under Linux to produce
+#       PE/COFF binaries using GCC 5 or newer
+#
+####################################################################################
+*_GCC_*_*_FAMILY                = GCC
+
+*_GCC_*_MAKE_PATH               = DEF(GCC_HOST_PREFIX)make
+*_GCC_*_*_DLL                   = ENV(GCC_DLL)
+*_GCC_*_ASL_PATH                = DEF(UNIX_IASL_BIN)
+
+*_GCC_*_PP_FLAGS                = DEF(GCC_PP_FLAGS)
+*_GCC_*_ASLPP_FLAGS             = DEF(GCC_ASLPP_FLAGS)
+*_GCC_*_ASLCC_FLAGS             = DEF(GCC_ASLCC_FLAGS)
+*_GCC_*_VFRPP_FLAGS             = DEF(GCC_VFRPP_FLAGS)
+*_GCC_*_APP_FLAGS               =
+*_GCC_*_ASL_FLAGS               = DEF(IASL_FLAGS)
+*_GCC_*_ASL_OUTFLAGS            = DEF(IASL_OUTFLAGS)
+*_GCC_*_DEPS_FLAGS                   = DEF(GCC_DEPS_FLAGS)
+
+##################
+# GCC IA32 definitions
+##################
+*_GCC_IA32_OBJCOPY_PATH         = DEF(GCC_IA32_PREFIX)objcopy
+*_GCC_IA32_CC_PATH              = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_SLINK_PATH           = DEF(GCC_IA32_PREFIX)gcc-ar
+*_GCC_IA32_DLINK_PATH           = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_ASLDLINK_PATH        = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_ASM_PATH             = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_PP_PATH              = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_VFRPP_PATH           = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_ASLCC_PATH           = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_ASLPP_PATH           = DEF(GCC_IA32_PREFIX)gcc
+*_GCC_IA32_RC_PATH              = DEF(GCC_IA32_PREFIX)objcopy
+
+*_GCC_IA32_ASLCC_FLAGS          = DEF(GCC5_ASLCC_FLAGS) -m32
+*_GCC_IA32_ASLDLINK_FLAGS       = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -no-pie
+*_GCC_IA32_ASM_FLAGS            = DEF(GCC5_ASM_FLAGS) -m32 -march=i386
+*_GCC_IA32_DLINK2_FLAGS         = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
+*_GCC_IA32_RC_FLAGS             = DEF(GCC_IA32_RC_FLAGS)
+*_GCC_IA32_OBJCOPY_FLAGS        =
+*_GCC_IA32_NASM_FLAGS           = -f elf32
+
+  DEBUG_GCC_IA32_CC_FLAGS       = DEF(GCC5_IA32_CC_FLAGS) -flto
+  DEBUG_GCC_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+
+RELEASE_GCC_IA32_CC_FLAGS       = DEF(GCC5_IA32_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
+RELEASE_GCC_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
+
+  NOOPT_GCC_IA32_CC_FLAGS       = DEF(GCC5_IA32_CC_FLAGS) -O0
+  NOOPT_GCC_IA32_DLINK_FLAGS    = DEF(GCC5_IA32_X64_DLINK_FLAGS) -Wl,-m,elf_i386,--oformat=elf32-i386 -O0
+
+##################
+# GCC X64 definitions
+##################
+*_GCC_X64_OBJCOPY_PATH          = DEF(GCC_X64_PREFIX)objcopy
+*_GCC_X64_CC_PATH               = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_SLINK_PATH            = DEF(GCC_X64_PREFIX)gcc-ar
+*_GCC_X64_DLINK_PATH            = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_ASLDLINK_PATH         = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_ASM_PATH              = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_PP_PATH               = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_VFRPP_PATH            = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_ASLCC_PATH            = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_ASLPP_PATH            = DEF(GCC_X64_PREFIX)gcc
+*_GCC_X64_RC_PATH               = DEF(GCC_X64_PREFIX)objcopy
+
+*_GCC_X64_ASLCC_FLAGS           = DEF(GCC5_ASLCC_FLAGS) -m64
+*_GCC_X64_ASLDLINK_FLAGS        = DEF(GCC5_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_x86_64
+*_GCC_X64_ASM_FLAGS             = DEF(GCC5_ASM_FLAGS) -m64
+*_GCC_X64_DLINK2_FLAGS          = DEF(GCC5_X64_DLINK2_FLAGS)
+*_GCC_X64_RC_FLAGS              = DEF(GCC_X64_RC_FLAGS)
+*_GCC_X64_OBJCOPY_FLAGS         =
+*_GCC_X64_NASM_FLAGS            = -f elf64
+
+  DEBUG_GCC_X64_CC_FLAGS        = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO
+  DEBUG_GCC_X64_DLINK_FLAGS     = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
+
+RELEASE_GCC_X64_CC_FLAGS        = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO -Wno-unused-but-set-variable -Wno-unused-const-variable
+RELEASE_GCC_X64_DLINK_FLAGS     = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
+
+  NOOPT_GCC_X64_CC_FLAGS        = DEF(GCC5_X64_CC_FLAGS) -O0
+  NOOPT_GCC_X64_DLINK_FLAGS     = DEF(GCC5_X64_DLINK_FLAGS) -O0
+
+##################
+# GCC ARM definitions
+##################
+*_GCC_ARM_CC_PATH               = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_SLINK_PATH            = ENV(GCC_ARM_PREFIX)gcc-ar
+*_GCC_ARM_DLINK_PATH            = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_ASLDLINK_PATH         = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_ASM_PATH              = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_PP_PATH               = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_VFRPP_PATH            = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_ASLCC_PATH            = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_ASLPP_PATH            = ENV(GCC_ARM_PREFIX)gcc
+*_GCC_ARM_RC_PATH               = ENV(GCC_ARM_PREFIX)objcopy
+
+*_GCC_ARM_ASLCC_FLAGS           = DEF(GCC5_ASLCC_FLAGS)
+*_GCC_ARM_ASLDLINK_FLAGS        = DEF(GCC5_ARM_ASLDLINK_FLAGS)
+*_GCC_ARM_ASM_FLAGS             = DEF(GCC5_ARM_ASM_FLAGS)
+*_GCC_ARM_DLINK2_FLAGS          = DEF(GCC5_ARM_DLINK2_FLAGS)
+*_GCC_ARM_DTCPP_FLAGS           = DEF(GCC_DTCPP_FLAGS)
+*_GCC_ARM_PLATFORM_FLAGS        = -march=armv7-a -mfloat-abi=soft
+*_GCC_ARM_PP_FLAGS              = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC_ARM_RC_FLAGS              = DEF(GCC_ARM_RC_FLAGS)
+*_GCC_ARM_VFRPP_FLAGS           = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC_ARM_CC_XIPFLAGS           = DEF(GCC5_ARM_CC_XIPFLAGS)
+
+  DEBUG_GCC_ARM_CC_FLAGS        = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
+  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
+
+RELEASE_GCC_ARM_CC_FLAGS        = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
+RELEASE_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
+
+  NOOPT_GCC_ARM_CC_FLAGS        = DEF(GCC5_ARM_CC_FLAGS) -O0
+  NOOPT_GCC_ARM_DLINK_FLAGS     = DEF(GCC5_ARM_DLINK_FLAGS) -O0
+
+##################
+# GCC AARCH64 definitions
+##################
+*_GCC_AARCH64_CC_PATH           = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_SLINK_PATH        = ENV(GCC_AARCH64_PREFIX)gcc-ar
+*_GCC_AARCH64_DLINK_PATH        = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_ASLDLINK_PATH     = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_ASM_PATH          = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_PP_PATH           = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_VFRPP_PATH        = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_ASLCC_PATH        = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_ASLPP_PATH        = ENV(GCC_AARCH64_PREFIX)gcc
+*_GCC_AARCH64_RC_PATH           = ENV(GCC_AARCH64_PREFIX)objcopy
+
+*_GCC_AARCH64_ASLCC_FLAGS       = DEF(GCC5_ASLCC_FLAGS)
+*_GCC_AARCH64_ASLDLINK_FLAGS    = DEF(GCC5_AARCH64_ASLDLINK_FLAGS)
+*_GCC_AARCH64_ASM_FLAGS         = DEF(GCC5_AARCH64_ASM_FLAGS)
+*_GCC_AARCH64_DLINK2_FLAGS      = DEF(GCC5_AARCH64_DLINK2_FLAGS)
+*_GCC_AARCH64_DTCPP_FLAGS       = DEF(GCC_DTCPP_FLAGS)
+*_GCC_AARCH64_PLATFORM_FLAGS    =
+*_GCC_AARCH64_PP_FLAGS          = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC_AARCH64_RC_FLAGS          = DEF(GCC_AARCH64_RC_FLAGS) DEF(GCC_AARCH64_RC_BTI_FLAGS)
+*_GCC_AARCH64_VFRPP_FLAGS       = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC_AARCH64_CC_XIPFLAGS       = DEF(GCC5_AARCH64_CC_XIPFLAGS)
+
+  DEBUG_GCC_AARCH64_CC_FLAGS    = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
+  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
+  DEBUG_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
+
+RELEASE_GCC_AARCH64_CC_FLAGS    = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
+RELEASE_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
+RELEASE_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
+
+  NOOPT_GCC_AARCH64_CC_FLAGS    = DEF(GCC5_AARCH64_CC_FLAGS) -O0
+  NOOPT_GCC_AARCH64_DLINK_FLAGS = DEF(GCC5_AARCH64_DLINK_FLAGS) -O0
+  NOOPT_GCC_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 -O0
+
+####################################################################################
+#
+# GCC RISC-V This configuration is used to compile under Linux to produce
+#             PE/COFF binaries using GCC RISC-V tool chain
+#
+####################################################################################
+
+##################
+# GCC RISCV64 definitions
+##################
+*_GCC_RISCV64_OBJCOPY_PATH         = ENV(GCC_RISCV64_PREFIX)objcopy
+*_GCC_RISCV64_CC_PATH              = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_SLINK_PATH           = ENV(GCC_RISCV64_PREFIX)gcc-ar
+*_GCC_RISCV64_DLINK_PATH           = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_ASLDLINK_PATH        = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_ASM_PATH             = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_PP_PATH              = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_VFRPP_PATH           = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_ASLCC_PATH           = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_ASLPP_PATH           = ENV(GCC_RISCV64_PREFIX)gcc
+*_GCC_RISCV64_RC_PATH              = ENV(GCC_RISCV64_PREFIX)objcopy
+
+*_GCC_RISCV64_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS)
+*_GCC_RISCV64_ASLDLINK_FLAGS       = DEF(GCC5_RISCV32_RISCV64_ASLDLINK_FLAGS)
+*_GCC_RISCV64_ASM_FLAGS            = DEF(GCC5_RISCV64_ASM_FLAGS)
+*_GCC_RISCV64_CC_FLAGS             = DEF(GCC5_RISCV64_CC_FLAGS) -save-temps
+*_GCC_RISCV64_DLINK_FLAGS          = DEF(GCC5_RISCV64_DLINK_FLAGS)
+*_GCC_RISCV64_DLINK2_FLAGS         = DEF(GCC5_RISCV64_DLINK2_FLAGS)
+*_GCC_RISCV64_RC_FLAGS             = DEF(GCC_RISCV64_RC_FLAGS)
+*_GCC_RISCV64_OBJCOPY_FLAGS        =
+*_GCC_RISCV64_DTCPP_FLAGS          = DEF(GCC_DTCPP_FLAGS)
+*_GCC_RISCV64_PP_FLAGS             = DEF(GCC_PP_FLAGS) DEF(GCC5_RISCV_OPENSBI_TYPES)
+
+##################
+# GCC LOONGARCH64 definitions
+##################
+*_GCC_LOONGARCH64_OBJCOPY_PATH         = ENV(GCC_LOONGARCH64_PREFIX)objcopy
+*_GCC_LOONGARCH64_CC_PATH              = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_SLINK_PATH           = ENV(GCC_LOONGARCH64_PREFIX)gcc-ar
+*_GCC_LOONGARCH64_DLINK_PATH           = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_ASLDLINK_PATH        = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_ASM_PATH             = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_PP_PATH              = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_VFRPP_PATH           = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_ASLCC_PATH           = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_ASLPP_PATH           = ENV(GCC_LOONGARCH64_PREFIX)gcc
+*_GCC_LOONGARCH64_RC_PATH              = ENV(GCC_LOONGARCH64_PREFIX)objcopy
+
+*_GCC_LOONGARCH64_ASLCC_FLAGS          = DEF(GCC_ASLCC_FLAGS)
+*_GCC_LOONGARCH64_ASLDLINK_FLAGS       = DEF(GCC5_LOONGARCH64_ASLDLINK_FLAGS)
+*_GCC_LOONGARCH64_ASM_FLAGS            = DEF(GCC5_LOONGARCH64_ASM_FLAGS)
+*_GCC_LOONGARCH64_DLINK_FLAGS          = DEF(GCC5_LOONGARCH64_DLINK_FLAGS)
+*_GCC_LOONGARCH64_DLINK2_FLAGS         = DEF(GCC5_LOONGARCH64_DLINK2_FLAGS)
+*_GCC_LOONGARCH64_RC_FLAGS             = DEF(GCC_LOONGARCH64_RC_FLAGS)
+*_GCC_LOONGARCH64_OBJCOPY_FLAGS        =
+*_GCC_LOONGARCH64_NASM_FLAGS           = -f elf32
+*_GCC_LOONGARCH64_PP_FLAGS             = DEF(GCC5_LOONGARCH64_PP_FLAGS)
+
+DEBUG_GCC_LOONGARCH64_CC_FLAGS         = DEF(GCC5_LOONGARCH64_CC_FLAGS)
+RELEASE_GCC_LOONGARCH64_CC_FLAGS       = DEF(GCC5_LOONGARCH64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-variable
+
 ####################################################################################
 #
 # Clang - This configuration is used to compile under Linux to produce
-- 
2.37.2


  parent reply	other threads:[~2023-04-16 17:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-16 17:05 [PATCH v3 00/13] BaseTools,CryptoPkg,EmulatorPkg,MdePkg,others: Delete CLANG35,CLANG38,VS2008-2013,EBC, deprecate GCC48,GCC49,GCC5, add GCC and GCCNOLTO, update CLANGDWARF Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 01/13] BaseTools,CryptoPkg: Update CLANGDWARF, remove CLANG 35/38 toolchains Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 02/13] BaseTools: Remove VS2008, 2010, 2012 and 2013 toolchain definitions Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 03/13] BaseTools: Remove VS2008-VS2013 remnants Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 04/13] MdePkg: " Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 05/13] edksetup.bat: " Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 06/13] BaseTools: Remove unused IPHONE_TOOLS and SOURCERY_CYGWIN_TOOLS defs Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 07/13] BaseTools: Remove EBC (EFI Byte Code) compiler definitions Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 08/13] BaseTools: Update VS toolchain descriptions in tools_def.txt.template Rebecca Cran
2023-04-16 17:05 ` Rebecca Cran [this message]
2023-04-17 11:03   ` [PATCH v3 09/13] BaseTools/Conf/tools_def.template: Add GCC and GCCNOLTO toolchains Gerd Hoffmann
2023-04-17 14:26     ` Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 10/13] BaseTools: Only call LoadConfiguration once in build.py Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 11/13] BaseTools: Add a deprecation warning for GCC48,GCC49,GCC5 to build.py Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 12/13] BaseTools/Conf/tools_def.template: Add section for deprecated toolchains Rebecca Cran
2023-04-16 17:05 ` [PATCH v3 13/13] BaseTools/Conf/tools_def.template: Bump VERSION to 3.00 Rebecca Cran
2023-04-17 11:32 ` [PATCH v3 00/13] BaseTools,CryptoPkg,EmulatorPkg,MdePkg,others: Delete CLANG35,CLANG38,VS2008-2013,EBC, deprecate GCC48,GCC49,GCC5, add GCC and GCCNOLTO, update CLANGDWARF Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230416170532.278338-10-rebecca@bsdio.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox