Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Free Pascal questions (Developers)

posted by marcov, 26.08.2008, 11:14

> > > 2) How to achieve minimum size of executables? I'm using "-O3 -Os
> > > -XX" > now. Unfortunately FPC's help screen doesn't show default settings as TPC does.
> > I see, but it still doesn't answer my initial question. :-(

Well, I only replied what is needed on top of what you specified. If you strip and compile all code with -CX and link with -XX, most of the important stuff is there. In theory you could maybe tighten it up by increasing the minimal processor (some conditional moves here and there), but I'd guess that's all sub 100 bytes on even a small exe.

> > The original idea was -XX is "link smartlink" and -CX is "compile
> > smartlink". This because you might not want to smartlink for speed in
> > development builds, but don't want to recompile everything. (in the
> > beginning both -CX and -XX were very slow. This was later sped up by
> > eliminating AS).
>
> But then that's a bug in FPC's documentation! Chart.pdf shows "XX =
> $SMARTLINK = Use smartlinking."

Well, the problem is that they both are. The compiler-linker separation needs two switches instead of one though.

> Btw: Did you receive my mails from last Friday?

Yes. As you can see, the ligature problem is solved. I still have to look into the other issues.

> > Note that, like TP, most $'s are not global, but for the compiled unit
> (or
> > mainprogram) only. So then you'd have to put them in an inc and include
> > that anywhere.

> That would be OK, but the problem is that not all command-line options
> have a source-code equivalent. So I have to use a mixture of both. That's
> what I dislike.

As far as I know, this was never considered a design requirement. At least I can't really remember anybody keeping those in sync. (mostly also, because a global inc file is the only way). A directive was only implemented if there was a need.

Best to either discus it on the mailling list, or file a bug (preferably which include an analysis of which params have no corresponding directives).

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 294 users online (0 registered, 294 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum