On Sun, 22 Mar 2026, mailinglists--- via fpc-pascal wrote:
On 2026-03-17 13:57, Michael Van Canneyt via fpc-pascal wrote:
The -pg (gprof) flag doesn't work well with Free Pascal — it tries to
link against C runtime profiling infrastructure (crtbegin.o,
__dso_handle) that FPC's linker setup doesn't support.
Is this true?
Yes, it is...
I found a solution - at least on my Ubuntu 24.04 system.
Add "-Fl/usr/lib/gcc/x86_64-linux-gnu/13" to the compiler options (your
application or global). The ~/.fpc.cfg had -Fl/usr/lib but that was
obviously not extensive enough to find the GCC libraries FPC needed.
And gprof is back in action! :)
Can you please add an issue to the bugtracker:
We should probably scan /usr/lib during installation for this path and add
it to the default generated fpc.cfg
Michael.
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal