public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Marty Leisner" <leisner@rochester.rr.com>
To: gcc-help@gcc.gnu.org
Cc: leisner@rochester.rr.com
Subject: where gcc -save-temps puts temporary files
Date: Mon, 14 Jan 2008 16:10:00 -0000	[thread overview]
Message-ID: <200801132154.m0DLs1c4018117@dell2.home> (raw)

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

             reply	other threads:[~2008-01-13 21:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-14 16:10 Marty Leisner [this message]
2008-01-15 12:40 ` Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200801132154.m0DLs1c4018117@dell2.home \
    --to=leisner@rochester.rr.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).