with Ada.Text_IO;
use Ada.Text_IO;
procedure Hello is
begin
Put_Line ("Hello WORLD!");
end Hello;
Slakware, Debian, etc have a completely different approach from Gentoo for their "ecosystem" tools. I extracted "gnat1", which is the real Ada compiler, and other useful libraries, and made a special package in /opt/gnat
There is still no "gcc" able to support gnat, and collect2, gnatmake, etc, still don't work.
# myinfo gcc languages
--enable-languages=c,c++
To have ada supported by gcc, the above line should look this way
# myinfo gcc languages
--enable-languages=c,c++,ada
Which is what I currently have on my macmini
macmini-intel # myinfo gcc-config languages
[1] i686-pc-linux-gnu-4.9.4-gnat2016 --enable-languages=c,c++,ada
[2] i686-pc-linux-gnu-6.5.0 --enable-languages=c,c++,fortran
[3] i686-pc-linux-gnu-7.3.1-gnat2018 --enable-languages=c,c++,ada
[4] i686-pc-linux-gnu-7.5.0 --enable-languages=c,c++,fortran
[5] i686-pc-linux-gnu-8.3.1-gnat2019 * --enable-languages=c,c++,ada
[6] i686-pc-linux-gnu-8.4.0 --enable-languages=c,c++,fortran
[7] i686-pc-linux-gnu-9.3.0 --enable-languages=c,c++,fortran
[8] i686-pc-linux-gnu-10.2.0 --enable-languages=c,c++,fortran
[9] i686-pc-linux-gnu-11.0.0-rust2020 --enable-languages=c,c++,rust
But in order to have it, you need an "ada-bootstrapper" to compile the ada support required by gcc.
In other words, GCC must be compiled by GCC, and since GNAT is mostly written in Ada, therefore,
native versions of GCC C and Ada compilers are necessary.
It is also recommended that the native versions should be at least the same versions as building cross compiler. Compilation with older versions of GCC may fail.
So, with just an existing gnat1, I have just created a wrapper to have things managed in wild way, and it seems working.
# gcc-ada-wrapper hello.adb
step1, ada compiling hello.adb ... done
step2, asm compiling hello.s ... done
step3, ada binding hello.adb ... done
step4, asm compiling b~hello.s ... done
step5, linking hello.o b~hello.o system.ada.libs ... done
# ./hello
Hello WORLD!
Not perfect, but hey? it's one step ahead
