Re: Replacing dynamic library with static one
- From: Jordan Abel <random832@xxxxxxxxx>
- Date: 28 Feb 2006 21:37:31 GMT
On 2006-02-28, Henry Townsend <henry.townsend@xxxxxxxx> wrote:
binit wrote:
Hi !!
I need to remove the dependency on libgcc_s.so.6 and libstd++.so , due
to some requirements. I need to replace these with their corresponding
*.a files.
I tried to explicitly mention -L <path>/libstd++.a , and -L
<path>/libgcc_s.a , and removed the -lgcc option but this didnt work.
Run gcc with -static-libgcc. There may be a similar flag for libstdc++;
take a look in the manual.
Be aware that due to a quirk of the LGPL[*], linking your code with
-static-libgcc may make your binaries in violation of the GPL if you
distribute them.
I believe libgcc has a special license exception for exactly this
reason. It would apply equally to dynamic linking, for what it's worth
[*] As I interpret it, and IANAL. But having read the licenses, my
understanding is that you can only use gcc for proprietary code if
you're willing to link dynamically with libgcc.
IANAL, but, your interpretation is "incorrect" in so far as any can be
incorrect. FSF interprets it such that dynamic linking has the same
effect you think static linking does, and some others interpret it such
that static linking has the same effect dynamic linking does, but the
point remains there's no real difference recognized by any party. Of
course, none of this has been tested in court, so EIIWALISWNK [guess
what that stands for?]
.
- References:
- Replacing dynamic library with static one
- From: binit
- Re: Replacing dynamic library with static one
- From: Henry Townsend
- Replacing dynamic library with static one
- Prev by Date: Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- Next by Date: Re: writev() on a blocking Unix-domain SOCK_STREAM socket
- Previous by thread: Re: Replacing dynamic library with static one
- Next by thread: writev() on a blocking Unix-domain SOCK_STREAM socket
- Index(es):
Relevant Pages
|
|