Skip to contentSkip to conversation

External GCC12 toolchain support

PATCH In review Florian Fainelli 3 participants 7 messages Apr 26, 2022 – Apr 27, 2022

lore
Share & tools
lore
#0 lore raw

v2 cover External GCC12 toolchain support

This patch series allows us to use Linaro's GCC12 snapshot that can be downloaded from here:

https://snapshots.linaro.org/gnu-toolchain/12.0-2021.10-1/aarch64-linux-gnu/

Changes in v2:

- rebased against master

Florian Fainelli (2):
toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option toolchain/toolchain-external/toolchain-external-custom: add gcc 12
version selection

 toolchain/Config.in                                   | 11 +++++++++--
 .../toolchain-external-custom/Config.in.options       |  4 ++++
 2 files changed, 13 insertions(+), 2 deletions(-)
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

PATCH v2 1/2 toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option

In order to add gcc 12 support for internal and external toolchain in follow-up commits, introduce BR2_TOOLCHAIN_GCC_AT_LEAST_12 symbol.

---
 toolchain/Config.in | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
toolchain/Config.in +9 -2
index d2c81217c84a..b572a89f2f85 100644
@@ -117,7 +117,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_43744
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \
 		BR2_TOOLCHAIN_GCC_AT_LEAST_9 || \
 		BR2_TOOLCHAIN_GCC_AT_LEAST_10 || \
-		BR2_TOOLCHAIN_GCC_AT_LEAST_11
+		BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		BR2_TOOLCHAIN_GCC_AT_LEAST_12
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
 # longer exists in gcc 8.x.
@@ -150,7 +151,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
 config BR2_TOOLCHAIN_HAS_GCC_BUG_83143
 	bool
 	default y if BR2_sh
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		   BR2_TOOLCHAIN_GCC_AT_LEAST_12
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85180. This bug no
 # longer exists in gcc 8.x.
@@ -698,10 +700,15 @@ config BR2_TOOLCHAIN_GCC_AT_LEAST_11
 	bool
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_10
 
+config BR2_TOOLCHAIN_GCC_AT_LEAST_12
+	bool
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
+
 # This order guarantees that the highest version is set, as kconfig
 # stops affecting a value on the first matching default.
 config BR2_TOOLCHAIN_GCC_AT_LEAST
 	string
+	default "12"	if BR2_TOOLCHAIN_GCC_AT_LEAST_12
 	default "11"	if BR2_TOOLCHAIN_GCC_AT_LEAST_11
 	default "10"	if BR2_TOOLCHAIN_GCC_AT_LEAST_10
 	default "9"	if BR2_TOOLCHAIN_GCC_AT_LEAST_9
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#2 lore raw

Re: [Buildroot] [PATCH v2 1/2] toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option

Hello Florian,

Thanks for the patch! I hope you're doing well :-)

Quoted 23 lines · On Tue, 26 Apr 2022 10:32:10 -0700 Florian Fainelli <[email protected]>…

In order to add gcc 12 support for internal and external toolchain in follow-up commits, introduce BR2_TOOLCHAIN_GCC_AT_LEAST_12 symbol.

---
 toolchain/Config.in | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
toolchain/Config.in +2 -1
index d2c81217c84a..b572a89f2f85 100644
@@ -117,7 +117,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_43744
 	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \
 		BR2_TOOLCHAIN_GCC_AT_LEAST_9 || \
 		BR2_TOOLCHAIN_GCC_AT_LEAST_10 || \
-		BR2_TOOLCHAIN_GCC_AT_LEAST_11
+		BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		BR2_TOOLCHAIN_GCC_AT_LEAST_12
 
 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
 # longer exists in gcc 8.x.

toolchain/Config.in config BR2_TOOLCHAIN_HAS_GCC_BUG_68485 · line 155

Quoted 6 lines
toolchain/Config.in +2 -1
@@ -150,7 +151,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
 config BR2_TOOLCHAIN_HAS_GCC_BUG_83143
 	bool
 	default y if BR2_sh
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		   BR2_TOOLCHAIN_GCC_AT_LEAST_12

Did you verify that these two bugs still affected gcc 12.x ?

Thanks,

Thomas

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

Re: [Buildroot] [PATCH v2 1/2] toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option

Hi Thomas,

Quoted 3 lines · Thomas Petazzoni

Hello Florian,

Thanks for the patch! I hope you're doing well :-)

Doing alright thanks for asking.

Quoted 24 lines
Quoted 20 lines · On Tue, 26 Apr 2022 10:32:10 -0700 Florian Fainelli <[email protected]>…

In order to add gcc 12 support for internal and external toolchain in follow-up commits, introduce BR2_TOOLCHAIN_GCC_AT_LEAST_12 symbol.

---
  toolchain/Config.in | 11 +++++++++--
  1 file changed, 9 insertions(+), 2 deletions(-)
toolchain/Config.in +2 -1
index d2c81217c84a..b572a89f2f85 100644
@@ -117,7 +117,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_43744
  	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_8 || \
  		BR2_TOOLCHAIN_GCC_AT_LEAST_9 || \
  		BR2_TOOLCHAIN_GCC_AT_LEAST_10 || \
-		BR2_TOOLCHAIN_GCC_AT_LEAST_11
+		BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		BR2_TOOLCHAIN_GCC_AT_LEAST_12
 
Quoted 11 lines

toolchain/Config.in config BR2_TOOLCHAIN_HAS_GCC_BUG_68485 · line 155

Quoted 9 lines
toolchain/Config.in +2 -1
  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63261. This bug no
  # longer exists in gcc 8.x.
@@ -150,7 +151,8 @@ config BR2_TOOLCHAIN_HAS_GCC_BUG_68485
  config BR2_TOOLCHAIN_HAS_GCC_BUG_83143
  	bool
  	default y if BR2_sh
-	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_10 || BR2_TOOLCHAIN_GCC_AT_LEAST_11 || \
+		   BR2_TOOLCHAIN_GCC_AT_LEAST_12

Did you verify that these two bugs still affected gcc 12.x ?

The bug tracker entry for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43744 does not seem to show a resolution for this bug so I am assuming that it is still active since it was not fixed in GCC 11.

Similarly it seemed like https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83143 was still not quite fixed.

Do you read the comments differently?

Signature · 5 lines
Florian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#4 lore raw

PATCH v2 2/2 toolchain/toolchain-external/toolchain-external-custom: add gcc 12 version selection

In reply to Florian Fainelli

This patch allows to use an external toolchain based on gcc 12.

---
 .../toolchain-external-custom/Config.in.options               | 4 ++++
 1 file changed, 4 insertions(+)
toolchain/toolchain-external/toolchain-external-custom/Config.in.options +4 -0
index 9346fa3feb75..683204e56ebd 100644
@@ -31,6 +31,10 @@ choice
 	  Set to the gcc version that is used by your external
 	  toolchain.
 
+config BR2_TOOLCHAIN_EXTERNAL_GCC_12
+	bool "12.x"
+	select BR2_TOOLCHAIN_GCC_AT_LEAST_12
+
 config BR2_TOOLCHAIN_EXTERNAL_GCC_11
 	bool "11.x"
 	select BR2_TOOLCHAIN_GCC_AT_LEAST_11
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#5 lore raw
In reply to Florian Fainelli
Quoted 5 lines · Florian Fainelli

This patch series allows us to use Linaro's GCC12 snapshot that can be downloaded from here:

https://snapshots.linaro.org/gnu-toolchain/12.0-2021.10-1/aarch64-linux-gnu/

Quoted 8 lines

Changes in v2:

- rebased against master

Florian Fainelli (2):
toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option toolchain/toolchain-external/toolchain-external-custom: add gcc 12
version selection

Series applied to master, thanks.

I was thinking that it would be useful to add an option
BR2_TOOLCHAIN_GCC_NEWER and BR2_TOOLCHAIN_EXTERNAL_GCC_12_PLUS that selects it. That way, you can use newer GCC without changing Buildroot. Same for linux-headers.

Note that the blind option can simply be _NEWER, but the user-visible option
has to have the version explicit in it, so legacy handling can force the user to use the correct version when Buildroot is updated.

Regards,
Arnout

Quoted 5 lines
  toolchain/Config.in                                   | 11 +++++++++--
  .../toolchain-external-custom/Config.in.options       |  4 ++++
  2 files changed, 13 insertions(+), 2 deletions(-)

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#6 lore raw
Quoted 18 lines · Arnout Vandecappelle
Quoted 6 lines · Florian Fainelli

This patch series allows us to use Linaro's GCC12 snapshot that can be downloaded from here:

https://snapshots.linaro.org/gnu-toolchain/12.0-2021.10-1/aarch64-linux-gnu/

Quoted 8 lines

Changes in v2:

- rebased against master

Florian Fainelli (2):
   toolchain/Config.in: add BR2_TOOLCHAIN_GCC_AT_LEAST_12 blind option toolchain/toolchain-external/toolchain-external-custom: add gcc 12 version selection

Quoted 7 lines

 Series applied to master, thanks.

 I was thinking that it would be useful to add an option
BR2_TOOLCHAIN_GCC_NEWER and BR2_TOOLCHAIN_EXTERNAL_GCC_12_PLUS that selects it. That way, you can use newer GCC without changing Buildroot. Same for linux-headers.

 Note that the blind option can simply be _NEWER, but the user-visible
option has to have the version explicit in it, so legacy handling can force the user to use the correct version when Buildroot is updated.

Yes, that makes sense to me, I will submit a patch series unless you have started something already.

Signature · 5 lines
Florian
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot