This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
A patch for libstdc++
- To: law at cygnus dot com
- Subject: A patch for libstdc++
- From: hjl at lucon dot org (H.J. Lu)
- Date: Mon, 31 Aug 1998 08:52:56 -0700 (PDT)
- Cc: egcs-patches at cygnus dot com
>
>
> In message <m0yxHf8-000266C@ocean.lucon.org>you write:
> > I hope it can go into egcs 1.1. It will solve many problems with
> > chaning ABI/API.
> I've installed this into the mainline tree.
> jeff
>
Here is a patch for libstdc++. It uses relative path for symlinks.
Thanks.
--
H.J. Lu (hjl@gnu.org)
----
Fri Aug 28 19:53:33 1998 H.J. Lu (hjl@gnu.org)
* Makefile.in (RELINSTALLDIR): New. Use it to make symlinks.
* configure.in: Fix INSTALLDIR replacement for cross-compile.
Index: Makefile.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libstdc++/Makefile.in,v
retrieving revision 1.1.1.14
diff -u -r1.1.1.14 Makefile.in
--- Makefile.in 1998/08/31 15:37:15 1.1.1.14
+++ Makefile.in 1998/08/31 15:49:35
@@ -285,21 +285,37 @@
INSTALLDIR=$(libsubdir); \
fi; \
INSTALLLINKDIR=$(libsubdir); \
+ if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR} ]; \
+ then \
+ RELINSTALLDIR=; \
+ elif [ x$(MULTISUBDIR) = x ]; then \
+ RELINSTALLDIR=../../../; \
+ elif [ "x`echo $(MULTISUBDIR) | sed s,[a-z],,g`" = "x/" ]; then \
+ RELINSTALLDIR=../../../../; \
+ else \
+ RELINSTALLDIR=$${INSTALLDIR}/; \
+ fi; \
+ if [ $(build_alias) != $(target_alias) ]; then \
+ case $$RELINSTALLDIR in \
+ ../../../|../../../../) \
+ RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \
+ esac; \
+ fi; \
rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
for FILE in $(LIBS) ; do \
rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
if [ $$FILE = $(SHLINK) ] ; then \
if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \
- ln -f -s $${INSTALLDIR}/$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ ln -f -s $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
else \
- ln -f -s $${INSTALLDIR}/$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ ln -f -s $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
fi; \
elif [ $$FILE = $(ARLINK) ] ; then \
if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \
- ln -f -s $${INSTALLDIR}/$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ ln -f -s $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
else \
- ln -f -s $${INSTALLDIR}/$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
+ ln -f -s $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
fi; \
elif [ $$FILE = mshlink ]; then \
for FILE in $(MSHLINK) ; do \
Index: configure.in
===================================================================
RCS file: /home/work/cvs/gnu/egcs/libstdc++/configure.in,v
retrieving revision 1.1.1.9
diff -u -r1.1.1.9 configure.in
--- configure.in 1998/08/31 15:37:17 1.1.1.9
+++ configure.in 1998/08/31 15:40:06
@@ -107,7 +107,7 @@
if [ -n "${with_cross_host}" ] ; then
rm -f Makefile.tem
sed \
- -e 's|\(INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \
+ -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)[^ ;]*|\1$(tooldir)/lib|' \
Makefile >Makefile.tem
mv -f Makefile.tem Makefile
fi