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.
This issue needs to be resolved before running the test suites for Binutils and GCC.
The following patch makes Binutils search in both the lib and lib64 directories in a multilib environment:
patch -Np1 -i ../binutils-2.17-genscripts_multilib-1.patch
The following patch corrects an error in the visibility tests for ld which only affects ppc64, see http://sourceware.org/ml/binutils/2004-08/msg00030.html.
patch -Np1 -i ../binutils-2.17-ppc64_fix_testsuite-1.patch
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 ${BUILD64}" ../binutils-2.17/configure --prefix=/usr \ --enable-shared --enable-64-bit-bfd --libdir=/usr/lib64
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