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.


Sriraman Tallam <tmsriram@google.com> writes:

> 	* 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);

This is OK, but please move the assignment to printed_version_ after
the call to gold::print_version, paralleling the similar code in
parse_V.

Thanks.

Ian


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