This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: -shared && -static
- From: "H. J. Lu" <hjl at lucon dot org>
- To: Jeff Baker <jbaker at qnx dot com>, nickc at redhat dot com
- Cc: 'Daniel Jacobowitz' <drow at false dot org>,"'binutils at sourceware dot org'" <binutils at sourceware dot org>
- Date: Thu, 28 Jul 2005 09:06:46 -0700
- Subject: Re: -shared && -static
- References: <1578FF984ABAD411AFA5000102C4BB5B0F9EBAB6@NIMBUS>
Hi Nick,
You made the change
http://sourceware.org/ml/binutils-cvs/2004-12/msg00106.html
I couldn't find any discussions on this. I think Jeff is correct.
-static is independent of -shared.
H.J.
----
On Thu, Jul 28, 2005 at 11:27:44AM -0400, Jeff Baker wrote:
> My point is that -shared says to create a shared library while -static says
> to link only against static libraries. I don't see why they should be
> mutually exclusive.
>
> > -----Original Message-----
> > From: Daniel Jacobowitz [mailto:drow@false.org]
> > Sent: Thursday, July 28, 2005 9:32 AM
> > To: Jeff Baker
> > Cc: 'binutils@sourceware.org'
> > Subject: Re: -shared && -static
> >
> > On Thu, Jul 28, 2005 at 09:29:40AM -0400, Jeff Baker wrote:
> > > I'm getting the following message from ld (2.16).
> > >
> > > ntosh-ld: -static and -shared may not be used together
> > >
> > > My question is: Why not? What if I want to create a shared library that
> > > doesn't link against other shared libraries?
> >
> > Then don't link it against any other shared libraries. It's still not
> > static.
> >
> > --
> > Daniel Jacobowitz
> > CodeSourcery, LLC