[fpc-pascal] Using a custom fpc.cfg

Tomas Hajny XHajT03 at hajny.biz
Tue Jul 8 13:21:07 CEST 2014


On Tue, July 8, 2014 12:07, Mark Morgan Lloyd wrote:
> Tomas Hajny wrote:
>
>>> Incidentally, how does one get a list of fpc's options? I don't mean
>>> fpc -h  since that actually shows ppcXXX's options, but how does one
>>> get
>>> minimal info on fpc itself such as a reminder of the -V option?
>>
>> In trunk, fpc -h shows all options supported by either fpc or ppcXXX
>> (technically, ppcXXX still shows the list, but it includes fpc specific
>> options if invoked from fpc). The part handled specifically by fpc
>> should
>> not be of such a high interest normally, but it may be obtained by
>> diffing
>> the output of both.
>
> I agree that it's obscure, but there was discussion of -V a few weeks
> ago in the context of starting Lazarus and I needed a reminder
> yesterday. Looking at 2.6.4 source, I note also -PP and -PB with the
> apparent "health warning" that they aren't qualified by the -V parameter.

I meant specifically that most users should not need to differentiate
between options handled by fpc and options handled by ppcXXX.

Anyway - if you want to find out options specific to the fpc helper
(and/or you don't have a compiled trunk compiler readily available), you
can also use:

grep -e "^F\*" < fpcsrc/compiler/msg/errore.msg  | cut -c3- | sed
"s/^1/-/" | sed "s/^2/ -/" | sed "s/_/   /"

(again, you need the trunk version of errore.msg as available e.g. from
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/compiler/msg/errore.msg?revision=28152&view=co)

That gives the following list:

-P<x>   Target CPU / compiler related options:
 -PB   Show default compiler binary
 -PP   Show default target cpu
 -P<x>   Set target CPU
(arm,i386,m68k,mips,mipsel,powerpc,powerpc64,sparc,x86_64
-V<x>   Append '-<x>' to the used compiler binary name (e.g. for version)
 -Xp<x>   First search for the compiler binary in the directory <x>

Tomas





More information about the fpc-pascal mailing list