On Mon, 15 May 2017, fredvs wrote:

fredvs wrote
Hello.

Sorry to come back with this story but there are (good) news.

Using
*
--gc-sections
*
 makes the library smartlinked.

So the question is:

Why FPC does not provide
*
--gc-sections
*
 to the linker with the -XX paramer for libraries ? (Bug ?)

Fre;D

Nobody uses fpc library here ?

Strange that a (big) problem with maybe a solution does not interest
anybody.

There is no problem.

The size of fpc libraries makes fpc-libraries not usable in a real world.

Why ?


I use some audio C libraries and a fpc library (that only link headers of
that C libraries) is 10 times bigger than the C libraries !

And when a solution (or bug) is found ---> only silence as answer.

There is no bug. You are comparing apples with pears.

A C library in the traditional unix sense is a set of routines that requires
other libraries to run - ultimately requiring libc.

A FPC library - due to it's windows origings heritage - is more like a static program. It's almost 100% standalone, and does not require other libraries to function (except the ones you explicitly link in). Inevitably, it is bigger.

Once dynamic packages are implemented, we can start comparing apples with
apples, and pears with pears. a dynamic package is more like a C library in
the unix sense. It makes sense to compare those.

If you want to compare today, you need to add the sizes of all the C
libraries that are loaded during execution of a C program with the size of an FPC program.

I think you'll find that the sizes of FPC programs are not so different then.

Just check the size of libc:

ls /lib/x86_64-linux-gnu/libc-2.19.so -l

-rwxr-xr-x 1 root root 1853216 Mar 21 20:24 /lib/x86_64-linux-gnu/libc-2.19.so*

That is almost 2Mb that is linked in to every C library and program.

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to