This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Move resolution file handling to gcc.c, fix PRs 43857, 43371
On Sun, 9 May 2010, Richard Guenther wrote:
> On Sun, 9 May 2010, Eric Botcazou wrote:
>
> > > 2010-05-06 Richard Guenther <rguenther@suse.de>
> > >
> > > * gcc.c (LINK_COMMAND_SPEC): Provide a resolution file to
> > > the linker plugin.
> > > (store_arg): Queue temp_filename for deletion instead of
> > > the whole argument.
> >
> > This broke -pipe:
> >
> > eric@atlantis:~/gnat/gnat-head/native32> cat t.c
> > int i;
> > eric@atlantis:~/gnat/gnat-head/native32> gcc/xgcc -Bgcc -c t.c -pipe
> > Segmentation fault
>
> Bah. I have reverted the store_arg change and will propose
> sth else to handle -plugin-arg=-fresolution-file=/tmp/xxxx.
Which is the following.
Bootstrap & regtest pending.
Richard.
2010-05-09 Richard Guenther <rguenther@suse.de>
* gcc.c (store_arg): Handle temporary file deletion for
joined arguments.
Index: gcc/gcc.c
===================================================================
*** gcc/gcc.c (revision 159197)
--- gcc/gcc.c (working copy)
*************** store_arg (const char *arg, int delete_a
*** 2082,2088 ****
if (strcmp (arg, "-o") == 0)
have_o_argbuf_index = argbuf_index;
if (delete_always || delete_failure)
! record_temp_file (arg, delete_always, delete_failure);
}
/* Load specs from a file name named FILENAME, replacing occurrences of
--- 2082,2096 ----
if (strcmp (arg, "-o") == 0)
have_o_argbuf_index = argbuf_index;
if (delete_always || delete_failure)
! {
! const char *p;
! /* If the temporary file we should delete is specified as
! part of a joined argument extract the filename. */
! if (arg[0] == '-'
! && (p = strrchr (arg, '=')))
! arg = p + 1;
! record_temp_file (arg, delete_always, delete_failure);
! }
}
/* Load specs from a file name named FILENAME, replacing occurrences of