#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:1 bdu...@…]:
> 1. It creates another potential way to break gcc.
> {{{
> $ ldd `which gcc`
> linux-vdso.so.1 => (0x00007fff21fff000)
> libc.so.6 => /lib/libc.so.6 (0x00007f7860660000)
> /lib64/ld-linux-x86-64.so.2 (0x00007f78609b3000)
> }}}
Incorrect, at least per this example. On my system that has been built
with the --with-system-zlib switch:
{{{
# ldd /usr/bin/gcc
linux-vdso.so.1 => (0x00007fffcedc2000)
libc.so.6 => /lib64/libc.so.6 (0x00007f38f505b000)
/lib64/ld-linux-x86-64.so.2 (0x00007f38f53b2000)
}}}
It's using -lz within the build, so I believe all uses are of the static
library.
> is simple.
>
> 2. On my system:
> {{{
> [zlib]
>
> Build time is: 0 minutes and 5 seconds
> Build time in seconds is: 5
> Approximate SBU time is: 0.1
> }}}
>
> That time is hardly is worth saving.
Any time that can be saved is worth considering saving. In any case, the
version of zlib that comes with gcc is an older one and for some reason it
takes much longer than 5 seconds. Run through a build, you'll see what I
mean.
> 3. It would require moving zlib to a position before gcc in Chapter 6.
Zlib already is before GCC in chapter 6.
> I don't see other distros doing this and the potential to do harm is
greater than what appears to be a negligible benefit.
I would accept this as a potentially valid argument if you applied that
same principle to the other libraries that gcc uses and could be built in
statically, namely, gmp and mpfr. As it is, since you install those to the
system in chapter 6 solely for the sake of GCC, then you're already
setting a precedent.
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2718#comment:2>
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