This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
darwin8, libgcc rebuilding
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Sep 2005 11:07:09 -0700 (PDT)
- Subject: darwin8, libgcc rebuilding
It turns out if you do
make bootstrap
rm gcc/libgcc.a
make quickstrap
on darwin8, it fails because the symlinks have already been created.
Plus, the symlinks should be made before updating the actual files, so
that if the symlinks fail (for some bizzare reason) a new 'make' will
try it again.
Tested by running the last two commands on an already-built tree and
checking that the libgcc stubs were created properly.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-minversionlibgccincr.patch=====
2005-09-30 Geoffrey Keating <geoffk@apple.com>
* config/t-slibgcc-darwin (libgcc_s_%.dylib): Remove old symlinks
before creating new ones. Do symlinks before creating the actual
targets.
Index: config/t-slibgcc-darwin
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-slibgcc-darwin,v
retrieving revision 1.13
diff -u -p -u -p -r1.13 t-slibgcc-darwin
--- config/t-slibgcc-darwin 30 Sep 2005 17:55:27 -0000 1.13
+++ config/t-slibgcc-darwin 30 Sep 2005 18:03:45 -0000
@@ -45,6 +45,14 @@ ASM_HIDDEN_OP = .private_extern
#
# This assumes each multilib corresponds to a different architecture.
libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver libgcc.a
+ # When builting multilibbed target libraries, all the required
+ # libraries are expected to exist in the multilib directory.
+ MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
+ | sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
+ for mlib in $$MLIBS ; do \
+ rm -f $${mlib}/$@ || exit 1 ; \
+ $(LN_S) ../$@ $${mlib}/$@ || exit 1 ; \
+ done
MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
| sed -e 's/;.*$$//' -e '/^\.$$/d' -e 's/^/_/'` ; \
for mlib in '' $$MLIBS ; do \
@@ -53,13 +61,6 @@ libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver
libgcc_s$${mlib}.$(SHLIB_SOVERSION)$(SHLIB_EXT) || exit 1 ; \
done
$(LIPO_FOR_TARGET) -output $@ -create $(@)_T*
- # When builting multilibbed target libraries, all the required
- # libraries are expected to exist in the multilib directory.
- MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
- | sed -e 's/;.*$$//' -e '/^\.$$/d'` ; \
- for mlib in $$MLIBS ; do \
- ln -s ../$@ $${mlib}/$@ || exit 1 ; \
- done
rm $(@)_T*
# From the point-of-view of the Makefiles, libgcc is built by the 'strip'
============================================================