https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91130
--- Comment #39 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Richard Biener from comment #34) > So like the following then. > > Index: gcc/lto-wrapper.c > =================================================================== > --- gcc/lto-wrapper.c (revision 274111) > +++ gcc/lto-wrapper.c (working copy) > @@ -133,7 +133,6 @@ maybe_unlink (const char *file) > static void > get_options_from_collect_gcc_options (const char *collect_gcc, > const char *collect_gcc_options, > - unsigned int lang_mask, > struct cl_decoded_option > **decoded_options, > unsigned int *decoded_options_count) > { > @@ -176,8 +175,7 @@ get_options_from_collect_gcc_options (co > argc = obstack_object_size (&argv_obstack) / sizeof (void *) - 1; > argv = XOBFINISH (&argv_obstack, const char **); > > - decode_cmdline_options_to_array (argc, (const char **)argv, > - lang_mask, > + decode_cmdline_options_to_array (argc, (const char **)argv, CL_DRIVER, > decoded_options, decoded_options_count); > obstack_free (&argv_obstack, NULL); > } > @@ -1009,8 +1007,7 @@ find_and_merge_options (int fd, off_t fi > { > struct cl_decoded_option *f2decoded_options; > unsigned int f2decoded_options_count; > - get_options_from_collect_gcc_options (collect_gcc, > - fopts, CL_LANG_ALL, > + get_options_from_collect_gcc_options (collect_gcc, fopts, > &f2decoded_options, > &f2decoded_options_count); > if (!fdecoded_options) > @@ -1283,7 +1280,6 @@ run_gcc (unsigned argc, char *argv[]) > fatal_error (input_location, > "environment variable %<COLLECT_GCC_OPTIONS%> must be set"); > get_options_from_collect_gcc_options (collect_gcc, collect_gcc_options, > - CL_LANG_ALL, > &decoded_options, > &decoded_options_count); Great, the patch works on aarch64. So the problem I saw before was probably related to the second usage of CL_LANG_ALL that I didn't replace with CL_DRIVER.