#2718: Have GCC link to system zlib
-------------------------+--------------------------------------------------
Reporter: jhuntwork | Owner: lfs-b...@…
Type: enhancement | Status: new
Priority: normal | Milestone: 6.7
Component: Book | Version: SVN
Severity: normal | Keywords:
-------------------------+--------------------------------------------------
Comment(by jhuntwork):
Replying to [comment:7 matt...@…]:
> Hmm, I'd be prone to avoid using that switch then, as I'd prefer to
avoid using static libraries if possible.
I'm not sure I understand your reasoning here. If it builds an internal
copy of zlib and uses that, then it's definitely using static anyway.
> According to my build logs, it's 'cc1' and 'cc1plus' that use libz.
Jeremy, could you check whether or not those 2 binaries (in
/usr/lib/gcc/i686-pc-linux-gnu/4.5.0 on my box) are linked to a dynamic
zlib library on your '--with-system-zlib' build please?
Good call. As it turns out, it is dynamically linking to zlib:
{{{
ldd /usr/lib64/gcc/x86_64-unknown-linux-gnu/4.5.0/cc1
linux-vdso.so.1 => (0x00007fff4dbad000)
libcloog.so.0 => /usr/lib64/libcloog.so.0 (0x00007f0e7e9a0000)
libppl_c.so.2 => /usr/lib64/libppl_c.so.2 (0x00007f0e7e45a000)
libppl.so.7 => /usr/lib64/libppl.so.7 (0x00007f0e7e196000)
libgmpxx.so.4 => /usr/lib64/libgmpxx.so.4 (0x00007f0e7df92000)
libmpc.so.2 => /usr/lib64/libmpc.so.2 (0x00007f0e7dd7f000)
libmpfr.so.4 => /usr/lib64/libmpfr.so.4 (0x00007f0e7db28000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f0e7d8bd000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f0e7d6b9000)
libz.so.1 => /lib64/libz.so.1 (0x00007f0e7d4a1000)
libelf.so.1 => /usr/lib64/libelf.so.1 (0x00007f0e7d28c000)
libc.so.6 => /lib64/libc.so.6 (0x00007f0e7cf30000)
libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007f0e7cc2b000)
libm.so.6 => /lib64/libm.so.6 (0x00007f0e7c9a9000)
libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007f0e7c794000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0e7ebc2000)
}}}
So it appears that it uses zlib statically in some spots through the build
and then dynamically for some installed binaries.
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2718#comment:8>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page