Bug 105096 - --target-help not an alias for --help=target
Summary: --target-help not an alias for --help=target
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 12.0
: P3 trivial
Target Milestone: ---
Assignee: Martin Liška
URL: https://gcc.gnu.org/pipermail/gcc-pat...
Keywords: patch
Depends on:
Blocks:
 
Reported: 2022-03-29 10:18 UTC by Tom de Vries
Modified: 2022-04-06 15:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2022-03-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2022-03-29 10:18:41 UTC
In common.opt, we read:
...
-target-help
Common Driver
Alias for --help=target.
...

But that doesn't seem to be correct, I get different results.

For instance, for nvptx target, we have an malias that atm is undocumented, and we have:
...
$ cc1 --target-help 2>&1 | grep malias
$
...
and:
...
$ cc1 --help=target 2>&1 | grep malias
  -malias                               [disabled]
$...
Comment 1 Martin Liška 2022-03-29 11:15:39 UTC
You are right, I can take a look.
Comment 2 GCC Commits 2022-04-06 15:38:57 UTC
The master branch has been updated by Martin Liska <marxin@gcc.gnu.org>:

https://gcc.gnu.org/g:717b2d4191e80dc8aae3847675de73ed3f611fb7

commit r12-8026-g717b2d4191e80dc8aae3847675de73ed3f611fb7
Author: Martin Liska <mliska@suse.cz>
Date:   Thu Mar 31 08:45:58 2022 +0200

    --target-help: align with --help=target
    
            PR driver/105096
    
    gcc/ChangeLog:
    
            * common.opt: Document properly based on what it does.
            * gcc.cc (display_help): Unify with what we have in common.opt.
            * opts.cc (common_handle_option): Do not print undocumented
            options.
Comment 3 Martin Liška 2022-04-06 15:41:54 UTC
Fixed on master, not planning to do a backport.