* [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
2023-01-05 16:04 [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
@ 2023-01-05 16:05 ` Ard Biesheuvel
2023-01-05 16:09 ` Chang, Abner
2023-01-05 16:05 ` [PATCH 2/4] BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags Ard Biesheuvel
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-05 16:05 UTC (permalink / raw)
To: devel
Cc: quic_llindhol, rebecca, bob.c.feng, gaoliming, Ard Biesheuvel,
Abner Chang
The global GCC_PP_FLAGS tools_def variable now contains a reference to
OpenSBI specific C preprocessor variables, which means they are added to
the command line on every architecture, not just RISC-V.
This does not currently result in any issues, but it is a bit sloppy so
let's clean this up. Given that the GCC_PP_FLAGS definition appears
twice, drop the one that carries the OpenSBI reference, and move that
reference to a new RISC-V specific variable.
Cc: Abner Chang <abner.chang@amd.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
BaseTools/Conf/tools_def.template | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 805e903b23bb..4733040e3ef1 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1979,8 +1979,6 @@ DEFINE GCC5_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_ASLDLINK_FLAGS)
DEFINE GCC5_LOONGARCH64_ASM_FLAGS = -x assembler-with-cpp -mabi=lp64d -march=loongarch64 -fno-builtin -c -Wall -mno-explicit-relocs
DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF(GCC_PP_FLAGS)
-DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include AutoGen.h DEF(GCC5_RISCV_OPENSBI_TYPES)
-
####################################################################################
#
# GCC 4.8 - This configuration is used to compile under Linux to produce
@@ -2456,6 +2454,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_GCC5_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
*_GCC5_RISCV64_OBJCOPY_FLAGS =
*_GCC5_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
+*_GCC5_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(GCC5_RISCV_OPENSBI_TYPES)
##################
# GCC5 LOONGARCH64 definitions
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
2023-01-05 16:05 ` [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only Ard Biesheuvel
@ 2023-01-05 16:09 ` Chang, Abner
2023-01-09 5:22 ` Sunil V L
0 siblings, 1 reply; 9+ messages in thread
From: Chang, Abner @ 2023-01-05 16:09 UTC (permalink / raw)
To: Ard Biesheuvel, devel@edk2.groups.io
Cc: quic_llindhol@quicinc.com, rebecca@quicinc.com,
bob.c.feng@intel.com, gaoliming@byosoft.com.cn, Sunil V L
[AMD Official Use Only - General]
Acked-by: Abner Chang <abner.chang@amd.com>
Add Sunil to review this.
> -----Original Message-----
> From: Ard Biesheuvel <ardb@kernel.org>
> Sent: Friday, January 6, 2023 12:05 AM
> To: devel@edk2.groups.io
> Cc: quic_llindhol@quicinc.com; rebecca@quicinc.com; bob.c.feng@intel.com;
> gaoliming@byosoft.com.cn; Ard Biesheuvel <ardb@kernel.org>; Chang,
> Abner <Abner.Chang@amd.com>
> Subject: [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references
> RISCV-only
>
> Caution: This message originated from an External Source. Use proper
> caution when opening attachments, clicking links, or responding.
>
>
> The global GCC_PP_FLAGS tools_def variable now contains a reference to
> OpenSBI specific C preprocessor variables, which means they are added to
> the command line on every architecture, not just RISC-V.
>
> This does not currently result in any issues, but it is a bit sloppy so let's clean
> this up. Given that the GCC_PP_FLAGS definition appears twice, drop the
> one that carries the OpenSBI reference, and move that reference to a new
> RISC-V specific variable.
>
> Cc: Abner Chang <abner.chang@amd.com>
> Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> ---
> BaseTools/Conf/tools_def.template | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index 805e903b23bb..4733040e3ef1 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1979,8 +1979,6 @@ DEFINE GCC5_LOONGARCH64_ASLDLINK_FLAGS
> = DEF(GCC_LOONGARCH64_ASLDLINK_FLAGS)
> DEFINE GCC5_LOONGARCH64_ASM_FLAGS = -x assembler-with-cpp -
> mabi=lp64d -march=loongarch64 -fno-builtin -c -Wall -mno-explicit-relocs
>
> DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -
> march=loongarch64 DEF(GCC_PP_FLAGS)
>
>
>
> -DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include
> AutoGen.h DEF(GCC5_RISCV_OPENSBI_TYPES)
>
> -
>
>
> ##########################################################
> ##########################
>
> #
>
> # GCC 4.8 - This configuration is used to compile under Linux to produce
>
> @@ -2456,6 +2454,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z
> common-page-size=0x20
> *_GCC5_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
>
> *_GCC5_RISCV64_OBJCOPY_FLAGS =
>
> *_GCC5_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
>
> +*_GCC5_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS)
> DEF(GCC5_RISCV_OPENSBI_TYPES)
>
>
>
> ##################
>
> # GCC5 LOONGARCH64 definitions
>
> --
> 2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
2023-01-05 16:09 ` Chang, Abner
@ 2023-01-09 5:22 ` Sunil V L
0 siblings, 0 replies; 9+ messages in thread
From: Sunil V L @ 2023-01-09 5:22 UTC (permalink / raw)
To: Chang, Abner
Cc: Ard Biesheuvel, devel@edk2.groups.io, quic_llindhol@quicinc.com,
rebecca@quicinc.com, bob.c.feng@intel.com,
gaoliming@byosoft.com.cn
Hi Ard,
Thank you very much for finding this issue and fixing it.
Reviewed-by: Sunil V L <sunilvl@ventanamicro.com>
On Thu, Jan 05, 2023 at 04:09:46PM +0000, Chang, Abner wrote:
> [AMD Official Use Only - General]
>
> Acked-by: Abner Chang <abner.chang@amd.com>
>
> Add Sunil to review this.
>
> > -----Original Message-----
> > From: Ard Biesheuvel <ardb@kernel.org>
> > Sent: Friday, January 6, 2023 12:05 AM
> > To: devel@edk2.groups.io
> > Cc: quic_llindhol@quicinc.com; rebecca@quicinc.com; bob.c.feng@intel.com;
> > gaoliming@byosoft.com.cn; Ard Biesheuvel <ardb@kernel.org>; Chang,
> > Abner <Abner.Chang@amd.com>
> > Subject: [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references
> > RISCV-only
> >
> > Caution: This message originated from an External Source. Use proper
> > caution when opening attachments, clicking links, or responding.
> >
> >
> > The global GCC_PP_FLAGS tools_def variable now contains a reference to
> > OpenSBI specific C preprocessor variables, which means they are added to
> > the command line on every architecture, not just RISC-V.
> >
> > This does not currently result in any issues, but it is a bit sloppy so let's clean
> > this up. Given that the GCC_PP_FLAGS definition appears twice, drop the
> > one that carries the OpenSBI reference, and move that reference to a new
> > RISC-V specific variable.
> >
> > Cc: Abner Chang <abner.chang@amd.com>
> > Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
> > ---
> > BaseTools/Conf/tools_def.template | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/BaseTools/Conf/tools_def.template
> > b/BaseTools/Conf/tools_def.template
> > index 805e903b23bb..4733040e3ef1 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -1979,8 +1979,6 @@ DEFINE GCC5_LOONGARCH64_ASLDLINK_FLAGS
> > = DEF(GCC_LOONGARCH64_ASLDLINK_FLAGS)
> > DEFINE GCC5_LOONGARCH64_ASM_FLAGS = -x assembler-with-cpp -
> > mabi=lp64d -march=loongarch64 -fno-builtin -c -Wall -mno-explicit-relocs
> >
> > DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -
> > march=loongarch64 DEF(GCC_PP_FLAGS)
> >
> >
> >
> > -DEFINE GCC_PP_FLAGS = -E -x assembler-with-cpp -include
> > AutoGen.h DEF(GCC5_RISCV_OPENSBI_TYPES)
> >
> > -
> >
> >
> > ##########################################################
> > ##########################
> >
> > #
> >
> > # GCC 4.8 - This configuration is used to compile under Linux to produce
> >
> > @@ -2456,6 +2454,7 @@ RELEASE_GCC5_AARCH64_DLINK_XIPFLAGS = -z
> > common-page-size=0x20
> > *_GCC5_RISCV64_RC_FLAGS = DEF(GCC_RISCV64_RC_FLAGS)
> >
> > *_GCC5_RISCV64_OBJCOPY_FLAGS =
> >
> > *_GCC5_RISCV64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
> >
> > +*_GCC5_RISCV64_PP_FLAGS = DEF(GCC_PP_FLAGS)
> > DEF(GCC5_RISCV_OPENSBI_TYPES)
> >
> >
> >
> > ##################
> >
> > # GCC5 LOONGARCH64 definitions
> >
> > --
> > 2.39.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 2/4] BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags
2023-01-05 16:04 [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
2023-01-05 16:05 ` [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only Ard Biesheuvel
@ 2023-01-05 16:05 ` Ard Biesheuvel
2023-01-05 16:05 ` [PATCH 3/4] BaseTools/tools_def ARM: Make choice for soft float ABI explicit Ard Biesheuvel
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-05 16:05 UTC (permalink / raw)
To: devel; +Cc: quic_llindhol, rebecca, bob.c.feng, gaoliming, Ard Biesheuvel
ARCHCC_FLAGS and ARCHASM_FLAGS no longer serve a useful purpose so drop
all the definitions and references.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
BaseTools/Conf/tools_def.template | 89 +++++++++-----------
1 file changed, 41 insertions(+), 48 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 4733040e3ef1..fe8d5a8ea5e8 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1896,11 +1896,11 @@ DEFINE GCC48_IA32_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x220 DEF
DEFINE GCC48_X64_DLINK_FLAGS = DEF(GCC48_IA32_X64_DLINK_FLAGS) -Wl,-melf_x86_64,--oformat=elf64-x86-64,-pie
DEFINE GCC48_X64_DLINK2_FLAGS = -Wl,--defsym=PECOFF_HEADER_SIZE=0x228 DEF(GCC_DLINK2_FLAGS_COMMON)
DEFINE GCC48_ASM_FLAGS = DEF(GCC_ASM_FLAGS)
-DEFINE GCC48_ARM_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
-DEFINE GCC48_AARCH64_ASM_FLAGS = $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
-DEFINE GCC48_ARM_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
+DEFINE GCC48_ARM_ASM_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
+DEFINE GCC48_AARCH64_ASM_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ASM_FLAGS) -mlittle-endian
+DEFINE GCC48_ARM_CC_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_ARM_CC_FLAGS) -fstack-protector -mword-relocations
DEFINE GCC48_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
-DEFINE GCC48_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
+DEFINE GCC48_AARCH64_CC_FLAGS = $(PLATFORM_FLAGS) -mcmodel=large DEF(GCC_AARCH64_CC_FLAGS)
DEFINE GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
DEFINE GCC48_ARM_DLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--oformat=elf32-littlearm
DEFINE GCC48_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
@@ -1923,7 +1923,7 @@ DEFINE GCC49_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS)
DEFINE GCC49_AARCH64_ASM_FLAGS = DEF(GCC48_AARCH64_ASM_FLAGS)
DEFINE GCC49_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS)
DEFINE GCC49_ARM_CC_XIPFLAGS = DEF(GCC48_ARM_CC_XIPFLAGS)
-DEFINE GCC49_AARCH64_CC_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC48_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS) -mcmodel=small
+DEFINE GCC49_AARCH64_CC_FLAGS = $(PLATFORM_FLAGS) DEF(GCC48_ALL_CC_FLAGS) DEF(GCC_AARCH64_CC_FLAGS) -mcmodel=small
DEFINE GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS)
DEFINE GCC49_ARM_DLINK_FLAGS = DEF(GCC48_ARM_DLINK_FLAGS)
DEFINE GCC49_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
@@ -2070,9 +2070,6 @@ RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-s
*_GCC48_ARM_ASLPP_PATH = ENV(GCC48_ARM_PREFIX)gcc
*_GCC48_ARM_RC_PATH = ENV(GCC48_ARM_PREFIX)objcopy
-*_GCC48_ARM_ARCHCC_FLAGS = -mthumb
-*_GCC48_ARM_PLATFORM_FLAGS = -march=armv7-a
-
*_GCC48_ARM_ASLCC_FLAGS = DEF(GCC48_ASLCC_FLAGS)
*_GCC48_ARM_ASLDLINK_FLAGS = DEF(GCC48_ARM_ASLDLINK_FLAGS)
*_GCC48_ARM_ASM_FLAGS = DEF(GCC48_ARM_ASM_FLAGS)
@@ -2080,9 +2077,9 @@ RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Os -Wno-unused-but-s
*_GCC48_ARM_DLINK2_FLAGS = DEF(GCC48_ARM_DLINK2_FLAGS)
*_GCC48_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC48_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_GCC48_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC48_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC48_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_GCC48_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC48_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC48_ARM_CC_XIPFLAGS = DEF(GCC48_ARM_CC_XIPFLAGS)
DEBUG_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -O0
@@ -2110,9 +2107,9 @@ RELEASE_GCC48_ARM_CC_FLAGS = DEF(GCC48_ARM_CC_FLAGS) -Wno-unused-but-set-v
*_GCC48_AARCH64_DLINK2_FLAGS = DEF(GCC48_AARCH64_DLINK2_FLAGS)
*_GCC48_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC48_AARCH64_PLATFORM_FLAGS =
-*_GCC48_AARCH64_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC48_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC48_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-*_GCC48_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC48_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC48_AARCH64_CC_XIPFLAGS = DEF(GCC48_AARCH64_CC_XIPFLAGS)
DEBUG_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -O0
@@ -2210,9 +2207,6 @@ RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-s
*_GCC49_ARM_ASLPP_PATH = ENV(GCC49_ARM_PREFIX)gcc
*_GCC49_ARM_RC_PATH = ENV(GCC49_ARM_PREFIX)objcopy
-*_GCC49_ARM_ARCHCC_FLAGS = -mthumb
-*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
-
*_GCC49_ARM_ASLCC_FLAGS = DEF(GCC49_ASLCC_FLAGS)
*_GCC49_ARM_ASLDLINK_FLAGS = DEF(GCC49_ARM_ASLDLINK_FLAGS)
*_GCC49_ARM_ASM_FLAGS = DEF(GCC49_ARM_ASM_FLAGS)
@@ -2220,9 +2214,9 @@ RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Os -Wno-unused-but-s
*_GCC49_ARM_DLINK2_FLAGS = DEF(GCC49_ARM_DLINK2_FLAGS)
*_GCC49_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC49_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_GCC49_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC49_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC49_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_GCC49_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC49_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC49_ARM_CC_XIPFLAGS = DEF(GCC49_ARM_CC_XIPFLAGS)
DEBUG_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -O0
@@ -2249,9 +2243,9 @@ RELEASE_GCC49_ARM_CC_FLAGS = DEF(GCC49_ARM_CC_FLAGS) -Wno-unused-but-set-v
*_GCC49_AARCH64_DLINK2_FLAGS = DEF(GCC49_AARCH64_DLINK2_FLAGS)
*_GCC49_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC49_AARCH64_PLATFORM_FLAGS =
-*_GCC49_AARCH64_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC49_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC49_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-*_GCC49_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC49_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC49_AARCH64_CC_XIPFLAGS = DEF(GCC49_AARCH64_CC_XIPFLAGS)
DEBUG_GCC49_AARCH64_CC_FLAGS = DEF(GCC49_AARCH64_CC_FLAGS) -O0
@@ -2365,16 +2359,15 @@ RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
*_GCC5_ARM_ASLPP_PATH = ENV(GCC5_ARM_PREFIX)gcc
*_GCC5_ARM_RC_PATH = ENV(GCC5_ARM_PREFIX)objcopy
-*_GCC5_ARM_ARCHCC_FLAGS = -mthumb
*_GCC5_ARM_ASLCC_FLAGS = DEF(GCC5_ASLCC_FLAGS)
*_GCC5_ARM_ASLDLINK_FLAGS = DEF(GCC5_ARM_ASLDLINK_FLAGS)
*_GCC5_ARM_ASM_FLAGS = DEF(GCC5_ARM_ASM_FLAGS)
*_GCC5_ARM_DLINK2_FLAGS = DEF(GCC5_ARM_DLINK2_FLAGS)
*_GCC5_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC5_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_GCC5_ARM_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC5_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC5_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_GCC5_ARM_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC5_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC5_ARM_CC_XIPFLAGS = DEF(GCC5_ARM_CC_XIPFLAGS)
DEBUG_GCC5_ARM_CC_FLAGS = DEF(GCC5_ARM_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2406,9 +2399,9 @@ RELEASE_GCC5_ARM_DLINK_FLAGS = DEF(GCC5_ARM_DLINK_FLAGS) -flto -Os -L$(WORKS
*_GCC5_AARCH64_DLINK2_FLAGS = DEF(GCC5_AARCH64_DLINK2_FLAGS)
*_GCC5_AARCH64_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
*_GCC5_AARCH64_PLATFORM_FLAGS =
-*_GCC5_AARCH64_PP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
+*_GCC5_AARCH64_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC5_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-*_GCC5_AARCH64_VFRPP_FLAGS = $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
+*_GCC5_AARCH64_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
*_GCC5_AARCH64_CC_XIPFLAGS = DEF(GCC5_AARCH64_CC_XIPFLAGS)
DEBUG_GCC5_AARCH64_CC_FLAGS = DEF(GCC5_AARCH64_CC_FLAGS) -flto -Wno-unused-but-set-variable -Wno-unused-const-variable
@@ -2529,19 +2522,19 @@ DEFINE CLANG35_AARCH64_CC_FLAGS = DEF(GCC_AARCH64_CC_FLAGS) DEF(CLANG35_AARCH64
*_CLANG35_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
*_CLANG35_ARM_ASLDLINK_FLAGS = DEF(CLANG35_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS)
-*_CLANG35_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG35_ARM_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments
+*_CLANG35_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG35_ARM_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
*_CLANG35_ARM_DLINK_FLAGS = DEF(CLANG35_ARM_TARGET) DEF(GCC_ARM_DLINK_FLAGS)
*_CLANG35_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
*_CLANG35_ARM_PLATFORM_FLAGS = -march=armv7-a -mkernel -Qunused-arguments
-*_CLANG35_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG35_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG35_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG35_ARM_TARGET) $(PLATFORM_FLAGS)
*_CLANG35_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_CLANG35_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG35_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG35_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG35_ARM_TARGET) $(PLATFORM_FLAGS)
*_CLANG35_ARM_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG35_ARM_TARGET)
*_CLANG35_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
- DEBUG_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O1
-RELEASE_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz
- NOOPT_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0
+ DEBUG_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -O1
+RELEASE_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -Oz
+ NOOPT_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -O0
##################
# CLANG35 AARCH64 definitions
@@ -2551,20 +2544,20 @@ RELEASE_CLANG35_ARM_CC_FLAGS = DEF(CLANG35_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(P
*_CLANG35_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS)
*_CLANG35_AARCH64_ASLDLINK_FLAGS = DEF(CLANG35_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS)
-*_CLANG35_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments
+*_CLANG35_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
*_CLANG35_AARCH64_DLINK_FLAGS = DEF(CLANG35_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
*_CLANG35_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_CLANG35_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
*_CLANG35_AARCH64_PLATFORM_FLAGS =
-*_CLANG35_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG35_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(PLATFORM_FLAGS)
*_CLANG35_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-*_CLANG35_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG35_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG35_AARCH64_TARGET) $(PLATFORM_FLAGS)
*_CLANG35_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG35_AARCH64_TARGET)
*_CLANG35_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
- DEBUG_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O1
-RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -Oz
- NOOPT_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0
+ DEBUG_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -O1
+RELEASE_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -Oz
+ NOOPT_CLANG35_AARCH64_CC_FLAGS = DEF(CLANG35_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -O0
####################################################################################
#
@@ -2692,20 +2685,20 @@ DEFINE CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_DLINK_FLA
*_CLANG38_ARM_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto
*_CLANG38_ARM_ASLDLINK_FLAGS = DEF(CLANG38_ARM_TARGET) DEF(GCC_ARM_ASLDLINK_FLAGS)
-*_CLANG38_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments
+*_CLANG38_ARM_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_ARM_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
*_CLANG38_ARM_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x220
*_CLANG38_ARM_PLATFORM_FLAGS = -march=armv7-a
-*_CLANG38_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG38_ARM_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_ARM_TARGET) $(PLATFORM_FLAGS)
*_CLANG38_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
-*_CLANG38_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_ARM_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG38_ARM_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_ARM_TARGET) $(PLATFORM_FLAGS)
*_CLANG38_ARM_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_ARM_TARGET)
*_CLANG38_ARM_CC_XIPFLAGS = DEF(GCC_ARM_CC_XIPFLAGS)
- DEBUG_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
+ DEBUG_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
DEBUG_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto -Wl,-O1 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
- NOOPT_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0
+ NOOPT_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -O0
NOOPT_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS)
-RELEASE_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
+RELEASE_CLANG38_ARM_CC_FLAGS = DEF(CLANG38_ARM_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
RELEASE_CLANG38_ARM_DLINK_FLAGS = DEF(CLANG38_ARM_DLINK_FLAGS) -flto -Wl,-O3 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-arm -Wl,-plugin-opt=-pass-through=-llto-arm
##################
@@ -2736,22 +2729,22 @@ DEFINE CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH6
*_CLANG38_AARCH64_ASLCC_FLAGS = DEF(GCC_ASLCC_FLAGS) -fno-lto
*_CLANG38_AARCH64_ASLDLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH64_ASLDLINK_FLAGS)
-*_CLANG38_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHASM_FLAGS) $(PLATFORM_FLAGS) -Qunused-arguments
+*_CLANG38_AARCH64_ASM_FLAGS = DEF(GCC_ASM_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(PLATFORM_FLAGS) -Qunused-arguments
*_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_TARGET) DEF(GCC_AARCH64_DLINK_FLAGS) -z common-page-size=0x1000
*_CLANG38_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20
*_CLANG38_AARCH64_DLINK2_FLAGS = DEF(GCC_DLINK2_FLAGS_COMMON) -Wl,--defsym=PECOFF_HEADER_SIZE=0x228
*_CLANG38_AARCH64_PLATFORM_FLAGS =
-*_CLANG38_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG38_AARCH64_PP_FLAGS = DEF(GCC_PP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(PLATFORM_FLAGS)
*_CLANG38_AARCH64_RC_FLAGS = DEF(GCC_AARCH64_RC_FLAGS)
-*_CLANG38_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS)
+*_CLANG38_AARCH64_VFRPP_FLAGS = DEF(GCC_VFRPP_FLAGS) DEF(CLANG38_AARCH64_TARGET) $(PLATFORM_FLAGS)
*_CLANG38_AARCH64_ASLPP_FLAGS = DEF(GCC_ASLPP_FLAGS) DEF(CLANG38_AARCH64_TARGET)
*_CLANG38_AARCH64_CC_XIPFLAGS = DEF(GCC_AARCH64_CC_XIPFLAGS)
- DEBUG_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
+ DEBUG_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O1
DEBUG_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl,-O1 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64
- NOOPT_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -O0
+ NOOPT_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -O0
NOOPT_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS)
-RELEASE_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(ARCHCC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
+RELEASE_CLANG38_AARCH64_CC_FLAGS = DEF(CLANG38_AARCH64_CC_FLAGS) $(PLATFORM_FLAGS) -flto -O3
RELEASE_CLANG38_AARCH64_DLINK_FLAGS = DEF(CLANG38_AARCH64_DLINK_FLAGS) -flto -Wl,-O3 -L$(WORKSPACE)/ArmPkg/Library/GccLto -llto-aarch64 -Wl,-plugin-opt=-pass-through=-llto-aarch64
####################################################################################
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 3/4] BaseTools/tools_def ARM: Make choice for soft float ABI explicit
2023-01-05 16:04 [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
2023-01-05 16:05 ` [PATCH 1/4] BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only Ard Biesheuvel
2023-01-05 16:05 ` [PATCH 2/4] BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags Ard Biesheuvel
@ 2023-01-05 16:05 ` Ard Biesheuvel
2023-01-05 16:05 ` [PATCH 4/4] BaseTools/tools_def CLANG38: Suppress unaligned access warning Ard Biesheuvel
2023-01-09 16:37 ` [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
4 siblings, 0 replies; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-05 16:05 UTC (permalink / raw)
To: devel; +Cc: quic_llindhol, rebecca, bob.c.feng, gaoliming, Ard Biesheuvel
Recent GCC for ARM will complain when selecting the hard float ABI
without specifying the FPU implementation, even when just running the
preprocessor.
This all happens under the hood, and we never bothered in the past,
given that we don't emit floating point code anyway. However, to placate
newer compilers, make it explicit that the floating point ABI is always the
softfloat one, by moving the -msoft-float compiler option to
PLATFORM_FLAGS.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
BaseTools/Conf/tools_def.template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index fe8d5a8ea5e8..9bf771385e33 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1850,7 +1850,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink=$(DEBUG_DIR)/$(MODULE_N
*_*_*_DTC_PATH = DEF(DTC_BIN)
DEFINE GCC_ALL_CC_FLAGS = -g -Os -fshort-wchar -fno-builtin -fno-strict-aliasing -Wall -Werror -Wno-array-bounds -include AutoGen.h -fno-common
-DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -mfloat-abi=soft -fno-pic -fno-pie
+DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie
DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -fno-plt -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections
DEFINE GCC_ARM_CC_XIPFLAGS = -mno-unaligned-access
DEFINE GCC_AARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -fno-short-enums -fverbose-asm -funsigned-char -ffunction-sections -fdata-sections -Wno-address -fno-asynchronous-unwind-tables -fno-unwind-tables -fno-pic -fno-pie -ffixed-x18
@@ -2364,7 +2364,7 @@ RELEASE_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
*_GCC5_ARM_ASM_FLAGS = DEF(GCC5_ARM_ASM_FLAGS)
*_GCC5_ARM_DLINK2_FLAGS = DEF(GCC5_ARM_DLINK2_FLAGS)
*_GCC5_ARM_DTCPP_FLAGS = DEF(GCC_DTCPP_FLAGS)
-*_GCC5_ARM_PLATFORM_FLAGS = -march=armv7-a
+*_GCC5_ARM_PLATFORM_FLAGS = -march=armv7-a -mfloat-abi=soft
*_GCC5_ARM_PP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_PP_FLAGS)
*_GCC5_ARM_RC_FLAGS = DEF(GCC_ARM_RC_FLAGS)
*_GCC5_ARM_VFRPP_FLAGS = $(PLATFORM_FLAGS) DEF(GCC_VFRPP_FLAGS)
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 4/4] BaseTools/tools_def CLANG38: Suppress unaligned access warning
2023-01-05 16:04 [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
` (2 preceding siblings ...)
2023-01-05 16:05 ` [PATCH 3/4] BaseTools/tools_def ARM: Make choice for soft float ABI explicit Ard Biesheuvel
@ 2023-01-05 16:05 ` Ard Biesheuvel
2023-01-09 16:37 ` [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
4 siblings, 0 replies; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-05 16:05 UTC (permalink / raw)
To: devel; +Cc: quic_llindhol, rebecca, bob.c.feng, gaoliming, Ard Biesheuvel
Even though the presence of the 'packed' pragma should be a strong hint
that the misaligned placement of a GUID in a struct is intentional,
recent Clang versions will object nonetheless, and break the build due
to the presence of such GUIDs in the FPDT ACPI tables.
This is obviously not something we can fix in the code, so let's just
suppress the warning/error instead.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
BaseTools/Conf/tools_def.template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
index 9bf771385e33..380d4587335a 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -2580,7 +2580,7 @@ DEFINE CLANG38_X64_PREFIX = ENV(CLANG38_BIN)
DEFINE CLANG38_IA32_TARGET = -target i686-pc-linux-gnu
DEFINE CLANG38_X64_TARGET = -target x86_64-pc-linux-gnu
-DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable
+DEFINE CLANG38_WARNING_OVERRIDES = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access
DEFINE CLANG38_ALL_CC_FLAGS = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANG38_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
###########################
--
2.39.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] BaseTools - various cleanups
2023-01-05 16:04 [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
` (3 preceding siblings ...)
2023-01-05 16:05 ` [PATCH 4/4] BaseTools/tools_def CLANG38: Suppress unaligned access warning Ard Biesheuvel
@ 2023-01-09 16:37 ` Ard Biesheuvel
2023-01-10 13:10 ` Ard Biesheuvel
4 siblings, 1 reply; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-09 16:37 UTC (permalink / raw)
To: devel; +Cc: quic_llindhol, rebecca, bob.c.feng, gaoliming
On Thu, 5 Jan 2023 at 17:05, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> Some cleanups for the tools_def template, mostly related to ARM but with
> some CLANG38 and RISCV changes as well.
>
Bob, Liming: any concerns regarding this series?
> Ard Biesheuvel (4):
> BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
> BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags
> BaseTools/tools_def ARM: Make choice for soft float ABI explicit
> BaseTools/tools_def CLANG38: Suppress unaligned access warning
>
> BaseTools/Conf/tools_def.template | 98 +++++++++-----------
> 1 file changed, 45 insertions(+), 53 deletions(-)
>
> --
> 2.39.0
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/4] BaseTools - various cleanups
2023-01-09 16:37 ` [PATCH 0/4] BaseTools - various cleanups Ard Biesheuvel
@ 2023-01-10 13:10 ` Ard Biesheuvel
0 siblings, 0 replies; 9+ messages in thread
From: Ard Biesheuvel @ 2023-01-10 13:10 UTC (permalink / raw)
To: devel, gaoliming, bob.c.feng; +Cc: quic_llindhol, rebecca
If there are no objections to these changes, I will merge them by the
end of today, Thanks.
On Mon, 9 Jan 2023 at 17:37, Ard Biesheuvel <ardb@kernel.org> wrote:
>
> On Thu, 5 Jan 2023 at 17:05, Ard Biesheuvel <ardb@kernel.org> wrote:
> >
> > Some cleanups for the tools_def template, mostly related to ARM but with
> > some CLANG38 and RISCV changes as well.
> >
>
> Bob, Liming: any concerns regarding this series?
>
>
> > Ard Biesheuvel (4):
> > BaseTools/tools_def RISCV: Make OpenSBI references RISCV-only
> > BaseTools/tools_def ARM AARCH64: Get rid of ARCHCC and ARCHASM flags
> > BaseTools/tools_def ARM: Make choice for soft float ABI explicit
> > BaseTools/tools_def CLANG38: Suppress unaligned access warning
> >
> > BaseTools/Conf/tools_def.template | 98 +++++++++-----------
> > 1 file changed, 45 insertions(+), 53 deletions(-)
> >
> > --
> > 2.39.0
> >
^ permalink raw reply [flat|nested] 9+ messages in thread