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 rr Homepage E-mail, Berlin, Germany, 25.08.2008, 22:07

> However FPC allows for a lot of tweaking of the linker, e.g. passing GNU
> ld linker params using -k will get you there:
> fpc -k"-Map mymapfile.map" helloworld
> (works for me WITH the doscompiler, but under XP)

Works for me too. Thanks!

> > 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.
>
> -CX to compile units, -XX to compile/link the final file. The optimization
> stuff is really peanuts. (IIRC it works a bit better in the development
> versions because Florian wants to target embedded CPUs, AVR Atmel in the
> near future, but in the 2.2 series it is peanuts)
>
> If you want to strip the result use -XXs, but some non Unix versions of ld
> do this badly, so there I usually strip with the provided separate
> strip.exe binary.

I see, but it still doesn't answer my initial question. :-(

> 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." Btw: Did you receive my mails from last Friday?

> 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.

---
Forum admin

 

Complete thread:

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