summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
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) $@