Author: jim
Date: 2005-06-30 21:37:24 -0600 (Thu, 30 Jun 2005)
New Revision: 6272

Added:
   branches/cross-lfs/BOOK/final-system/mips64/adjusting.xml
Modified:
   branches/cross-lfs/BOOK/
   branches/cross-lfs/BOOK/final-system/mips/adjusting.xml
   branches/cross-lfs/BOOK/final-system/mips64-chapter.xml
   branches/cross-lfs/BOOK/final-system/mips64/glibc-64bit.xml
   branches/cross-lfs/BOOK/final-system/mips64/glibc-n32.xml
   branches/cross-lfs/BOOK/final-system/ppc/adjusting.xml
   branches/cross-lfs/BOOK/final-system/sparc64/adjusting.xml
   branches/cross-lfs/BOOK/final-system/sparc64/glibc-64bit.xml
   branches/cross-lfs/BOOK/final-system/x86/adjusting.xml
   branches/cross-lfs/BOOK/final-system/x86_64/adjusting.xml
   branches/cross-lfs/BOOK/introduction/common/changelog.xml
Log:
 [EMAIL PROTECTED]:  jim | 2005-06-30 20:36:27 -0700
 Added testing for adjusting of the toolchain



Property changes on: branches/cross-lfs/BOOK
___________________________________________________________________
Name: svk:merge
   - 7321b066-45f8-0310-a5e2-f63eff31be55:/cross-lfs:6537
dfc39d96-41f8-0310-9e44-b84af8e7c7f6:/books/local:5516
   + 7321b066-45f8-0310-a5e2-f63eff31be55:/cross-lfs:6545
dfc39d96-41f8-0310-9e44-b84af8e7c7f6:/books/local:5516

Modified: branches/cross-lfs/BOOK/final-system/mips/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/mips/adjusting.xml     2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/mips/adjusting.xml     2005-07-01 
03:37:24 UTC (rev 6272)
@@ -22,12 +22,34 @@
     -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib/ @g;' \
     `gcc --print-file specs`</userinput></screen>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
-  xpointer="xpointer(/sect1/para[2])"/>
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
-  xpointer="xpointer(/sect1/para[3])"/>
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
 
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib/ld.so.1]</computeroutput></screen>
+
+<para>Note that <filename class="directory">/lib</filename> is now
+the prefix of our dynamic linker.</para>
+
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
+
 </sect1>

Added: branches/cross-lfs/BOOK/final-system/mips64/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/mips64/adjusting.xml   2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/mips64/adjusting.xml   2005-07-01 
03:37:24 UTC (rev 6272)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"; [
+  <!ENTITY % general-entities SYSTEM "../../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-adjusting">
+  <?dbhtml filename="adjusting.html"?>
+
+  <title>Adjusting the Toolchain</title>
+
+  <para>Now we amend the GCC specs file so that it points to the new
+  dynamic linker. A <command>perl</command> command accomplishes this:</para>
+
+  <warning>
+    <para><emphasis>Do not</emphasis> run the following command more than
+    once, it will adversely affect the outcome of software built after
+    this step.</para>
+  </warning>
+
+<para>First we will adjust the 32 bit ABI:</para>
+
+<screen><userinput>perl -pi -e 's@ /tools/lib/ld.so.1@ /lib/[EMAIL 
PROTECTED];' \
+    -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib/ @g;' \
+        `gcc --print-file specs`</userinput></screen>
+
+<para>Second we will adjust the N32 ABI:</para>
+
+<screen><userinput>perl -pi -e 's@ /tools/lib32/ld.so.1@ /lib32/[EMAIL 
PROTECTED];' \
+    -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib32/ @g;' \
+        `gcc --print-file specs`</userinput></screen>
+
+<para>Third we will adjust the 64 bit ABI:</para>
+
+<screen><userinput>perl -pi -e 's@ /tools/lib64/ld.so.1@ /lib64/[EMAIL 
PROTECTED];' \
+    -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib64/ @g;' \
+        `gcc --print-file specs`</userinput></screen>
+
+  <para>It is a good idea to visually inspect the specs file to verify the
+  intended change was actually made.</para>
+
+  <para>Note that <filename class="directory">/lib</filename>,
+  <filename class="directory">/lib32</filename>, or
+  <filename class="directory">/lib64</filename> is now the prefix
+  of our dynamic linker.</para>
+
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
+
+<para>For 32 bit ABI:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc ${BUILD32} dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib/ld.so.1]</computeroutput></screen>
+
+<para>For N32 ABI:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc ${BUILDN32} dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib32/ld.so.1]</computeroutput></screen>
+
+<para>For 64 bit ABI:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc ${BUILD64} dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib64/ld.so.1]</computeroutput></screen>
+
+<para>Note that <filename class="directory">/lib</filename>,
+<filename class="directory">/lib32</filename> or 
+<filename class="directory">/lib64</filename> is now the prefix
+of our dynamic linker.</para>
+
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
+
+</sect1>

Modified: branches/cross-lfs/BOOK/final-system/mips64/glibc-64bit.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/mips64/glibc-64bit.xml 2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/mips64/glibc-64bit.xml 2005-07-01 
03:37:24 UTC (rev 6272)
@@ -75,14 +75,6 @@
 
 <screen><userinput>echo "slibdir=/lib64" >> configparms</userinput></screen>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="../mips64/glibc.xml"
-    xpointer="xpointer(//[EMAIL PROTECTED]'installation']/para[6])"/>
-
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="../mips64/glibc.xml"
-    xpointer="xpointer(//[EMAIL PROTECTED]'installation']/screen[3])"/>
-
 <screen><userinput>CC="gcc ${BUILD64}" CXX="gcc ${BUILD64}" \
     ../glibc-&glibc-version;/configure --prefix=/usr \
     --disable-profile --enable-add-ons --enable-kernel=2.6.0 \

Modified: branches/cross-lfs/BOOK/final-system/mips64/glibc-n32.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/mips64/glibc-n32.xml   2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/mips64/glibc-n32.xml   2005-07-01 
03:37:24 UTC (rev 6272)
@@ -79,12 +79,6 @@
     href="../mips64/glibc.xml"
     xpointer="xpointer(//[EMAIL PROTECTED]'installation']/para[6])"/>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="../mips64/glibc.xml"
-    xpointer="xpointer(//[EMAIL PROTECTED]'installation']/screen[3])"/>
-
-    <para>Prepare Glibc for compilation:</para>
-
 <screen><userinput>CC="gcc ${BUILDN32}" CXX="gcc ${BUILDN32} \
     ../glibc-&glibc-version;/configure --prefix=/usr \
     --disable-profile --enable-add-ons --enable-kernel=2.6.0 \

Modified: branches/cross-lfs/BOOK/final-system/mips64-chapter.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/mips64-chapter.xml     2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/mips64-chapter.xml     2005-07-01 
03:37:24 UTC (rev 6272)
@@ -16,7 +16,7 @@
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="mips64/glibc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="mips64/glibc-n32.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="mips64/glibc-64bit.xml"/>
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="mips/adjusting.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="mips64/adjusting.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="multilib/binutils.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="multilib/gcc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"; 
href="multilib/zlib.xml"/>

Modified: branches/cross-lfs/BOOK/final-system/ppc/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/ppc/adjusting.xml      2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/ppc/adjusting.xml      2005-07-01 
03:37:24 UTC (rev 6272)
@@ -22,12 +22,34 @@
     -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib/ @g;' \
     `gcc --print-file specs`</userinput></screen>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
-  xpointer="xpointer(/sect1/para[2])"/>
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
-  xpointer="xpointer(/sect1/para[3])"/>
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
 
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib/ld.so.1]</computeroutput></screen>
+
+<para>Note that <filename class="directory">/lib</filename> is now
+the prefix of our dynamic linker.</para>
+
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
+
 </sect1>

Modified: branches/cross-lfs/BOOK/final-system/sparc64/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/sparc64/adjusting.xml  2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/sparc64/adjusting.xml  2005-07-01 
03:37:24 UTC (rev 6272)
@@ -6,5 +6,5 @@
 ]>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
+  href="../x86_64/adjusting.xml"
   xpointer="xpointer(/sect1)"/>

Modified: branches/cross-lfs/BOOK/final-system/sparc64/glibc-64bit.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/sparc64/glibc-64bit.xml        
2005-06-30 22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/sparc64/glibc-64bit.xml        
2005-07-01 03:37:24 UTC (rev 6272)
@@ -62,19 +62,45 @@
     href="../x86/glibc.xml"
     xpointer="xpointer(id('install-glibc')/screen[2])"/>
 
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
+    href="../mips64/glibc.xml"
+    xpointer="xpointer(//[EMAIL PROTECTED]'installation']/para[6])"/>
+
 <screen><userinput>CC="gcc ${BUILD64}" CXX="gcc ${BUILD64}" \
     ../glibc-&glibc-version;/configure --prefix=/usr \
     --disable-profile --enable-add-ons --enable-kernel=2.6.0 \
     --libexecdir=/usr/lib64/glibc --libdir=/usr/lib64</userinput></screen>
 
-    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="../x86/glibc.xml"
-    
xpointer="xpointer(id('install-glibc')/variablelist[1]/range-to(id('install-glibc')/para[12]))"/>
+    <variablelist>
+      <title>The meaning of the new configure option:</title>
 
+      <varlistentry>
+        <term><parameter>--libexecdir=/usr/lib64/glibc</parameter></term>
+        <listitem>
+          <para>This changes the location of the <command>pt_chown</command>
+          program from its default of <filename
+          class="directory">/usr/libexec</filename> to <filename
+          class="directory">/usr/lib64/glibc</filename>.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
     <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-    href="../x86/glibc.xml"
-    
xpointer="xpointer(id('install-glibc')/screen[8]/range-to(id('install-glibc')/para[last()]))"/>
+    href="../mips64/glibc.xml"
+    xpointer="xpointer(//[EMAIL PROTECTED]'installation']/important[1])"/>
 
+    <para>Test the results:</para>
+
+<screen><userinput>make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
   </sect2>
 
   <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";

Modified: branches/cross-lfs/BOOK/final-system/x86/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/x86/adjusting.xml      2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/x86/adjusting.xml      2005-07-01 
03:37:24 UTC (rev 6272)
@@ -29,4 +29,34 @@
   <para>Note that <filename class="directory">/lib</filename> is now
   the prefix of our dynamic linker.</para>
 
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib/ld-linux.so.2]</computeroutput></screen>
+
+<para>Note that <filename class="directory">/lib</filename> is now
+the prefix of our dynamic linker.</para>
+
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
+
 </sect1>

Modified: branches/cross-lfs/BOOK/final-system/x86_64/adjusting.xml
===================================================================
--- branches/cross-lfs/BOOK/final-system/x86_64/adjusting.xml   2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/final-system/x86_64/adjusting.xml   2005-07-01 
03:37:24 UTC (rev 6272)
@@ -5,7 +5,83 @@
   %general-entities;
 ]>
 
-  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude";
-  href="../x86/adjusting.xml"
-  xpointer="xpointer(/sect1)"/>
+<sect1 id="ch-system-adjusting">
+  <?dbhtml filename="adjusting.html"?>
 
+  <title>Adjusting the Toolchain</title>
+
+  <para>Now we amend the GCC specs file so that it points to the new
+  dynamic linker. A <command>perl</command> command accomplishes this:</para>
+
+  <warning>
+    <para><emphasis>Do not</emphasis> run the following command more than
+    once, it will adversely affect the outcome of software built after
+    this step.</para>
+  </warning>
+
+<para>First we will adjust the 32 bit ABI:</para>
+
+<screen><userinput>perl -pi -e 's@ /tools/lib/ld-linux.so.2@ /lib/[EMAIL 
PROTECTED];' \
+    -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib/ @g;' \
+        `gcc --print-file specs`</userinput></screen>
+
+<para>Second we will adjust the 64 bit ABI:</para>
+
+<screen><userinput>perl -pi -e 's@ /tools/lib64/ld-linux.so.2@ /lib64/[EMAIL 
PROTECTED];' \
+    -e '[EMAIL PROTECTED]:[EMAIL PROTECTED]/usr/lib64/ @g;' \
+        `gcc --print-file specs`</userinput></screen>
+
+  <para>It is a good idea to visually inspect the specs file to verify the
+  intended change was actually made.</para>
+
+  <para>Note that <filename class="directory">/lib</filename> or 
+  <filename class="directory">/lib64</filename> is now the prefix
+  of our dynamic linker.</para>
+
+<caution><para>It is imperative at this point to stop and ensure that
+the basic functions (compiling and linking) of the adjusted toolchain
+are working as expected. To do this, perform a sanity
+check:</para>
+
+<para>For 32 bit ABI:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc ${BUILD32} dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+<para>For 32bit:</para>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib/ld-linux.so.2]</computeroutput></screen>
+
+<para>For 64 bit ABI:</para>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc ${BUILD64} dummy.c
+readelf -l a.out | grep ': /lib'</userinput></screen>
+
+<para>If everything is working correctly, there should be no errors,
+and the output of the last command will be (allowing for
+platform-specific differences in dynamic linker name):</para>
+
+<screen><computeroutput>[Requesting program interpreter: 
/lib64/ld-linux.so.2]</computeroutput></screen>
+
+<para>Note that <filename class="directory">/lib</filename> or 
+<filename class="directory">/lib64</filename> is now the prefix
+of our dynamic linker.</para>
+
+<para>If the output does not appear as shown above or is not received
+at all, then something is seriously wrong. Investigate and retrace the
+steps to find out where the problem is and correct it. The most likely
+reason is that something went wrong with the specs file amendment
+above. Any issues will need to be resolved before continuing on with
+the process.</para>
+
+<para>Once everything is working correctly, clean up the test
+files:</para>
+
+<screen><userinput>rm dummy.c a.out</userinput></screen></caution>
+
+</sect1>

Modified: branches/cross-lfs/BOOK/introduction/common/changelog.xml
===================================================================
--- branches/cross-lfs/BOOK/introduction/common/changelog.xml   2005-06-30 
22:06:21 UTC (rev 6271)
+++ branches/cross-lfs/BOOK/introduction/common/changelog.xml   2005-07-01 
03:37:24 UTC (rev 6272)
@@ -205,6 +205,9 @@
         <listitem>
           <para>[jim] - Added CPPFLAGS=-D_GNU_SOURCE to patch in 
temp-system.</para>
         </listitem>
+        <listitem>
+          <para>[jim] - Added testing of adjusting the toolchain to all 
architectures.</para>
+        </listitem>
       </itemizedlist>
     </listitem>
 

-- 
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