PATCH for fixing broken symbolic links with the new library interface

Manfred Hollstein manfred@s-direktnet.de
Tue Sep 8 09:11:00 GMT 1998


Some days ago  Mark Mitchell complained  about broken links left  by a
"make install" with the new library interface. I tested this a bit and
found a  different thing which should be fixed also:

  installing a cross compiler which had been configured with
  --enable-version-specific-runtime-libs still installs the libraries
  in $(tooldir)/lib instead of $(libsubdir).

The appended  patch fixes both  problems  (plus tracks  the change for
INSTALLDIR and fixes a comment in libio, too). OK to install?

manfred

egcs-19980906/libio/ChangeLog:

1998-09-08  Manfred Hollstein  <manfred@s-direktnet.de>

	* configure.in (INSTALLDIR): Fix comment about changing INSTALLDIR's
	value; don't change its value if --enable-version-specific-runtime-libs
	has been specified.

egcs-19980906/libstdc++/ChangeLog:

1998-09-08  Manfred Hollstein  <manfred@s-direktnet.de>

	* Makefile.in (install): Initialize RELINSTALLDIR correctly
	even for multilib and cross configurations.

	* configure.in (INSTALLDIR): Don't change INSTALLDIR's init
	value if --enable-version-specific-runtime-libs has been specified.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980906.orig/libio/configure.in egcs-19980906/libio/configure.in
--- egcs-19980906.orig/libio/configure.in	Fri Sep  4 20:34:59 1998
+++ egcs-19980906/libio/configure.in	Tue Sep  8 16:04:55 1998
@@ -136,13 +136,12 @@ fi
 
 # post-target:
 
-# If cross-compiling, don't build gperf or the utils.  They
-# will get built by the target compiler, which is confusing.
-# We cannot test the installation.  We install in $(tooldir).
+# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
+# depending on --enable-version-specific-runtime-libs.
 if [ -n "${with_cross_host}" ] ; then
     rm -f Makefile.tem
     sed \
-	-e 's|\(^[ 	]*INSTALLDIR[ 	]*=[ 	]*\)[^ 	;]*|\1$(tooldir)/lib|' \
+        -e 's|\(^[ 	]*INSTALLDIR[ 	]*=[ 	]*\)\$(libdir)|\1$(tooldir)/lib|' \
 	Makefile >Makefile.tem
     mv -f Makefile.tem Makefile
 fi
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980906.orig/libstdc++/Makefile.in egcs-19980906/libstdc++/Makefile.in
--- egcs-19980906.orig/libstdc++/Makefile.in	Fri Sep  4 20:42:21 1998
+++ egcs-19980906/libstdc++/Makefile.in	Tue Sep  8 15:51:36 1998
@@ -285,15 +285,20 @@ install:
 	  INSTALLDIR=$(libsubdir); \
 	fi; \
 	INSTALLLINKDIR=$(libsubdir); \
-	if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR} ]; \
-	then \
+	if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR}$(MULTISUBDIR) ]; then \
 	  RELINSTALLDIR=; \
 	elif [ x$(MULTISUBDIR) = x ]; then \
-	  RELINSTALLDIR=../../../; \
-	elif [ "x`echo $(MULTISUBDIR) | sed s,[a-z],,g`" = "x/" ]; then \
-	  RELINSTALLDIR=../../../../; \
+	  if [ $(build_alias) = $(target_alias) ]; then \
+	    RELINSTALLDIR=../../../; \
+	  else \
+	    RELINSTALLDIR=../../../../$(target_alias)/lib/; \
+	  fi; \
 	else \
-	  RELINSTALLDIR=$${INSTALLDIR}/; \
+	  if [ $(build_alias) = $(target_alias) ]; then \
+	    RELINSTALLDIR=../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`$(MULTISUBDIR)/; \
+	  else \
+	    RELINSTALLDIR=../../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`/$(target_alias)/lib$(MULTISUBDIR)/; \
+	  fi; \
 	fi; \
 	if [ $(build_alias) != $(target_alias) ]; then \
 	  case $$RELINSTALLDIR in \
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980906.orig/libstdc++/configure.in egcs-19980906/libstdc++/configure.in
--- egcs-19980906.orig/libstdc++/configure.in	Fri Sep  4 20:34:59 1998
+++ egcs-19980906/libstdc++/configure.in	Tue Sep  8 15:47:15 1998
@@ -103,11 +103,12 @@ LIBC_INTERFACE=${libc_interface}
 
 # post-target:
 
-# If cross-compiling, we install in $(tooldir).
+# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
+# depending on --enable-version-specific-runtime-libs.
 if [ -n "${with_cross_host}" ] ; then
     rm -f Makefile.tem
     sed \
-	-e 's|\(^[ 	]*INSTALLDIR[ 	]*=[ 	]*\)[^ 	;]*|\1$(tooldir)/lib|' \
+        -e 's|\(^[ 	]*INSTALLDIR[ 	]*=[ 	]*\)\$(libdir)|\1$(tooldir)/lib|' \
         Makefile >Makefile.tem
     mv -f Makefile.tem Makefile
 fi



More information about the Gcc-patches mailing list