-an and help page (Was: Re: [fpc-devel] Re: Episode 4. Addressing and it's limits Part Two)

Mark Morgan Lloyd markMLl.fpc-devel at telemetry.co.uk
Thu Feb 9 14:45:07 CET 2012


Tomas Hajny wrote:

>> Note that to get this level of detail the compiler has to be built with
>> -dEXTDEBUG in order to enable the -an option, despite the fact that this
>> always appears in fpc's -h output. If it were my choice I'd make that
>> bit of help output conditional.
> 
> Making it conditional isn't possible without modifying the structure used
> in the message files (plain text files to allow easy translation /
> localization to other languages) or their concept / the way how they are
> used.
> 
> As it works now, the default (English) text file is translated into an
> include file containing all texts and compiled into the compiler
> executable (but another file with the same structure but written in a
> different language may be supplied on the command line and override the
> default on run-time). The only conditional parts in the message files are
> related to platforms and targets (which is a limited set of dependencies
> by definition); -dEXTDEBUG based dependency doesn't fit into that. The
> easier solution would be probably adding a note about this dependency
> directly into the help page (I or anybody else in the core team can do
> that if it really works that way - i.e., if there is no difference between
> -an and -a in a compiler compiled without -dEXTDEBUG).

Thanks for the expiation :-) Would it be possible to do something like 
(a) annotating non-standard options with e.g. "(requires EXTDEBUG)" and 
(b) having a line in the banner showing what non-default options were 
used during build?

Free Pascal Compiler version 2.7.1 [2012/02/06] for mipsel
Copyright (c) 1993-2011 by Florian Klaempfl and others
Built with EXTDEBUG, fvm32.
/usr/local/src/fpc/fpc-trunk/compiler/ppcXmipsel [options] <inputfile> 
[options]
Put + after a boolean switch option to enable it, - to disable it

As a slight aside, I've got a shell script for Linux/Solaris which saves 
this sort of thing and also generates a cross-reference of all files by 
parsing -vt output. I've considered doing something like putting it on 
lazarus-ccr but don't relish handling any "why doesn't it work on 
Windows?" questions.

Linux pye-dev-07 2.6.38-custom #2 SMP Thu Jun 9 11:07:18 GMT 2011 i686 
GNU/Linux
Using Free Pascal Compiler version 2.7.1 [2012/02/04] for i386
make NOGDB=1 OPT='-O- -gl -vt' all |/usr/local/bin/fpc-filter-vt

= /usr/local/src/fpc/fpc-trunk/rtl/linux/system.pp
+  /lib/ld-linux.so.2

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-devel mailing list