[PATCH] Fix PR target/30572 libgcc_s install name

Etsushi Kato ek.kato@gmail.com
Wed Dec 19 07:49:00 GMT 2007


Hi,

On Dec 19, 2007 10:26 AM, Jack Howarth <howarth@bromo.msbb.uc.edu> wrote:
>    This is producing the following here on i686-apple-darwin9...
>
> [Macintosh:darwin_objdir/i686-apple-darwin9/libgcc] howarth% otool -L libgcc_s.1.dylib
> libgcc_s.1.dylib:
>         @slibdir@/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
>         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.0.0)

I think here is what Paolo proposed.


2007-12-19  Etsushi Kato  <ek.kato@gmail.com>

	PR target/30572
	* Makefile.in: Use @shlib_slibdir@ substitution to get
	correct install name for darwin.
	* config/t-slibgcc-darwin: Use @shlib_slibdir@ for -install_name.
	

Index: libgcc/Makefile.in
===================================================================
--- libgcc/Makefile.in	(revision 131032)
+++ libgcc/Makefile.in	(working copy)
@@ -739,7 +739,8 @@
 		@shlib_objs@,$(objects),$(subst \
 		@shlib_base_name@,libgcc_s,$(subst \
 		@shlib_map_file@,$(mapfile),$(subst \
-		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_LINK)))))))
+		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
+		@shlib_slibdir@,@slibdir@,$(SHLIB_LINK))))))))

 libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
 	# @multilib_flags@ is still needed because this may use
Index: libgcc/config/t-slibgcc-darwin
===================================================================
--- libgcc/config/t-slibgcc-darwin	(revision 131032)
+++ libgcc/config/t-slibgcc-darwin	(working copy)
@@ -16,7 +16,7 @@
 # Note that this version is used for the loader, not the linker; the linker
 # uses the stub versions named by the versioned members of $(INSTALL_FILES).
 SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
-	-install_name $(slibdir)/$(SHLIB_INSTALL_NAME) \
+	-install_name @shlib_slibdir@/$(SHLIB_INSTALL_NAME) \
 	-single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
 	-Wl,-exported_symbols_list,$(SHLIB_MAP) \
 	$(SHLIB_VERSTRING) \



Cheers,
-- 
Etsushi Kato
ek.kato@gmail.com



More information about the Gcc-patches mailing list