public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Eric Botcazou <ebotcazou@adacore.com>, gcc-patches@gcc.gnu.org
Cc: Tristan Gingold <gingold@adacore.com>
Subject: Re: [patch] Delete temporary response file
Date: Tue, 23 Jun 2015 15:35:00 -0000	[thread overview]
Message-ID: <55897750.3040701@redhat.com> (raw)
In-Reply-To: <41004497.9MLYOPW9V5@polaris>

On 06/22/2015 11:37 AM, Eric Botcazou wrote:
> Hi,
>
> when you pass a response file at link time and you use the GNU linker, then
> collect2 creates another, temporary response file and passes it to the linker.
> But it fails to delete the file after it is done.  This can easily be seen
> with the following manipulation:
>
> eric@polaris:~/build/gcc/native> cat t.c
> int main (void) { return 0; }
> eric@polaris:~/build/gcc/native> cat t.resp
> -L/usr/lib64
> eric@polaris:~/build/gcc/native> gcc -c t.c
> eric@polaris:~/build/gcc/native> export TMPDIR=$PWD
> eric@polaris:~/build/gcc/native> gcc -o t t.o @t.resp
> eric@polaris:~/build/gcc/native> ls cc*
> ccVSQ6W5
>
> The problem is that do_wait is not invoked by tlink_execute, only collect_wait
> is, so the cleanup code present therein is never invoked.
>
> Tested on x86_64-suse-linux, OK for the mainline?
>
>
> 2015-06-22  Tristan Gingold  <gingold@adacore.com>
>
> 	* collect2.c (collect_wait): Unlink the response file here instead of...
> 	(do_wait): ...here.
> 	(utils_cleanup): ...and here.
OK.
jeff

      reply	other threads:[~2015-06-23 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22 17:48 Eric Botcazou
2015-06-23 15:35 ` Jeff Law [this message]

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=55897750.3040701@redhat.com \
    --to=law@redhat.com \
    --cc=ebotcazou@adacore.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gingold@adacore.com \
    /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).