GNAT/GCC ADA compiler

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
mfro
Atari God
Atari God
Posts: 1171
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: GNAT/GCC ADA compiler

Post by mfro »

Do you happen to have LTO enabled in your ELF toolchain?
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2421
Joined: Sun Aug 03, 2014 5:54 pm

Re: GNAT/GCC ADA compiler

Post by ThorstenOtto »

No, not anymore (at least not in the libraries). Problem is that in every major gcc version, the file format seems to change, and you can't use libraries compiled by gcc7 with gcc8 or vice versa. And for the mintlib, where it would be most useful, it never worked, because lto does not support weak symbols, and there were also problems with known builtin functions like strlen, memcpy etc.
User avatar
mfro
Atari God
Atari God
Posts: 1171
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: GNAT/GCC ADA compiler

Post by mfro »

Do you have your Ada ELF compiler variant available somewhere for download? Maybe I'll find time to look into the --gc-sections thing.

Code size is becoming ridiculous...
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2421
Joined: Sun Aug 03, 2014 5:54 pm

Re: GNAT/GCC ADA compiler

Post by ThorstenOtto »

Yes:

- https://tho-otto.de/download/mint/gcc-1 ... x64.tar.xz (driver, C & c++ compiler)
- https://tho-otto.de/download/mint/gcc-1 ... x64.tar.xz (ADA backend & tools)

You may also need the binutils:
https://tho-otto.de/download/mint/binut ... x64.tar.xz

If ld crashes, i'll have to upload the version that i compiled a few days ago, but that will need glibc >= 2.36 again. The version currently on the site will need glibc >= 2.14
User avatar
mfro
Atari God
Atari God
Posts: 1171
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: GNAT/GCC ADA compiler

Post by mfro »

Thanks!
ThorstenOtto
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2421
Joined: Sun Aug 03, 2014 5:54 pm

Re: GNAT/GCC ADA compiler

Post by ThorstenOtto »

As i figured out, using elf compiler toolchain does not help. That --gc-sections is only supported when the *output* format is elf, which isn't the case (only the object files are elf, the executable is still our a.out-mint format).

Beside that: the next version of ORCS will support ADA output ;) If someone wants to experiment, it is available here : https://tho-otto.de/download/orcs-ada.zip (but be aware that @mfro is still working on the bindings, and there might be changes needed in the final version).
Post Reply

Return to “Coding”