On 2/25/21 2:56 PM, Chang, Abner (HPS SW/FW Technologist) wrote:
We unify build options to GCC:*_*_*_CC_FLAGS, but some options were added or
removed to the specific arch
e.g. for GCC:*_*_IA32_CC_FLAGS, -ffreestanding, -nostdinc, -nostdlib are added
additionally because of GCC:*_*_*_CC_FLAGS?
As far as I can see GCC:*_*_IA32_CC_FLAGS had -ffreestanding, -nostdinc,
-nostdlib even before. See below. Hence, no change with this patch.
For GCC:*_*_AARCH64_CC_FLAGS, some options were removed.
Yes, -Wno-error=unused-function -Wno-error=unused-but-set-variable were removed
for some platforms.
But since all of the platforms already had -Wno-error (ignoring all errors),
the build process shouldn't be affected.
Are those option changes affect the original build process? Are this the
necessary changes?
None of this is necessary but Leif requested me to clean up the flags in the
last series of these patches.
I don't see any changes to the build process for other platforms.
Everything should be the same if I didn't make a mistake.
Abner
-----Original Message-----
From: Schaefer, Daniel
Sent: Tuesday, February 9, 2021 11:44 PM
To: devel@edk2.groups.io
Cc: G Edhaya Chandran <edhaya.chand...@arm.com>; Barton Gao
<gao...@byosoft.com.cn>; Samer El-Haj-Mahmoud <Samer.El-Haj-
mahm...@arm.com>; Eric Jin <eric....@intel.com>; Arvin Chen
<arvinx.c...@intel.com>; Leif Lindholm <l...@nuviainc.com>; Heinrich
Schuchardt <xypron.g...@gmx.de>; Chang, Abner (HPS SW/FW Technologist)
<abner.ch...@hpe.com>
Subject: [edk2-test PATCHv2 4/5] SctPkg: Unify CC_FLAGS for all GCC
platforms
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3042
Cc: G Edhaya Chandran <edhaya.chand...@arm.com>
Cc: Barton Gao <gao...@byosoft.com.cn>
Cc: Samer El-Haj-Mahmoud <samer.el-haj-mahm...@arm.com>
Cc: Eric Jin <eric....@intel.com>
Cc: Arvin Chen <arvinx.c...@intel.com>
Cc: Leif Lindholm <l...@nuviainc.com>
Cc: Heinrich Schuchardt <xypron.g...@gmx.de>
Cc: Abner Chang <abner.ch...@hpe.com>
Signed-off-by: Daniel Schaefer <daniel.schae...@hpe.com>
---
uefi-sct/SctPkg/UEFI/IHV_SCT.dsc | 15 ++++++++------- uefi-
sct/SctPkg/UEFI/UEFI_SCT.dsc | 15 ++++++++-------
2 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc b/uefi-
sct/SctPkg/UEFI/IHV_SCT.dsc
index 94bb5c36..91116ca7 100644
--- a/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/IHV_SCT.dsc
@@ -69,15 +69,16 @@
MSFT:*_*_X64_APP_FLAGS = /D EFIX64
MSFT:*_*_X64_PP_FLAGS = /D EFIX64
-# GCC:*_*_IA32_CC_FLAGS = -D EFI32 $(GCC_VER_MACRO) -
ffreestanding -nostdinc -nostdlib -Wno-error -mno-red-zone -Wno-address -
mno-stack-arg-probe "-DEFIAPI=__attribute__((ms_abi))" -m32 -mabi=ms -
-ffreestanding, -nostdinc, -nostdlib already present.
However it's commented out before and after, so either way it doesn't make a
difference.
D MDE_CPU_X32
- GCC:*_*_IA32_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -Wno-error
+ GCC:*_*_*_CC_FLAGS = -ffreestanding -nostdinc -nostdlib -Wno-
error+# GCC:*_*_IA32_CC_FLAGS = -D EFI32 $(GCC_VER_MACRO) -mno-
red-zone -Wno-address -mno-stack-arg-probe "-
DEFIAPI=__attribute__((ms_abi))" -m32 -mabi=ms -D MDE_CPU_X32+
GCC:*_*_IA32_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) #
GCC:*_*_IA32_VFRPP_FLAGS = -D EFI32 $(GCC_VER_MACRO) #
GCC:*_*_IA32_APP_FLAGS = -D EFI32 $(GCC_VER_MACRO) #
GCC:*_*_IA32_PP_FLAGS = -D EFI32 $(GCC_VER_MACRO) -#
GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -ffreestanding
-nostdinc -nostdlib -Wno-error -mno-red-zone -Wno-address -mno-stack-
arg-probe "-DEFIAPI=__attribute__((ms_abi))" -m64 -mcmodel=large -
mabi=ms -D MDE_CPU_X64
+# GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -mno-red-
zone -Wno-address -mno-stack-arg-probe "-
DEFIAPI=__attribute__((ms_abi))" -m64 -mcmodel=large -mabi=ms -D
MDE_CPU_X64 - GCC:*_*_X64_CC_FLAGS = -D EFIX64
$(GCC_VER_MACRO) -Wno-error + GCC:*_*_X64_CC_FLAGS = -D EFIX64
$(GCC_VER_MACRO) # GCC:*_*_X64_VFRPP_FLAGS = -D EFIX64
$(GCC_VER_MACRO) # GCC:*_*_X64_APP_FLAGS = -D EFIX64
$(GCC_VER_MACRO) # GCC:*_*_X64_PP_FLAGS = -D EFIX64
$(GCC_VER_MACRO)@@ -85,7 +86,7 @@
#TODO: OM - fixme RVCT:*_*_ARM_CC_FLAGS = -D EFIARM
$(GCC_VER_MACRO) *_*_ARM_CC_FLAGS = -D EFIARM-
GCC:*_*_ARM_CC_FLAGS = -D EFIARM $(GCC_VER_MACRO) -fno-stack-
protector -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -
Wno-error=unused-but-set-variable -Wno-error=implicit-function-
declaration -Wno-error+ GCC:*_*_ARM_CC_FLAGS = -D EFIARM
$(GCC_VER_MACRO) -fno-stack-protector *_*_ARM_VFRPP_FLAGS = -D
EFIARM $(GCC_VER_MACRO) *_*_ARM_APP_FLAGS = -D EFIARM
$(GCC_VER_MACRO) *_*_ARM_PP_FLAGS = -D EFIARM
$(GCC_VER_MACRO)@@ -104,14 +105,14 @@
RVCT:*_*_ARM_CC_FLAGS = --diag_remark=167 --
diag_suppress=167,1295,188,550,1,68,111,177 *_*_AARCH64_CC_FLAGS
= -D EFIAARCH64 $(GCC_VER_MACRO)- GCC:*_*_AARCH64_CC_FLAGS = -
D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -
Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-
error+ GCC:*_*_AARCH64_CC_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_VFRPP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_APP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_PP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
*_*_RISCV64_CC_FLAGS = -D EFIRISCV64 $(GCC_VER_MACRO)-
GCC:*_*_RISCV64_CC_FLAGS = -D EFIRISCV64 $(GCC_VER_MACRO) -
ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-
error=unused-but-set-variable -Wno-error+ GCC:*_*_RISCV64_CC_FLAGS
= -D EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_VFRPP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_APP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_PP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO)diff --git a/uefi-
sct/SctPkg/UEFI/UEFI_SCT.dsc b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
index e13e40e4..3bb57d26 100644
--- a/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
+++ b/uefi-sct/SctPkg/UEFI/UEFI_SCT.dsc
@@ -72,14 +72,15 @@
MSFT:*_*_X64_APP_FLAGS = /D EFIX64
MSFT:*_*_X64_PP_FLAGS = /D EFIX64
-# GCC:*_*_IA32_CC_FLAGS = -D EFI32 $(GCC_VER_MACRO) -
ffreestanding -nostdinc -nostdlib -Wno-error -mno-red-zone -Wno-address -
mno-stack-arg-probe "-DEFIAPI=__attribute__((ms_abi))" -m32 -mabi=ms -
D MDE_CPU_X32
- GCC:*_*_IA32_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -Wno-error
+ GCC:*_*_*_CC_FLAGS = -ffreestanding -nostdinc -nostdlib -Wno-
error+# GCC:*_*_IA32_CC_FLAGS = -D EFI32 $(GCC_VER_MACRO) -mno-
red-zone -Wno-address -mno-stack-arg-probe "-
DEFIAPI=__attribute__((ms_abi))" -m32 -mabi=ms -D MDE_CPU_X32
+ GCC:*_*_IA32_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) #
GCC:*_*_IA32_VFRPP_FLAGS = -D EFI32 $(GCC_VER_MACRO) #
GCC:*_*_IA32_APP_FLAGS = -D EFI32 $(GCC_VER_MACRO) #
GCC:*_*_IA32_PP_FLAGS = -D EFI32 $(GCC_VER_MACRO) -#
GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -ffreestanding
-nostdinc -nostdlib -Wno-error -mno-red-zone -Wno-address -mno-stack-
arg-probe "-DEFIAPI=__attribute__((ms_abi))" -m64 -mcmodel=large -
mabi=ms -D MDE_CPU_X64
- GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -Wno-error
+# GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) -mno-red-
zone -Wno-address -mno-stack-arg-probe "-
DEFIAPI=__attribute__((ms_abi))" -m64 -mcmodel=large -mabi=ms -D
MDE_CPU_X64
+ GCC:*_*_X64_CC_FLAGS = -D EFIX64 $(GCC_VER_MACRO) #
GCC:*_*_X64_VFRPP_FLAGS = -D EFIX64 $(GCC_VER_MACRO) #
GCC:*_*_X64_APP_FLAGS = -D EFIX64 $(GCC_VER_MACRO) #
GCC:*_*_X64_PP_FLAGS = -D EFIX64 $(GCC_VER_MACRO)@@ -87,7 +88,7
@@
#TODO: OM - fixme RVCT:*_*_ARM_CC_FLAGS = -D EFIARM
$(GCC_VER_MACRO) *_*_ARM_CC_FLAGS = -D EFIARM-
GCC:*_*_ARM_CC_FLAGS = -D EFIARM $(GCC_VER_MACRO) -fno-stack-
protector -ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -
Wno-error=unused-but-set-variable -Wno-error=implicit-function-
declaration -Wno-error+ GCC:*_*_ARM_CC_FLAGS = -D EFIARM
$(GCC_VER_MACRO) -fno-stack-protector *_*_ARM_VFRPP_FLAGS = -D
EFIARM $(GCC_VER_MACRO) *_*_ARM_APP_FLAGS = -D EFIARM
$(GCC_VER_MACRO) *_*_ARM_PP_FLAGS = -D EFIARM
$(GCC_VER_MACRO)@@ -106,14 +107,14 @@
RVCT:*_*_ARM_CC_FLAGS = --diag_remark=167 --
diag_suppress=167,1295,188,550,1,68,111,177 *_*_AARCH64_CC_FLAGS
= -D EFIAARCH64 $(GCC_VER_MACRO)- GCC:*_*_AARCH64_CC_FLAGS = -
D EFIAARCH64 $(GCC_VER_MACRO) -ffreestanding -nostdinc -nostdlib -
Wno-error=unused-function -Wno-error=unused-but-set-variable -Wno-
error+ GCC:*_*_AARCH64_CC_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_VFRPP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_APP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) *_*_AARCH64_PP_FLAGS = -D EFIAARCH64
$(GCC_VER_MACRO) RVCT:*_*_AARCH64_DLINK_FLAGS = --muldefweak
*_*_RISCV64_CC_FLAGS = -D EFIRISCV64 $(GCC_VER_MACRO)-
GCC:*_*_RISCV64_CC_FLAGS = -D EFIRISCV64 $(GCC_VER_MACRO) -
ffreestanding -nostdinc -nostdlib -Wno-error=unused-function -Wno-
error=unused-but-set-variable -Wno-error+ GCC:*_*_RISCV64_CC_FLAGS
= -D EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_VFRPP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_APP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO) *_*_RISCV64_PP_FLAGS = -D
EFIRISCV64 $(GCC_VER_MACRO)--
2.30.0
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#72417): https://edk2.groups.io/g/devel/message/72417
Mute This Topic: https://groups.io/mt/80507445/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-