I try to be independend from lazarus and wrote a configure file which I then pass to fpc at the console.
Now suddenly the linker is noteable slower.
In both modes (from lazarus and from console).
Which reason can it have?

Mailing lists / fpc-pascal / 2012-08
6 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I try to be independend from lazarus and wrote a configure file which I then pass to fpc at the console.
Now suddenly the linker is noteable slower.
In both modes (from lazarus and from console).
Which reason can it have?
Which platform and which compiler version is it? Do you use internal or external linker?
Tomas
Os: Linux
Compiler Version: 2.4.2-0 i386
Sometimes there is the message:
/urs/bin/ld: warning: link.res contains output sections; did you forget -T?
Where can I see and/or configure if an internal or external linker is used? I assume it is an external linker because of the message (/urs/bin/ld ...).
Rainer Stratmann wroteSometimes there is the message: /urs/bin/ld: warning: link.res contains output sections; did you forget -T?
The latest FPC under Linux now always produces this message. Search the message archives... I asked this question before and somebody explained what is causing it, but basically nothing really to worry about. Though I must admit, I don't like such message either. :)
Where can I see and/or configure if an internal or external linker is used? I assume it is an external linker because of the message (/urs/bin/ld ...).
Linux doesn't have an internal linker, so it that case it is always external. Only FPC under Windows has an internal linker as far as I know.
Os: Linux Compiler Version: 2.4.2-0 i386 Sometimes there is the message: /urs/bin/ld:…
That is a pretty old version now (not that this should be the reason of your issue).
Indeed, it's external (which is your only option for the Linux target currently). Does your fpc.cfg use smartlinking (-XX)? I could imagine that smartlinking could slow down things if you haven't used it before (but the advantage of smartlinking are smaller binaries obviously).
What is the current linking time and rough speed difference compared to the previous state? Current linking time may get easier to measure if you use option -s when compiling and adapt the resulting ppas.sh by adding some timing call before and after the ld invocation.
Tomas
Tomas Hajny wrote> Compiler Version: 2.4.2-0 i386 That is a pretty old version now (not that this should be the reason of your issue).
It was ok with the same version :-)
I am satisfied with 2.4.2-0.
Does your fpc.cfg use smartlinking (-XX)?
Yes.
I could imagine that smartlinking could slow down things if you haven't used it before (but the advantage of smartlinking are smaller binaries obviously).
Yes, it was the reason, thanks!
I did not deselect external configuration file in the project settings. So I was not aware that the switch was set there...
What is the current linking time and rough speed difference compared to the previous state?
0.1ms to 0.6ms (I have an i7-3770S).
Current linking time may get easier to measure if you use option -s when compiling and adapt the resulting ppas.sh by adding some timing call before and after the ld invocation.
Lazarus shows the time and I can feel that it is slower in comparison to before.