Le 10/08/2024 à 23:48, David Billsbrough via Dng a écrit :
> With much referencing legacy languages and manuals, I had to check out
> how long to get a working compiler to test out on a current Linux
> installation. It sounded like a challenge:
>
> <gnat installed>
>
> kc4zvw@www:~$ gnat --version
> GNAT 10.5.0
> Copyright (C) 1996-2020, Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> kc4zvw@www:~$
Sorry but I don't understand at all the meaning of your mail and
what conclusion you draw (~;
About challenges with Gnat, I addressed around 2012 the challenge
of building a GCC with Ada, C and C++ support, native arch-wise, but
linking against Musl-libc and itself statically linked against Musl
libc. It first needed a cross-compiler, to build the native one. It took
me months, and the cpu power of a Dell server, mostly because I'm not an
expert of GCC, but also because the Gnat runtime library contained hacks
into the GNU libc. But I succeeded.
I imagine it is possible to compile the front-end separately, since
it is packaged separately in Debian, but this is not described in the
GCC manuals; instead, they suggest to just list the languages you want.
Of course C and C++ were necessary for the cross-compiler, since GCC
itself is written in C and C++.
There was still a litle trick missing in my compiler: making it
link the libc statically by default. Gnat links by default all libraries
statically, except the libc, which is a "feature" of glibc. I couldn't
get any help from the GCC devel mailing list: nobody answered.
-- Didier