Author: bdubbs
Date: 2009-05-16 20:08:02 -0600 (Sat, 16 May 2009)
New Revision: 8880

Modified:
   trunk/BOOK/chapter01/changelog.xml
   trunk/BOOK/chapter01/whatsnew.xml
   trunk/BOOK/chapter03/patches.xml
   trunk/BOOK/chapter06/zlib.xml
   trunk/BOOK/patches.ent
Log:
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.



Modified: trunk/BOOK/chapter01/changelog.xml
===================================================================
--- trunk/BOOK/chapter01/changelog.xml  2009-05-16 23:49:13 UTC (rev 8879)
+++ trunk/BOOK/chapter01/changelog.xml  2009-05-17 02:08:02 UTC (rev 8880)
@@ -41,6 +41,13 @@
       <para>2009-05-16</para>
       <itemizedlist>
         <listitem>
+          <para>[bdubbs] - 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
+          <ulink url="&lfs-ticket-root;2329">#2329</ulink>.</para>
+        </listitem>
+        <listitem>
           <para>[bdubbs] - Make symbolic links installed by bzip2 relative.
           Fixes
           <ulink url="&lfs-ticket-root;2396">#2396</ulink>.</para>

Modified: trunk/BOOK/chapter01/whatsnew.xml
===================================================================
--- trunk/BOOK/chapter01/whatsnew.xml   2009-05-16 23:49:13 UTC (rev 8879)
+++ trunk/BOOK/chapter01/whatsnew.xml   2009-05-17 02:08:02 UTC (rev 8880)
@@ -304,6 +304,9 @@
     <listitem>
       <para>vim-7.2-fixes-3.patch</para>
     </listitem>
+    <listitem>
+      <para>zlib-1.2.3-fPIC-1.patch</para>
+    </listitem>
 
   </itemizedlist>
 

Modified: trunk/BOOK/chapter03/patches.xml
===================================================================
--- trunk/BOOK/chapter03/patches.xml    2009-05-16 23:49:13 UTC (rev 8879)
+++ trunk/BOOK/chapter03/patches.xml    2009-05-17 02:08:02 UTC (rev 8880)
@@ -234,6 +234,14 @@
       </listitem>
     </varlistentry> -->
 
+    <varlistentry>
+      <term>Zlib fPIC Patch - <token>&zlib-fpic-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&zlib-fpic-patch;"/></para>
+        <para>MD5 sum: <literal>&zlib-fpic-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
   </variablelist>
 
   <para>Total size of these patches: about <returnvalue/></para>

Modified: trunk/BOOK/chapter06/zlib.xml
===================================================================
--- trunk/BOOK/chapter06/zlib.xml       2009-05-16 23:49:13 UTC (rev 8879)
+++ trunk/BOOK/chapter06/zlib.xml       2009-05-17 02:08:02 UTC (rev 8880)
@@ -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>
+    <para>Install the libraries:</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>
-
-<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">

Modified: trunk/BOOK/patches.ent
===================================================================
--- trunk/BOOK/patches.ent      2009-05-16 23:49:13 UTC (rev 8879)
+++ trunk/BOOK/patches.ent      2009-05-17 02:08:02 UTC (rev 8880)
@@ -116,3 +116,7 @@
 <!ENTITY vim-mandir-patch-md5 "b6426eb4192faba1e867ddd502323f5b">
 <!ENTITY vim-mandir-patch-size "4.2 KB"> -->
 
+<!ENTITY zlib-fpic-patch "zlib-&zlib-version;-fPIC-1.patch">
+<!ENTITY zlib-fpic-patch-md5 "506ab642a0d5bebeb73552030358b197">
+<!ENTITY zlib-fpic-patch-size "21 KB">
+

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to