[PATCH] Fix PR target/30572 libgcc_s install name

Jakub Jelinek jakub@redhat.com
Wed Dec 19 08:40:00 GMT 2007


On Wed, Dec 19, 2007 at 02:50:25PM +0900, Etsushi Kato wrote:
> 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))))))))

This will misbehave if @slibdir@ is expanded with a comma inside of it (I know
it is not very probable, but anyway).
Wouldn't it be safer to
shlib_slibdir=@slibdir@
close to the beginning of libgcc/Makefile.in and then
		@shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
		@shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
?

	Jakub



More information about the Gcc-patches mailing list