Skip to contentSkip to conversation

toolchain: update gcc bug 99140

PATCH Superseded Giulio Benetti 3 participants 9 messages Jul 26, 2021 – Aug 24, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain: update gcc bug 99140

Gcc bug 99140 is still not fixed on gcc version 8.x so we need to move gcc version up to 9.x to have it correctly working.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

---
 toolchain/Config.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
toolchain/Config.in +2 -2
index 03375e0c52..8603e2aaff 100644
@@ -171,10 +171,10 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
 # Error: branch offset out of range on Nios II. This bug
-# no longer exists in gcc >= 8.x.
+# no longer exists in gcc >= 9.x.
 config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
 	bool
-	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 config BR2_TOOLCHAIN_HAS_NATIVE_RPC
 	bool
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#1 lore raw
Quoted 2 lines · On Mon, 26 Jul 2021 10:01:59 +0200 Giulio Benetti…

Gcc bug 99140 is still not fixed on gcc version 8.x so we need to move gcc version up to 9.x to have it correctly working.

And so you're positive in has been fixed in gcc 9.x and later versions ?

Thanks!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#2 lore raw
Quoted 10 lines

Il giorno 26 lug 2021, alle ore 10:07, Thomas Petazzoni <[email protected]> ha scritto:

On Mon, 26 Jul 2021 10:01:59 +0200

Quoted 2 lines · Giulio Benetti

Gcc bug 99140 is still not fixed on gcc version 8.x so we need to move gcc version up to 9.x to have it correctly working.

And so you're positive in has been fixed in gcc 9.x and later versions ?

Yes, I’ve retested with the combination of all binutils:
2.32, 2.34, 2.35.2 and 2.36,1 against:
gcc9,10 and they worked correctly on gcc10 with any binutils. I haven’t dig the reason inside gcc but that is what I’ve seen.

Honestly this showed up only with gcc8 as I remember and it still does it with Bootlin toolchain on autobuilder(gcc9+binutils 2.33.1).

Giulio

Quoted 8 lines

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#3 lore raw
Quoted 12 lines

Il giorno 26 lug 2021, alle ore 11:05, Giulio Benetti <[email protected]> ha scritto:



Quoted 8 lines

Il giorno 26 lug 2021, alle ore 10:07, Thomas Petazzoni <[email protected]> ha scritto:

On Mon, 26 Jul 2021 10:01:59 +0200

Quoted 2 lines · Giulio Benetti

Gcc bug 99140 is still not fixed on gcc version 8.x so we need to move gcc version up to 9.x to have it correctly working.

Quoted 8 lines
Quoted 1 line

And so you're positive in has been fixed in gcc 9.x and later versions ?

Yes, I’ve retested with the combination of all binutils:
2.32, 2.34, 2.35.2 and 2.36,1 against:
gcc9,10 and they worked correctly on gcc10 with any binutils. I haven’t dig the reason inside gcc but that is what I’ve seen.

Honestly this showed up only with gcc8 as I remember and it still does it with Bootlin toolchain on autobuilder(gcc9+binutils 2.33.1).

Oops, sorry it must be moved to 10.x not 9.x
Need to retest all then. I’ve made confusion on this. Sorry for the noise.

Giulio

Quoted 11 lines

Giulio

Quoted 8 lines

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#4 lore raw

PATCH v2 1/1 toolchain: update gcc bug 99140

Gcc bug 99140 has been fixed on gcc 8.x but reappeared on gcc 9.x while it's been fixed on gcc 10.x+. So let's update BR2_TOOLCHAIN_HAS_GCC_BUG_99140 accordingly.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

---
V1->V2:
* gcc 8.x works, gcc 9.x doesn't, gcc 10.x+ work

---
 toolchain/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/Config.in +4 -2
index c35c52d142..d033ce3962 100644
@@ -165,10 +165,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
 # Error: branch offset out of range on Nios II. This bug
-# no longer exists in gcc >= 8.x.
+# no longer exists in gcc 8.x but reappeared on gcc 9.x and has been
+# fixed on gcc 10.x.
 config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
 	bool
-	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if BR2_nios2
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_TOOLCHAIN_GCC_AT_LEAST_9
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
 # ICE: SH4 -Os causes internal compiler error. This bug
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#5 lore raw
Quoted 21 lines · Giulio Benetti

Gcc bug 99140 has been fixed on gcc 8.x but reappeared on gcc 9.x while it's been fixed on gcc 10.x+. So let's update BR2_TOOLCHAIN_HAS_GCC_BUG_99140 accordingly.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

---
V1->V2:
* gcc 8.x works, gcc 9.x doesn't, gcc 10.x+ work

---
 toolchain/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/Config.in +0 -0
index c35c52d142..d033ce3962 100644
@@ -165,10 +165,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
 

toolchain/Config.in config BR2_TOOLCHAIN_HAS_GCC_BUG_93847 · line 173

Quoted 10 lines
toolchain/Config.in +4 -2
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
 # Error: branch offset out of range on Nios II. This bug
-# no longer exists in gcc >= 8.x.
+# no longer exists in gcc 8.x but reappeared on gcc 9.x and has been
+# fixed on gcc 10.x.
 config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
 	bool
-	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if BR2_nios2
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_TOOLCHAIN_GCC_AT_LEAST_9

Unless I'm very mistaken, this is basically saying "depends on any GCC version
except GCC 8". However, from your commit message, it seems it should be "depends on GCC < 8 or GCC 9". To simplify the logic, I would say:

default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9 && !BR2_TOOLCHAIN_GCC_AT_LEAST_10 depends on BR2_nios2

Regards,
Arnout

toolchain/Config.in config BR2_TOOLCHAIN_HAS_GCC_BUG_93847

Quoted 4 lines
toolchain/Config.in +0 -0
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
 # ICE: SH4 -Os causes internal compiler error. This bug
 

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#6 lore raw

Hi Arnout,

Quoted 39 lines · Arnout Vandecappelle
Quoted 21 lines · Giulio Benetti

Gcc bug 99140 has been fixed on gcc 8.x but reappeared on gcc 9.x while it's been fixed on gcc 10.x+. So let's update BR2_TOOLCHAIN_HAS_GCC_BUG_99140 accordingly.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

---
V1->V2:
* gcc 8.x works, gcc 9.x doesn't, gcc 10.x+ work

---
  toolchain/Config.in | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
toolchain/Config.in +0 -0
index c35c52d142..d033ce3962 100644
@@ -165,10 +165,12 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
 

toolchain/Config.in config BR2_TOOLCHAIN_HAS_GCC_BUG_93847 · line 173

Quoted 10 lines
toolchain/Config.in +4 -2
  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
  # Error: branch offset out of range on Nios II. This bug
-# no longer exists in gcc >= 8.x.
+# no longer exists in gcc 8.x but reappeared on gcc 9.x and has been
+# fixed on gcc 10.x.
  config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
  	bool
-	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if BR2_nios2
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || BR2_TOOLCHAIN_GCC_AT_LEAST_9

Unless I'm very mistaken, this is basically saying "depends on any GCC version
except GCC 8". However, from your commit message, it seems it should be "depends on GCC < 8 or GCC 9". To simplify the logic, I would say:

Quoted 3 lines

default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9 && !BR2_TOOLCHAIN_GCC_AT_LEAST_10 depends on BR2_nios2

Oh, that is a very elegant solution. I've learnt something new! Thank you. I've sent v2 patch for this

Best regards!

Signature · 6 lines
Giulio Benetti
Benetti Engineering sas
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#7 lore raw

PATCH v2 1/1 toolchain: update gcc bug 99140

In reply to Arnout Vandecappelle

Gcc bug 99140 has been fixed on gcc 8.x but reappeared on gcc 9.x while it's been fixed on gcc 10.x+. So let's update BR2_TOOLCHAIN_HAS_GCC_BUG_99140 accordingly.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

---
V1->V2:
* fix/improve Kconfig mechanism as suggested by Arnout

---
 toolchain/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
toolchain/Config.in +5 -2
index c35c52d142..bf2bb3efe4 100644
@@ -165,10 +165,13 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_93847
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99410
 # Error: branch offset out of range on Nios II. This bug
-# no longer exists in gcc >= 8.x.
+# no longer exists in gcc 8.x but reappeared on gcc 9.x and has been
+# fixed on gcc 10.x.
 config BR2_TOOLCHAIN_HAS_GCC_BUG_99140
 	bool
-	default y if BR2_nios2 && !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if !BR2_TOOLCHAIN_GCC_AT_LEAST_8
+	default y if BR2_TOOLCHAIN_GCC_AT_LEAST_9 && !BR2_TOOLCHAIN_GCC_AT_LEAST_10
+	depends on BR2_nios2
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101737
 # ICE: SH4 -Os causes internal compiler error. This bug
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot
#8 lore raw
Quoted 7 lines · On Tue, 24 Aug 2021 00:58:46 +0200 Giulio Benetti…

Gcc bug 99140 has been fixed on gcc 8.x but reappeared on gcc 9.x while it's been fixed on gcc 10.x+. So let's update BR2_TOOLCHAIN_HAS_GCC_BUG_99140 accordingly.

Fixes:
http://autobuild.buildroot.net/results/c55/c55f50a8d657695f0d5492c32efa666254cd7f99/

Quoted 7 lines

---
V1->V2:
* fix/improve Kconfig mechanism as suggested by Arnout

---
 toolchain/Config.in | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot