[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Shared vs Static (please read)
- From: Arjan van de Ven <arjan fenrus demon nl>
- To: Development discussions related to Fedora Core <fedora-devel-list redhat com>
- Cc: pquiring hotmail com
- Subject: Re: Shared vs Static (please read)
- Date: Fri, 16 Dec 2005 09:11:22 +0100
On Thu, 2005-12-15 at 23:48 +0000, Peter Jr. Quiring wrote:
> I'm a C++ programmer that is porting from Windows to the Linux world. So
> far things are great. I've recently tried to use the -static option with
> gcc to generate binaries that are more portable, and so far it works.
the problem is that due to a bunch of technicalities, -static binaries
are LESS portable in linux, not more portable.
http://people.redhat.com/drepper/no_static_linking.html
However there is a middle ground; static link only the lib(s) that are a
real portability problem, eg libstdc++, but not the rest. (at which
point you need to be careful wrt the LGPL already but I don't know the
exact details of the libstdc++ license, it may well have an exception
for this).
Linking openssl static sounds like a nightmare from a security update
pov.... it's better to avoid it anyway in non-core-OS software due to
the very unstable ABI.
btw the way to only link libstdc++ static is this:
-Wl,-static -lstdc++ -Wl,-dynamic
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]