This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH for installing runtime libs/headers in $(libsubdir) (was: Re: How to get top-level library installed in lib/gcc-lib/...? )
- To: egcs-patches at cygnus dot com
- Subject: PATCH for installing runtime libs/headers in $(libsubdir) (was: Re: How to get top-level library installed in lib/gcc-lib/...? )
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Fri, 19 Jun 1998 20:46:15 +0200 (MEST)
- Cc: law at cygnus dot com
- References: <rzqhg1jvnya.fsf@djlvig.dl.ac.uk><6308.898139856@hurl.cygnus.com><13706.3274.474623.435125@slsvhmt>
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On Fri, 19 June 1998, 09:18:13, manfred@s-direktnet.de wrote:
> > You've just made programs which use libstdc++ (any C++ program) rely
> > on being able to find libsubdir/libstdc++.so at runtime. ANd if your
> > sysadmin updates compilers and wipes out the old version, then your
> > programs will be unable to find the right libstdc++.so and will not
> > run.
>
> I even agree with this. But, imagine the other way round: You've just
> installed a new snapshot, which simply overwrites any existing egcs
> release's or other snapshot's libs; unfortunately, the new lib's
> interfaces have changed :-( What gives? The programs won't start,
> either, or even worse, they'll start but won't work as they should.
>
> >
> > This is the same argument against libgcc.sl.
>
> No, I guess the argument against a shared libgcc is mainly that we
> expect to have more changes in it than in a shared libstdc++ or
> libg++.
>
> Perhaps, this issue is mostly relevant to us gcc/g++/libstdc++ hackers
> only. What do you think about this:
>
> In a release tree shared libraries continue to be installed where
> they are right now. The change I've proposed with my patch in a
> separate e-mail concerning $(libsubdir) and $(gxx_include_dir) will
> only be applied to the snapshots.
Even if this won't make it into the mainline source, anyway, here's a
patch for those who want to be able to use different egcs versions in
parallel without moving files around after "make install"
(gcc/configure needs to be manually re-built using autoconf!):
egcs-19980619/ChangeLog:
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* configure (gxx_include_dir): Default to '${libsubdir}/include/g++' now.
egcs-19980619/gcc/ChangeLog:
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* configure.in (gxx_include_dir): Use same default as the toplevel
configure script would use; add comment for this.
* configure: Regenerate.
egcs-19980619/libio/ChangeLog:
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (install): Install _G_config.h in $(gxx_include_dir).
* config/linux.mt (gxx_include_dir): Remove definition here as we use
gcc's default anyway.
egcs-19980619/libstdc++/ChangeLog:
1998-06-18 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (INSTALLDIR): Default to $(libsubdir).
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980619.orig/configure egcs-19980619/configure
--- egcs-19980619.orig/configure Fri Jun 19 07:42:14 1998
+++ egcs-19980619/configure Fri Jun 19 15:18:06 1998
@@ -1223,7 +1223,7 @@ EOF
# Note, if you change the default, make sure to fix both here
# and in the gcc subdirectory.
if test -z "${with_gxx_include_dir}"; then
- echo gxx_include_dir = '${prefix}/include/g++' >> ${Makefile}
+ echo gxx_include_dir = '$(libsubdir)/include/g++' >> ${Makefile}
else
echo gxx_include_dir = ${with_gxx_include_dir} >> ${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-19980619.orig/gcc/configure.in egcs-19980619/gcc/configure.in
--- egcs-19980619.orig/gcc/configure.in Fri Jun 19 01:36:41 1998
+++ egcs-19980619/gcc/configure.in Fri Jun 19 15:18:07 1998
@@ -71,11 +71,12 @@ AC_ARG_WITH(gxx-include-dir,
[ --with-gxx-include-dir=DIR
specifies directory to put g++ header files.],
gxx_include_dir=$with_gxx_include_dir,
-gxx_include_dir='${prefix}/include/g++')
+gxx_include_dir='${libsubdir}/include/g++')
# Default g++ header file directory if it is empty
+# Note, we need to match the default from the toplevel configure script.
if [[ x$gxx_include_dir = x ]]; then
- gxx_include_dir='${prefix}/include/g++'
+ gxx_include_dir='${libsubdir}/include/g++'
fi
# Enable expensive internal checks
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980619.orig/libio/Makefile.in egcs-19980619/libio/Makefile.in
--- egcs-19980619.orig/libio/Makefile.in Sun Feb 22 17:31:01 1998
+++ egcs-19980619/libio/Makefile.in Fri Jun 19 15:18:07 1998
@@ -107,8 +107,8 @@ install:
rootme=`pwd`/ ; export rootme ; \
if [ -z "$(MULTISUBDIR)" ]; then \
if [ "$(_G_CONFIG_H)" != "" ]; then \
- rm -f $(tooldir)/include/_G_config.h ; \
- $(INSTALL_DATA) _G_config.h $(tooldir)/include/_G_config.h || exit 1; \
+ rm -f $(gxx_include_dir)/_G_config.h ; \
+ $(INSTALL_DATA) _G_config.h $(gxx_include_dir)/_G_config.h || exit 1; \
else true; \
fi ; \
cd $(srcdir); \
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980619.orig/libio/config/linux.mt egcs-19980619/libio/config/linux.mt
--- egcs-19980619.orig/libio/config/linux.mt Tue Feb 17 21:54:11 1998
+++ egcs-19980619/libio/config/linux.mt Fri Jun 19 15:18:07 1998
@@ -1,8 +1,5 @@
# Use the libio which comes with the local libc.
-# That is where we keep the g++ header files.
-gxx_include_dir =$(prefix)/include/g++
-
# Comment this out to avoid including the stdio functions in libiostream.a:
# LIBIOSTREAM_OBJECTS = $(IO_OBJECTS) $(IOSTREAM_OBJECTS) $(STDIO_WRAP_OBJECTS) $(OSPRIM_OBJECTS)
# LIBIOSTREAM_DEP = $(LIBIOSTREAM_OBJECTS) stdio.list
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980619.orig/libstdc++/Makefile.in egcs-19980619/libstdc++/Makefile.in
--- egcs-19980619.orig/libstdc++/Makefile.in Sun May 17 15:39:11 1998
+++ egcs-19980619/libstdc++/Makefile.in Fri Jun 19 15:18:07 1998
@@ -48,7 +48,7 @@ LIBIBERTY_DIR = ../libiberty
LIBIBERTY_OBJS = `cat $(LIBIBERTY_DIR)/needed-list` strerror.o
tooldir = $(exec_prefix)/$(target)
-INSTALLDIR = $(libdir)
+INSTALLDIR = $(libsubdir)
MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist
CLEAN_JUNK = $(LIBS)