diff mbox series

[1/2] toolchain/Config.in: update gcc bug 90620

Message ID 20220910135256.1689860-1-giulio.benetti@benettiengineering.com
State Accepted
Headers show
Series [1/2] toolchain/Config.in: update gcc bug 90620 | expand

Commit Message

Giulio Benetti Sept. 10, 2022, 1:52 p.m. UTC
Gcc bug 90620 reappeared with gcc 11.x so let's update
BR2_TOOLCHAIN_HAS_GCC_BUG_90620 conditions.

Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
---
 toolchain/Config.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Comments

Yann E. MORIN Sept. 11, 2022, 7:30 p.m. UTC | #1
Giulio, All,

On 2022-09-10 15:52 +0200, Giulio Benetti spake thusly:
> Gcc bug 90620 reappeared with gcc 11.x so let's update
> BR2_TOOLCHAIN_HAS_GCC_BUG_90620 conditions.
> 
> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
> ---
>  toolchain/Config.in | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/toolchain/Config.in b/toolchain/Config.in
> index fbc2f28553..16e358344d 100644
> --- a/toolchain/Config.in
> +++ b/toolchain/Config.in
> @@ -168,11 +168,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
>  
>  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
>  # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
> -# This bug no longer exists in gcc 10.x
> +# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
>  config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
>  	bool
> -	default y if BR2_microblaze
> -	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10
> +	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
> +	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
> +	depends on BR2_microblaze

I am not sure why the switch of default to depends is needed, because the
same condition can still be written without changing the default:

    default y if BR2_microblaze
    depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
            || BR2_TOOLCHAIN_GCC_AT_LEAST_11

Yeah, I see that other symbols that have a dependency on two gcc version
have the default/depends inverted, but symbols that have a dependency on
a single gcc version do not, e.g.:

    config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
        bool
        default y if BR2_microblaze
        depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7

So, I think it is better to keep the same semantics between the two
situations.

So, I fixed that, and applied to master, thanks.

Note, there is also a third way to write it, and obviouslty we are also
using that:

    config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
        bool
        default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9

Meh... :-(

Note: this is *not* a plea for patches to fix that, at all. I just like
ranting a bit. ;-)

Regards,
Yann E. MORIN.

>  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
>  # ICE: compiler error: Segmentation fault on Nios II. This bug
> -- 
> 2.34.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
Giulio Benetti Sept. 11, 2022, 7:43 p.m. UTC | #2
On 11/09/22 21:30, Yann E. MORIN wrote:
> Giulio, All,
> 
> On 2022-09-10 15:52 +0200, Giulio Benetti spake thusly:
>> Gcc bug 90620 reappeared with gcc 11.x so let's update
>> BR2_TOOLCHAIN_HAS_GCC_BUG_90620 conditions.
>>
>> Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
>> ---
>>   toolchain/Config.in | 7 ++++---
>>   1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/toolchain/Config.in b/toolchain/Config.in
>> index fbc2f28553..16e358344d 100644
>> --- a/toolchain/Config.in
>> +++ b/toolchain/Config.in
>> @@ -168,11 +168,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
>>   
>>   # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
>>   # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
>> -# This bug no longer exists in gcc 10.x
>> +# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
>>   config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
>>   	bool
>> -	default y if BR2_microblaze
>> -	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10
>> +	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
>> +	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
>> +	depends on BR2_microblaze
> 
> I am not sure why the switch of default to depends is needed, because the
> same condition can still be written without changing the default:
> 
>      default y if BR2_microblaze
>      depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
>              || BR2_TOOLCHAIN_GCC_AT_LEAST_11

It was an attempt to propose a standard shape to use here

> Yeah, I see that other symbols that have a dependency on two gcc version
> have the default/depends inverted, but symbols that have a dependency on
> a single gcc version do not, e.g.:
> 
>      config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
>          bool
>          default y if BR2_microblaze
>          depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_7
> 
> So, I think it is better to keep the same semantics between the two
> situations.
> 
> So, I fixed that, and applied to master, thanks.

Thank you

> Note, there is also a third way to write it, and obviouslty we are also
> using that:
> 
>      config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
>          bool
>          default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
> 
> Meh... :-(

Exactly :-)

> Note: this is *not* a plea for patches to fix that, at all. I just like
> ranting a bit. ;-)

Why don't we choose a standard way instead? This for next patches, or
even to send a patchset to keep consistency between all the bugs, but
I know that it doesn't add anything and can add regressions.

What do you think?

Best regards
Yann E. MORIN Sept. 11, 2022, 7:54 p.m. UTC | #3
Giulio, All,

On 2022-09-11 21:43 +0200, Giulio Benetti spake thusly:
> On 11/09/22 21:30, Yann E. MORIN wrote:
> >On 2022-09-10 15:52 +0200, Giulio Benetti spake thusly:
> >>Gcc bug 90620 reappeared with gcc 11.x so let's update
> >>BR2_TOOLCHAIN_HAS_GCC_BUG_90620 conditions.
[--SNIP--]
> >>-	default y if BR2_microblaze
> >>-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10
> >>+	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
> >>+	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
> >>+	depends on BR2_microblaze
> >
> >I am not sure why the switch of default to depends is needed, because the
> >same condition can still be written without changing the default:
> >     default y if BR2_microblaze
> >     depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 \
> >             || BR2_TOOLCHAIN_GCC_AT_LEAST_11
> It was an attempt to propose a standard shape to use here

Yes, yes, I see that it looked like other similar cases around it.

But my point is that, this make symbols with a single or with two
dependencies on gcc versions differ:

  - the former have a deault on the arch, and depends on the gcc
    versions,

  - while the latter have a default on gcc versins, and a depends on the
    arch.

[--SNIP--]
> >Note: this is *not* a plea for patches to fix that, at all. I just like
> >ranting a bit. ;-)
> Why don't we choose a standard way instead? This for next patches, or
> even to send a patchset to keep consistency between all the bugs, but
> I know that it doesn't add anything and can add regressions.
> 
> What do you think?

I a not even sure what the best is. The best is that they all folow the
same logic, but we currently have (at least) three.

The question is: what is the most important and defining dependency: the
arch or the gcc versions?

I'd argue that, for those microblaze-related bugs, the arch is more
important than the gcc version, so the default should be on the arch,
and the depends on the gcc versions.

So, if I were to handle following changes in that area, that's what I'd
like to see. But others may se things differently. It's a rather ad-hoc
situation anyway.

And no, no patch to standardise that.

Thanks!

Regards,
Yann E. MORIN.
Peter Korsgaard Sept. 18, 2022, 9:15 p.m. UTC | #4
>>>>> "Giulio" == Giulio Benetti <giulio.benetti@benettiengineering.com> writes:

 > Gcc bug 90620 reappeared with gcc 11.x so let's update
 > BR2_TOOLCHAIN_HAS_GCC_BUG_90620 conditions.

 > Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com>

Committed to 2022.02.x, 2022.05.x and 2022.08.x, thanks.
diff mbox series

Patch

diff --git a/toolchain/Config.in b/toolchain/Config.in
index fbc2f28553..16e358344d 100644
--- a/toolchain/Config.in
+++ b/toolchain/Config.in
@@ -168,11 +168,12 @@  config BR2_TOOLCHAIN_HAS_GCC_BUG_85862
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90620
 # ICE: in do_output_reload, at reload1.c:7978 on microblaze.
-# This bug no longer exists in gcc 10.x
+# This bug no longer exists in gcc 10.x but reappeared in gcc 11.x
 config BR2_TOOLCHAIN_HAS_GCC_BUG_90620
 	bool
-	default y if BR2_microblaze
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10
+	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_10
+	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_11
+	depends on BR2_microblaze
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93847
 # ICE: compiler error: Segmentation fault on Nios II. This bug