[fpc-devel] Bug: compilation loop in 2.0.2 when using -So

Konstantin Münning konstantin at muenning.com
Fri Aug 18 12:36:46 CEST 2006


Jonas Maebe wrote:
> 
> On 17 aug 2006, at 21:40, Konstantin Münning wrote:
> 
>> There are some other inconsistencies to previous versions of FPC and
>> Borland Pascal like assembler syntax and pointer addition
>> (inc(Pointer,LongInt) does not work anymore).
> 
> Please (as always) post a test program, because it works file for me
> with 2.0.4-rc3.
> 
>> If someone is interested I can post details. It seems possible to work
>> around them.
> 
> Always post a compilable program which demonstrates the problem if you
> want bugs to be fixed, preferably in the bug tracker at
> http://www.freepascal.org/mantis.
> 
>> Last thing - size. Program tested results with 1.0.10 in 354KB and with
>> 2.0.4-rc3 in 515KB. Both with default optimization options and no debug
>> info. Tried -Og but result was almost the same. Is this the final state
>> or are improvements to be expected?
> 
> Definitely final for 2.0.4-rc3. Make sure you also use -CX -XX to turn
> on smartlinking.

As I remember some problems with smartlinking I left it to default
behaviour. Maybe my information was too old. Using -CX and -XX it's much
better - with 1.0.10 it's 238KB and with 2.0.4-rc3 it's 277KB. Still got
a bit bigger but that's sometimes in the nature of improvement :-).

What is the current general advice about smartlinking? Are there any
concerns left for using it?

> It may become bigger or smaller in the future depending on a number of
> factors, including but not limited to optimizer improvements,
> (smart)linking improvements, routines added to the system unit which are
> referenced from the initialization section, effort required to
> investigate in detail why things became bigger vs the impact this has
> for most people, the fact whether someone who actually cares about
> executable file size performs said investigations, and the phase of the
> moon.

;-)

Konstantin



More information about the fpc-devel mailing list