This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix for libf2c installation
On Tue, 23 June 1998, 10:30:12, Manfred.Hollstein@ks.sel.alcatel.de wrote:
> On Mon, 22 June 1998, 23:53:43, law@hurl.cygnus.com wrote:
>
> > > Manfred, does this make sense? Could you consider doing it if you
> > > understand the relevant bits of top-level configure? Feel free
> > > to fix up the gcc, g77, and libf2c configure/Makefile stuff accordingly
> > > (e.g. the gcc configure would have to substitute the $(libsubdir)
> > > macro as well in the gcc Makefile it builds, right?).
> > Agreed. Fixing it once and for all would be good :-) The only thing
> > to be careful about would be setting "version" in a subdir that
> > has its own notion of version #s (libstdc++, or any non-egcs package
> > like binutils that someone might put in the egcs tree to set up a
> > single tree build environment).
>
> Well, this is actually one of the next issues I thought of ;-) Once
> I'll find some time, I'll send a patch for this.
OK, here it is; I simply "invented" a new --with-gcc-version option,
which the toplevel configure scripts initializes properly according to
its own investigations, and then passes it down to all other configure
scripts. For the sake of consistency, I've added the gcc_version macro
to the FLAGS_TO_PASS emitted by libio's config.shared script.
Note, if you want to try this patch yourself, you need to rebuild
libf2c/configure manually, as I've omitted this patch.
manfred
egcs-19980623/ChangeLog:
1998-06-23 Manfred Hollstein <manfred@s-direktnet.de>
* configure (recursion line): Pass a --with-gcc-version=${gcc_version}
to configures in subdirs.
egcs-19980623/libf2c/ChangeLog.egcs:
1998-06-23 Manfred Hollstein <manfred@s-direktnet.de>
* Makefile.in (version): Rename to gcc_version.
* configure.in (version): Likewise.
(gcc_version): Add code to use an option passed from a parent configure.
* configure: Regenerate.
egcs-19980623/libio/ChangeLog:
1998-06-23 Manfred Hollstein <manfred@s-direktnet.de>
* config.shared (FLAGS_TO_PASS): Add gcc_version.
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980623.orig/configure egcs-19980623/configure
--- egcs-19980623.orig/configure Fri Jun 19 07:42:14 1998
+++ egcs-19980623/configure Tue Jun 23 16:30:57 1998
@@ -1447,7 +1457,7 @@ if [ -z "${norecursion}" -a -n "${config
if [ ! -z "${recprog}" ] ; then
if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
- ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
+ ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} --with-gcc-version=${gcc_version} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${floating_pointoption} ${cache_file_option} ${removing} ${other_options} ${redirect} ; then
true
else
echo Configure in `pwd` failed, exiting. 1>&2
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980623.orig/libf2c/Makefile.in egcs-19980623/libf2c/Makefile.in
--- egcs-19980623.orig/libf2c/Makefile.in Sun Jun 21 11:14:49 1998
+++ egcs-19980623/libf2c/Makefile.in Tue Jun 23 16:38:02 1998
@@ -27,7 +27,7 @@ srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
target_alias = @target_alias@
-version = @version@
+gcc_version = @gcc_version@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
@@ -36,7 +36,7 @@ mandir = $(prefix)/man
infodir = $(prefix)/info
includedir = $(prefix)/include
docdir = $(datadir)/doc
-libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
+libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(gcc_version)
TO_TOPDIR = ..
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980623.orig/libf2c/configure.in egcs-19980623/libf2c/configure.in
--- egcs-19980623.orig/libf2c/configure.in Sun Jun 21 11:12:26 1998
+++ egcs-19980623/libf2c/configure.in Tue Jun 23 16:42:57 1998
@@ -344,8 +344,17 @@ test -f libI77/makefile && mv libI77/mak
test -f libU77/makefile && mv libU77/makefile libU77/makefile.ori
# Get the version number from the toplevel
-version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/../gcc/version.c`
-AC_SUBST(version)
+if test x${with_gcc_version} = x; then
+ # Try to get the version number from a hopefully existing gcc directory.
+ if test -d ${srcdir}/../gcc; then
+ gcc_version=`sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/' < ${srcdir}/../gcc/version.c`
+ else
+ gcc_version=UNKNOWN
+ fi
+else
+ gcc_version=${with_gcc_version}
+fi
+AC_SUBST(gcc_version)
AC_CANONICAL_SYSTEM
AC_SUBST(target_alias)
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980623.orig/libio/config.shared egcs-19980623/libio/config.shared
--- egcs-19980623.orig/libio/config.shared Fri Jun 19 14:35:16 1998
+++ egcs-19980623/libio/config.shared Tue Jun 23 16:45:45 1998
@@ -220,6 +220,7 @@ if [ "${SUBDIRS}" != "" ] ; then
echo >&2 ' "tooldir=$(tooldir)" \'
echo >&2 ' "gxx_include_dir=$(gxx_include_dir)" \'
echo >&2 ' "libsubdir=$(libsubdir)" \'
+ echo >&2 ' "gcc_version=$(gcc_version)" \'
echo >&2 ' "AR=$(AR)" \'
echo >&2 ' "AR_FLAGS=$(AR_FLAGS)" \'
echo >&2 ' "CC=$(CC)" \'