Skip to contentSkip to conversation

package/arm-gnu-a-toolchain: bump to version 10.3-2021.07

PATCH In review Kory Maincent 3 participants 10 messages Sep 8, 2021 – Dec 30, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/arm-gnu-a-toolchain: bump to version 10.3-2021.07

Update to version 10.3-2021.07.
The old version contained a nasty nano.spec. The nano.spec file was adding -lc_nano option but the c_nano.a library was not delivered in the toolchain archive.

---
 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash | 2 +-
 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash +1 -1
index b18e56c151..26b9f1be1e 100644
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256 ac952d89ae0fc3543e81099e7d34917efc621f5def112eee843fd1ce755eca8c  gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz
+sha256 8c5b8de344e23cd035ca2b53bbf2075c58131ad61223cae48510641d3e556cea  gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +3 -3
index d7088892ca..1bbfa45d78 100644
@@ -4,9 +4,9 @@
 #
 ################################################################################
 
-ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
-ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/$(ARM_GNU_A_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_A_TOOLCHAIN_VERSION = 10.3-2021.07
+ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(ARM_GNU_A_TOOLCHAIN_VERSION)
+ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-none-eabi-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-linux.tar.bz2
 ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
 
 HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi
Signature · 6 lines
2.25.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 24 lines · Kory Maincent

Update to version 10.3-2021.07.
The old version contained a nasty nano.spec. The nano.spec file was adding -lc_nano option but the c_nano.a library was not delivered in the toolchain archive.

---
  package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash | 2 +-
  package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk   | 6 +++---
  2 files changed, 4 insertions(+), 4 deletions(-)
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash +1 -1
index b18e56c151..26b9f1be1e 100644
@@ -1,2 +1,2 @@
  # Locally calculated
-sha256 ac952d89ae0fc3543e81099e7d34917efc621f5def112eee843fd1ce755eca8c  gcc-arm-9.2-2019.12-x86_64-arm-none-eabi.tar.xz
+sha256 8c5b8de344e23cd035ca2b53bbf2075c58131ad61223cae48510641d3e556cea  gcc-arm-none-eabi-10.3-2021.07-x86_64-linux.tar.bz2
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +0 -0
index d7088892ca..1bbfa45d78 100644

package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk line 9

Quoted 9 lines
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +3 -3
@@ -4,9 +4,9 @@
  #
  ################################################################################
 
-ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
-ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/$(ARM_GNU_A_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_A_TOOLCHAIN_VERSION = 10.3-2021.07
+ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(ARM_GNU_A_TOOLCHAIN_VERSION)
+ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-none-eabi-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-linux.tar.bz2

Err, this can't be right... 'gnu-rm' stands for "GNU-based toolchain for
Cortex-R and Cortex-M", and "arm-none-eabi" means it's a toolchain without libc...

So either someone made a huge mistake at ARM, or you haven't actually tested
this patch :-)

Regards,
Arnout

package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk line 12

Quoted 4 lines
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +0 -0
  ARM_GNU_A_TOOLCHAIN_LICENSE = GPL-3.0+
 
  HOST_ARM_GNU_A_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/gcc-arm-none-eabi

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

#2 lore raw

Hello,

Quoted 10 lines · On Sun, 19 Sep 2021 14:35:56 +0200 Arnout Vandecappelle <[email protected]> wrote:

package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk line 9

Quoted 6 lines
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +3 -3
-ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
-ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/$(ARM_GNU_A_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_A_TOOLCHAIN_VERSION = 10.3-2021.07
+ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(ARM_GNU_A_TOOLCHAIN_VERSION)
+ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-none-eabi-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-linux.tar.bz2  

Err, this can't be right... 'gnu-rm' stands for "GNU-based toolchain for
Cortex-R and Cortex-M", and "arm-none-eabi" means it's a toolchain without libc...

Quoted 2 lines

So either someone made a huge mistake at ARM, or you haven't actually tested
this patch :-)

It was tested to build code for a Cortex-M4.

This package was originally introduced to build ARM 32-bit code in the context of TF-A (boot/arm-trusted-firmware/). At the very beginning, was submitted by a Marvell person, who also had to build code for a Cortex-M3 co-processor IIRC, but then was taken over by a person from Amarula, who needed it to build ARM 32-bit code running on a Cortex-A.

If it's truly a bare-metal toolchain with no libraries, it should not matter, right? You just pass to gcc -march=XYZ, and it will produce the right code. However, my understanding is that those bare-metal toolchains do have some libraries built for the target, which can potentially get linked with the code produced.

So, long story short: do we need arm-gnu-a-toolchaind and arm-gnu-rm-toolchain packages ?

Best regards,

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
Quoted 17 lines · Thomas Petazzoni

Hello,

Quoted 12 lines · On Sun, 19 Sep 2021 14:35:56 +0200 Arnout Vandecappelle <[email protected]> wrote:

package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk line 9

Quoted 6 lines
package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk +3 -3
-ARM_GNU_A_TOOLCHAIN_VERSION = 9.2-2019.12
-ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-a/$(ARM_GNU_A_TOOLCHAIN_VERSION)/binrel
-ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-arm-none-eabi.tar.xz
+ARM_GNU_A_TOOLCHAIN_VERSION = 10.3-2021.07
+ARM_GNU_A_TOOLCHAIN_SITE = https://developer.arm.com/-/media/Files/downloads/gnu-rm/$(ARM_GNU_A_TOOLCHAIN_VERSION)
+ARM_GNU_A_TOOLCHAIN_SOURCE = gcc-arm-none-eabi-$(ARM_GNU_A_TOOLCHAIN_VERSION)-x86_64-linux.tar.bz2

Err, this can't be right... 'gnu-rm' stands for "GNU-based toolchain for
Cortex-R and Cortex-M", and "arm-none-eabi" means it's a toolchain without libc...

So either someone made a huge mistake at ARM, or you haven't actually tested
this patch :-)

Or, of course, I can't read and I see
toolchain/toolchain-external/toolchain-external-arm-arm instead of package/arm-gnu-a-toolchain...

Worse still: I didn't see that the old one already *was* arm-none-eabi, it was
just specified at the end of the tarball name instead of at the beginning.

Quoted 8 lines

It was tested to build code for a Cortex-M4.

This package was originally introduced to build ARM 32-bit code in the context of TF-A (boot/arm-trusted-firmware/). At the very beginning, was submitted by a Marvell person, who also had to build code for a Cortex-M3 co-processor IIRC, but then was taken over by a person from Amarula, who needed it to build ARM 32-bit code running on a Cortex-A.

Quoted 5 lines

If it's truly a bare-metal toolchain with no libraries, it should not matter, right? You just pass to gcc -march=XYZ, and it will produce the right code. However, my understanding is that those bare-metal toolchains do have some libraries built for the target, which can potentially get linked with the code produced.

Yeah, you get libgcc and libstdc++ from the gcc source. libstdc++ is probably
not used . libgcc may not be linked in either if -nostdlib is used (which it probably is).

Quoted 2 lines

So, long story short: do we need arm-gnu-a-toolchaind and arm-gnu-rm-toolchain packages ?

Easy to check: build a bunch of the defconfigs which set
BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_ARM32_TOOLCHAIN=y. And maybe double-check if indeed ATF doesn't link with libgcc.

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

#4 lore raw
Quoted 3 lines · On Mon, 20 Sep 2021 11:18:34 +0200 Arnout Vandecappelle <[email protected]> wrote:

Yeah, you get libgcc and libstdc++ from the gcc source. libstdc++ is probably
not used . libgcc may not be linked in either if -nostdlib is used (which it probably is).

I think there's more than that, there is a c_nano library integrated in this toolchain. I'm not sure what it is, but the Cortex-M4 code we're building links against that library (I haven't investigated further for now).

Best regards,

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
#5 lore raw
Quoted 11 lines · Thomas Petazzoni
Quoted 3 lines · On Mon, 20 Sep 2021 11:18:34 +0200 Arnout Vandecappelle <[email protected]> wrote:

Yeah, you get libgcc and libstdc++ from the gcc source. libstdc++ is probably
not used . libgcc may not be linked in either if -nostdlib is used (which it probably is).

I think there's more than that, there is a c_nano library integrated in this toolchain. I'm not sure what it is, but the Cortex-M4 code we're building links against that library (I haven't investigated further for now).

Obviously, I can't comment on some mysterious out-of-tree package you have...

If that package (which I guess will eventually be upstreamed) links with
anything that is part of the toolchain, that's still fine as long as there's no other package (i.e. ATF) links with it (and expects a different target architecture).

However, if the intention is to use the toolchain for a Cortex-M and you need
any of its libraries, it's probably a lot cleaner to simply have a separate arm-gnu-a-toolchain and arm-gnu-rm-toolchain. It's definitely a bit weird to have a package "arm-gnu-a-toolchain" that actually uses the -rm one...

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

#6 lore raw

Hello Arnout,

Quoted 6 lines · On Mon, 20 Sep 2021 20:52:29 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 4 lines

I think there's more than that, there is a c_nano library integrated in this toolchain. I'm not sure what it is, but the Cortex-M4 code we're building links against that library (I haven't investigated further for now).

Obviously, I can't comment on some mysterious out-of-tree package you have...

It's not that mysterious in fact, we are building the examples provided by ST for the Cortex-M4 included in their STM32MP157. I would ideally like this package to be submitted to upstream Buildroot, but it has some not so nice aspects: these examples are implemented using some fancy IDE, which saves some "project files", and you can only build the examples using the IDE. The Yocto packaging, which we have replicated in our Buildroot packaging, consists in a Makefile + some scripting that parses those "project files" to generate the final Makefiles to build those examples without the damn IDE.

Yeah, not great :-/

Quoted 4 lines

If that package (which I guess will eventually be upstreamed) links with
anything that is part of the toolchain, that's still fine as long as there's no other package (i.e. ATF) links with it (and expects a different target architecture).

As you can see from above, it won't link with any other thing: it's bare-metal code for a Cortex-M4 micro-controller.

Quoted 4 lines

However, if the intention is to use the toolchain for a Cortex-M and you need
any of its libraries, it's probably a lot cleaner to simply have a separate arm-gnu-a-toolchain and arm-gnu-rm-toolchain. It's definitely a bit weird to have a package "arm-gnu-a-toolchain" that actually uses the -rm one...

Yes, I agree that we should probably add a arm-gnu-rm-toolchain package side-by-side with the arm-gnu-a-toolchain. Köry: something for you to look at, perhaps? :-)

Best regards,

Thomas Petazzoni

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
#7 lore raw
Quoted 5 lines · Thomas Petazzoni

Hello Arnout,

On Mon, 20 Sep 2021 20:52:29 +0200
Arnout Vandecappelle <[email protected]> wrote:

[snip]

Quoted 7 lines
Quoted 4 lines

If that package (which I guess will eventually be upstreamed) links with
anything that is part of the toolchain, that's still fine as long as there's no other package (i.e. ATF) links with it (and expects a different target architecture).

As you can see from above, it won't link with any other thing: it's bare-metal code for a Cortex-M4 micro-controller.

Well, bare-metal code often links with a libc that is included in the
toolchain (newlib or apparently c-nano in this case), and usually with libgcc as well (for memcpy and friends).

Regards,
Arnout

Quoted 5 lines
Quoted 4 lines

However, if the intention is to use the toolchain for a Cortex-M and you need
any of its libraries, it's probably a lot cleaner to simply have a separate arm-gnu-a-toolchain and arm-gnu-rm-toolchain. It's definitely a bit weird to have a package "arm-gnu-a-toolchain" that actually uses the -rm one...

Quoted 8 lines

Yes, I agree that we should probably add a arm-gnu-rm-toolchain package side-by-side with the arm-gnu-a-toolchain. Köry: something for you to look at, perhaps? :-)

Best regards,

Thomas Petazzoni

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

#8 lore raw

Hello Arnout, Thomas,

Quoted 10 lines · On Thu, 23 Sep 2021 23:20:40 +0200 Arnout Vandecappelle <[email protected]> wrote:
Quoted 10 lines
Quoted 6 lines

However, if the intention is to use the toolchain for a Cortex-M and
you need any of its libraries, it's probably a lot cleaner to simply have a separate arm-gnu-a-toolchain and arm-gnu-rm-toolchain. It's definitely a bit weird to have a package "arm-gnu-a-toolchain" that actually uses the -rm one...

Yes, I agree that we should probably add a arm-gnu-rm-toolchain package side-by-side with the arm-gnu-a-toolchain. Köry: something for you to look at, perhaps? :-)

Hum, I don't know how to do it properly, without link and naming installation conflict between these two toolchains.

Regards,

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

#9 lore raw
In reply to Kory Maincent

Hello Köry,

Quoted 10 lines · On Wed, 8 Sep 2021 10:16:30 +0200 Kory Maincent <[email protected]>…

Update to version 10.3-2021.07.
The old version contained a nasty nano.spec. The nano.spec file was adding -lc_nano option but the c_nano.a library was not delivered in the toolchain archive.

---
 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.hash | 2 +-
 package/arm-gnu-a-toolchain/arm-gnu-a-toolchain.mk   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

So, I have applied, but with a very important change: I really bump the gnu-a toolchain, I don't switch to the gnu-rm toolchain, which should be added as a separate package, because it's different.

Best regards,

Thomas

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