libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using -Bsymbolic with libtool


From: Robert Boehne
Subject: Re: Using -Bsymbolic with libtool
Date: Wed, 09 May 2001 14:59:40 -0500

Ganesan Rajagopal wrote:
> 
> Hi,
> 
> I am currently using -Bsymbolic to compile my libraries. I pass in the flag
> using "-Xlinker -Bsymbolic". Is "-Bsymbolic" portable and if it is can the
> flag be added to libtool directly. Linux, FreeBSD ELF, Tru64 and Solaris
> seem to support it (with the same flag), but I am sure there will be other
> platforms that don't.
> 
> While we are in the topic, how should libtool handle platform specific
> optimizations? For eg. I submitted a patch to allow RPATHs to have '$ORIGIN'
> in the RPATH; it was (understandably) rejected because it is not
> portable. It's a pain to explicitly pass the '$ORIGIN' RPATH using -Xlinker
> when all the platforms I care about already support it.
> 
> Can I submit a patch that will let libtool allow '$ORIGIN' in the
> RPATH for platforms that support it?
> 
> Ganesan
> 
> _______________________________________________
> Libtool mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/libtool

Ganesan:

I think you can get the exact same result by using the
-Wl,-Bsymbolic flag.  It will be recognized by Libtool,
and passed to the linker.  -Xlinker is a gcc equivalent
to -Wl, so if I recall correctly, that would only work
when using GCC.  If using -Wl,-Bsymbolic does the trick
even whey you're using libtool, then there is no need
to alter Libtool.
  As for $ORIGIN, I think the same applies, just add
-R $ORIGIN to your links.

`-R LIBDIR'
     If OUTPUT-FILE is a program, add LIBDIR to its run-time path.  If
     OUTPUT-FILE is a library, add -RLIBDIR to its DEPENDENCY_LIBS, so
     that, whenever the library is linked into a program, LIBDIR will
     be added to its run-time path.

Cheers!

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]