diff options
author | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-07-02 13:04:13 +0000 |
---|---|---|
committer | Gerard Beekmans <gerard@linuxfromscratch.org> | 2001-07-02 13:04:13 +0000 |
commit | 671561bb345fe34cc9219611ec2f2a3747b6c012 (patch) | |
tree | f4b4590e81ffe8b2c4f1a4873cfb01cf8f6fe488 | |
parent | fcb99142190fcf1a077811a8c6052110e136fb1b (diff) |
Added the missing command explanations
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@755 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r-- | chapter06/glibc-exp.xml | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/chapter06/glibc-exp.xml b/chapter06/glibc-exp.xml index cf7dc5aaa..05803155a 100644 --- a/chapter06/glibc-exp.xml +++ b/chapter06/glibc-exp.xml @@ -16,9 +16,62 @@ will have Glibc default to using /lib and /usr/lib which is fine right now). </para> <para> +<userinput>sed s/"\$(PERL)"/"\/usr\/bin\/perl"/ +../glibc-2.2.3/malloc/Makefile > tmp~:</userinput> This sed command +searches through <filename>../glibc-2.2.3/malloc/Makefile</filename> and +converts all occurances of <filename>$(PERL)</filename> to +<filename>/usr/bin/perl</filename>. The output is then written to the +file <filename>tmp~</filename>. This is done because Glibc can't +autodetect perl since it's not installed yet at the time when we install +Glibc. +</para> + +<para> +<userinput>mv tmp~ ../glibc-2.2.3/malloc/Makefile:</userinput> The file +<filename>tmp~</filename> is now moved back to +<filename>../glibc-2.2.3/malloc/Makefile</filename>. We do this because +when using sed, we can't write straight back to this file so we need to +use a temporary file in between. +</para> + +<para> +<userinput>sed "s/root/0" ../glibc-2.2.3/login/Makefile > +tmp~:</userinput> This sed command replaces all occurances of +<filename>root</filename> in +<filename>../glibc-2.2.3/login/Makefile</filename> with 0. This is +because as we don't have glibc on the LFS system yet, usernames can't +be resolved to their user id's. Therefore, we replace the username +root with the id 0. +</para> + +<para> +<userinput>mv tmp~ ../glibc-2.2.3/login/Makefile:</userinput> As above, +we are using a temporary file (<filename>tmp~</filename>) to store the +edited Makefile and then copying it back over the original. +</para> + +<para> <userinput>--enable-add-ons:</userinput> This enables the add-on that we install with Glibc: linuxthreads </para> +<para> +<userinput>sed s/"cross-compiling = yes"/"cross-compiling = no"/ +config.make > config.make~:</userinput> This time, we're replacing +<filename>cross-compiling = yes</filename> with +<filename>cross-compiling = no</filename>. 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 determin this, so it automatically default to a +cross-compiler. The reason for the failed program is because Glibc +hasn't been installed yet. +</para> + +<para> +<userinput>mv config.make~ config.make:</userinput> Again, we are moving +the temporary file over the original. +</para> + </sect2> |