#### Linux From Scratch - Version r13.0-133

### Chapter 6. Cross Compiling Temporary Tools

- Prev

  Bash-5.3

- Next

  Diffutils-3.12

- Up
- Home

# 6.5. Coreutils-9.11

The Coreutils package contains the basic utility programs needed by every operating system.

Approximate build time: 0.3 SBU
Required disk space: 185 MB

## 6.5.1. Installation of Coreutils

Prepare Coreutils for compilation:

    ./configure --prefix=/usr                     \
                --host=$LFS_TGT                   \
                --build=$(build-aux/config.guess) \
                --enable-install-program=hostname \
                --enable-no-install-program=kill,uptime

The meaning of the configure options:

`--enable-install-program=hostname`

  This enables the hostname binary to be built and installed – it is disabled by default but is required by the Perl test suite.

Compile the package:

    make

Install the package:

    make DESTDIR=$LFS install

Move programs to their final expected locations. Although this is not necessary in this temporary environment, we must do so because some programs hardcode executable locations:

    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"/'                    $LFS/usr/share/man/man8/chroot.8

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

- Prev

  Bash-5.3

- Next

  Diffutils-3.12

- Up
- Home