This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: tidy documentation of ld command-line option syntax
- From: Dave Korn <dave dot korn dot cygwin at googlemail dot com>
- To: Sandra Loosemore <sandra at codesourcery dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 23 Feb 2009 05:56:09 +0000
- Subject: Re: PATCH: tidy documentation of ld command-line option syntax
- References: <49A214CD.5000807@codesourcery.com>
Sandra Loosemore wrote:
> We've noticed that users have a hard time figuring out how to pass
> linker options that take arguments on the gcc command line, using
> -Xlinker or -Wl. When options are documented in the ld manual as
> "--option value", from gcc you have to do "-Xlinker --option -Xlinker
> value" or "-Wl,--option,value" to get that effect, and that seems to
> really confuse people.
>
> OTOH, ld already defines that "--option=value" is equivalent to
> "--option value" for all long options, and from the gcc command line,
> this is much less user-error-prone; you can just say the obvious
> "-Xlinker --option=value" or "-Wl,--option=value". While the
> "--option=value" syntax is already discussed generally in the ld manual,
> and many ld command-line options are already documented that way,
> several others are not. This patch fixes the documentation of those
> remaining long options to consistently use the "--option=value" syntax.
I would have preferred if you didn't actually conceal the existence of the
"--option value" form but just added the "--option=value" form where missing.
That might be confusing to anyone who is familiar with standard getopt()
behaviour. Did you consider and decide against doing it that way for some reason?
cheers,
DaveK