[Top][All Lists]

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

Re: Favoring static linking at configure time

From: Brian Dessent
Subject: Re: Favoring static linking at configure time
Date: Tue, 04 Dec 2007 10:20:40 -0800

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 however:


reply via email to

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