Please use the mailing list. Thanks.
From: Matt Doar [mailto:matt@...]
Sent: Wednesday, June 12, 2002 4:19 PM
To: Arnold, Curt
Subject: RE: CCTask - minor bug for gcc
The decorateLinkerOption method in the GccLinker class has a switch for
letters passed by gcc. I notice that 'X' is missing, as in gcc -Xlinker.
From: Curt Arnold <carnold@ho...> - 2002-06-13 02:12:14
> The decorateLinkerOption method in the GccLinker class has a switch for
> letters passed by gcc. I notice that 'X' is missing, as in gcc -Xlinker.
From the GCC manual:
Pass option as an option to the linker. You can use this to supply
system-specific linker options which GCC does not know how to recognize.
If you want to pass an option that takes an argument, you must use -Xlinker
twice, once for the option and once for the argument. For example, to
pass -assert definitions, you must write -Xlinker -assert -Xlinker
definitions. It does not work to write -Xlinker "-assert definitions",
because this passes the entire string as a single argument, which is not
what the linker expects.
Pass option as an option to the linker. If option contains commas, it is
split into multiple options at the commas.
The GCC linker adapter will decorate unrecognized linker args with -Wl,. So
if you were trying to replicate:
gcc -Xlinker -foo ....
You could do just
Which would result in:
gcc -Wl,-foo ...
To properly handle -Xlinker, you would have to not only not escape it, but
also not escape the next linkerarg. If I didn't mention earlier, I'm out
for the next few days, so no chance to my addressing it till mid next week