Details on this package are located in Section 10.65.3, “Contents of Util-linux.”
The Util-linux package contains miscellaneous utility programs. Among them are utilities for handling file systems, consoles, partitions, and messages.
Util-linux fails to compile against newer versions of Linux kernel headers. The following patch properly fixes this issue:
patch -Np1 -i ../util-linux-2.12r-cramfs-1.patch
The following patch fixes build issues with GCC 4.1.1:
patch -Np1 -i ../util-linux-2.12r-gcc4_fixes-1.patch
The following patch fixes swapon.c - it tries to find the variable R_OK, but the header that has R_OK is not included:
patch -Np1 -i ../util-linux-2.12r-missing_header-1.patch
Util-linux does not use the freshly installed headers and libraries from the /tools directory by default. This is fixed by altering the configure script:
cp -v configure{,.orig} sed -e 's@/usr/include@/tools/include@g' configure.orig > configure
The Util-linux installation uses -o root. The following sed removes that since we don't have users setup yet:
cp -v MCONFIG{,.orig} sed -e 's|-o root||' MCONFIG.orig > MCONFIG
Prepare Util-linux for compilation:
CC="${CC} ${BUILD64}" ./configure
Compile the package:
make HAVE_KILL=yes HAVE_SLN=yes \ HAVE_SHADOW=no CPUOPT="" ARCH="" \ CPU=""
The meaning of the make parameters:
This prevents the kill program from being built.
This prevents the sln program (a statically linked version of ln already installed by Glibc) from being built and installed again.
This disables linking to shadow .
This disables any compiler optimizations by CPU type.
This disables the detection of the architecture.
This disables the detection of the CPU.
Install the package:
make HAVE_KILL=yes HAVE_SLN=yes HAVE_SHADOW=no \ USE_TTY_GROUP=no CPUOPT="" ARCH="" \ CPU="" DESTDIR=${CLFS} install
Details on this package are located in Section 10.65.3, “Contents of Util-linux.”