PR driver/91130 Use CL_DRIVER when handling of COLLECT_GCC_OPTIONS in lto-wrapper.c

Richard Earnshaw (lists) Richard.Earnshaw@arm.com
Wed Aug 7 12:52:00 GMT 2019


Some options are handled differently by the main driver (gcc, g++, etc) 
from the back-end compiler programs (cc1, cc1plus, etc) in that in the 
driver they do not take an additional argument, while in the compiler 
programs they do.  The processing option option CL_DRIVER controls this 
alternative interpretation of the options.

The environment variable COLLECT_GCC_OPTIONS is the list of options to 
add to a compile if the compiler re-invokes itself at some point.  As 
such, the options are driver options, so CL_DRIVER should be used when 
processing this list.  Currently lto-wrapper is doing this incorrectly.

	PR driver/91130
	* lto-wrapper.c (find_and_merge_options): Use CL_DRIVER when
	processing COLLECT_GCC_OPTIONS.
	(run_gcc): Likewise.

Bootstrapped on aarch64-linux

OK?

NB, this is essentially the same as Richi's patch in the PR.  I'll let 
you decide which to take...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto-wrap.patch
Type: text/x-patch
Size: 859 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190807/9310e60a/attachment.bin>


More information about the Gcc-patches mailing list