On Dec 4, 2007, at 9:55 PM, Ralf Wildenhues wrote:
Hello,
* Brian Dessent wrote on Tue, Dec 04, 2007 at 07:20:40PM CET:
Benoit Sigoure wrote:
Of course there is: -Wl,-Bstatic -lfoo -Wl,-Bdynamic
Hmm I didn't know this. How portable is it? I guess a gccism, but
is it even portable across versions/ports of GCC?
[...]
-B seems to be fairly portable; all of the following support it:
I implemented support for it in Libtool a while ago:
<http://thread.gmane.org/gmane.comp.gnu.libtool.patches/6727/
focus=6730>
it was postponed due to "2.2 being out real soon now", and it being
possibly destabilizing to HEAD.
Maybe some data points to the end that it's rather stable (I think I
tested it pretty well at some point) would help.
OK So finally I solved the whole thing by adding /abs/path/to/libfoo.
$libext (instead of -lfoo) in $LIBS ($libext is computed by libtool,
most of the time it's .a but it happens to be .lib at least for
MSVC). This is probably fragile but at least it works on GNU/Linux
(GCC, ICC), OSX (Apple GCC) and Windows (Cygwin, MinGW, MSVC).
Cheers and thanks for the suggestions. By the way the reason why I
didn't bother with -Bstatic and friends is that it doesn't play
nicely with MSVC.
--
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory
_______________________________________________
http://lists.gnu.org/mailman/listinfo/libtool