View Issue Details

IDProjectCategoryView StatusLast Update
0027013FPCDocumentationpublic2015-04-14 20:24
ReporterJuha Manninen Assigned ToMichael Van Canneyt  
Status closedResolutionfixed 
Product Version2.7.1 
Fixed in Version3.0.0 
Summary0027013: Options missing from "fpc -h" output
DescriptionAccording to my analysis the following FPC options are missing from "fpc -h" output.
Tested with recent FPC trunk, Windows 64-bit version.

-gt[ttt] (don't remember how many 't's are supported)
-Xf (maybe only missing in windows?)

and there may be more.

Then there is '-' which turns an option off. At least
are supported. Which others?
The help output should maybe have them, too.

The main motivation for reporting this is the GUI for all FPC options in Lazarus. It is parsed directly from "fpc -h" and "fpc -i".
  Project Options -> Compiler Options -> Other -> All Options ...
It has a nice filtering system and has turned out to be usefull.
It shows all available FPC options ... if only they are mentioned in "fpc -h".
TagsNo tags attached.
Fixed in Revision29099
Attached Files


Tomas Hajny

2014-11-08 02:48

manager   ~0078997

Last edited: 2014-11-12 18:19

View 2 revisions

Regarding -<option>- - this is covered by the line "Put + after a boolean switch option to enable it, - to disable it" preceding all the options, isn't it? In other words, everything which would be represented by a checkbox in your GUI may also get a minus sign on the command line.

Regarding your list of missing options - some of them (-ap, -CN and -Dw) _are_ currently included, but listed only if running on the particular platform or host where they are assumed to be relevant (-Dw being a tricky one of which I'm aware of and prefer keeping it as it is now). It's possible that these assumptions are not correct in some cases (any longer) and they should be listed on other platforms/hosts as well - let's discuss these cases individually.

If you still need to parse _all_ options including those which may be valid only for cross-compilers, it might be better for Lazarus to parse errore.msg directly rather than getting the list from 'fpc -h".

Juha Manninen

2014-11-08 10:47

reporter   ~0079003

> If you still need to parse _all_ options including those which may be valid only for cross-compilers, it might be better for Lazarus to parse errore.msg directly rather than getting the list from 'fpc -h".

No, the idea was that fpc -h gives only the options it supports, including for cross-compilation, and nothing more.
Parsing errore.msg directly would require another compex logic in Lazarus to determine which options are valid. FPC already has such logic or at least it should have.

Tomas Hajny

2014-11-12 23:23

manager   ~0079121

Last edited: 2014-11-21 14:28

View 2 revisions

-Fg is not supported any longer (it just shows a warning that it should not be used any longer).

If I add information about -gt, I'd probably use a way which is not usable for parsing anyway, because changing it to -gt[t[t[t]]] looks very ugly and adding individual entries for -gt, -gtt, -gttt and -gtttt while specifying the specific values used for thrashing looks a bit excessive to me. I tend to add just "multiple 't' changes the thrashing value".

-m does nothing normally, because it's only used if the compiler is compiled with -dPREPROCWRITE. I'll change the compiler so that parsing of this option and also the compiler flag set by this option are conditional as well.

I'll add description for -Sf as well as list of supported values to -i (including a "machine-friendly" output).

All the others should be probably indeed added as well.

Tomas Hajny

2014-11-21 14:57

manager   ~0079249

I've added the descriptions as outlined in the previous note. As agreed with Michael, I'll change the category to 'Documentation' now and assign the bug to him so that he can add description of the previously missing options to the documentation as well.

Michael Van Canneyt

2015-04-12 15:47

administrator   ~0082846

Brought compiler options description up to date in docs. revision 1157.

Issue History

Date Modified Username Field Change
2014-11-07 22:15 Juha Manninen New Issue
2014-11-08 02:48 Tomas Hajny Note Added: 0078997
2014-11-08 10:47 Juha Manninen Note Added: 0079003
2014-11-12 18:18 Tomas Hajny Assigned To => Tomas Hajny
2014-11-12 18:18 Tomas Hajny Status new => assigned
2014-11-12 18:19 Tomas Hajny Note Edited: 0078997 View Revisions
2014-11-12 23:23 Tomas Hajny Note Added: 0079121
2014-11-21 14:28 Tomas Hajny Note Edited: 0079121 View Revisions
2014-11-21 14:57 Tomas Hajny Fixed in Revision => 29099
2014-11-21 14:57 Tomas Hajny Note Added: 0079249
2014-11-21 14:57 Tomas Hajny Status assigned => resolved
2014-11-21 14:57 Tomas Hajny Fixed in Version => 2.8.0
2014-11-21 14:57 Tomas Hajny Resolution open => fixed
2014-11-21 14:58 Tomas Hajny Assigned To Tomas Hajny => Michael Van Canneyt
2014-11-21 14:58 Tomas Hajny Status resolved => assigned
2014-11-21 14:58 Tomas Hajny Category Compiler => Documentation
2015-04-12 15:47 Michael Van Canneyt Note Added: 0082846
2015-04-12 15:47 Michael Van Canneyt Status assigned => resolved
2015-04-14 20:24 Juha Manninen Status resolved => closed