Add revision number to gcc version?

2005-11-14 Thread H. J. Lu
The current "gcc --version" prints out gcc (GCC) 4.1.0 20051113 (experimental) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Can we change it

Re: Add revision number to gcc version?

2005-11-14 Thread Mike Stump
On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: Can we change it to something like gcc (GCC) 4.1.0 20051113 (revision 106863) (experimental) Doesn't work, unless you also have the branch name. Further, the substitutions that svn can do, doesn't allow for the above, and they don't want to `fi

Re: Add revision number to gcc version?

2005-11-14 Thread H. J. Lu
On Mon, Nov 14, 2005 at 12:52:49PM -0800, Mike Stump wrote: > On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: > >Can we change it to something like > > > >gcc (GCC) 4.1.0 20051113 (revision 106863) (experimental) > > Doesn't work, unless you also have the branch name. Further, the > substitutions

Re: Add revision number to gcc version?

2005-12-15 Thread H. J. Lu
On Mon, Nov 14, 2005 at 02:05:47PM -0800, H. J. Lu wrote: > On Mon, Nov 14, 2005 at 12:52:49PM -0800, Mike Stump wrote: > > On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: > > >Can we change it to something like > > > > > >gcc (GCC) 4.1.0 20051113 (revision 106863) (experimental) > > > > Doesn't work

Re: Add revision number to gcc version?

2005-12-15 Thread David Daney
H. J. Lu wrote: On Mon, Nov 14, 2005 at 02:05:47PM -0800, H. J. Lu wrote: On Mon, Nov 14, 2005 at 12:52:49PM -0800, Mike Stump wrote: On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: Can we change it to something like gcc (GCC) 4.1.0 20051113 (revision 106863) (experimental) Doesn't work, un

Re: Add revision number to gcc version?

2005-12-15 Thread H. J. Lu
On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: > H. J. Lu wrote: > >On Mon, Nov 14, 2005 at 02:05:47PM -0800, H. J. Lu wrote: > > > >>On Mon, Nov 14, 2005 at 12:52:49PM -0800, Mike Stump wrote: > >> > >>>On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: > >>> > Can we change it to some

Re: Add revision number to gcc version?

2005-12-15 Thread David Daney
H. J. Lu wrote: On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: H. J. Lu wrote: On Mon, Nov 14, 2005 at 02:05:47PM -0800, H. J. Lu wrote: On Mon, Nov 14, 2005 at 12:52:49PM -0800, Mike Stump wrote: On Nov 14, 2005, at 9:14 AM, H. J. Lu wrote: Can we change it to somethin

Re: Add revision number to gcc version?

2005-12-15 Thread Daniel Jacobowitz
On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: > I like this, but what if you also did an svn status to see if there were > any modifications WRT the branch/revision and then add either 'clean' or > 'modified' to the information. > > So you would get (gcc-4_1-branch revision 108596

Re: Add revision number to gcc version?

2005-12-15 Thread David Daney
Daniel Jacobowitz wrote: On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: I like this, but what if you also did an svn status to see if there were any modifications WRT the branch/revision and then add either 'clean' or 'modified' to the information. So you would get (gcc-4_1-bra

Re: Add revision number to gcc version?

2005-12-15 Thread H. J. Lu
On Thu, Dec 15, 2005 at 04:09:41PM -0800, David Daney wrote: > Daniel Jacobowitz wrote: > >On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: > > > >>I like this, but what if you also did an svn status to see if there were > >>any modifications WRT the branch/revision and then add either

Re: Add revision number to gcc version?

2005-12-15 Thread David Daney
H. J. Lu wrote: On Thu, Dec 15, 2005 at 04:09:41PM -0800, David Daney wrote: Daniel Jacobowitz wrote: On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: I like this, but what if you also did an svn status to see if there were any modifications WRT the branch/revision and then add

Re: Add revision number to gcc version?

2005-12-15 Thread H. J. Lu
On Thu, Dec 15, 2005 at 06:03:25PM -0800, David Daney wrote: > H. J. Lu wrote: > >On Thu, Dec 15, 2005 at 04:09:41PM -0800, David Daney wrote: > > > >>Daniel Jacobowitz wrote: > >> > >>>On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: > >>> > >>> > I like this, but what if you also

Re: Add revision number to gcc version?

2005-12-15 Thread Ben Elliston
> I like this, but what if you also did an svn status to see if there > were any modifications WRT the branch/revision and then add either > 'clean' or 'modified' to the information. I think this is a good idea (and don't mind the idea of `svn status' being run from gcc_update to do so), but I won

Re: Add revision number to gcc version?

2005-12-15 Thread H. J. Lu
On Fri, Dec 16, 2005 at 03:58:05PM +1100, Ben Elliston wrote: > > I like this, but what if you also did an svn status to see if there > > were any modifications WRT the branch/revision and then add either > > 'clean' or 'modified' to the information. > > I think this is a good idea (and don't mind

Re: Add revision number to gcc version?

2005-12-16 Thread Volker Reichelt
> 1. contrib/gcc_update creates gcc/REVISION with branch name and > revision number. > 2. If gcc/REVISION exists, it will be used in gcc/version.c. > > With those 2 patches, I got > > [EMAIL PROTECTED] gcc]$ ./xgcc --version > xgcc (GCC) 4.1.0 (gcc-4_1-branch revision 108596) 20051215 (prerelease

Re: Add revision number to gcc version?

2005-12-16 Thread H. J. Lu
On Thu, Dec 15, 2005 at 06:35:29PM -0500, Daniel Jacobowitz wrote: > On Thu, Dec 15, 2005 at 03:00:10PM -0800, David Daney wrote: > > I like this, but what if you also did an svn status to see if there were > > any modifications WRT the branch/revision and then add either 'clean' or > > 'modified

Re: Add revision number to gcc version?

2005-12-16 Thread H. J. Lu
On Fri, Dec 16, 2005 at 12:07:54PM +0100, Volker Reichelt wrote: > > 1. contrib/gcc_update creates gcc/REVISION with branch name and > > revision number. > > 2. If gcc/REVISION exists, it will be used in gcc/version.c. > > > > With those 2 patches, I got > > > > [EMAIL PROTECTED] gcc]$ ./xgcc --v

Re: Add revision number to gcc version?

2005-12-19 Thread Richard Earnshaw
On Fri, 2005-12-16 at 05:02, H. J. Lu wrote: > > In my patch, gcc/REVISION is created by gcc_update. If you don't use > gcc_update, gcc/REVISION may not be there. > > In any case, when we agree on what to put in gcc/REVISION, I can > provide a new patch. Maybe we should just set up the commit f

Re: Add revision number to gcc version?

2005-12-19 Thread H. J. Lu
On Mon, Dec 19, 2005 at 01:26:18PM +, Richard Earnshaw wrote: > On Fri, 2005-12-16 at 05:02, H. J. Lu wrote: > > > > > In my patch, gcc/REVISION is created by gcc_update. If you don't use > > gcc_update, gcc/REVISION may not be there. > > > > In any case, when we agree on what to put in gcc/

Re: Add revision number to gcc version?

2005-12-19 Thread Jim Blandy
Subversion provides an "opt-in" version of keyword substitution, and provides a $Revision$ keyword. It might take a little scriptery to get that into the form GCC wants. http://svnbook.red-bean.com/nightly/en/svn.advanced.props.html#svn.advanced.props.special.keywords

Re: Add revision number to gcc version?

2005-12-19 Thread Mike Stump
On Dec 19, 2005, at 2:56 PM, Jim Blandy wrote: Subversion provides an "opt-in" version of keyword substitution, and provides a $Revision$ keyword. But it doesn't do what people really want it to by design. :-(

Re: Add revision number to gcc version?

2005-12-19 Thread Jim Blandy
On 12/19/05, Mike Stump <[EMAIL PROTECTED]> wrote: > On Dec 19, 2005, at 2:56 PM, Jim Blandy wrote: > > Subversion provides an "opt-in" version of keyword substitution, and > > provides a $Revision$ keyword. > > But it doesn't do what people really want it to by design. :-( And that would be?

Re: Add revision number to gcc version?

2005-12-19 Thread Mike Stump
On Dec 19, 2005, at 5:34 PM, Jim Blandy wrote: On 12/19/05, Mike Stump <[EMAIL PROTECTED]> wrote: But it doesn't do what people really want it to by design. :-( And that would be? http://subversion.tigris.org/faq.html#version-value-in-source I would like something, that substitutes automat

Re: Add revision number to gcc version?

2005-12-19 Thread H. J. Lu
On Mon, Dec 19, 2005 at 02:56:43PM -0800, Jim Blandy wrote: > Subversion provides an "opt-in" version of keyword substitution, and > provides a $Revision$ keyword. It might take a little scriptery to > get that into the form GCC wants. > > http://svnbook.red-bean.com/nightly/en/svn.advanced.props

Re: Add revision number to gcc version?

2005-12-19 Thread H. J. Lu
On Mon, Dec 19, 2005 at 06:04:46PM -0800, Mike Stump wrote: > On Dec 19, 2005, at 5:34 PM, Jim Blandy wrote: > >On 12/19/05, Mike Stump <[EMAIL PROTECTED]> wrote: > >>But it doesn't do what people really want it to by design. :-( > > > >And that would be? > > http://subversion.tigris.org/faq.html

Re: Add revision number to gcc version?

2005-12-20 Thread Jim Blandy
Okay, I see. Yes, there really ought to be an easy way to provide enough information to reproduce the tree, and $Revision$ isn't it.