From 4a8b9b3abf29b99e73eac2bb6ab813d365826b5d Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sun, 17 May 2009 02:08:02 +0000 Subject: Add zlib-1.2.3-fPIC-1.patch which allows building static and dynamic libraries in one step. Also moved the libraries to /usr/lib. Fixes ticket #2329. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8880 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/zlib.xml | 35 +++++++---------------------------- 1 file changed, 7 insertions(+), 28 deletions(-) (limited to 'chapter06') diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml index 6a4eadbc0..ddddad00b 100644 --- a/chapter06/zlib.xml +++ b/chapter06/zlib.xml @@ -50,9 +50,14 @@ remove it afterwards. + Modify the build scripts to ensure compilation with position independent + code and allow building both static and dynamic libraries in one step: + +patch -Np1 -i ../&zlib-fpic-patch; + Prepare Zlib for compilation: -./configure --prefix=/usr --shared --libdir=/lib +./configure --prefix=/usr --shared Compile the package: @@ -62,36 +67,10 @@ make check - Install the shared library: - -make install - - The previous command installed a .so file in /lib. We will remove it and relink it into - /usr/lib: - -rm -v /lib/libz.so -ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so - - Build the static library: - -make clean -./configure --prefix=/usr -make - - To test the results again, issue: - -make check - - Install the static library: + Install the libraries: make install - Fix the permissions on the static library: - -chmod -v 644 /usr/lib/libz.a - -- cgit v1.2.3-54-g00ecf