6.45.1. Environment Settings
This package requires compiler variables to be set for the target
in the environment.
export CC="${CLFS_TARGET}-gcc"
export CXX="${CLFS_TARGET}-g++"
export AR="${CLFS_TARGET}-ar"
export AS="${CLFS_TARGET}-as"
export RANLIB="${CLFS_TARGET}-ranlib"
export LD="${CLFS_TARGET}-ld"
export STRIP="${CLFS_TARGET}-strip"
6.45.2. Installation of Psmisc
When cross-compiling the AC_FUNC_MALLOC
macro will assume that the malloc
provided is not GNU Compatible. The following tells it that we do:
cat > config.cache << EOF
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes
EOF
Prepare Psmisc for compilation:
./configure --build=${CLFS_HOST} --host=${CLFS_TARGET} \
--prefix=/usr --exec-prefix="" \
--cache-file=config.cache
The meaning of the configure option:
-
--exec-prefix=""
-
This ensures that the Psmisc binaries will install into
/bin
instead of /usr/bin
. This is the correct location
according to the FHS, because some of the Psmisc binaries are
used by the CLFS-Bootscripts package.
Compile the package:
make
Install the package:
make DESTDIR=${CLFS} install
There is no reason for the pstree and pstree.x11 programs to reside in
/bin
. Therefore, move them to
/usr/bin
:
mv -v ${CLFS}/bin/pstree* ${CLFS}/usr/bin
By default, Psmisc's pidof program is not installed.
This usually is not a problem because it is installed later in the
Sysvinit package, which provides a better pidof program. If Sysvinit will
not be used for a particular system, complete the installation of
Psmisc by creating the following symlink:
ln -sfv killall ${CLFS}/bin/pidof