mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-01-20 05:57:43 +00:00
8f9069b37b
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@1572 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
53 lines
2.5 KiB
XML
53 lines
2.5 KiB
XML
<sect2>
|
|
<title>Command explanations</title>
|
|
|
|
<para><userinput>mknod -m 0666 /dev/null c 1 3:</userinput> Glibc needs a
|
|
null device to compile properly. All other devices will be created in the
|
|
next section.</para>
|
|
|
|
<para><userinput>touch /etc/ld.so.conf</userinput> One of the final steps
|
|
of the Glibc installation is running ldconfig to update the dynamic loader
|
|
cache. If this file doesn't exist, the installation will abort with an error
|
|
that it can't read the file, so we simply create an empty file (the empty file
|
|
will have Glibc default to using /lib and /usr/lib which is fine).</para>
|
|
|
|
<para><userinput>sed 's%\$(PERL)%/usr/bin/perl%'
|
|
malloc/Makefile.backup > malloc/Makefile:</userinput> This sed command
|
|
searches through <filename>malloc/Makefile.backup</filename> and
|
|
converts all occurrences of <filename>$(PERL)</filename> to
|
|
<filename>/usr/bin/perl</filename>. The output is then written to the
|
|
original <filename>malloc/Makefile.in</filename> which is used during
|
|
configuration. This is done because Glibc can't autodetect perl since
|
|
it hasn't been installed yet.</para>
|
|
|
|
<para><userinput>sed 's/root/0' login/Makefile.backup >
|
|
login/Makefile:</userinput> This sed command replaces all occurrences of
|
|
<filename>root</filename> in <filename>login/Makefile.backup</filename>
|
|
with 0. This is because we don't have glibc on the LFS system yet, so
|
|
usernames can't be resolved to their user id's. Therefore, we replace
|
|
the username root with user id 0.</para>
|
|
|
|
<para><userinput>--enable-add-ons:</userinput> This enables the add-on that
|
|
we install with Glibc: linuxthreads</para>
|
|
|
|
<para><userinput>--libexecdir=/usr/bin:</userinput> This will cause the
|
|
pt_chown program to be installed in the /usr/bin directory.</para>
|
|
|
|
<para><userinput>echo "cross-compiling = no" > configparms:</userinput>
|
|
We do this because we are only building for our own system. Cross-compiling
|
|
is used, for instance, to build a package for an Apple Power PC on an
|
|
Intel system. The reason Glibc thinks we're cross-compiling is that it
|
|
can't compile a test program to determine this, so it automatically defaults
|
|
to a cross-compiler. Compiling the test program fails because Glibc hasn't
|
|
been installed yet.</para>
|
|
|
|
<para><userinput>exec /bin/bash:</userinput>This command will
|
|
start a new bash shell which will replace the current shell. This is
|
|
done to get rid of the "I have no name!" message in the command
|
|
prompt, which was caused by bash's inability to resolve a userid to
|
|
a username (which in turn was caused by the missing Glibc
|
|
installation).</para>
|
|
|
|
</sect2>
|
|
|