[Lazarus] old problem on FreeBSD: ld cannot find -lc_r

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jul 25 08:34:16 CEST 2013

On Wed, 24 Jul 2013 12:22:18 +0200
Marco van de Voort <marcov at stack.nl> wrote:

> On Fri, Jul 19, 2013 at 08:05:13AM +0200, Mattias Gaertner wrote:
> > You can grep for linklib directives in the sources.
> > And you can use the ppudump tool on all .ppu files and grep for c_r.
> Afaik this won't work fool proof. It will work if there is a {$linklib c_r},
> but it is also possible that a {$linklib pthreads} was changed to c_r by
>  -Xf.  (which is equal to -XLApthreads=c_r )

-Xf and -XL are both not mentioned in the compiler -h help.

> The c_r/pthreads substitution, like the library substitution system it uses
> (-XLA, XLO) operates on the list of static libs just before linking,
> generating a new list.
> IOW in the ppu, the names are the same as the linklib, and not necessarily
> the same as passed to the linker.

That means that either the user or the fpc.cfg passes some special
parameters to the compiler, right?


More information about the Lazarus mailing list