It's supported on Solaris, and for some reason we can't
use the .so unless we link with that argument.

Matthew Inger []
Software Developer
Synygy, Inc
610-664-7433 x 7770
"Man who jump off cliff, leap to conclusions." - Confucious

-----Original Message-----
From: Stephen M. Webb []
Sent: Thursday, August 28, 2003 9:07 AM
Subject: Re: [Ant-contrib-developers] Wierd options on GCC linker

On August 27, 2003 05:08 pm, Inger, Matthew wrote:
> I have a project which seems to require the "--export-all-symbols"
> flag to be passed to "gcc" when a shared library link occurs.
> However, the GCC linker code, coverts this to "-Wl,--export-all-symbols".
> Which, of course is wrong because "ld" doesn't understand what
> --export-all-symbols
> means.  Does anyone know if this even translates into a linker argument?

The only place in the GNU toolchain where that command-line argument is used
is in dlltool, a part of the cygwin/mingw target toolchain.

> If not, I have 2 choices:
>    1.  Have the GCC linker class treat strings that start with "--" as
> being direct gcc arguments (there's already a place where this type of
> thing
>        is being done for other combinations, such as -g in
>    2.  Add a flag to <linkerarg> tag which allows you to specify that it
> goes
>        to the command line as-is with no additional translation.
>          <linker name="gcc">
>             <linkerarg value="--export-all-symbols" direct="true" />
> What do people think?

I think there's a need for some more flexible way to add target-specific link
arguments to at least the gcc (and g++) linkers.  Both the Win32 target and
the Mac OS X target require fancy arguments for various nefarious purposes
and wrapping them in -Wl, won't necessarily work.

I'v been patching my source locally to pass the additional linkerargs through
unmodified (your solution number 2), but I know there's got to be a better
solution out there.

Perhaps what we need is to be able to distinguish between the compile driver
tool (gcc, g++, gcj, etc) and the underlying invoked toolchain components
(ld, libtool (on Mac), dlltool (on Win32)).

Perhaps the linker task should trust the programmer to add the -Wl, where
necessary and not try to be so clever about what it allows through.

These taregt-specific linker arguments are a bit of a thorn in my side.
Stephen M. Webb

This email is sponsored by:ThinkGeek
Welcome to geek heaven.
Ant-contrib-developers mailing list