From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7ab2d703299100e6 X-Google-Attributes: gid103376,public From: Juergen.Pfeifer@t-online.de (Juergen Pfeifer) Subject: Re: GNAT shared libraries under Linux Date: 1998/05/31 Message-ID: <6ksc6a$9ap$1@news00.btx.dtag.de>#1/1 X-Deja-AN: 358451263 Content-Transfer-Encoding: 7bit References: <3571A970.41C6@cl.cam.ac.uk> X-Sender: 06162912249-0001@t-online.de Content-Type: text/plain; charset=us-ascii Organization: Pfeifer Family Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1998-05-31T00:00:00+00:00 List-Id: Markus Kuhn wrote: > > Is it possible to compile libada.a into a shared library with > gnat-3.10p under Linux? > > At the moment, the way I use gnat, every executable I produce > is statically linked with the Ada run-time system, which causes > even 20 lines long programs to produce easily over 100 kb long > executables (even with -O2 -gnatp and "strip"ed). > I built it from the sources on my redhat 5.0 system (requires a tiny patch). The important thing is to use "make gnatlib-shared" if you build the library. Next step is to make sure, that the linker knows about the shared library. I simply put a symlink /usr/lib/libgnat.so to the shared library located in the gcc library subdirectory. After the usual ldconfig it works fine with the shared runtime. I'm actually experimenting now with glibc-2.1 und kernel 2.1.103. This again requires some small patches that I'm currently testing, because the glibc developers have changed the LinuxThreads a little bit. I've it up und running now, but there are problems with tasking. - Every of the test programs of florist get's a CONSTRAINT_ERROR and I've problems to debug this because gdb gets always interrupted by the realtime signals the glibc now uses for threading. - Programs using tasking are not properly terminated when killed by a SIGINT. There are always remaining threads that have to be killed from the commandline. Cheers Juergen