[fpc-devel] RTL make shared

Adriaan van Os adriaan at adriaan.biz
Tue Oct 29 11:29:35 CET 2024


Trying to build the FPC RTL as a dynamic library on MacOS (with make shared), I run into several 
problems

1. When I try with fpc-3.0.4 or 3.2.2, ppumove returns an ld error that -shared is an unknown flag. 
I think the ld flags -shared -E should be -dylib -dynamic on MacOS

2. When I do the linking pass by hand, ld complains about unknown symbols

ld: Undefined symbols:
   FPC_RESLOCATION, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   FPC_RESOURCESTRINGTABLES, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   FPC_RESSTRINITTABLES, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   FPC_THREADVARTABLES, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   INITFINAL, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   _PASCALMAIN, referenced from:
       _TC_$SYSINIT_$$_SYSINITENTRYINFORMATION in sysinit.o
   __stklen, referenced from:
       _SYSINIT_$$_FPC_SYSTEMMAIN$LONGINT$PPANSICHAR$PPANSICHAR in sysinit.o

Any help building a dynamic RTL is much appreciated.

Regards,

Adriaan van Os







More information about the fpc-devel mailing list