This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Comments wanted on an idea of changing the binutils version handling


On Thu, Mar 07, 2002 at 10:02:45AM -0800, Joe Buck wrote:
> 
> > > > objdump (GNU binutils) 2.12.90 20020307 (experimental)
> > > > Copyright 2002 Free Software Foundation, Inc.
> > > > This program is free software; you may redistribute it under the terms of
> > > > the GNU General Public License.  This program has absolutely no warranty.
> 
> I wrote:
> 
> > > Why are you printing the copyright?  This is inconsistent with other GNU
> > > tools, which just print a short one line string.  Because the string is
> > > one line it's easy to use in shell substitutions.
> > 
> > Well, perhaps it is inconsistent, but looking at the GNU Coding
> > Standards, Last updated February 23, 2002, we can read this:
> > 
> > ``All programs should support two standard options: `--version' and
> > `--help'.
> > 
> > `--version'
> >      This option should direct the program to print information about
> >      its name, version, origin and legal status, all on standard
> >      output, and then exit successfully.  Other options and arguments
> >      should be ignored once this is seen, and the program should not
> >      perform its normal function.
> > 
> >      The first line is meant to be easy for a program to parse; the
> >      version number proper starts after the last space.  In addition,
> >      it contains the canonical name for this program, in this format:
> > 
> >           GNU Emacs 19.30
> 
> OK, now that I try some newer versions of various GNU tools, I see
> that there was a change made.  Older versions just print a short
> version number, e.g. Emacs 19.29 prints "19.29.1".  The text above
> suggests that the change was made around the time of the Emacs 19.30
> release.
> 
> So, it looks like it is GCC that is out of step.  Should we change the
> output of "gcc --version"?
> 

Yes, I guess we should eventually. Note that it *may* require updating
of the testsuite. I just did that for my suggestion for binutils, it's
messy :-)

One other thing, gcc also has gcc -v, that is not documented in the
GNU Coding Standards... I think that's what used in the test
suite. But, perhaps it would be better to transform that into using
gcc --version instead since it's mandated by the GNU Coding Standards.


Then there is one more thing, I suggest off the top of my head that
the output of gcc --version (of a released version) be like this:

gcc (GNU Compiler Collection) 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
GNU Compiler Collection comes with NO WARRANTY,
to the extent permitted by law.
You may redistribute copies of GNU Compiler Collection
under the terms of the GNU General Public License.
For more information about these matters,
see the files named COPYING.

a cvs prerelease branch like this:

gcc (GNU Compiler Collection) (prerelease) 20020307 3.1
Copyright (C) 2002 Free Software Foundation, Inc.
GNU Compiler Collection comes with NO WARRANTY,
to the extent permitted by law.
You may redistribute copies of GNU Compiler Collection
under the terms of the GNU General Public License.
For more information about these matters,
see the files named COPYING.

and finally a for the main cvs branch like this:

gcc (GNU Compiler Collection) (experimental) 20020307 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
GNU Compiler Collection comes with NO WARRANTY,
to the extent permitted by law.
You may redistribute copies of GNU Compiler Collection
under the terms of the GNU General Public License.
For more information about these matters,
see the files named COPYING.

If doing like this with the (experimental). (prerelease) and date
stuff, we can still rely on the coding standard and parse out the
'relevant' versions for the test suite, regardless of release,
prerelease, or experimental status, just parse out whatever is before
(GNU Compiler Collection) and filter out what's after it:

regexp -line {\w. \(GNU Compiler Collection\) (.+)$} $tmp match version

but this will break running the test suite with an old version
installed...

Then again, perhaps we shouldn't change from using gcc -v in the test
suite to using gcc --version...

Like I said, from the top of my head...

Cheers,

/ChJ


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]