[arch-dev-public] klibc static or shared building

Thomas Bächler thomas at archlinux.org
Wed Oct 31 10:46:00 EDT 2007


Dan McGee schrieb:
> Just curious- what is the downside of building statically? It seems
> like it could be a plus in some ways, because you eliminate one more
> chance of breakage in early userspace. Of course, this also increases
> the size of your built binaries and increases the size of your initrd.

The binaries provided inside the klibc package were always compiled with
-shared explicitly. The klibc-extras and klibc-udev were always compiled
without -shared or -static, thus statically linked. This was an
inconsistency, mixing static and shared binaries in the image.

The "bug" I actually fixed was that klcc (without -static or -shared
specified) linked a static binary, while gcc linked a shared binary,
which is inconsistent.

We can discuss building all klibc binaries statically, but then we do it
by specifying -static in LDFLAGS explicitly, not by some weird klcc
misbehaviour.


About the breakage: When klibc is rebuilt, all klibc tools are rebuilt
at the same time, so nothing should ever break.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <http://archlinux.org/pipermail/arch-dev-public/attachments/20071031/db832e0a/attachment.pgp>


More information about the arch-dev-public mailing list