diff options
Diffstat (limited to 'chapter05/coreutils.xml')
-rw-r--r-- | chapter05/coreutils.xml | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/chapter05/coreutils.xml b/chapter05/coreutils.xml index 6f56a4108..f1e380f7e 100644 --- a/chapter05/coreutils.xml +++ b/chapter05/coreutils.xml @@ -45,7 +45,11 @@ <para>Prepare Coreutils for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/tools --enable-install-program=hostname</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ + --enable-install-program=hostname \ + --enable-no-install-program=kill,uptime</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> @@ -64,20 +68,9 @@ <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the test - suite is not mandatory for the temporary tools here in this chapter. To run - the Coreutils test suite anyway, issue the following command:</para> - -<screen><userinput remap="test">make RUN_EXPENSIVE_TESTS=yes check</userinput></screen> - - <para>The <parameter>RUN_EXPENSIVE_TESTS=yes</parameter> parameter tells the - test suite to run several additional tests that are considered - relatively expensive (in terms of CPU power and memory usage) on some - platforms, but generally are not a problem on Linux.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> <!-- <para>The above command refuses to install <filename>su</filename> because the program cannot be installed setuid root as a non-privileged @@ -86,6 +79,19 @@ <screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> --> + <para>Move programs to their final expected locations. Although this is + not necessary in this temporary environment, we must do so because some + programs harcode executable locations:</para> + +<screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin +mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin +mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin +mv -v $LFS/usr/bin/chroot $LFS/usr/sbin +mkdir -pv $LFS/usr/share/man/man8 +mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 +sed -i s/\"1\"/\"8\"/1 $LFS/usr/share/man/man8/chroot.8 +mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin</userinput></screen> + </sect2> <sect2 role="content"> |