On Fri, Aug 12, 2011 at 5:38 AM, Pedro Alves <pe...@codesourcery.com> wrote:
> On Friday 12 August 2011 13:17:21, Paolo Bonzini wrote:
>>   2011-08-12  Paolo Bonzini  <bonz...@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,10 @@ gcc-extra-parts:
>>  all: $(extra-parts)
>>
>>  install-unwind_h:
>> -       rm -f $(gcc_objdir)/include/unwind.h
>> -       cp unwind.h $(gcc_objdir)/include/unwind.h
>> +       cp unwind.h $(gcc_objdir)/include/tmp-unwind.h
>> +       sh $(srcdir)/../move-if-change \
>> +               $(gcc_objdir)/include/tmp-unwind.h \
>> +               $(gcc_objdir)/include/unwind.h
>>         chmod a+r $(gcc_objdir)/include/unwind.h
>>
>
> 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.


-- 
H.J.

Reply via email to