Hi.

The patch is conclusion of long-lasting discussion in the PR.
I've just verified that our gcc9 package with the patch attached
can build emacs, and so it's fixed.

Note that the CL_DRIVER instead of CL_LANG_ALL still fails.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

gcc/ChangeLog:

2019-08-06  Martin Liska  <mli...@suse.cz>

        PR target/91130
        * lto-wrapper.c (find_and_merge_options): Use (CL_LANG_ALL | CL_DRIVER)
        for get_options_from_collect_gcc_options instead of CL_LANG_ALL.
---
 gcc/lto-wrapper.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/gcc/lto-wrapper.c b/gcc/lto-wrapper.c
index 3414adedd26..f1fa48c4688 100644
--- a/gcc/lto-wrapper.c
+++ b/gcc/lto-wrapper.c
@@ -1010,7 +1010,7 @@ find_and_merge_options (int fd, off_t file_offset, const char *prefix,
       struct cl_decoded_option *f2decoded_options;
       unsigned int f2decoded_options_count;
       get_options_from_collect_gcc_options (collect_gcc,
-					    fopts, CL_LANG_ALL,
+					    fopts, (CL_LANG_ALL | CL_DRIVER),
 					    &f2decoded_options,
 					    &f2decoded_options_count);
       if (!fdecoded_options)

Reply via email to