Subject: Compiling, -fpic, shared libraries, gdb, etc.
To: NetBSD ARM 32 mailinglist <port-arm32@NetBSD.ORG>
From: None <Peter.Berg@ww.tu-freiberg.de>
List: port-arm32
Date: 02/14/1998 11:51:47
> So my question is: how do you managed to compile the shared libraries
> distributed with RiscBSD (eg. the X stuff)? =


I really like to know this too ;)

> Is a fixed compiler available? BTW: Why is the compiler in the comp.tar=
=2Egz
> set broken? Or maybe it is the linker...

I tried to build a shared lib from libmultimedia, but it didn't work. But=
 now =

the intresting part:
I have a runtime revision control system in libmultimedia and did the =

following:

I linked my programs with the dymamic libc and libm and the static =

libmultimedia. I got some RSS relocation messages, but as I started the =

program, the runtime validator reported a not matching interface to =

libmultimedia. Because I can build (with the same static lib) a static ve=
rsion =

of the program which *does* work, I guess it is a broken linker !
The same validation error is reported when I link libmultimedia as shared=
 lib.

Anyway, from the small libgFX (~20 KB C source) I can build a shared lib =
that =

works without any problems. I use the same build procedure for both libra=
ries.

> Alternatively, am I doing something wrong, eg. there is a mysterious co=
mpiler
> option to use? I used -fpic -msoft-float.
> =

> Since I suppose I am not the only one in this situation, could anybody =
please
> enlighten us?

PS: I must compile libmultimedia with -fPIC because I have a large global=
 structure which contains informations which will be accessed directly (r=
ead only) by the application.

Ciao, Peter.