Add a 'GCC' toolchain that's a copy of the existing GCC5 definition.
Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC49
toolchain.
Update build flags in CryptoPkg, EmulatorPkg, IntelFsp2Pkg and
UnitTestFrameworkPkg to add flags for the new toolchains.
Signed-off-by: Rebecca Cran <rebecca@bsdio.com>
---
UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 4 +
IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 8 +-
CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 +
CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf | 1 +
CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 +
CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 1 +
CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf | 2 +
EmulatorPkg/Unix/Host/Host.inf | 2 +
BaseTools/Conf/tools_def.template | 366 ++++++++++++++++++++
9 files changed, 385 insertions(+), 1 deletion(-)
diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
index 7866c36e6693..9bdbbf3a222c 100644
--- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
+++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc
@@ -31,6 +31,10 @@ [BuildOptions]
!endif
GCC:*_GCC5_*_CC_FLAGS = --coverage
GCC:*_GCC5_*_DLINK_FLAGS = --coverage
+ GCC:*_GCCNOLTO_*_CC_FLAGS = --coverage
+ GCC:*_GCCNOLTO_*_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..34409f8b80d5 100644
--- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
+++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc
@@ -461,10 +461,16 @@ [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/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
index 86a00b1c4b2a..0669f3035b85 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf
@@ -644,6 +644,7 @@ [BuildOptions]
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
# Revisit after switching to 3.0 branch
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable
+ GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable
# suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
# 1295: Deprecated declaration <entity> - give arg types
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf
index 2e4f95909b51..45fd4799d748 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf
@@ -692,6 +692,7 @@ [BuildOptions]
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
# Revisit after switching to 3.0 branch
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable
+ GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable
# suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
# 1295: Deprecated declaration <entity> - give arg types
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
index 637d4769e8ca..44292f589b6c 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf
@@ -594,6 +594,7 @@ [BuildOptions]
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
# Revisit after switching to 3.0 branch
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable
+ GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable
# suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
# 1295: Deprecated declaration <entity> - give arg types
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
index c5f90221fc66..7c07521dcf1e 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf
@@ -699,6 +699,7 @@ [BuildOptions]
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
# Revisit after switching to 3.0 branch
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable
+ GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable
# suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
# 1295: Deprecated declaration <entity> - give arg types
diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
index 076295244a2a..62846e37a456 100644
--- a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
+++ b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf
@@ -747,6 +747,8 @@ [BuildOptions]
GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
# Revisit after switching to 3.0 branch
GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable
+ GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable
+
# suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
# 1295: Deprecated declaration <entity> - give arg types
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 d0fa158552df..f85120244267 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
@@ -1139,6 +1144,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
@@ -1356,6 +1505,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
+
####################################################################################
#
# CLANG35 - This configuration is used to compile under Linux to produce
--
2.39.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#103808): https://edk2.groups.io/g/devel/message/103808
Mute This Topic: https://groups.io/mt/98618987/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang: Could one of you add a Reviewed-by tag for the CryptoPkg changes please? Andrew Fish, Ray Ni: Could one of you add a Reviewed-by tag for the EmulatorPkg changes please? Chasel Chiu, Nate DeSimone, Star Zeng: Could one of you add a Reviewed-by tag for the IntelFsp2Pkg changes please? -- Rebecca Cran On 5/1/23 10:08, Rebecca Cran wrote: > Add a 'GCC' toolchain that's a copy of the existing GCC5 definition. > Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC49 > toolchain.q > > Update build flags in CryptoPkg, EmulatorPkg, IntelFsp2Pkg and > UnitTestFrameworkPkg to add flags for the new toolchains. > > Signed-off-by: Rebecca Cran <rebecca@bsdio.com> > --- > UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 4 + > IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 8 +- > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + > CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf | 1 + > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + > CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 1 + > CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf | 2 + > EmulatorPkg/Unix/Host/Host.inf | 2 + > BaseTools/Conf/tools_def.template | 366 ++++++++++++++++++++ > 9 files changed, 385 insertions(+), 1 deletion(-) > > diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > index 7866c36e6693..9bdbbf3a222c 100644 > --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > @@ -31,6 +31,10 @@ [BuildOptions] > !endif > GCC:*_GCC5_*_CC_FLAGS = --coverage > GCC:*_GCC5_*_DLINK_FLAGS = --coverage > + GCC:*_GCCNOLTO_*_CC_FLAGS = --coverage > + GCC:*_GCCNOLTO_*_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..34409f8b80d5 100644 > --- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc > +++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc > @@ -461,10 +461,16 @@ [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/CryptoPkg/Library/OpensslLib/OpensslLib.inf b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > index 86a00b1c4b2a..0669f3035b85 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > @@ -644,6 +644,7 @@ [BuildOptions] > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > # Revisit after switching to 3.0 branch > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: > # 1295: Deprecated declaration <entity> - give arg types > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > index 2e4f95909b51..45fd4799d748 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > @@ -692,6 +692,7 @@ [BuildOptions] > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > # Revisit after switching to 3.0 branch > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: > # 1295: Deprecated declaration <entity> - give arg types > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > index 637d4769e8ca..44292f589b6c 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > @@ -594,6 +594,7 @@ [BuildOptions] > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > # Revisit after switching to 3.0 branch > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: > # 1295: Deprecated declaration <entity> - give arg types > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > index c5f90221fc66..7c07521dcf1e 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > @@ -699,6 +699,7 @@ [BuildOptions] > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > # Revisit after switching to 3.0 branch > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: > # 1295: Deprecated declaration <entity> - give arg types > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > index 076295244a2a..62846e37a456 100644 > --- a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > @@ -747,6 +747,8 @@ [BuildOptions] > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > # Revisit after switching to 3.0 branch > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > + > > # suppress the following warnings in openssl so we don't break the build with warnings-as-errors: > # 1295: Deprecated declaration <entity> - give arg types > 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 d0fa158552df..f85120244267 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 > @@ -1139,6 +1144,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 > @@ -1356,6 +1505,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 > + > #################################################################################### > # > # CLANG35 - This configuration is used to compile under Linux to produce -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103828): https://edk2.groups.io/g/devel/message/103828 Mute This Topic: https://groups.io/mt/98618987/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Hi Have you evaluated size impact with this new compiler option? Especially crypto library. Bigger? Smaller? Why we add "-flto" for "NOLTO" ? > > + *_GCCNOLTO_IA32_CC_FLAGS = -flto > > + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > -----Original Message----- > From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca > Cran > Sent: Tuesday, May 2, 2023 8:06 AM > To: Yao, Jiewen <jiewen.yao@intel.com>; Wang, Jian J > <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, > Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, > Ray <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, > Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star > <star.zeng@intel.com> > Cc: devel@edk2.groups.io > Subject: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO > toolchains to tools_def.txt and update packages > > Jiewen Yao, Jian J Wang, Xiaoyu Lu, Guomin Jiang: Could one of you add a > Reviewed-by tag for the CryptoPkg changes please? > > > Andrew Fish, Ray Ni: Could one of you add a Reviewed-by tag for the > EmulatorPkg changes please? > > > Chasel Chiu, Nate DeSimone, Star Zeng: Could one of you add a > Reviewed-by tag for the IntelFsp2Pkg changes please? > > > -- > Rebecca Cran > > > On 5/1/23 10:08, Rebecca Cran wrote: > > Add a 'GCC' toolchain that's a copy of the existing GCC5 definition. > > Add a 'GCCNOLTO' toolchain that's a copy of the existing GCC49 > > toolchain.q > > > > Update build flags in CryptoPkg, EmulatorPkg, IntelFsp2Pkg and > > UnitTestFrameworkPkg to add flags for the new toolchains. > > > > Signed-off-by: Rebecca Cran <rebecca@bsdio.com> > > --- > > UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc | 4 + > > IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc | 8 +- > > CryptoPkg/Library/OpensslLib/OpensslLib.inf | 1 + > > CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf | 1 + > > CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf | 1 + > > CryptoPkg/Library/OpensslLib/OpensslLibFull.inf | 1 + > > CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf | 2 + > > EmulatorPkg/Unix/Host/Host.inf | 2 + > > BaseTools/Conf/tools_def.template | 366 > ++++++++++++++++++++ > > 9 files changed, 385 insertions(+), 1 deletion(-) > > > > diff --git a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > > index 7866c36e6693..9bdbbf3a222c 100644 > > --- a/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > > +++ b/UnitTestFrameworkPkg/UnitTestFrameworkPkgHost.dsc.inc > > @@ -31,6 +31,10 @@ [BuildOptions] > > !endif > > GCC:*_GCC5_*_CC_FLAGS = --coverage > > GCC:*_GCC5_*_DLINK_FLAGS = --coverage > > + GCC:*_GCCNOLTO_*_CC_FLAGS = --coverage > > + GCC:*_GCCNOLTO_*_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..34409f8b80d5 100644 > > --- a/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc > > +++ b/IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc > > @@ -461,10 +461,16 @@ [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/CryptoPkg/Library/OpensslLib/OpensslLib.inf > b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > > index 86a00b1c4b2a..0669f3035b85 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLib.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLib.inf > > @@ -644,6 +644,7 @@ [BuildOptions] > > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized - > Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno- > error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > > # Revisit after switching to 3.0 branch > > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > > > # suppress the following warnings in openssl so we don't break the build > with warnings-as-errors: > > # 1295: Deprecated declaration <entity> - give arg types > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > > index 2e4f95909b51..45fd4799d748 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf > > @@ -692,6 +692,7 @@ [BuildOptions] > > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized - > Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno- > error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > > # Revisit after switching to 3.0 branch > > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > > > # suppress the following warnings in openssl so we don't break the build > with warnings-as-errors: > > # 1295: Deprecated declaration <entity> - give arg types > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > index 637d4769e8ca..44292f589b6c 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibCrypto.inf > > @@ -594,6 +594,7 @@ [BuildOptions] > > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized - > Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno- > error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > > # Revisit after switching to 3.0 branch > > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > > > # suppress the following warnings in openssl so we don't break the build > with warnings-as-errors: > > # 1295: Deprecated declaration <entity> - give arg types > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > > index c5f90221fc66..7c07521dcf1e 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFull.inf > > @@ -699,6 +699,7 @@ [BuildOptions] > > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized - > Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno- > error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > > # Revisit after switching to 3.0 branch > > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > > > # suppress the following warnings in openssl so we don't break the build > with warnings-as-errors: > > # 1295: Deprecated declaration <entity> - give arg types > > diff --git a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > > index 076295244a2a..62846e37a456 100644 > > --- a/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > > +++ b/CryptoPkg/Library/OpensslLib/OpensslLibFullAccel.inf > > @@ -747,6 +747,8 @@ [BuildOptions] > > GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized - > Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno- > error=implicit-function-declaration -Wno-error=ignored-pragma-optimize > > # Revisit after switching to 3.0 branch > > GCC:*_GCC5_*_CC_FLAGS = -Wno-unused-but-set-variable > > + GCC:*_GCC_*_CC_FLAGS = -Wno-unused-but-set-variable > > + > > > > # suppress the following warnings in openssl so we don't break the build > with warnings-as-errors: > > # 1295: Deprecated declaration <entity> - give arg types > > 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 d0fa158552df..f85120244267 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 > > @@ -1139,6 +1144,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 > > @@ -1356,6 +1505,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 > > + > > > ############################################################## > ###################### > > # > > # CLANG35 - This configuration is used to compile under Linux to > produce > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103836): https://edk2.groups.io/g/devel/message/103836 Mute This Topic: https://groups.io/mt/98618987/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On 5/2/23 00:35, Yao, Jiewen wrote: > Have you evaluated size impact with this new compiler option? Especially crypto library. > Bigger? Smaller? The increase in size when we disable LTO doesn't seem too bad: With LTO: -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 BaseCryptLibUnitTestShell.debug -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 BaseCryptLibUnitTestShell.efi -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi Without LTO: -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 BaseCryptLibUnitTestShell.debug -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 BaseCryptLibUnitTestShell.efi -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > > Why we add "-flto" for "NOLTO" ? >>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto >>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto I don't know why -flto was added for the GCC49 flags, but when I created the GCCNOLTO flags I copied it because I presume there's a reason this specific test package requires it. -- Rebecca Cran -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#103859): https://edk2.groups.io/g/devel/message/103859 Mute This Topic: https://groups.io/mt/98618987/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Rebecca: I understand this change is to add GCC and GCCNOLTO toolchain. GCC is same to GCC5, GCCNOLTO is same to GCC49. So, new tool chain copies the same changes from origin one. Right? Thanks Liming > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran > 发送时间: 2023年5月2日 22:23 > 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Wang, > Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, > Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray > <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, > Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star > <star.zeng@intel.com> > 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO toolchains > to tools_def.txt and update packages > > On 5/2/23 00:35, Yao, Jiewen wrote: > > Have you evaluated size impact with this new compiler option? Especially > crypto library. > > Bigger? Smaller? > > The increase in size when we disable LTO doesn't seem too bad: > > With LTO: > > -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > BaseCryptLibUnitTestShell.debug > -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 BaseCryptLibUnitTestShell.efi > -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > > Without LTO: > -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 > BaseCryptLibUnitTestShell.debug > -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 BaseCryptLibUnitTestShell.efi > -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > > > > > Why we add "-flto" for "NOLTO" ? > >>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto > >>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > > I don't know why -flto was added for the GCC49 flags, but when I created > the GCCNOLTO flags I copied it because I presume there's a reason this > specific test package requires it. > > > -- > > Rebecca Cran > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104071): https://edk2.groups.io/g/devel/message/104071 Mute This Topic: https://groups.io/mt/98697594/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Thanks Liming. I am not sure below change is expected or not. Please feedback if possible. Thank you! > Why we add "-flto" for "NOLTO" ? >>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto >>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > -----Original Message----- > From: gaoliming <gaoliming@byosoft.com.cn> > Sent: Friday, May 5, 2023 10:00 AM > To: devel@edk2.groups.io; rebecca@bsdio.com; Yao, Jiewen > <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 > <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; 'Andrew > Fish' <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Chiu, Chasel > <chasel.chiu@intel.com>; Desimone, Nathaniel L > <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com> > Subject: 回复: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO > toolchains to tools_def.txt and update packages > > Rebecca: > I understand this change is to add GCC and GCCNOLTO toolchain. GCC is > same to GCC5, GCCNOLTO is same to GCC49. So, new tool chain copies the > same changes from origin one. Right? > > Thanks > Liming > > -----邮件原件----- > > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca > Cran > > 发送时间: 2023年5月2日 22:23 > > 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; > Wang, > > Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, > > Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, > Ray > > <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, > > Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star > > <star.zeng@intel.com> > > 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO > toolchains > > to tools_def.txt and update packages > > > > On 5/2/23 00:35, Yao, Jiewen wrote: > > > Have you evaluated size impact with this new compiler option? Especially > > crypto library. > > > Bigger? Smaller? > > > > The increase in size when we disable LTO doesn't seem too bad: > > > > With LTO: > > > > -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > > -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > > -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > > -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > > -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 > > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > > -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 > > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > > -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 > > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > > -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 > > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > > -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > > BaseCryptLibUnitTestShell.debug > > -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > > -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 > > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > > -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > > -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > > -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 > > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > > -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > > -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > > -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 > > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > > -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 > > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > > -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 > > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > > -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 > > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > > -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 > > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > > -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 > > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > > -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 > > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > > -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 > > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > > -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 > > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > > -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 BaseCryptLibUnitTestShell.efi > > -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 > > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > > -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 > > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > > -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > > -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > > -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > > -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > > > > Without LTO: > > -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > > -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > > -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > > -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > > -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 > > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > > -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 > > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > > -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 > > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > > -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 > > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > > -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 > > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > > -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 > > BaseCryptLibUnitTestShell.debug > > -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 > > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > > -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 > > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > > -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 > > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > > -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 > > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > > -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 > > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > > -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 > > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > > -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 > > CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > > -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 > > CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > > -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 > > CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > > -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 > > CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > > -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 > > CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > > -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 > > CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > > -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 > > CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > > -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 > > CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > > -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 > > CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > > -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 BaseCryptLibUnitTestShell.efi > > -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 > > CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > > -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 > > CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > > -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 > > CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > > -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 > > CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > > -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 > > CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > > -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 > > CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > > > > > > > > Why we add "-flto" for "NOLTO" ? > > >>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto > > >>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > > > > I don't know why -flto was added for the GCC49 flags, but when I created > > the GCCNOLTO flags I copied it because I presume there's a reason this > > specific test package requires it. > > > > > > -- > > > > Rebecca Cran > > > > > > > > > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104072): https://edk2.groups.io/g/devel/message/104072 Mute This Topic: https://groups.io/mt/98697642/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
If you look at the entire block, GCC49 also has -flto, so since GCCNOLTO is a copy of GCC49, that's why it has -flto: # Append build options for EDK and EDKII drivers (= is Append, == is Replace) # 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 Hopefully we can remove the flag in future, but since it's in IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc and not a main .dsc file I'm not sure it's very important. -- Rebecca Cran On 5/4/23 20:02, Yao, Jiewen wrote: > Thanks Liming. > > I am not sure below change is expected or not. Please feedback if possible. Thank you! > >> Why we add "-flto" for "NOLTO" ? >>>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto >>>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > >> -----Original Message----- >> From: gaoliming <gaoliming@byosoft.com.cn> >> Sent: Friday, May 5, 2023 10:00 AM >> To: devel@edk2.groups.io; rebecca@bsdio.com; Yao, Jiewen >> <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 >> <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; 'Andrew >> Fish' <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Chiu, Chasel >> <chasel.chiu@intel.com>; Desimone, Nathaniel L >> <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com> >> Subject: 回复: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO >> toolchains to tools_def.txt and update packages >> >> Rebecca: >> I understand this change is to add GCC and GCCNOLTO toolchain. GCC is >> same to GCC5, GCCNOLTO is same to GCC49. So, new tool chain copies the >> same changes from origin one. Right? >> >> Thanks >> Liming >>> -----邮件原件----- >>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca >> Cran >>> 发送时间: 2023年5月2日 22:23 >>> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; >> Wang, >>> Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, >>> Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, >> Ray >>> <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, >>> Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star >>> <star.zeng@intel.com> >>> 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO >> toolchains >>> to tools_def.txt and update packages >>> >>> On 5/2/23 00:35, Yao, Jiewen wrote: >>>> Have you evaluated size impact with this new compiler option? Especially >>> crypto library. >>>> Bigger? Smaller? >>> The increase in size when we disable LTO doesn't seem too bad: >>> >>> With LTO: >>> >>> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug >>> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug >>> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug >>> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug >>> -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug >>> -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug >>> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug >>> -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug >>> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 >>> BaseCryptLibUnitTestShell.debug >>> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug >>> -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug >>> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug >>> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug >>> -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug >>> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug >>> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug >>> -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi >>> -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi >>> -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi >>> -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi >>> -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi >>> -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi >>> -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi >>> -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi >>> -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi >>> -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 BaseCryptLibUnitTestShell.efi >>> -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi >>> -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi >>> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi >>> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi >>> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi >>> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi >>> >>> Without LTO: >>> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug >>> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug >>> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug >>> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug >>> -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug >>> -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug >>> -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug >>> -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug >>> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug >>> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 >>> BaseCryptLibUnitTestShell.debug >>> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug >>> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug >>> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug >>> -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug >>> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug >>> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug >>> -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi >>> -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi >>> -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi >>> -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi >>> -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi >>> -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi >>> -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi >>> -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi >>> -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi >>> -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 BaseCryptLibUnitTestShell.efi >>> -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi >>> -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi >>> -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi >>> -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi >>> -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi >>> -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi >>> >>>> Why we add "-flto" for "NOLTO" ? >>>>>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto >>>>>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto >>> I don't know why -flto was added for the GCC49 flags, but when I created >>> the GCCNOLTO flags I copied it because I presume there's a reason this >>> specific test package requires it. >>> >>> >>> -- >>> >>> Rebecca Cran >>> >>> >>> >>> >>> >> -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104074): https://edk2.groups.io/g/devel/message/104074 Mute This Topic: https://groups.io/mt/98697642/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Jiewen: As Rebecca describes, IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc GCC49 tool chain adds -flto option to enable link-time optimization. So, new GCCNOLTO also copies this option. QemuFspPkg.dsc is in IntelFsp2Pkg. Fsp2Pkg maintainer may give the answer why adds -flto option for GCC49. Rebecca: This patch makes the changes cross the different packages. So, it may bring the confuse to the different package maintainers. Can these changes be separated for the different packages? Thanks Liming > -----邮件原件----- > 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran > 发送时间: 2023年5月5日 10:12 > 收件人: Yao, Jiewen <jiewen.yao@intel.com>; Gao, Liming > <gaoliming@byosoft.com.cn>; devel@edk2.groups.io; Wang, Jian J > <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, Guomin > <guomin.jiang@intel.com>; 'Andrew Fish' <afish@apple.com>; Ni, Ray > <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, > Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star > <star.zeng@intel.com> > 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO toolchains > to tools_def.txt and update packages > > If you look at the entire block, GCC49 also has -flto, so since GCCNOLTO > is a copy of GCC49, that's why it has -flto: > > > # Append build options for EDK and EDKII drivers (= is Append, == is > Replace) > # 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 > > Hopefully we can remove the flag in future, but since it's in > IntelFsp2Pkg/Tools/Tests/QemuFspPkg.dsc and not a main .dsc file I'm not > sure it's very important. > > > -- > > Rebecca Cran > > > On 5/4/23 20:02, Yao, Jiewen wrote: > > Thanks Liming. > > > > I am not sure below change is expected or not. Please feedback if possible. > Thank you! > > > >> Why we add "-flto" for "NOLTO" ? > >>>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto > >>>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > > > >> -----Original Message----- > >> From: gaoliming <gaoliming@byosoft.com.cn> > >> Sent: Friday, May 5, 2023 10:00 AM > >> To: devel@edk2.groups.io; rebecca@bsdio.com; Yao, Jiewen > >> <jiewen.yao@intel.com>; Wang, Jian J <jian.j.wang@intel.com>; Lu, > Xiaoyu1 > >> <xiaoyu1.lu@intel.com>; Jiang, Guomin <guomin.jiang@intel.com>; > 'Andrew > >> Fish' <afish@apple.com>; Ni, Ray <ray.ni@intel.com>; Chiu, Chasel > >> <chasel.chiu@intel.com>; Desimone, Nathaniel L > >> <nathaniel.l.desimone@intel.com>; Zeng, Star <star.zeng@intel.com> > >> Subject: 回复: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO > >> toolchains to tools_def.txt and update packages > >> > >> Rebecca: > >> I understand this change is to add GCC and GCCNOLTO toolchain. GCC > is > >> same to GCC5, GCCNOLTO is same to GCC49. So, new tool chain copies the > >> same changes from origin one. Right? > >> > >> Thanks > >> Liming > >>> -----邮件原件----- > >>> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca > >> Cran > >>> 发送时间: 2023年5月2日 22:23 > >>> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; > >> Wang, > >>> Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; > Jiang, > >>> Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, > >> Ray > >>> <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, > >>> Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star > >>> <star.zeng@intel.com> > >>> 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO > >> toolchains > >>> to tools_def.txt and update packages > >>> > >>> On 5/2/23 00:35, Yao, Jiewen wrote: > >>>> Have you evaluated size impact with this new compiler option? > Especially > >>> crypto library. > >>>> Bigger? Smaller? > >>> The increase in size when we disable LTO doesn't seem too bad: > >>> > >>> With LTO: > >>> > >>> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > >>> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 > >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > >>> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > >>> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 > >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > >>> -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 > >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > >>> -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 > >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > >>> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 > >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > >>> -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 > >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > >>> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > >>> BaseCryptLibUnitTestShell.debug > >>> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 > >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > >>> -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 > >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > >>> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > >>> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 > >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > >>> -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 > >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > >>> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > >>> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 > >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > >>> -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 > >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > >>> -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 > >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > >>> -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 > >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > >>> -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 > >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > >>> -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 > >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > >>> -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 > >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > >>> -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 > >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > >>> -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 > >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > >>> -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 > >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > >>> -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 > BaseCryptLibUnitTestShell.efi > >>> -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 > >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > >>> -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 > >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > >>> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > >>> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 > >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > >>> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > >>> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 > >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > >>> > >>> Without LTO: > >>> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug > >>> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 > >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug > >>> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug > >>> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 > >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug > >>> -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 > >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug > >>> -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 > >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug > >>> -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 > >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug > >>> -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 > >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug > >>> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 > >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug > >>> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 > >>> BaseCryptLibUnitTestShell.debug > >>> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 > >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug > >>> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 > >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug > >>> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 > >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug > >>> -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 > >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug > >>> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 > >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug > >>> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 > >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug > >>> -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 > >>> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi > >>> -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 > >>> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi > >>> -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 > >>> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi > >>> -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 > >>> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi > >>> -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 > >>> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi > >>> -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 > >>> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi > >>> -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 > >>> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi > >>> -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 > >>> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi > >>> -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 > >>> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi > >>> -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 > BaseCryptLibUnitTestShell.efi > >>> -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 > >>> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi > >>> -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 > >>> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi > >>> -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 > >>> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi > >>> -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 > >>> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi > >>> -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 > >>> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi > >>> -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 > >>> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi > >>> > >>>> Why we add "-flto" for "NOLTO" ? > >>>>>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto > >>>>>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto > >>> I don't know why -flto was added for the GCC49 flags, but when I created > >>> the GCCNOLTO flags I copied it because I presume there's a reason this > >>> specific test package requires it. > >>> > >>> > >>> -- > >>> > >>> Rebecca Cran > >>> > >>> > >>> > >>> > >>> > >> > > > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104105): https://edk2.groups.io/g/devel/message/104105 Mute This Topic: https://groups.io/mt/98701058/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
On Fri, May 5, 2023, at 1:41 AM, gaoliming via groups.io wrote: > Rebecca: > This patch makes the changes cross the different packages. So, it may > bring the confuse to the different package maintainers. Can these > changes be separated for the different packages? > Yes, I can send the changes that haven’t had reviews yet as new separate patches. And to avoid further delay and reduce confusion, I can merge the patches which have already been reviewed. Rebecca -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104108): https://edk2.groups.io/g/devel/message/104108 Mute This Topic: https://groups.io/mt/98701984/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Yes, that's correct. On 5/4/23 20:00, gaoliming wrote: > Rebecca: > I understand this change is to add GCC and GCCNOLTO toolchain. GCC is same to GCC5, GCCNOLTO is same to GCC49. So, new tool chain copies the same changes from origin one. Right? > > Thanks > Liming >> -----邮件原件----- >> 发件人: devel@edk2.groups.io <devel@edk2.groups.io> 代表 Rebecca Cran >> 发送时间: 2023年5月2日 22:23 >> 收件人: Yao, Jiewen <jiewen.yao@intel.com>; devel@edk2.groups.io; Wang, >> Jian J <jian.j.wang@intel.com>; Lu, Xiaoyu1 <xiaoyu1.lu@intel.com>; Jiang, >> Guomin <guomin.jiang@intel.com>; Andrew Fish <afish@apple.com>; Ni, Ray >> <ray.ni@intel.com>; Chiu, Chasel <chasel.chiu@intel.com>; Desimone, >> Nathaniel L <nathaniel.l.desimone@intel.com>; Zeng, Star >> <star.zeng@intel.com> >> 主题: Re: [edk2-devel] [PATCH v6 08/16] Add GCC and GCCNOLTO toolchains >> to tools_def.txt and update packages >> >> On 5/2/23 00:35, Yao, Jiewen wrote: >>> Have you evaluated size impact with this new compiler option? Especially >> crypto library. >>> Bigger? Smaller? >> The increase in size when we disable LTO doesn't seem too bad: >> >> With LTO: >> >> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 >> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug >> -rwxrwxr-x 1 bcran bcran 13M May 2 08:11 >> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug >> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 >> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug >> -rwxrwxr-x 1 bcran bcran 11M May 2 08:11 >> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug >> -rwxrwxr-x 1 bcran bcran 8.5M May 2 08:11 >> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug >> -rwxrwxr-x 1 bcran bcran 8.3M May 2 08:11 >> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug >> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:11 >> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug >> -rwxrwxr-x 1 bcran bcran 7.8M May 2 08:11 >> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug >> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 >> BaseCryptLibUnitTestShell.debug >> -rwxrwxr-x 1 bcran bcran 7.0M May 2 08:11 >> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug >> -rwxrwxr-x 1 bcran bcran 6.9M May 2 08:11 >> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug >> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 >> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug >> -rwxrwxr-x 1 bcran bcran 6.7M May 2 08:11 >> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug >> -rwxrwxr-x 1 bcran bcran 6.5M May 2 08:11 >> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug >> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 >> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug >> -rwxrwxr-x 1 bcran bcran 6.2M May 2 08:11 >> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug >> -rw-rw-r-- 1 bcran bcran 1005K May 2 08:11 >> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi >> -rw-rw-r-- 1 bcran bcran 903K May 2 08:11 >> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi >> -rw-rw-r-- 1 bcran bcran 811K May 2 08:11 >> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi >> -rw-rw-r-- 1 bcran bcran 755K May 2 08:11 >> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi >> -rw-rw-r-- 1 bcran bcran 724K May 2 08:11 >> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi >> -rw-rw-r-- 1 bcran bcran 710K May 2 08:11 >> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi >> -rw-rw-r-- 1 bcran bcran 654K May 2 08:11 >> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi >> -rw-rw-r-- 1 bcran bcran 623K May 2 08:11 >> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi >> -rw-rw-r-- 1 bcran bcran 585K May 2 08:11 >> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi >> -rw-rw-r-- 1 bcran bcran 560K May 2 08:11 BaseCryptLibUnitTestShell.efi >> -rw-rw-r-- 1 bcran bcran 555K May 2 08:11 >> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi >> -rw-rw-r-- 1 bcran bcran 500K May 2 08:11 >> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi >> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 >> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi >> -rw-rw-r-- 1 bcran bcran 485K May 2 08:11 >> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi >> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 >> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi >> -rw-rw-r-- 1 bcran bcran 454K May 2 08:11 >> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi >> >> Without LTO: >> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 >> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.debug >> -rwxrwxr-x 1 bcran bcran 14M May 2 08:13 >> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.debug >> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 >> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.debug >> -rwxrwxr-x 1 bcran bcran 12M May 2 08:13 >> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.debug >> -rwxrwxr-x 1 bcran bcran 9.5M May 2 08:13 >> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.debug >> -rwxrwxr-x 1 bcran bcran 9.2M May 2 08:13 >> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.debug >> -rwxrwxr-x 1 bcran bcran 8.9M May 2 08:13 >> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.debug >> -rwxrwxr-x 1 bcran bcran 8.7M May 2 08:13 >> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.debug >> -rwxrwxr-x 1 bcran bcran 8.0M May 2 08:13 >> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.debug >> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:13 >> BaseCryptLibUnitTestShell.debug >> -rwxrwxr-x 1 bcran bcran 7.9M May 2 08:12 >> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.debug >> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:12 >> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.debug >> -rwxrwxr-x 1 bcran bcran 7.7M May 2 08:13 >> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.debug >> -rwxrwxr-x 1 bcran bcran 7.4M May 2 08:13 >> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.debug >> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:12 >> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.debug >> -rwxrwxr-x 1 bcran bcran 7.2M May 2 08:13 >> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.debug >> -rw-rw-r-- 1 bcran bcran 1.1M May 2 08:13 >> CryptoDxe_41A491D1-A972-468B-A299-DABF415A43B7.efi >> -rw-rw-r-- 1 bcran bcran 1011K May 2 08:13 >> CryptoDxe_AA83B296-F6EA-447F-B013-E80E98629CF8.efi >> -rw-rw-r-- 1 bcran bcran 914K May 2 08:13 >> CryptoDxe_9FBDAD27-910C-4229-9EFF-A93BB5FE18C6.efi >> -rw-rw-r-- 1 bcran bcran 823K May 2 08:13 >> CryptoSmm_C1760694-AB3A-4532-8C6D-52D8F86EB1AA.efi >> -rw-rw-r-- 1 bcran bcran 813K May 2 08:13 >> CryptoDxe_ADD6D05A-52A2-437B-98E7-DBFDA89352CD.efi >> -rw-rw-r-- 1 bcran bcran 789K May 2 08:13 >> CryptoPei_A10827AD-7598-4955-B661-52EE2B62B057.efi >> -rw-rw-r-- 1 bcran bcran 722K May 2 08:13 >> CryptoSmm_1930CE7E-6598-48ED-8AB1-EBE7E85EC254.efi >> -rw-rw-r-- 1 bcran bcran 687K May 2 08:13 >> CryptoPei_D51FCE59-6860-49C0-9B35-984470735D17.efi >> -rw-rw-r-- 1 bcran bcran 644K May 2 08:13 >> CryptoSmm_828959D3-CEA6-4B79-B1FC-5AFA0D7F2144.efi >> -rw-rw-r-- 1 bcran bcran 632K May 2 08:13 BaseCryptLibUnitTestShell.efi >> -rw-rw-r-- 1 bcran bcran 610K May 2 08:13 >> CryptoPei_DCC9CB49-7BE2-47C6-864E-6DCC932360F9.efi >> -rw-rw-r-- 1 bcran bcran 567K May 2 08:12 >> CryptoDxe_31C17C54-325D-47D5-8622-888098F10E44.efi >> -rw-rw-r-- 1 bcran bcran 543K May 2 08:12 >> CryptoSmm_1A1C9E13-5722-4636-AB73-31328EDE8BAF.efi >> -rw-rw-r-- 1 bcran bcran 543K May 2 08:13 >> CryptoSmm_E4D7D1E3-E886-4412-A442-EFD6F2502DD3.efi >> -rw-rw-r-- 1 bcran bcran 508K May 2 08:12 >> CryptoPei_C693A250-6B36-49B9-B7F3-7283F8136A72.efi >> -rw-rw-r-- 1 bcran bcran 508K May 2 08:13 >> CryptoPei_EBD49F5C-6D8B-40D1-A56D-9AFA485A8661.efi >> >>> Why we add "-flto" for "NOLTO" ? >>>>> + *_GCCNOLTO_IA32_CC_FLAGS = -flto >>>>> + *_GCCNOLTO_IA32_DLINK_FLAGS = -flto >> I don't know why -flto was added for the GCC49 flags, but when I created >> the GCCNOLTO flags I copied it because I presume there's a reason this >> specific test package requires it. >> >> >> -- >> >> Rebecca Cran >> >> >> >> >> > > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#104073): https://edk2.groups.io/g/devel/message/104073 Mute This Topic: https://groups.io/mt/98697594/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2026 Red Hat, Inc.