5.12. Binutils-2.15.94.0.2.2 - Pass 2

The Binutils package contains a linker, an assembler, and other tools for handling object files.

Approximate build time: 1.5 SBU
Required disk space: 114 MB
Installation depends on: Bash, Bison, Coreutils, Diffutils, Flex, GCC, Gettext, Glibc, Grep, M4, Make, Perl, Sed, and Texinfo

5.12.1. Re-installation of Binutils

This package is known to have issues when its default optimization flags (including the -march and -mcpu options) are changed. If any environment variables that override default optimizations have been defined, such as CFLAGS and CXXFLAGS, unset them when building Binutils.

Create a separate build directory again:

mkdir -v ../binutils-build
cd ../binutils-build

Prepare Binutils for compilation:

../binutils-2.15.94.0.2.2/configure --prefix=/tools \
    --disable-nls --enable-shared --with-lib-path=/tools/lib

The meaning of the new configure options:

--with-lib-path=/tools/lib

This tells the configure script to specify the library search path during the compilation of Binutils, resulting in /tools/lib being passed to the linker. This prevents the linker from searching through library directories on the host.

Compile the package:

make

Compilation is now complete. As discussed earlier, running the test suite is not mandatory for the temporary tools here in this chapter. To run the Binutils test suite anyway, issue the following command:

make check

Install the package:

make install

Now prepare the linker for the “Re-adjusting” phase in the next chapter:

make -C ld clean
make -C ld LIB_PATH=/usr/lib:/lib
[Warning]

Warning

Do not remove the Binutils source and build directories yet. These directories will be needed again in the next chapter in their current state.

Details on this package are located in Section 6.13.2, “Contents of Binutils.”

mirror server hosted at Truenetwork, Russian Federation.