
Linux From Scratch - Version 7.0
98
6.13. Binutils-2.21.1a
The Binutils package contains a linker, an assembler, and other tools for handling object files.
Approximate build time: 1.9 SBU
Required disk space: 307 MB
6.13.1. Installation of Binutils
Verify that the PTYs are working properly inside the chroot environment by performing a simple test:
expect -c "spawn ls"
This command should output the following:
spawn ls
If, instead, the output includes the message below, then the environment is not set up for proper PTY operation. This
issue needs to be resolved before running the test suites for Binutils and GCC:
The system has no more ptys.
Ask your system administrator to create more.
Suppress the installation of an outdated standards.info file as a newer one is installed later on in the Autoconf
instructions:
rm -fv etc/standards.info
sed -i.bak '/^INFO/s/standards.info //' etc/Makefile.in
Fix a couple of the tests, which fail when using GCC-4.6.1
sed -i "/exception_defines.h/d" ld/testsuite/ld-elf/new.cc
sed -i "s/-fvtable-gc //" ld/testsuite/ld-selective/selective.exp
The Binutils documentation recommends building Binutils outside of the source directory in a dedicated build
directory:
mkdir -v ../binutils-build
cd ../binutils-build
Prepare Binutils for compilation:
../binutils-2.21.1/configure --prefix=/usr --enable-shared
Compile the package:
make tooldir=/usr
The meaning of the make parameter:
tooldir=/usr
Normally, the tooldir (the directory where the executables will ultimately be located) is set to $(exec_
prefix)/$(target_alias). For example, x86_64 machines would expand that to /usr/x86_64-
unknown-linux-gnu. Because this is a custom system, this target-specific directory in /usr is not required.
Comentarios a estos manuales