This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH for using gcc_version reliably (was: Re: WORKAROUND for the new gcc_version problem)
This works for both cases I reported.
Thanks,
Franz.
At 13:51 25.06.98 , Manfred Hollstein wrote:
>OK, this is the "ultimate" patch for handling all this:
>
> 1. toplevel configure defines "$gcc_version" and a new variable
> "$gcc_version_trigger" which is the absolute pathname of gcc's
> version.c file. Only the latter is passed down to subdir
> configures.
>
> 2. Cygnus based configures (e.g. libio, libstdc++) don't need to do
> anything.
>
> 3. autoconf based configures (e.g. gcc, libf2c) need to add code for
> using this new option to dynamically evalutate gcc's actual
> version number; in addition they need to AC_SUBST both variables
> - see gcc/configure.in or libf2c/configure.in as an example.
>
> 4. Whenever gcc/version.c is touched (its content isn't actually
> checked, though), calling "make ..." in whatever directory will
> re-start the configuration process, since Makefile depends on
> config.status which in turn now depends on $(gcc_version_trigger).
>
>I tested this in various configurations (using absolute pathnames,
>relative names - incl. ../srcdir and ../../src/srcdir -, building in
>srcdir, with and without multilibs), hence I'm pretty certain, that it
>won't break your building rules again, which I honestly apologize for.