'armclang vs GCC

I've been following a few ARM / Raspberry Pi tutorials for building an OS, and they all seem to use GCC. Being that I'm using my MacBook, I've installed the toolchain available from https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads for macOS.

However, on further research I see the "ARM compiler for embedded" seems to be the "official" and latest toolchain, and is based on clang/llvm, but this isn't available for Mac. (Docs at https://developer.arm.com/documentation/100748/0618/Getting-Started/Introduction-to-Arm-Compiler-for-Embedded-6?lang=en and download at https://developer.arm.com/downloads/-/arm-compiler-for-embedded ).

Is there much of a difference between using either toolset? I see the GCC versions are tagged as "community supported". Why do nearly all other sources install the GCC tools if the clang/llvm based toolset is the latest and greatest from arm? (And why no macOS version - especially as it's LLVM based!?)

[Edit: Additional details for clarity]

This isn't a general "Which is better: GCC or Clang?" type question. I'm just trying to avoid going down a dead-end or learning "deprecated" toolsets as I start to learn this stuff. Tools evolve over time, and they clearly have in the ARM compiler space.

For example, some of the first examples I found used armasm, which now appears to be "legacy". I followed some instructions to build a project on my Linux box which install the gcc-aarch64-linux-gnu package and command-line (via the usual sudo apt-get install ... method), but then when I installed the GCC/GNU tools from the ARM site (linked above) on my Mac the compiler binary is gcc-aarch64-none-elf. (which appears to work the same - so I just aliased it to avoid updating all the project build scripts).

Now I find on the ARM site their docs state the armclang compiler is the latest and greatest toolset to use. For example, the release notes [1] state "Arm Compiler for Embedded provides the earliest, most complete, and most accurate support for the latest architectural features and extensions of the Arm architecture. It supports all the latest Arm processors, including those in development.", and "The key features of Arm Compiler for Embedded 6.18 include support for... Armv9.3-A... The Cortex-X1C processor, etc.". For example, it says this release added support for the compiler options -march=armv9.3-a and -mcpu=cortex-x1c. I'm going to assume the 'upstream' Clang and GCC don't support these yet. (The version of GCC I installed with apt-get doesn't, anyway).

If I were to hazard a guess based on the info I've found, it would seem that the latest ARM compiler toolsets to use are either of GCC or Clang based, and both should support roughly the same usages. If you need to be on the bleeding edge ARM ISA or ARM core support, then use the ARM provided compilers (either the Clang based "ARM Compiler" or the GCC-based "community supported" one on their site). Else the generally available GCC/Clang packages via the usual distribution channels have probably "upstreamed" most of the features needed for most ARM development. Does that sound about right?

[1] https://developer.arm.com/-/media/Arm%20Developer%20Community/Downloads/Arm%20Compiler%20for%20Embedded/6-18/Release%20notes%20for%20Arm%20Compiler%20for%20Embedded%206.pdf



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source