On 5/2/19 12:30 PM, Jakub Jelinek wrote:
> On Mon, Apr 01, 2019 at 02:11:17PM +0200, Martin Liška wrote:
>> 2019-04-01  Martin Liska  <mli...@suse.cz>
>>
>>      * gcc.c (process_command): Add dummy file only
>>      if n_infiles == 0.
>>      * opts-global.c (decode_options): Pass lang_mask.
>>      * opts.c (print_help): New function.
>>      (finish_options): Print --help if help_option_argument
>>      is set.
>>      (common_handle_option): Factor out content of OPT__help_
>>      into print_help.
>>      * opts.h (finish_options): Add new argument.
> 
> As reported by Ulrich Drepper on IRC, this broke
> --enable-as-accelerator-for=... build, tree-streamer-in.c calls
> finish_options too and that caller has not been adjusted.

You are right, it's guarded in #ifdef ACCEL_COMPILER
so I haven't seen the compilation error.

> 
> Any reason why you've called print_help from finish_options rather than
> decode_options after it calls finish_options?

Yes, I need that as I need option propagation, as described in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89885#c0

> 
> Or should tree-streamer-in.c pass CL_LTO as the lang_mask, or say CL_DRIVER
> so that print_help does nothing in that case?

Yes, that would fix it. Can you please provide a patch that he can test?

Thanks,
Martin

> 
>       Jakub
> 

Reply via email to