Bug 104614 - "Undocumented" option flag ignored with --help=target
Summary: "Undocumented" option flag ignored with --help=target
Status: ASSIGNED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-21 17:19 UTC by Richard Earnshaw
Modified: 2022-04-23 21:05 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2022-02-24 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Earnshaw 2022-02-21 17:19:43 UTC
I don't know if this applies to other --help varieties, but in the Arm backend we have some 'internal' options which we don't want the user to be using.  However, --help=target is still printing these out even though the manual suggests these should be suppressed.  For example, in arm.opt we have:

; Set to the name of target architecture which is required for
; multilib linking.  This option is undocumented because it
; should not be used by the users.
mlibarch=
Target RejectNegative JoinedOrMissing NoDWARFRecord DriverOnly Undocumented

But the output of --help=target contains:

  -mlibarch=                  This option lacks documentation.

Which is wrong.

Is there something else that needs to be done to suppress this output?
Comment 1 Richard Earnshaw 2022-02-21 17:21:21 UTC
Note the manual says for 'Undocumented' 

@item Undocumented
The option is deliberately missing documentation and should not
be included in the @option{--help} output.
Comment 2 Richard Earnshaw 2022-02-21 17:25:38 UTC
This case is also wrong:

mhard-float
Target RejectNegative Alias(mfloat-abi=, hard) Undocumented

produces:

  -mhard-float                Same as -mfloat-abi=hard.

Which, while not inaccurate, means that the output of the help command contains a lot of 'old/deprecated' options that we really want to suppress going forwards.
Comment 3 Martin Liška 2022-02-24 14:12:30 UTC
I can take a look at this.