http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44986
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | --- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-29 15:40:51 UTC --- The problem is that --end-group is identified as input_basename by the driver which it does because: case OPT_Wl_: { int prev, j; /* Split the argument at commas. */ prev = 0; for (j = 0; arg[j]; j++) if (arg[j] == ',') { add_infile (save_string (arg + prev, j - prev), "*"); prev = j + 1; } /* Record the part after the last comma. */ add_infile (arg + prev, "*"); maybe we should just disregard "infiles" with starting '-' here (same with -Xlinker). Note that a plain -lfoo will also count as infile. -save-temps will simply re-use the last infile it got. Maybe it's also the unfortunate position of the -fresolution spec in LINK_COMMAND_SPEC that we run into this. I have a patch.