6.15. Coreutils-8.21

The Coreutils package contains utilities for showing and setting the basic system characteristics.

6.15.1. Installation of Coreutils

Configure can not properly determine how to get free space when cross-compiling - as a result, the df program will not be built. Add the following entries to config.cache to correct this, and fix various cross-compiling issues:

cat > config.cache << EOF

Prepare Coreutils for compilation:

./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --enable-install-program=hostname --cache-file=config.cache

The meaning of the new configure option:


Tells Coreutils to install hostname, which is needed for the Perl testsuite.

Apply a sed to allow completion of the build:

cp -v Makefile{,.orig}
sed -e 's/^#run_help2man\|^run_help2man/#&/' \
  -e 's/^\##run_help2man/run_help2man/' Makefile.orig > Makefile

Compile the package:


Install the package:

make install

Details on this package are located in Section 10.24.2, “Contents of Coreutils.”