* version.cc (print_version): Adjust output for current value of
BFD_VERSION_STRING.
This commit is contained in:
parent
b896398099
commit
f4b2c6f5d1
2 changed files with 20 additions and 3 deletions
|
@ -1,5 +1,10 @@
|
||||||
2008-03-25 Ian Lance Taylor <iant@google.com>
|
2008-03-25 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
|
* version.cc (print_version): Adjust output for current value of
|
||||||
|
BFD_VERSION_STRING.
|
||||||
|
|
||||||
|
* NEWS: New file.
|
||||||
|
|
||||||
* options.cc (options::help): Print list of supported targets.
|
* options.cc (options::help): Print list of supported targets.
|
||||||
* target-select.h: Include <vector>.
|
* target-select.h: Include <vector>.
|
||||||
(class Target_selector): Make machine_, size_, and is_big_endian_
|
(class Target_selector): Make machine_, size_, and is_big_endian_
|
||||||
|
|
|
@ -40,9 +40,21 @@ static const char* version_string = "1.4";
|
||||||
void
|
void
|
||||||
print_version(bool print_short)
|
print_version(bool print_short)
|
||||||
{
|
{
|
||||||
/* xgettext:c-format */
|
// The --version output is intended to follow the GNU coding
|
||||||
printf("GNU gold (GNU binutils %s) version %s\n",
|
// standards. We want to print something like:
|
||||||
BFD_VERSION_STRING, version_string);
|
// GNU gold (GNU binutils 2.19) 1.4
|
||||||
|
// BFD_VERSION_STRING looks like "(GNU Binutils) 2.19". We take off
|
||||||
|
// those parentheses.
|
||||||
|
std::string bfd_version(BFD_VERSION_STRING);
|
||||||
|
if (bfd_version[0] == '(')
|
||||||
|
{
|
||||||
|
bfd_version.erase(0, 1);
|
||||||
|
size_t pos = bfd_version.find(')');
|
||||||
|
if (pos != std::string::npos)
|
||||||
|
bfd_version.erase(pos, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("GNU gold (%s) %s\n", bfd_version.c_str(), version_string);
|
||||||
|
|
||||||
if (!print_short)
|
if (!print_short)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue