This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] flag to create dump files in same directory as object files
On Tue, May 5, 2009 at 3:24 PM, Diego Novillo <dnovillo@google.com> wrote:
> On Mon, May 4, 2009 at 19:06, Steven Bosscher <stevenb.gcc@gmail.com> wrote:
>
>> Can we make this option the default (and maybe remove the dumping to
>> the working directory)? It seems much more intuitive to me that dump
>> files go in the same directory as the compiled object.
>
> I like this idea.
>
> Mark, it would probably even simplify the patch. ?You would not need
> to add a new option and the .texi documentation would just need to
> clarify that dump files are written on the same directory as the
> output file.
I think dump files go to the directory part specified by -dumpbase
which is relative to cwd if not absolute. If -dumpbase is missing
then the source argument is used as dumpbase. By default
if invoking cc1 through the driver -dumpbase is the basename
of the source argument. So you suggest to instead make it
dirname of the output concatenated with the basename of the
source?
[note that changing default behavior here may break existing scripts]
Richard.
>
> Diego.
>