[lfs-dev] More on static libs
bruce.dubbs at gmail.com
Thu Mar 12 20:58:08 PDT 2015
Douglas R. Reno wrote:
> On Thu, Mar 12, 2015 at 9:36 PM, Bruce Dubbs <bruce.dubbs at gmail.com> wrote:
>> I know that I am hopping into this conversation a little late (and without
> too much prior knowledge of the discussion), but I would definitely suggest
> leaving things from Binutils, GCC, Glibc, GMP, Zlib, MPFR, and MPC alone.
> There is just too much that can go wrong if we remove those libraries.
> (Example, Bruce's libc_nonshared.a removal causing a failure with "cc
> dummy.c"). Although I suppose that we could just leave things from GCC,
> Glibc, and Binutils alone. I have followed that some distributions have
> them and some don't, but I understand that the real question is whether or
> not we need them.
Under certain circumstances, static libraries can cause problems, so we probably
do want to minimize them. Generally if there is a libsample.a and a
libsample.so, the linker will select the .so version, but if it doesn't exist,
it will us the .a version. If there is a bug in libsample, replacing the
libraries isn't enough with the static library; you have to relink all
executables that use that library -- and often you don't knwo which ones they are.
I though ubuntu didn't include the .a files at first, but then found them in
usr/lib/x86_64-linux-gnu/ or /usr/lib/gcc/x86_64-linux-gnu/`gcc --version`.
Looking at Linux Mint, I do notice that I cannot find libc_nonshared.a, but it
may not have all the -devel packages installed. It does have libc-2.19.so which
is a real library and not just link instructions like a standard glibc build uses.
More information about the lfs-dev