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"
If the following message shows up, the environment is not set up for proper PTY operation:
The system has no more ptys. Ask your system administrator to create more.
The following patches merges all updates from the 2.17 Branch from the binutils developers:
patch -Np1 -i ../binutils-2.17-branch_update-1.patch
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:
../binutils-2.17/configure --prefix=/usr \
--enable-shared --disable-multilib --enable-64-bit-bfd
Compile the package:
make configure-host
During make configure-host you may receive the following error message. It is safe to ignore.
WARNING: `flex' is missing on your system. You should only need it if you modified a `.l' file. You may need the `Flex' package in order for those modifications to take effect. You can get `Flex' from any GNU archive site.
make tooldir=/usr
The meaning of the make parameter:
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.
The test suite for Binutils is considered critical. Do not skip it under any circumstance.
Test the results:
make check
Install the package:
make tooldir=/usr install
Install the libiberty header file that is needed by some packages:
cp -v ../binutils-2.17/include/libiberty.h /usr/include