This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Q: linker "-static" flag usage
- To: Denis Vakatov <vakatov at peony dot nlm dot nih dot gov>
- Subject: Re: Q: linker "-static" flag usage
- From: Alexandre Oliva <aoliva at cygnus dot com>
- Date: 11 May 2000 23:54:25 -0300
- Cc: gcc at gcc dot gnu dot org, hjl at lucon dot org
- Organization: Cygnus Solutions, a Red Hat Company
- References: <200005112153.RAA01704@peony.nlm.nih.gov>
On May 11, 2000, Denis Vakatov <vakatov@peony.nlm.nih.gov> wrote:
> 1) Where can I get the path/name of the linker used by "gcc"?
The GCC manual probably documents the -print-prog-name option.
> 2) Am I right that I should use:
> a) for GNU "ld" underlying linker: -Wl,-Bstatic / -Wl,-Bdynamic
> b) for SUN "ld" underlying linker: -Wlinker -Bstatic / -Wlinker -Bdynamic
> c) for IRIX "ld" underlying linker: mission impossible, "foged-aboud-it"
I think it would be much easier, and far more portable, to name the .a
file when you want it linked statically. This may be hard if you
don't know where it is located, though.
--
Alexandre Oliva Enjoy Guaranį, see http://www.ic.unicamp.br/~oliva/
Cygnus Solutions, a Red Hat company aoliva@{redhat, cygnus}.com
Free Software Developer and Evangelist CS PhD student at IC-Unicamp
oliva@{lsd.ic.unicamp.br, gnu.org} Write to mailing lists, not to me