where gcc -save-temps puts temporary files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



gcc -save-temps is defined to leave temporaries in the current directory.
This works intuitively where the build writes the output files into the current
directory.  Not everything works that way.

It seems it makes more sense to always leave it alongside the output...

If I'm debugging a build (of something like the linux kernel) its
calling the C compiler with

gcc <flags> foo/bar/src.c -c  -o <dest>foo/bar/src.o

If I add -save-temps, it puts the .i and .s in the current directory...

I found this not intuitive and has the following problems:
   1) if current directory isn't writable, -save-temps won't work
   2) if multiple files in subdirectories have the same name (and different
paths) -save-temps will overwrite temporary files

Comments?  This would be an easy change to make.  Would it be desirable
to change the behavior of -save-temps?

marty


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux