X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gold%2Fversion.cc;h=ec17019e3d674db045cf26d9e27ae8dfddc5e02a;hb=3cb5a3a16af2cae1a5059b7571c514b3fa575df9;hp=489880dff9886950c599d75dde7e099aaa90e105;hpb=f5921069ece6c234d10bcfe46473902abbac20bb;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/version.cc b/gold/version.cc index 489880dff9..ec17019e3d 100644 --- a/gold/version.cc +++ b/gold/version.cc @@ -1,6 +1,6 @@ // version.c -- print gold version information -// Copyright 2006, 2007, 200 Free Software Foundation, Inc. +// Copyright (C) 2006-2019 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -22,6 +22,9 @@ #include "gold.h" +#include +#include + #include "../bfd/bfdver.h" namespace gold @@ -33,22 +36,34 @@ namespace gold // version number from configure.ac. But it's easier to just change // this file for now. -static const char* version_string = "1.4"; +static const char* version_string = "1.16"; // Report version information. void print_version(bool print_short) { - /* xgettext:c-format */ - printf("GNU gold (GNU binutils %s) version %s\n", - BFD_VERSION_STRING, version_string); + // The --version output is intended to follow the GNU coding + // standards. We want to print something like: + // 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) { // This output is intended to follow the GNU standards. - printf (_("Copyright 2008 Free Software Foundation, Inc.\n")); - printf (_("\ + printf(_("Copyright (C) 2019 Free Software Foundation, Inc.\n")); + printf(_("\ This program is free software; you may redistribute it under the terms of\n\ the GNU General Public License version 3 or (at your option) a later version.\n\ This program has absolutely no warranty.\n"));