diff mbox

[build] Move unwinder to toplevel libgcc (v2)

Message ID 4E454971.6060509@gnu.org
State New
Headers show

Commit Message

Paolo Bonzini Aug. 12, 2011, 3:40 p.m. UTC
>> 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

Comments

H.J. Lu Aug. 12, 2011, 3:50 p.m. UTC | #1
On Fri, Aug 12, 2011 at 8:40 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>>> 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.
>

It should work.

Thanks.
Paolo Bonzini Aug. 12, 2011, 3:57 p.m. UTC | #2
On 08/12/2011 05:50 PM, H.J. Lu wrote:
> >  Thanks, you are correct.
>
> It should work.
>
> Thanks.

I prefer to wait for testing results to commit it, the breakage is minor.

Paolo
Pedro Alves Aug. 12, 2011, 4:18 p.m. UTC | #3
On Friday 12 August 2011 16:40:33, Paolo Bonzini wrote:
>  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

Thanks, that looks good to me.
H.J. Lu Aug. 12, 2011, 4:25 p.m. UTC | #4
On Fri, Aug 12, 2011 at 8:57 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
> On 08/12/2011 05:50 PM, H.J. Lu wrote:
>>
>> >  Thanks, you are correct.
>>
>> It should work.
>>
>> Thanks.
>
> I prefer to wait for testing results to commit it, the breakage is minor.

It bootstraps successfully with "make -j12" on a 24 core machine.

Thanks.
Paolo Bonzini Aug. 12, 2011, 5:13 p.m. UTC | #5
On 08/12/2011 06:25 PM, H.J. Lu wrote:
>> >
>> >  I prefer to wait for testing results to commit it, the breakage is minor.
> It bootstraps successfully with "make -j12" on a 24 core machine.
>
> Thanks.

Committed.

Paolo
diff mbox

Patch

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