This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
- From: Zack Weinberg <zack at codesourcery dot com>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org, binutils at sources dot redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Thu, 25 Nov 2004 13:05:27 -0800
- Subject: Re: Factor configure-time gcc version checks (patch 1/4 for PR 7305)
- References: <87is7tejx4.fsf@redhat.com>
I think this is a fine idea (though I cannot approve it) and I would
like to encourage you also to break the version number proper and the
date stamp out of gcc/version.c. If we could have two syntax-free
files somewhere (suggest config/gcc-version, config/gcc-datestamp)
that were parsed by everything that cares, then we could eliminate all
the remaining copies of those numbers, and people maintaining modified
versions of GCC wouldn't have merge conflicts in version.c every time
they updated from the official sources. Oh, and it would be one fewer
reason for gcc/Makefile to rebuild everything after a cvs update.
By syntax-free I mean that these files should contain the literal text
3.4.2 and 20041124 (respectively, for example) and nothing else, so
that using them is as simple as
gcc version.c -c ... other flags ... \
-DVERSION=`cat /path/to/source/config/gcc-version` \
-DDATESTAMP=`cat /path/to/source/config/gcc-datestamp`
quotation being handled by macros inside version.c.
zw