public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF
@ 2023-08-23 15:15 Leif Lindholm
  2023-08-23 15:20 ` Ard Biesheuvel
  2023-08-23 17:21 ` Rebecca Cran
  0 siblings, 2 replies; 5+ messages in thread
From: Leif Lindholm @ 2023-08-23 15:15 UTC (permalink / raw)
  To: devel
  Cc: 'Ajay Iyengar ', Rebecca Cran, Liming Gao, Bob Feng,
	Yuwei Chen, Ard Biesheuvel

The CLANGDWARF progfile sets both -Wno-tautological-compare and
-Wno-tautological-constant-out-of-range-compare, but this prevents
compile-time detection of certain errors.
Drop these flags.

Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
Cc: Rebecca Cran <rebecca@bsdio.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
---

Does anyone remember why these were added?
I'm not running into any issues across armvirtqemu, qemusbsa, ovmfx64, ovmfriscv64.

/
    Leif

 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 1bf62362b611..5bd5283655ea 100755
--- a/BaseTools/Conf/tools_def.template
+++ b/BaseTools/Conf/tools_def.template
@@ -1859,7 +1859,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS        = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
 DEFINE CLANGDWARF_IA32_TARGET             = -target i686-pc-linux-gnu
 DEFINE CLANGDWARF_X64_TARGET              = -target x86_64-pc-linux-gnu
 
-DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration
+DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration
 DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
 
 ###########################
-- 
2.39.2



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107981): https://edk2.groups.io/g/devel/message/107981
Mute This Topic: https://groups.io/mt/100916818/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF
  2023-08-23 15:15 [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF Leif Lindholm
@ 2023-08-23 15:20 ` Ard Biesheuvel
  2023-08-23 17:21 ` Rebecca Cran
  1 sibling, 0 replies; 5+ messages in thread
From: Ard Biesheuvel @ 2023-08-23 15:20 UTC (permalink / raw)
  To: devel, quic_llindhol
  Cc: Ajay Iyengar, Rebecca Cran, Liming Gao, Bob Feng, Yuwei Chen,
	Ard Biesheuvel

On Wed, 23 Aug 2023 at 17:15, Leif Lindholm <quic_llindhol@quicinc.com> wrote:
>
> The CLANGDWARF progfile sets both -Wno-tautological-compare and
> -Wno-tautological-constant-out-of-range-compare, but this prevents
> compile-time detection of certain errors.
> Drop these flags.
>
> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>

Acked-by: Ard Biesheuvel <ardb@kernel.org>

> ---
>
> Does anyone remember why these were added?

I added those when I first introduced Clang 3.5 support, and I am
quite sure i only added the options that were needed to complete the
build. But I don't remember which exact issue was solved by each
option

5c02fc49aea5 ("BaseTools: add CLANG35 toolchain with AARCH64 support")

> I'm not running into any issues across armvirtqemu, qemusbsa, ovmfx64, ovmfriscv64.
>
>
>  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 1bf62362b611..5bd5283655ea 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1859,7 +1859,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS        = -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>  DEFINE CLANGDWARF_IA32_TARGET             = -target i686-pc-linux-gnu
>  DEFINE CLANGDWARF_X64_TARGET              = -target x86_64-pc-linux-gnu
>
> -DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration
> +DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality -Wno-empty-body -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option -Wno-unused-but-set-variable -Wno-unused-const-variable -Wno-unaligned-access -Wno-unneeded-internal-declaration
>  DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -msoft-float -mno-implicit-float  -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang -funsigned-char -fno-ms-extensions -Wno-null-dereference
>
>  ###########################
> --
> 2.39.2
>
>
>
> 
>
>


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107982): https://edk2.groups.io/g/devel/message/107982
Mute This Topic: https://groups.io/mt/100916818/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF
  2023-08-23 15:15 [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF Leif Lindholm
  2023-08-23 15:20 ` Ard Biesheuvel
@ 2023-08-23 17:21 ` Rebecca Cran
  2023-08-24 16:08   ` Leif Lindholm
  2023-08-29 12:25   ` Leif Lindholm
  1 sibling, 2 replies; 5+ messages in thread
From: Rebecca Cran @ 2023-08-23 17:21 UTC (permalink / raw)
  To: devel, Leif Lindholm
  Cc: 'Ajay Iyengar ', gaoliming, 'Bob Feng',
	'Yuwei Chen', Ard Biesheuvel

Reviewed-by: Rebecca Cran <rebecca@bsdio.com>

On Wed, Aug 23, 2023, at 9:15 AM, Leif Lindholm wrote:
> The CLANGDWARF progfile sets both -Wno-tautological-compare and
> -Wno-tautological-constant-out-of-range-compare, but this prevents
> compile-time detection of certain errors.
> Drop these flags.
>
> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
> Cc: Rebecca Cran <rebecca@bsdio.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Bob Feng <bob.c.feng@intel.com>
> Cc: Yuwei Chen <yuwei.chen@intel.com>
> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> ---
>
> Does anyone remember why these were added?
> I'm not running into any issues across armvirtqemu, qemusbsa, ovmfx64, 
> ovmfriscv64.
>
> /
>     Leif
>
>  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 1bf62362b611..5bd5283655ea 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -1859,7 +1859,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS        = 
> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>  DEFINE CLANGDWARF_IA32_TARGET             = -target i686-pc-linux-gnu
>  DEFINE CLANGDWARF_X64_TARGET              = -target x86_64-pc-linux-gnu
> 
> -DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality 
> -Wno-tautological-compare 
> -Wno-tautological-constant-out-of-range-compare -Wno-empty-body 
> -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option 
> -Wno-unused-but-set-variable -Wno-unused-const-variable 
> -Wno-unaligned-access -Wno-unneeded-internal-declaration
> +DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality 
> -Wno-empty-body -Wno-unused-const-variable -Wno-varargs 
> -Wno-unknown-warning-option -Wno-unused-but-set-variable 
> -Wno-unused-const-variable -Wno-unaligned-access 
> -Wno-unneeded-internal-declaration
>  DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) 
> DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields 
> -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas 
> -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables 
> -mno-sse -mno-mmx -msoft-float -mno-implicit-float  
> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
> -funsigned-char -fno-ms-extensions -Wno-null-dereference
> 
>  ###########################
> -- 
> 2.39.2
>
>
>
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#107987): https://edk2.groups.io/g/devel/message/107987
Mute This Topic: https://groups.io/mt/100916818/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF
  2023-08-23 17:21 ` Rebecca Cran
@ 2023-08-24 16:08   ` Leif Lindholm
  2023-08-29 12:25   ` Leif Lindholm
  1 sibling, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2023-08-24 16:08 UTC (permalink / raw)
  To: Rebecca Cran, devel
  Cc: 'Ajay Iyengar ', gaoliming, 'Bob Feng',
	'Yuwei Chen', Ard Biesheuvel

Thanks Rebecca, Ard,

I'll fix the typo "progfile" -> "profile" in the commit message and 
merge after stable tag is done unless someone objects beforehand.

As a sidenote, it may be worth looking into this for CLANGPDB as well, 
but I don't have a setup for that.

/
     Leif

On 2023-08-23 18:21, Rebecca Cran wrote:
> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
> 
> On Wed, Aug 23, 2023, at 9:15 AM, Leif Lindholm wrote:
>> The CLANGDWARF progfile sets both -Wno-tautological-compare and
>> -Wno-tautological-constant-out-of-range-compare, but this prevents
>> compile-time detection of certain errors.
>> Drop these flags.
>>
>> Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
>> Cc: Rebecca Cran <rebecca@bsdio.com>
>> Cc: Liming Gao <gaoliming@byosoft.com.cn>
>> Cc: Bob Feng <bob.c.feng@intel.com>
>> Cc: Yuwei Chen <yuwei.chen@intel.com>
>> Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
>> ---
>>
>> Does anyone remember why these were added?
>> I'm not running into any issues across armvirtqemu, qemusbsa, ovmfx64,
>> ovmfriscv64.
>>
>> /
>>      Leif
>>
>>   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 1bf62362b611..5bd5283655ea 100755
>> --- a/BaseTools/Conf/tools_def.template
>> +++ b/BaseTools/Conf/tools_def.template
>> @@ -1859,7 +1859,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS        =
>> -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
>>   DEFINE CLANGDWARF_IA32_TARGET             = -target i686-pc-linux-gnu
>>   DEFINE CLANGDWARF_X64_TARGET              = -target x86_64-pc-linux-gnu
>>
>> -DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality
>> -Wno-tautological-compare
>> -Wno-tautological-constant-out-of-range-compare -Wno-empty-body
>> -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option
>> -Wno-unused-but-set-variable -Wno-unused-const-variable
>> -Wno-unaligned-access -Wno-unneeded-internal-declaration
>> +DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality
>> -Wno-empty-body -Wno-unused-const-variable -Wno-varargs
>> -Wno-unknown-warning-option -Wno-unused-but-set-variable
>> -Wno-unused-const-variable -Wno-unaligned-access
>> -Wno-unneeded-internal-declaration
>>   DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS)
>> DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields
>> -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas
>> -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables
>> -mno-sse -mno-mmx -msoft-float -mno-implicit-float
>> -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang
>> -funsigned-char -fno-ms-extensions -Wno-null-dereference
>>
>>   ###########################
>> -- 
>> 2.39.2
>>
>>
>>
>> 



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108014): https://edk2.groups.io/g/devel/message/108014
Mute This Topic: https://groups.io/mt/100916818/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF
  2023-08-23 17:21 ` Rebecca Cran
  2023-08-24 16:08   ` Leif Lindholm
@ 2023-08-29 12:25   ` Leif Lindholm
  1 sibling, 0 replies; 5+ messages in thread
From: Leif Lindholm @ 2023-08-29 12:25 UTC (permalink / raw)
  To: Rebecca Cran
  Cc: devel, 'Ajay Iyengar ', gaoliming, 'Bob Feng',
	'Yuwei Chen', Ard Biesheuvel

Thanks all - merged as 14bf2cb411ca.

On Wed, Aug 23, 2023 at 11:21:02 -0600, Rebecca Cran wrote:
> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
> 
> On Wed, Aug 23, 2023, at 9:15 AM, Leif Lindholm wrote:
> > The CLANGDWARF progfile sets both -Wno-tautological-compare and
> > -Wno-tautological-constant-out-of-range-compare, but this prevents
> > compile-time detection of certain errors.
> > Drop these flags.
> >
> > Signed-off-by: Leif Lindholm <quic_llindhol@quicinc.com>
> > Cc: Rebecca Cran <rebecca@bsdio.com>
> > Cc: Liming Gao <gaoliming@byosoft.com.cn>
> > Cc: Bob Feng <bob.c.feng@intel.com>
> > Cc: Yuwei Chen <yuwei.chen@intel.com>
> > Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
> > ---
> >
> > Does anyone remember why these were added?
> > I'm not running into any issues across armvirtqemu, qemusbsa, ovmfx64, 
> > ovmfriscv64.
> >
> > /
> >     Leif
> >
> >  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 1bf62362b611..5bd5283655ea 100755
> > --- a/BaseTools/Conf/tools_def.template
> > +++ b/BaseTools/Conf/tools_def.template
> > @@ -1859,7 +1859,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS        = 
> > -Wl,--defsym=PECOFF_HEADER_SIZE=0x22
> >  DEFINE CLANGDWARF_IA32_TARGET             = -target i686-pc-linux-gnu
> >  DEFINE CLANGDWARF_X64_TARGET              = -target x86_64-pc-linux-gnu
> > 
> > -DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality 
> > -Wno-tautological-compare 
> > -Wno-tautological-constant-out-of-range-compare -Wno-empty-body 
> > -Wno-unused-const-variable -Wno-varargs -Wno-unknown-warning-option 
> > -Wno-unused-but-set-variable -Wno-unused-const-variable 
> > -Wno-unaligned-access -Wno-unneeded-internal-declaration
> > +DEFINE CLANGDWARF_WARNING_OVERRIDES    = -Wno-parentheses-equality 
> > -Wno-empty-body -Wno-unused-const-variable -Wno-varargs 
> > -Wno-unknown-warning-option -Wno-unused-but-set-variable 
> > -Wno-unused-const-variable -Wno-unaligned-access 
> > -Wno-unneeded-internal-declaration
> >  DEFINE CLANGDWARF_ALL_CC_FLAGS         = DEF(GCC48_ALL_CC_FLAGS) 
> > DEF(CLANGDWARF_WARNING_OVERRIDES) -fno-stack-protector -mms-bitfields 
> > -Wno-address -Wno-shift-negative-value -Wno-unknown-pragmas 
> > -Wno-incompatible-library-redeclaration -fno-asynchronous-unwind-tables 
> > -mno-sse -mno-mmx -msoft-float -mno-implicit-float  
> > -ftrap-function=undefined_behavior_has_been_optimized_away_by_clang 
> > -funsigned-char -fno-ms-extensions -Wno-null-dereference
> > 
> >  ###########################
> > -- 
> > 2.39.2
> >
> >
> >
> > 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108091): https://edk2.groups.io/g/devel/message/108091
Mute This Topic: https://groups.io/mt/100916818/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/12367111/7686176/1913456212/xyzzy [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-29 12:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-23 15:15 [edk2-devel] [RFC PATCH 1/1] BaseTools: drop tautological warning overrides for CLANGDWARF Leif Lindholm
2023-08-23 15:20 ` Ard Biesheuvel
2023-08-23 17:21 ` Rebecca Cran
2023-08-24 16:08   ` Leif Lindholm
2023-08-29 12:25   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox