This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimizing a DSO
Tim Prince <n8tm@aol.com> writes:
> On 5/28/2010 11:14 AM, Ian Lance Taylor wrote:
>>
>> When you run configure, you can specify --with-gnu-as and/or
>> --with-gnu-ld. If you do, the compiler will assume the GNU assembler
>> or linker. If you do not, the compiler will assume that you are not
>> using the GNU assembler or linker. In this case the compiler will
>> normally use the common subset of command line options supported by
>> the native assembler and the GNU assembler.
>>
>> In general that only affects the compiler behaviour on platforms which
>> support multiple assemblers and/or linkers. E.g., on GNU/Linux, we
>> always assume the GNU assembler and linker.
>>
>> There is an exception. If you use --with-ld, the compiler will run
>> the linker with the -v option and grep for GNU in the output. If it
>> finds it, it will assume it is the GNU linker. The reason for this
>> exception is that --with-ld gives a linker which will always be used.
>> The assumption when no specific linker is specified is that you might
>> wind up using any linker available on the system, depending on the
>> value of PATH when running the compiler.
>>
>> Ian
>>
> Is it reasonable to assume when the configure test reports using GNU
> linker, it has taken that "exception," even without a --with-ld
> specification?
No, that is a separate message, from libtool. That is for the host
linker. What gcc cares about is the target linker. Of course, for
the usual case of a native compiler, they are the same linker.
(This stuff is all far too confusing.)
Ian