FS#79939 - [arm-none-eabi-gcc] add support for Ada

Attached to Project: Arch Linux
Opened by Alex (nytpu) - Friday, 13 October 2023, 00:13 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Task Type Feature Request
Category Packages: Extra
Status Closed
Assigned To Anatol Pomozov (anatolik)
Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
It'd be nice for the arm-none-eabi-gcc package to also build a cross-compiler for Ada, naturally split into a separate package like the x86-64 gcc and gcc-ada packages are. Ot is difficult-to-impossible to build just Ada/GNAT without building all of GCC and then plucking out the Ada bits. The simplest and most efficient solution seems to be the strategy done by gcc & gcc-* packages: building them all at once and splitting them up in the package() stage.

As far as I can tell with my experimenting with making it as an AUR package, all it would require is adding `ada` to the `--enable-languages` array in configure, and then add the aforementioned second package() function.

(I perfectly understand if this is rejected outright since it does require creating a new package)

Additional info:
* Current arm-none-eabi-gcc version: 13.2.0-2

Steps to reproduce:
Not a bug.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/arm-none-eabi-gcc/issu es/2
Comment by Toolybird (Toolybird) - Friday, 13 October 2023, 19:37 GMT
Requests like this carry more weight when accompanied by a fully tested patch (still no guarantee it'll be implemented though).

Note: for the native GCC, ada is required to bootstrap ada. Not sure how this plays out in a cross-compiler scenario.
Comment by Alex (nytpu) - Friday, 13 October 2023, 20:03 GMT
Hmm, having never contributed to the main Arch repos before, I didn't know if it is acceptable for non-contributors to submit patches. I have a mostly-working patch that I'll get shipshape and post here then.

And yes, makedepends for the cross-compiler does require the native (non cross) gcc-ada package, like the C/C++ cross-compiler already requires the native gcc package (albeit implicitly as part of base-devel). Luckily there shouldn't be any annoying bootstrapping issues because of it.
Comment by Alex (nytpu) - Monday, 16 October 2023, 03:05 GMT
Here's a patch to build and package a second arm-none-eabi-gcc-ada package alongside the existing arm-none-eabi-gcc. I tried to add descriptive comments explaining why what was added was added, because of issues I ran into while building.

According to pkgdiff, the arm-none-eabi-gcc package is unchanged beyond additions to usr/bin/arm-none-eabi-gcc and unreproducable elements like random folder names (e.g. usr/lib/gcc/arm-none-eabi/13.2.0/stKUGtMy). namcap reports no issues that weren't already present in the package. The C cross-compiler was tested without the -ada package installed, with a variety of real-world programs I have and it matches the existing package. The -ada package was tested with a variety of real-world embedded Ada runtimes and programs targeting three different ARM chipsets and all ran perfectly; it also reproduced binaries compiled using a prebuilt arm-eabi-gnat I have downloaded.

Loading...