summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-06-21 11:25:11 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-06-24 11:55:28 +0200
commit638c2396a2a7c0481bea536775544364fbde6fa8 (patch)
treebbb3e62277c10496f588825d145c37c308c529a1 /libc
parent6cbeaa5dd11a1b506a8a97b4dfb4e632240f9953 (diff)
fix race condition when generating linker scripts
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/Makefile.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 37eaa65eb..dd666ac7c 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -66,13 +66,14 @@ $(libc.depend): $(libc_OUT)/libc.oS $(libc-nomulti-y:.o=.oS) | $(LIBS-libc.so)
$(call linkm.so,$(libc_FULL_NAME),$(ABI_VERSION))
endif
$(Q)$(RM) $@
- $(Q)cp $(top_srcdir)extra/scripts/format.lds $@
- $(Q)$(OUTPUT_FORMAT) >> $@
+ $(Q)cat $(top_srcdir)extra/scripts/format.lds > $@.tmp
+ $(Q)$(OUTPUT_FORMAT) >> $@.tmp
ifeq ($(COMPAT_ATEXIT),y)
- $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_LIBNAME) $(ASNEEDED) )" >> $@
+ $(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
else
- $(Q)echo "GROUP ( $(SHARED_LIBNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@
+ $(Q)echo "GROUP ( $(SHARED_LIBNAME) $(NONSHARED_LIBNAME) $(ASNEEDED) )" >> $@.tmp
endif
+ $(Q)mv $@.tmp $@
$(libc_OUT)/libc_so.a: $(libc-so-y) | $(top_builddir)lib/libc.a $(top_builddir)lib/$(NONSHARED_LIBNAME)
$(Q)$(RM) $@