This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix PR target/30572 libgcc_s install name
- From: "Etsushi Kato" <ek dot kato at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Dec 2007 11:18:44 +0900
- Subject: [PATCH] Fix PR target/30572 libgcc_s install name
Hi,
Here is a patch to keep slibdir defined while making libgcc_s* to add
appropriate install names on darwin. Without this, install name of
libgcc_s.1dylib becomes '/libgcc_s.1.dylib' and all binaries linked to
the library won't work.
I've tested this patch on Mac OS X 10.4.11 and Fedora 8. Could
someone commit this for trunk?
2007-12-18 Etsushi Kato <ek.kato@gmail.com>
PR target/30572
* libgcc/Makefile.in: Install libgcc_s.* with slibdir defined
to keep install names correctly on darwin.
Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in (revision 131004)
+++ libgcc/Makefile.in (working copy)
@@ -100,8 +100,17 @@
# in-tree libraries, and DejaGNU) know about the layout
# of the build tree, for now.
$(MAKE) install DESTDIR=$(gcc_objdir) \
- slibdir= libsubdir= MULTIOSDIR=$(MULTIDIR)
+ slibdir=$(slibdir) libsubdir= MULTIOSDIR=$(MULTIDIR)
+ objdir="$(gcc_objdir)/$(slibdir)"; \
+ if test -d $$objdir; then \
+ for file in $$objdir/libgcc_s*; do \
+ if test -f $$file -o -L $$file; then \
+ mv -f $$file $(gcc_objdir)/; \
+ fi; \
+ done; \
+ fi
+
.PHONY: all-multi
all-multi:
# If this is the top-level multilib, build all the other
--
Etsushi Kato
ek.kato@gmail.com