A couple of platform compatibility issues...
gschafer at zip.com.au
Sun Jan 5 03:44:21 PST 2003
On Sun, Jan 05, 2003 at 02:02:55AM -0600, Kelledin wrote:
> 1) See here:
> We figured out why zlib does things the way it does, but we never
> really committed a proper build method to the book. The proper
> method would be to build zlib with the following commands:
> CFLAGS="$CFLAGS -fPIC" \
> ./configure --prefix=/usr --shared &&
> make LIBS="libz.so.1.1.4 libz.a" &&
> make LIBS="libz.so.1.1.4 libz.a" install &&
> mv /usr/lib/libz.so.* /lib &&
> ln -sf ../../lib/libz.so.1 /usr/lib/libz.so &&
> cp zlib.3 /usr/share/man/man3
I agree that the shared lib needs to be compiled with -fPIC and thus don't
object to your proposal.
But I will say that the current build instructions are not quite kosher.
Look at any libtool using package. Libtool might be a "piece of crap" but at
least it does the right thing:-
code for shared *.so libs gets compiled with -fPIC
code for static *.a archives gets compiled normally (ie: without -fPIC)
in other words, the same object file gets compiled twice
Keeping that in mind, I'm sure the zlib instructions could be made a bit
On a side note, I note that some people (Debian for instance) go out of
their way to compile all their shared libs with -D_REENTRANT. I always
thought -D_REENTRANT was related to threading. What are your thoughts on
On another side note, the zlib package defaults its optimization to -O3
which is probably not good with latest gcc's (at least according to my very
unscientific decompression tests :-)
> 2) See here:
> Essentially findutils should always be compiled with
> -D_GNU_SOURCE stuck in the CPPFLAGS. This applies to both Ch. 5
> and Ch. 6.
> These fixes don't do much (anything?) for or against x86. They
> _do_ fix issues with other architectures, though, and adding
> them to LFS-CVS is pretty trivial. AFAIK the only reason they
> haven't been added is just pure inertia; I decided to give the
> issue a little push. ;)
I'm sure I read somewhere that pretty much all GNU software should be
compiled with -D_GNU_SOURCE. I think I even did some investigations and
noted that only a few of the source files in findutils define _GNU_SOURCE.
So again, no objections from me.
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message
More information about the lfs-dev