Bug 65598
Summary: | gcc 3.1 reports ugly version string | ||
---|---|---|---|
Product: | [Retired] Red Hat Raw Hide | Reporter: | darkeye |
Component: | gcc | Assignee: | Jakub Jelinek <jakub> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 1.0 | CC: | darkeye |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2002-05-28 13:26:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
darkeye
2002-05-28 13:24:51 UTC
Then the configure scripts simply need changing. This is not something we add in our rpm (we just merely replace the content in the () with more specific info). gcc 3.1 switched to --version output like: gcc (GCC) 3.1.1 20020528 (prerelease) Copyright (C) 2002 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. to match what other GNU programs do (try ls --version, bash --version, etc.). See 2002-01-08 Joseph S. Myers <jsm28.uk> * gcc.c (option_map): Remove --version. (process_command): Handle -fversion following the GNU Coding Standards. Partially addresses PR other/704. change. Maybe for ls, bash, but not for gcc. The version string in the sources that the source RPM contains is: "3.1.1 20020522 (prerelease)" (in files gcc/version.c, gcc/f/version.c), which begins with the version number. This is changed to a string which is very differently formateed. Also, the gcc sources downloadable from gcc.gnu.org contain merely the version number, e.g. "3.1" in gcc/version.c. But the version_string in the source is not exactly what you get by running gcc --version, see gcc.c: /* translate_options () has turned --version into -fversion. */ printf (_("%s (GCC) %s\n"), programname, version_string); fputs (_("Copyright (C) 2002 Free Software Foundation, Inc.\n"), stdout); fputs (_("This is free software; see the source for copying conditions. There is NO\n\ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\n"), stdout); exit (0); Oh, I see. What way would you then suggest to tell the version number of gcc by using a script? Is it deterministic so far as say the version number is the 3rd word in the first line that is returned by "gcc --version"? Are there any guidelines for the format of the returned string? Whatever works ;) E.g. gcc --version | sed -n '1s/^[^ ]* (.*) //;s/ .*$//;1p' might work, similarly you can parse gcc -v, etc. Thanks!! (It's too bad the GNU coding standard does not specify a parsable version string format...) |