aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06
diff options
context:
space:
mode:
authorBruce Dubbs <bdubbs@linuxfromscratch.org>2009-05-17 02:08:02 +0000
committerBruce Dubbs <bdubbs@linuxfromscratch.org>2009-05-17 02:08:02 +0000
commit4a8b9b3abf29b99e73eac2bb6ab813d365826b5d (patch)
tree2bfb32b655c1141b08b47d722b663c26b4d1fd38 /chapter06
parent1442d774635c736969812155a643048f47a4e279 (diff)
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
Diffstat (limited to 'chapter06')
-rw-r--r--chapter06/zlib.xml35
1 files changed, 7 insertions, 28 deletions
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.</para>
</note>
+ <para>Modify the build scripts to ensure compilation with position independent
+ code and allow building both static and dynamic libraries in one step:</para>
+
+<screen><userinput remap="configure">patch -Np1 -i ../&zlib-fpic-patch;</userinput></screen>
+
<para>Prepare Zlib for compilation:</para>
-<screen><userinput remap="configure">./configure --prefix=/usr --shared --libdir=/lib</userinput></screen>
+<screen><userinput remap="configure">./configure --prefix=/usr --shared</userinput></screen>
<para>Compile the package:</para>
@@ -62,36 +67,10 @@
<screen><userinput remap="test">make check</userinput></screen>
- <para>Install the shared library:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
- <para>The previous command installed a <filename
- class="extension">.so</filename> file in <filename
- class="directory">/lib</filename>. We will remove it and relink it into
- <filename class="directory">/usr/lib</filename>:</para>
-
-<screen><userinput remap="install">rm -v /lib/libz.so
-ln -sfv ../../lib/libz.so.&zlib-version; /usr/lib/libz.so</userinput></screen>
-
- <para>Build the static library:</para>
-
-<screen><userinput remap="make">make clean
-./configure --prefix=/usr
-make</userinput></screen>
-
- <para>To test the results again, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
- <para>Install the static library:</para>
+ <para>Install the libraries:</para>
<screen><userinput remap="install">make install</userinput></screen>
- <para>Fix the permissions on the static library:</para>
-
-<screen><userinput remap="install">chmod -v 644 /usr/lib/libz.a</userinput></screen>
-
</sect2>
<sect2 id="contents-zlib" role="content">