This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix driver/39293


* Mark Mitchell wrote on Tue, Mar 03, 2009 at 07:12:03PM CET:
> So, the fix (moving the location of the temporary file) doesn't
> completely solve the problem.  Using the name of the output file as the
> basis for the temporary would, though; in other words, if we used a.i
> and a.s when the target was "a.o" and "foo/bar/baz.[is]" when the target
> was "foo/bar/baz.o" that would presumably work.  Another advantage is
> that presumably the target directory is writable, whereas the current
> directory need not be -- in particular, it may be a read-only source
> directory.

Yes.  FWIW, keying off the output name is what Automake's compile
wrapper scripts do, too.

> I think that adding a new -save-temps-o option, with the behavior
> suggested above, is probably the best option, perhaps in parallel with
> adding a deprecation warning for -save-temps.

Doesn't GCC produce various output files in other situations, too?
Why not a more generic flag that causes all such output files to be
keyed off the -o argument?  I'm thinking of sane -ftest-coverage
(hasn't that been fixed by breaking backward compatibility?),
Fortran -J, -fdump-core, heck, it should have been used for -M* too.

Cheers,
Ralf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]