diff options
Diffstat (limited to 'chapter05/glibc.xml')
-rw-r--r-- | chapter05/glibc.xml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/chapter05/glibc.xml b/chapter05/glibc.xml index 262a85a9f..17caba3d7 100644 --- a/chapter05/glibc.xml +++ b/chapter05/glibc.xml @@ -202,6 +202,42 @@ esac</userinput></screen> <screen><userinput remap="install">make install</userinput></screen> + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> + +<screen><userinput>echo 'main(){}' > dummy.c +$LFS_TGT-gcc dummy.c +readelf -l a.out | grep ': /tools'</userinput></screen> + + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> + +<screen><computeroutput>[Requesting program interpreter: /tools/lib/ld-linux.so.2]</computeroutput></screen> + + <para>Note that <filename class="directory">/tools/lib</filename>, or + <filename class="directory">/tools/lib64</filename> for 64-bit machines + appears as the prefix of the dynamic linker.</para> + + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on. Something may have gone wrong with the specs file amendment + above. In this case, redo the specs file amendment, being careful to + copy-and-paste the commands.</para> + + <para>Once all is well, clean up the test files:</para> + +<screen><userinput>rm -v dummy.c a.out</userinput></screen> + + </caution> + + <note><para>Building Binutils in the next section will serve as an additional check that + the toolchain has been built properly. If Binutils fails to build, it is an + indication that something has gone wrong with the previous Binutils, GCC, or Glibc + installations.</para></note> + </sect2> <sect2 role="content"> |