This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [build] Move unwinder to toplevel libgcc (v2)


On Fri, Aug 12, 2011 at 5:38 AM, Pedro Alves <pedro@codesourcery.com> wrote:
> On Friday 12 August 2011 13:17:21, Paolo Bonzini wrote:
>> ? 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,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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]