The Binutils package contains a linker, an assembler, and other tools for handling object files.
Verify that the PTYs are working properly inside the build environment. Check that everything is set up correctly by performing a simple test:
expect -c "spawn ls"
This command should give the following output:
spawn ls
If, instead, it gives a message saying to create more ptys, 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 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:
CC="gcc -isystem /usr/include" \ LDFLAGS="-Wl,-rpath-link,/usr/lib:/lib" \ ../binutils-2.28/configure \ --prefix=/usr \ --libdir=/usr/lib \ --enable-shared \ --disable-multilib \ --enable-64-bit-bfd \ --enable-gold=yes \ --enable-plugins \ --with-system-zlib \ --enable-threads
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). Because
this is a custom system, this target-specific directory in
/usr is not required.
Due to Binutils' critical role in a properly functioning system, the CLFS developers strongly recommend running the testsuite.
Test the results:
make check
Install the package:
make tooldir=/usr install
Translates program addresses to file names and line numbers; given an address and the name of an executable, it uses the debugging information in the executable to determine which source file and line number are associated with the address
Used by the linker to de-mangle C++ and Java symbols and to keep overloaded functions from clashing
A linker that combines a number of object and archive files into a single file, relocating their data and tying up symbol references
Displays information about the given object file, with options controlling the particular information to display; the information shown is useful to programmers who are working on the compilation tools
Generates an index of the contents of an archive and stores it in the archive; the index lists all of the symbols defined by archive members that are relocatable object files
Outputs, for each given file, the sequences of printable characters that are of at least the specified length (defaulting to four); for object files, it prints, by default, only the strings from the initializing and loading sections while for other types of files, it scans the entire file