[fpc-pascal] Size of program vs library ?

Michael Van Canneyt michael at freepascal.org
Mon May 15 11:32:57 CEST 2017



On Mon, 15 May 2017, fredvs wrote:

>> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
> Ha, news, finally.
>
> Huh, did you read my post ?

I did.

I responded to the statement that fpc libraries are big and "unusable".

> It talk about smartlinking of libraries that does not work.
>
> After lot of fight, there is a solution: using -*-gc-sections*.
>
> And the question was :
>
> /Why FPC does not provide --gc-sections to the linker with the -XX paramer
> for libraries ? (Bug ?) /

Not providing an option is not a bug. 
At best, providing this option is a feature request on your part.

Why it does not provide the option?
For the same reason that it doesn't strip binaries by default, I suppose.
Or maybe this option didn't exist when the FPC library support was
implemented ? Maybe there are even other reasons I am not aware of.

But even when you do the --gc-sections, your library will still be bigger than
corresponding C libraries for the reasons I outlined in my initial response.

Michael.



More information about the fpc-pascal mailing list