This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/44986] -fuse-linker-plugin -save-temps gives resolution file base name of last argument
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 29 Nov 2010 15:40:57 +0000
- Subject: [Bug driver/44986] -fuse-linker-plugin -save-temps gives resolution file base name of last argument
- Auto-submitted: auto-generated
- References: <bug-44986-4@http.gcc.gnu.org/bugzilla/>
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.