diff options
Diffstat (limited to 'gcc/config/t-slibgcc-darwin')
-rw-r--r-- | gcc/config/t-slibgcc-darwin | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/t-slibgcc-darwin b/gcc/config/t-slibgcc-darwin index 34cb0d4160f..fbbf1c01afa 100644 --- a/gcc/config/t-slibgcc-darwin +++ b/gcc/config/t-slibgcc-darwin @@ -12,10 +12,14 @@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \ -Wl,-install_name,$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME) \ - -Wl,-flat_namespace -o $(SHLIB_NAME) \ + -Wl,-flat_namespace -o $(SHLIB_NAME).tmp \ $(SHLIB_VERSTRING) \ @multilib_flags@ $(SHLIB_OBJS) -lc && \ rm -f $(SHLIB_SOLINK) && \ + if [ -f $(SHLIB_NAME) ]; then \ + mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \ + else true; fi && \ + mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \ $(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) # $(slibdir) double quoted to protect it from expansion while building # libgcc.mk. We want this delayed until actual install time. |