about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index cb6b35425a..0554f85f98 100644
--- a/Makerules
+++ b/Makerules
@@ -583,7 +583,9 @@ versioned := $(strip $(foreach so,$(install-lib.so),\
 $(addprefix $(libdir)/,$(filter-out $(versioned),$(install-lib.so))): \
 $(libdir)/%.so: $(objpfx)%.so; $(do-install-program)
 
-make-link = cd $(@D); rm -f $(@F); $(LN_S) $(<F) $(@F)
+define make-link
+cd $(@D); rm -f $(@F).new; $(LN_S) $(<F) $(@F).new; mv -f $(@F).new $(@F)
+endef
 
 ifdef libc.so-version
 # For a library specified to be version N, install three files: