public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Pedro Alves <pedro@codesourcery.com>,
	gcc-patches@gcc.gnu.org,
	 Rainer Orth <ro@cebitec.uni-bielefeld.de>
Subject: Re: [build] Move unwinder to toplevel libgcc (v2)
Date: Fri, 12 Aug 2011 16:18:00 -0000	[thread overview]
Message-ID: <4E454971.6060509@gnu.org> (raw)
In-Reply-To: <CAMe9rOo2OTtisb5dAPKeO7Kaks58rJt573hEeR=wFP0HGZK8Wg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

>> Can't this sequence happen?
>>
>> proc1:       cp unwind.h $(gcc_objdir)/include/tmp-unwind.h
>> proc2:       cp unwind.h $(gcc_objdir)/include/tmp-unwind.h
>> proc1:       sh $(srcdir)/../move-if-change \
>>                $(gcc_objdir)/include/tmp-unwind.h \
>>                $(gcc_objdir)/include/unwind.h
>> proc2:       sh $(srcdir)/../move-if-change \
>>                $(gcc_objdir)/include/tmp-unwind.h \
>>                $(gcc_objdir)/include/unwind.h
>>
>> It sounds like the latter move-if-change could trip on
>> a non-extant tmp-unwind.h.
>
> Yes, we should use an unique tmp unwind.h.

Thanks, you are correct.

Paolo

[-- Attachment #2: fff.patch --]
[-- Type: text/x-patch, Size: 683 bytes --]

2011-08-12  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.in (install-unwind_h): Create $(gcc_objdir)/include/unwind.h
	atomically.

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 177688)
+++ Makefile.in	(working copy)
@@ -991,8 +1001,9 @@ gcc-extra-parts:
 all: $(extra-parts)
 
 install-unwind_h:
-	rm -f $(gcc_objdir)/include/unwind.h
-	cp unwind.h $(gcc_objdir)/include/unwind.h
-	chmod a+r $(gcc_objdir)/include/unwind.h
+	dest=$(gcc_objdir)/include/tmp$$$$-unwind.h; \
+	cp unwind.h $$dest; \
+	chmod a+r $$dest; \
+	sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/include/unwind.h
 
 all: install-unwind_h

  reply	other threads:[~2011-08-12 15:40 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-03 13:33 Rainer Orth
2011-08-03 16:07 ` Nick Clifton
2011-08-03 21:11 ` Benjamin Kosnik
2011-08-05  9:50 ` Paolo Bonzini
2011-08-05 12:16   ` Rainer Orth
2011-08-05 13:56     ` Paolo Bonzini
2011-08-05 18:37 ` Mikael Morin
2011-08-05 20:58   ` Paolo Bonzini
2011-08-06 10:58     ` Mikael Morin
2011-08-06 14:40       ` Paolo Bonzini
2011-08-06 15:26         ` Mikael Morin
2011-08-06 15:39           ` Paolo Bonzini
2011-08-09 12:42             ` Rainer Orth
2011-08-06  9:54 ` Andreas Schwab
2011-08-08 17:29   ` Steve Ellcey
2011-08-08 18:49   ` Rainer Orth
2011-08-09  1:03     ` Andreas Schwab
2011-08-09 12:52       ` Rainer Orth
2011-08-09 13:15         ` Andreas Schwab
2011-08-09 14:50           ` Andreas Schwab
2011-08-09 15:17             ` Rainer Orth
2011-08-06 18:56 ` Richard Sandiford
2011-08-09 13:00   ` Rainer Orth
2011-08-10 13:57 ` Joseph S. Myers
2011-08-10 14:05   ` Rainer Orth
2011-08-10 14:12     ` Joseph S. Myers
2011-08-10 14:29       ` Rainer Orth
2011-08-10 15:59         ` Joseph S. Myers
2011-08-10 16:51         ` Paolo Bonzini
2011-08-10 16:53           ` Rainer Orth
2011-08-10 17:00             ` Paolo Bonzini
2011-08-11 15:49               ` Rainer Orth
2011-08-11 19:14                 ` H.J. Lu
2011-08-11 19:28                   ` H.J. Lu
2011-08-12  7:39                     ` Paolo Bonzini
2011-08-12 12:27                       ` H.J. Lu
2011-08-12 12:59                         ` Paolo Bonzini
2011-08-12 13:47                           ` Pedro Alves
2011-08-12 13:53                             ` H.J. Lu
2011-08-12 16:18                               ` Paolo Bonzini [this message]
2011-08-12 16:25                                 ` H.J. Lu
2011-08-12 16:31                                   ` Paolo Bonzini
2011-08-12 17:12                                     ` H.J. Lu
2011-08-12 17:51                                       ` Paolo Bonzini
2011-08-12 18:27                                         ` Paolo Bonzini
2011-08-12 16:44                                 ` Pedro Alves
2011-08-11 20:40                   ` Paolo Bonzini
2011-08-10 17:22             ` Pedro Alves
2011-08-11 12:31               ` Paolo Bonzini
2011-08-11 12:40                 ` Rainer Orth
2011-08-11 14:50                   ` Joseph S. Myers
2011-08-11 15:10                     ` Paolo Bonzini
2011-08-11 15:23                       ` Joseph S. Myers
2011-08-11 15:58                         ` Rainer Orth
2011-08-11 16:52                           ` Paolo Bonzini
2011-08-11 17:14                             ` Rainer Orth
2011-08-11 15:14                     ` Rainer Orth

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=4E454971.6060509@gnu.org \
    --to=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    --cc=pedro@codesourcery.com \
    --cc=ro@cebitec.uni-bielefeld.de \
    /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).