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?
It doesn't really have anything to do with gcc, it's the linker that
interprets these options. -Wl is the only part gcc sees and that has
been in gcc forever. I'm not sure if other compilers have options for
"pass this to the linker" or not.
-B seems to be fairly portable; all of the following support it:
<GNU ld> <Solaris ld> <FreeBSD ld> <NetBSD ld> <Irix ld> <Looks
like Tru64 does not>