Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

build libada from gcc source

Tags:

gcc

ada

I tried to build gnat compiler from gcc-11.2.0 with following script

./configure --prefix="/root/gcc-11" --enable-languages="c,c++,ada"  --enable-libada

then I get a gnat compiler but without ada standard library and found that the library's build script libada.gpr in gcc-11.2/gcc/ada/libgnat/ can be standalone.

GPR tools tells that it needs libgnarl.lst to continue when tried to use gprbuild -Plibada to build libada.

Here's my questions:

  1. what's the difference between libgnat & libgnarl
  2. where can i get libgnarl.lst
  3. are there guides for build libada?
like image 501
flyingsheep Avatar asked Dec 05 '25 14:12

flyingsheep


1 Answers

libgnarl contains the tasking elements of the runtime, libgnat contains the rest. They’re split so that a program that doesn’t do tasking can be smaller than it would otherwise need to be.

The GCC installation instructions contain, in the Configuration section,

First, we highly recommend that GCC be built into a separate directory from the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn’t get extensive testing; building where objdir is a subdirectory of srcdir is unsupported.

My experience building GCC like that is that the runtime gets properly built. (This may not be the case for less common OSs; what’s yours?).

After such a build, I found these files lurking amongst many others in $build/gcc/ada/rts/:

libada.gpr
libgnarl.gpr
libgnarl.lst
libgnat.gpr
libgnat.lst
libgnat_common.gpr

and I get the strong impression (from libada.gpr, particularly) that these are intended to rebuild the runtime for a specific purpose.

like image 162
Simon Wright Avatar answered Dec 10 '25 01:12

Simon Wright



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!