[PATCH] Fix PR target/30572 libgcc_s install name

Jack Howarth howarth@bromo.msbb.uc.edu
Wed Dec 19 03:00:00 GMT 2007


Paolo,
   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)

             Jack


On Tue, Dec 18, 2007 at 09:34:06AM +0100, Paolo Bonzini wrote:
> Etsushi Kato wrote:
>> 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.
>
> Would something like this work instead?
>
> Index: base-gcc-src/libgcc/config/t-slibgcc-darwin
> ===================================================================
> --- base-gcc-src/libgcc/config/t-slibgcc-darwin   (revision 130928)
> +++ base-gcc-src/libgcc/config/t-slibgcc-darwin   (working copy)
> @@ -16,7 +16,7 @@ SHLIB_LC = -lc
>  # 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 @slibdir@/$(SHLIB_INSTALL_NAME) \
>         -single_module -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
>         -Wl,-exported_symbols_list,$(SHLIB_MAP) \
>         $(SHLIB_VERSTRING) \
>
>
>
> Paolo



More information about the Gcc-patches mailing list