diff options
author | Martin Liska <mliska@suse.cz> | 2017-08-29 09:46:10 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-08-29 07:46:10 +0000 |
commit | 130fcab02f1fbb097fc52fc9a8892472e3fa0c6c (patch) | |
tree | 046ad3bcd18ba4f41c0aa0e8b5abc176198fc723 /gcc/opts.c | |
parent | faa5399be693b2cdea641b976156f0fc89fa10cf (diff) | |
download | gcc-130fcab02f1fbb097fc52fc9a8892472e3fa0c6c.zip gcc-130fcab02f1fbb097fc52fc9a8892472e3fa0c6c.tar.gz gcc-130fcab02f1fbb097fc52fc9a8892472e3fa0c6c.tar.bz2 |
Fix --help=target (PR other/39851).
2017-08-29 Martin Liska <mliska@suse.cz>
PR other/39851
* gcc.c (driver_handle_option): Add new argument.
* opts-common.c (handle_option): Pass
target_option_override_hook.
* opts-global.c (lang_handle_option): Add new option.
(set_default_handlers): Add new argument.
(decode_options): Likewise.
* opts.c (target_handle_option): Likewise.
(common_handle_option): Call target_option_override_hook.
* opts.h (struct cl_option_handler_func): Add hook for
target option override.
(struct cl_option_handlers): Likewise.
(set_default_handlers): Add new argument.
(decode_options): Likewise.
(common_handle_option): Likewise.
(target_handle_option): Likewise.
* toplev.c (toplev::main): Pass targetm.target_option.override
hook.
2017-08-29 Martin Liska <mliska@suse.cz>
PR other/39851
* c-common.c (parse_optimize_options): Add argument to function
call.
* c-pragma.c (handle_pragma_diagnostic): Likewise.
From-SVN: r251400
Diffstat (limited to 'gcc/opts.c')
-rw-r--r-- | gcc/opts.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -217,7 +217,7 @@ target_handle_option (struct gcc_options *opts, unsigned int lang_mask ATTRIBUTE_UNUSED, int kind, location_t loc, const struct cl_option_handlers *handlers ATTRIBUTE_UNUSED, - diagnostic_context *dc) + diagnostic_context *dc, void (*) (void)) { gcc_assert (dc == global_dc); gcc_assert (kind == DK_UNSPECIFIED); @@ -1716,7 +1716,8 @@ common_handle_option (struct gcc_options *opts, unsigned int lang_mask, int kind ATTRIBUTE_UNUSED, location_t loc, const struct cl_option_handlers *handlers, - diagnostic_context *dc) + diagnostic_context *dc, + void (*target_option_override_hook) (void)) { size_t scode = decoded->opt_index; const char *arg = decoded->arg; @@ -1743,6 +1744,7 @@ common_handle_option (struct gcc_options *opts, undoc_mask = ((opts->x_verbose_flag | opts->x_extra_warnings) ? 0 : CL_UNDOCUMENTED); + target_option_override_hook (); /* First display any single language specific options. */ for (i = 0; i < cl_lang_count; i++) print_specific_help @@ -1762,6 +1764,7 @@ common_handle_option (struct gcc_options *opts, if (lang_mask == CL_DRIVER) break; + target_option_override_hook (); print_specific_help (CL_TARGET, CL_UNDOCUMENTED, 0, opts, lang_mask); opts->x_exit_after_options = true; break; @@ -1888,8 +1891,11 @@ common_handle_option (struct gcc_options *opts, } if (include_flags) - print_specific_help (include_flags, exclude_flags, 0, opts, - lang_mask); + { + target_option_override_hook (); + print_specific_help (include_flags, exclude_flags, 0, opts, + lang_mask); + } opts->x_exit_after_options = true; break; } |