This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Support --disable-multilib on darwin8
- From: gkeating at apple dot com (Geoffrey Keating)
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 30 Sep 2005 10:53:28 -0700 (PDT)
- Subject: Support --disable-multilib on darwin8
Of course, this is the right way to do it. Silly me.
Bootstrapped & installed on powerpc-darwin, both with and without
--disable-multilib.
--
- Geoffrey Keating <geoffk@apple.com>
===File ~/patches/gcc-darwin-minversionlibgccnomulti.patch===
2005-09-30 Geoffrey Keating <geoffk@apple.com>
* config/t-slibgcc-darwin (libgcc_s_%.dylib): Use --print-multi-lib
to work out which multilibs are actually being built.
Index: config/t-slibgcc-darwin
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-slibgcc-darwin,v
retrieving revision 1.12
diff -u -p -u -p -r1.12 t-slibgcc-darwin
--- config/t-slibgcc-darwin 29 Sep 2005 00:49:56 -0000 1.12
+++ config/t-slibgcc-darwin 30 Sep 2005 17:51:41 -0000
@@ -43,10 +43,11 @@ ASM_HIDDEN_OP = .private_extern
# contain no code, just a list of exported symbols.
# The actual use of the libraries is controlled by REAL_LIBGCC_SPEC.
#
-# This assumes only one level of multilibs. It also assumes each multilib
-# corresponds to a different architecture.
+# This assumes each multilib corresponds to a different architecture.
libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver libgcc.a
- for mlib in '' $(MULTILIB_DIRNAMES:%=_%) ; do \
+ MLIBS=`$(GCC_FOR_TARGET) --print-multi-lib \
+ | sed -e 's/;.*$$//' -e '/^\.$$/d' -e 's/^/_/'` ; \
+ for mlib in '' $$MLIBS ; do \
$(STRIP_FOR_TARGET) -o $(@)_T$${mlib} \
-s $(SHLIB_VERPFX).$(*).ver -c -u \
libgcc_s$${mlib}.$(SHLIB_SOVERSION)$(SHLIB_EXT) || exit 1 ; \
@@ -54,7 +55,9 @@ libgcc_s.%.dylib : $(SHLIB_VERPFX).%.ver
$(LIPO_FOR_TARGET) -output $@ -create $(@)_T*
# When builting multilibbed target libraries, all the required
# libraries are expected to exist in the multilib directory.
- for mlib in $(MULTILIB_DIRNAMES) ; do \
+ 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*
============================================================