This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: New PATCH to provide $(libsubdir) to sub-makes
- To: law at cygnus dot com
- Subject: Re: New PATCH to provide $(libsubdir) to sub-makes
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Fri, 19 Jun 1998 14:43:04 +0200 (MET DST)
- Cc: egcs-patches at cygnus dot com, burley at gnu dot org
- References: <13704.46293.572266.946471@slsvhmt> <9863.898234405@hurl.cygnus.com>
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
On Thu, 18 June 1998, 23:33:25, law@hurl.cygnus.com wrote:
>
> In message <13704.46293.572266.946471@slsvhmt>you write:
> > I need to do it this way, because I don't want to go through the whole
> > bootstrap chain again and again whenever I've made a small change to
> > whatever file. Currently a complete build on my m68k-motorola-sysv
> > system takes nearly ONE WEEK, you understand my intention?!? So, I'd
> > prefer to be able to build up to stage4 or 5.
> >
> > My new patch (replacing the previous one completely) fixes this.
> > PLUS, now that libf2c will be installed in ${libsubdir}, I've added
> > the same behaviour for libio/libstdc++:
> >
> > - libstdc++.{a,so*} will be installed in ${libsubdir}
> > - gxx_include_dir now defaults to ${libsubdir}/include/g++
> > - _G_config.h will be installed in ${gxx_include_dir}
> >
> > I believe these changes help a lot to use several different egcs
> > versions in parallel. What do you think?
> You can install the change, without the parts which change the install
> directory for libstdc++ libraries, include files and _G_config.h.
>
> I have serious reservations about changing those since the discussion
> on this topic was rather lengthy in the past and I don't remember a
> solid yes/no decision ever being made on this topic.
Done. I've actually checked in the appended patch.
manfred
egcs-19980619/ChangeLog
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* configure (gcc_version): Add new variable describing the
particular gcc version we're building.
* Makefile.in (libsubdir): Add new macro for the directory
in which the compiler finds executables, libraries, etc.
(BASE_FLAGS_TO_PASS): Pass down gcc_version, target_alias
and libsubdir.
egcs-19980619/gcc/ChangeLog
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (installdirs): Loop over directories in $(libsubdir)
creating probably missing ones, instead of single if statements.
egcs-19980619/libio/ChangeLog
1998-06-19 Manfred Hollstein <manfred@s-direktnet.de>
* config.shared (FLAGS_TO_PASS): Add 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/Makefile.in egcs-19980619/Makefile.in
--- egcs-19980619.orig/Makefile.in Mon May 25 11:29:19 1998
+++ egcs-19980619/Makefile.in Fri Jun 19 10:38:20 1998
@@ -41,6 +41,8 @@ man8dir = $(mandir)/man8
man9dir = $(mandir)/man9
infodir = $(prefix)/info
includedir = $(prefix)/include
+# Directory in which the compiler finds executables, libraries, etc.
+libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
GDB_NLM_DEPS =
SHELL = /bin/sh
@@ -355,7 +357,10 @@ BASE_FLAGS_TO_PASS = \
"exec_prefix=$(exec_prefix)" \
"prefix=$(prefix)" \
"tooldir=$(tooldir)" \
- "gxx_include_dir=$(gxx_include_dir)"
+ "gxx_include_dir=$(gxx_include_dir)" \
+ "gcc_version=$(gcc_version)" \
+ "target_alias=$(target_alias)" \
+ "libsubdir=$(libsubdir)"
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
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 Apr 24 07:59:08 1998
+++ egcs-19980619/configure Fri Jun 19 10:38:20 1998
@@ -56,6 +56,7 @@ exec_prefixoption=
fatal=
floating_point=default
gas=default
+gcc_version=UNKNOWN
host_alias=NOHOST
host_makefile_frag=
moveifchange=
@@ -700,6 +701,12 @@ if [ "${program_prefix}" != "" ] ; then
program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
fi
+# If gcc's sources are available, extract its version number which is used by
+# $libsubdir.
+if [ -f $srcdir/gcc/version.c ]; then
+ gcc_version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/gcc/version.c`
+fi
+
# If CC and CXX are not set in the environment, and the Makefile
# exists, try to extract them from it. This is to handle running
# ./config.status by hand.
@@ -1227,6 +1234,12 @@ EOF
else
echo enable_shared = ${enable_shared} >> ${Makefile}
fi
+
+ # Emit a macro which is used to build the libsubdir macro where
+ # compiler specific stuff can be found/installed.
+ # FIXME: This works only if gcc's sources are available in a gcc
+ # subdirectory!
+ echo gcc_version = ${gcc_version} >> ${Makefile}
# reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
# remove any form feeds.
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/Makefile.in egcs-19980619/gcc/Makefile.in
--- egcs-19980619.orig/gcc/Makefile.in Fri Jun 19 10:08:55 1998
+++ egcs-19980619/gcc/Makefile.in Fri Jun 19 10:38:20 1998
@@ -2271,9 +2271,10 @@ installdirs:
-if [ -d $(libdir)/gcc-lib ] ; then true ; else mkdir $(libdir)/gcc-lib ; chmod a+rx $(libdir)/gcc-lib ; fi
# This dir isn't currently searched by cpp.
# -if [ -d $(libdir)/gcc-lib/include ] ; then true ; else mkdir $(libdir)/gcc-lib/include ; chmod a+rx $(libdir)/gcc-lib/include ; fi
- -if [ -d $(libdir)/gcc-lib/$(target_alias) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias) ; fi
- -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version) ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version) ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version) ; fi
- -if [ -d $(libdir)/gcc-lib/$(target_alias)/$(version)/include ] ; then true ; else mkdir $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; chmod a+rx $(libdir)/gcc-lib/$(target_alias)/$(version)/include ; fi
+ -fdir= ; for dir in `echo $(libsubdir) | tr '/' ' '`; do \
+ fdir=$${fdir}/$${dir}; \
+ if [ -d $${fdir} ] ; then true ; else mkdir $${fdir}; chmod a+rx $${fdir}; fi ; \
+ done
-if [ -d $(bindir) ] ; then true ; else mkdir $(bindir) ; chmod a+rx $(bindir) ; fi
-if [ -d $(includedir) ] ; then true ; else mkdir $(includedir) ; chmod a+rx $(includedir) ; fi
-if [ -d $(tooldir) ] ; then true ; else mkdir $(tooldir) ; chmod a+rx $(tooldir) ; 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/libio/config.shared egcs-19980619/libio/config.shared
--- egcs-19980619.orig/libio/config.shared Mon Feb 23 18:05:54 1998
+++ egcs-19980619/libio/config.shared Fri Jun 19 10:38:20 1998
@@ -219,6 +219,7 @@ if [ "${SUBDIRS}" != "" ] ; then
echo >&2 ' "exec_prefix=$(exec_prefix)" \'
echo >&2 ' "tooldir=$(tooldir)" \'
echo >&2 ' "gxx_include_dir=$(gxx_include_dir)" \'
+ echo >&2 ' "libsubdir=$(libsubdir)" \'
echo >&2 ' "AR=$(AR)" \'
echo >&2 ' "AR_FLAGS=$(AR_FLAGS)" \'
echo >&2 ' "CC=$(CC)" \'