5.4. uClibc-20070404

The uClibc package contains ... TO BE WRITTEN

5.4.1. Installation of uClibc

[Note]

Note

The stable versions of uClibc do not yet support the gcc-4.1 Stack Smashing Protector library functions. This support is planned to be added to uClibc-0.9.29. Until then uClibc snapshots must be used in order to support gcc-4.1's SSP. uClibc snapshots are often unstable. The snapshot version in this book has been mildly tested and is expected to work, your success may vary.

The next patch adds a generic config file. This will build uClibc with standard features, including the hardening features. In chapter 6 you will be able to configure uClibc to your more specific needs:

patch -Np1 -i ../uClibc-20070404-config-1.patch

Put the pre-generated locale tarball where uClibc can find it:

install -v -m444 ../uClibc-locale-030818.tgz extra/locale/

Reset the installation paths:

cp -vi .config{,.orig}
sed -e 's@.*SHARED_LIB_LOADER_P.*@SHARED_LIB_LOADER_PREFIX="/tools/lib"@g' \
    -e 's@.*RUNTIME_PREFIX.*@RUNTIME_PREFIX="/tools"@g' \
    -e 's@.*DEVEL_PREFIX.*@DEVEL_PREFIX="/tools/"@g' \
    -e 's@.*KERNEL_HEADERS.*@KERNEL_HEADERS="/tools/include"@g' .config.orig > .config

Then build uClibc:

make

Install uClibc:

make install

Details on this package are located in Section 6.11.5, “Contents of uClibc.”