re PR bootstrap/17684 (/usr/ccs/bin/ld: Can't create libgcc_s.sl)

2004-11-18  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/17684
	* Makefile.in (clean): Remove libgcc_s$(SHLIB_EXT).1.stage?.
	(stage1-start): Remove and copy libunwind.a and
	libunwind*$(SHLIB_EXT) instead of libunwind*.
	(stage2-start): Likewise.
	(stage3-start): Likewise.
	(stage4-start): Likewise.
	(stageprofile-start): Likewise.
	(stagefeedback-start): Likewise.

	* config/alpha/t-osf4 (SHLIB_LINK): Use a temporary file for
	the shared library to be created and don't remove the existing
	shared library.
	* config/arm/t-netbsd (SHLIB_LINK): Likewise.
	* config/i386/t-nwld (SHLIB_LINK): Likewise.
	* config/mips/t-slibgcc-irix (SHLIB_LINK): Likewise.
	* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
	* config/sh/t-linux (SHLIB_LINK): Likewise.
	* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
	* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
	* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
	* config/t-slibgcc-sld (SHLIB_LINK): Likewise.

	* mklibgcc.in (libgcc-stage-start): Also move "*${objext}s"
	files.

From-SVN: r89227
This commit is contained in:
H.J. Lu 2004-10-18 15:52:51 +00:00 committed by H.J. Lu
parent a204196782
commit 3b415018d3
13 changed files with 94 additions and 24 deletions

View file

@ -1,3 +1,31 @@
2004-11-18 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/17684
* Makefile.in (clean): Remove libgcc_s$(SHLIB_EXT).1.stage?.
(stage1-start): Remove and copy libunwind.a and
libunwind*$(SHLIB_EXT) instead of libunwind*.
(stage2-start): Likewise.
(stage3-start): Likewise.
(stage4-start): Likewise.
(stageprofile-start): Likewise.
(stagefeedback-start): Likewise.
* config/alpha/t-osf4 (SHLIB_LINK): Use a temporary file for
the shared library to be created and don't remove the existing
shared library.
* config/arm/t-netbsd (SHLIB_LINK): Likewise.
* config/i386/t-nwld (SHLIB_LINK): Likewise.
* config/mips/t-slibgcc-irix (SHLIB_LINK): Likewise.
* config/pa/t-hpux-shlib (SHLIB_LINK): Likewise.
* config/sh/t-linux (SHLIB_LINK): Likewise.
* config/t-libunwind-elf (SHLIBUNWIND_LINK): Likewise.
* config/t-slibgcc-darwin (SHLIB_LINK): Likewise.
* config/t-slibgcc-elf-ver (SHLIB_LINK): Likewise.
* config/t-slibgcc-sld (SHLIB_LINK): Likewise.
* mklibgcc.in (libgcc-stage-start): Also move "*${objext}s"
files.
2004-10-18 Kazu Hirata <kazu@cs.umass.edu>
* basic-block.h (reg_set_iterator): New.

View file

@ -3077,7 +3077,7 @@ mostlyclean: lang.mostlyclean
# that don't exist in the distribution.
clean: mostlyclean lang.clean
-rm -f libgcc.a libgcc_eh.a libgcov.a
-rm -f libgcc_s$(SHLIB_EXT) libgcc_s$(SHLIB_EXT).1
-rm -f libgcc_s*
-rm -f libunwind*
-rm -f config.h tconfig.h bconfig.h tm_p.h tm.h
-rm -f options.c options.h optionlist
@ -3911,7 +3911,7 @@ stage1-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stage1 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stage1/libgcc.a stage1/libgcc_eh.a stage1/libgcov.a
-rm -f stage1/libgcc_s*$(SHLIB_EXT)
-rm -f stage1/libunwind*
-rm -f stage1/libunwind.a stage1/libunwind*$(SHLIB_EXT)
-cp libgcc.a stage1
-$(RANLIB_FOR_TARGET) stage1/libgcc.a
-cp libgcov.a stage1
@ -3920,7 +3920,7 @@ stage1-start:
$(RANLIB_FOR_TARGET) stage1/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stage1
-cp libunwind* stage1
-cp libunwind.a libunwind*$(SHLIB_EXT) stage1
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage1/$${f} . ; \
else true; \
@ -3950,7 +3950,7 @@ stage2-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stage2 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stage2/libgcc.a stage2/libgcov.a stage2/libgcc_eh.a
-rm -f stage2/libgcc_s*$(SHLIB_EXT)
-rm -f stage2/libunwind*
-rm -f stage2/libunwind.a stage2/libunwind*$(SHLIB_EXT)
-cp libgcc.a stage2
-$(RANLIB_FOR_TARGET) stage2/libgcc.a
-cp libgcov.a stage2
@ -3959,7 +3959,7 @@ stage2-start:
$(RANLIB_FOR_TARGET) stage2/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stage2
-cp libunwind* stage2
-cp libunwind.a libunwind*$(SHLIB_EXT) stage2
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage2/$${f} . ; \
else true; \
@ -3985,7 +3985,7 @@ stage3-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stage3 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stage3/libgcc.a stage3/libgcov.a stage3/libgcc_eh.a
-rm -f stage3/libgcc_s*$(SHLIB_EXT)
-rm -f stage3/libunwind*
-rm -f stage3/libunwind.a stage3/libunwind*$(SHLIB_EXT)
-cp libgcc.a stage3
-$(RANLIB_FOR_TARGET) stage3/libgcc.a
-cp libgcov.a stage3
@ -3994,7 +3994,7 @@ stage3-start:
$(RANLIB_FOR_TARGET) stage3/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stage3
-cp libunwind* stage3
-cp libunwind.a libunwind*$(SHLIB_EXT) stage3
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage3/$${f} . ; \
else true; \
@ -4020,7 +4020,7 @@ stage4-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stage4 && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stage4/libgcc.a stage4/libgcov.a stage4/libgcc_eh.a
-rm -f stage4/libgcc_s*$(SHLIB_EXT)
-rm -f stage4/libunwind*
-rm -f stage4/libunwind.a stage4/libunwind*$(SHLIB_EXT)
-cp libgcc.a stage4
-$(RANLIB_FOR_TARGET) stage4/libgcc.a
-cp libgcov.a stage4
@ -4029,7 +4029,7 @@ stage4-start:
$(RANLIB_FOR_TARGET) stage4/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stage4
-cp libunwind* stage4
-cp libunwind.a libunwind*$(SHLIB_EXT) stage4
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stage4/$${f} . ; \
else true; \
@ -4053,7 +4053,7 @@ stageprofile-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stageprofile && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stageprofile/libgcc.a stageprofile/libgcov.a stageprofile/libgcc_eh.a
-rm -f stageprofile/libgcc_s*$(SHLIB_EXT)
-rm -f stageprofile/libunwind*
-rm -f stageprofile/libunwind.a stageprofile/libunwind*$(SHLIB_EXT)
-cp libgcc.a stageprofile
-$(RANLIB_FOR_TARGET) stageprofile/libgcc.a
-cp libgcov.a stageprofile
@ -4062,7 +4062,7 @@ stageprofile-start:
$(RANLIB_FOR_TARGET) stageprofile/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stageprofile
-cp libunwind* stageprofile
-cp libunwind.a libunwind*$(SHLIB_EXT) stageprofile
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stageprofile/$${f} . ; \
else true; \
@ -4086,7 +4086,7 @@ stagefeedback-start:
-if [ -f collect-ld$(exeext) ] ; then (cd stagefeedback && $(LN_S) ../collect-ld$(exeext) .) ; else true ; fi
-rm -f stagefeedback/libgcc.a stagefeedback/libgcov.a stagefeedback/libgcc_eh.a
-rm -f stagefeedback/libgcc_s*$(SHLIB_EXT)
-rm -f stagefeedback/libunwind*
-rm -f stagefeedback/libunwind.a stagefeedback/libunwind*$(SHLIB_EXT)
-rm -f *.da
-for dir in fixinc po testsuite $(SUBDIRS); \
do \
@ -4100,7 +4100,7 @@ stagefeedback-start:
$(RANLIB_FOR_TARGET) stagefeedback/libgcc_eh.a; \
fi
-cp libgcc_s*$(SHLIB_EXT) stagefeedback
-cp libunwind* stagefeedback
-cp libunwind.a libunwind*$(SHLIB_EXT) stagefeedback
-for f in .. $(EXTRA_MULTILIB_PARTS); do if [ x$${f} != x.. ]; then \
cp stagefeedback/$${f} . ; \
else true; \

View file

@ -16,8 +16,12 @@ SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-hidden_symbol,pthread\* -Wl,-hidden_symbol,__pthread\* \
-Wl,-hidden_symbol,sched_get_\* -Wl,-hidden_symbol,sched_yield \
-Wl,-msym -Wl,-set_version,gcc.1 -Wl,-soname,$(SHLIB_SONAME) \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
rm -f $(SHLIB_SONAME) && \
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_SONAME)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.

View file

@ -11,8 +11,12 @@ SHLIB_OBJS = @shlib_objs@
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-soname,$(SHLIB_SONAME) \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
rm -f $(SHLIB_SONAME) && \
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_SONAME)
# $(slibdir) double quoted to protect it from expansion while building
# libgcc.mk. We want this delayed until actual install time.

View file

@ -46,9 +46,13 @@ SHLIB_LINK = set -e; \
then echo "xdcdata @shlib_so_name@.xdc" >>@shlib_so_name@.def; \
else echo "WARNING: $(SHLIB_NAME) built without XDC data will not work well." 1>&2; \
fi; \
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME) \
$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME).tmp \
$(SHLIB_SRC) -static-libgcc -lnetware \
-Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_so_name@.def; \
if [ -f $(SHLIB_NAME) ]; then \
mv -f $(SHLIB_NAME) $(SHLIB_NAME).`basename $(STAGE_PREFIX)`; \
else true; fi; \
mv $(SHLIB_NAME).tmp $(SHLIB_NAME); \
rm -f @shlib_so_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_so_name@.imp; \
echo $$$$(($$$$(<libgcc/build)+1)) >libgcc/build

View file

@ -12,8 +12,12 @@ SHLIB_LC = -lc
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-soname,$(SHLIB_SONAME) \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_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.

View file

@ -5,8 +5,12 @@ SHLIB_SONAME = @shlib_base_name@.1
SHLIB_OBJS = @shlib_objs@
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
rm -f $(SHLIB_SONAME) && \
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_SONAME)

View file

@ -21,8 +21,12 @@ SHLIB_MAPFILES = $(srcdir)/config/sh/libgcc-std.ver \
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=$(SHLIB_SONAME) \
-Wl,--version-script=$(SHLIB_MAP) \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_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) && \
(echo "/* GNU ld script"; \
echo " Use the shared library, but some functions are only in"; \
echo " the static library. */"; \

View file

@ -10,9 +10,14 @@ SHLIBUNWIND_NAME = @shlib_dir@@shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \
-nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \
-Wl,-z,text -Wl,-z,defs \
-o $(SHLIBUNWIND_NAME) @multilib_flags@ $(SHLIB_OBJS) -lc && \
-Wl,-z,text -Wl,-z,defs -o $(SHLIBUNWIND_NAME).tmp \
@multilib_flags@ $(SHLIB_OBJS) -lc && \
rm -f $(SHLIB_SOLINK) && \
if [ -f $(SHLIBUNWIND_NAME) ]; then \
mv -f $(SHLIBUNWIND_NAME) \
$(SHLIBUNWIND_NAME).`basename $(STAGE_PREFIX)`; \
else true; fi && \
mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
$(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
# $(slibdir) double quoted to protect it from expansion while building

View file

@ -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.

View file

@ -14,8 +14,12 @@ SHLIB_LC = -lc
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=$(SHLIB_SONAME) \
-Wl,--version-script=$(SHLIB_MAP) \
-o $(SHLIB_NAME) @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_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.

View file

@ -10,9 +10,13 @@ SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
-Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME) \
-Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME).tmp \
@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.

View file

@ -557,6 +557,7 @@ echo ' if [ -d $(stage)/$$dir ]; then true; else '$mkinstalldirs' $(stage)/$$d
echo ' done'
echo ' -for dir in '"${dirs}"'; do \'
echo ' mv $$dir/*'"${objext}"' $(stage)/$$dir; \'
echo ' mv $$dir/*'"${objext}s"' $(stage)/$$dir || true; \'
echo ' test ! -f $$dir/stacknote.s || mv $$dir/stacknote.s $(stage)/$$dir; \'
echo ' test ! -f $$dir/libgcc.a || mv $$dir/lib* $(stage)/$$dir; \'
echo ' done'