Generating shared objects with gpc

Pascal Viandier pviandie at accovia.com
Wed Oct 17 16:10:37 CEST 2007


I rebuild libgpc.a and build libgpc.2.1.so and it works like perfect.

If this is of interest for someone, the exact command to build a shared
object from a Pascal source with Sun Solaris is:

gpc --automake --shared -fPIC module.pas -o module.so

If -fPIC is not specified, the assembler does not generate position
independent code (the "-KPIC" parameter is not passed to "as")

Thank you very much for your help.

Kind regards

Pascal Viandier

> 
> Yes, something like
> 
> cd gcc/p/rts
> make clean
> make CFLAGS="-O2 -fPIC"
> 
> or make libgpc shared also.
> 
> cd gcc/p/rts
> make clean
> make GPCSOLIBNAME=libgpc_xxx.so WITH_SHARED=yes
> 
> Regards,
> 
> Adriaan van Os






More information about the Gpc mailing list