This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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: gold -v should continue and do the link just like GNU ld.


Hi,

   Running gold with -v should exit without an error if there is
nothing to link. Atleast, this is what GNU ld does. This patch fixes
this.

	* options.cc (General_options::parse_version): Allow -v to exit
	without an error if there is nothing to link.

RCS file: /cvs/src/src/gold/options.cc,v
retrieving revision 1.95
diff -u -u -p -r1.95 options.cc
--- options.cc	22 Dec 2009 01:33:43 -0000	1.95
+++ options.cc	29 Dec 2009 22:26:30 -0000
@@ -289,6 +289,7 @@ void
 General_options::parse_version(const char* opt, const char*, Command_line*)
 {
   bool print_short = (opt[0] == '-' && opt[1] == 'v');
+  this->printed_version_ = true;
   gold::print_version(print_short);
   if (!print_short)
     ::exit(EXIT_SUCCESS);


Is this ok to commit ? Any comments ?

Thanks,
-Sriraman.


On Mon, Dec 21, 2009 at 5:28 PM, Ian Lance Taylor <iant@google.com> wrote:
> Sriraman Tallam <tmsriram@google.com> writes:
>
>> ? ? * options.cc (General_options::parse_version): Make -v continue and do
>> ? ? the link like GNU ld does.
>
> This is OK.
>
> Thanks.
>
> Ian
>


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