%general-entities; ]> binutils &binutils-version;
&binutils-url;
Binutils-&binutils-version; - Pass 2 Binutils tools, pass 2 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../chapter06/binutils.xml" xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> <seg>&binutils-ch5p2-sbu;</seg> <seg>&binutils-ch5p2-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> <title>Installation of Binutils Fix a couple of syntax errors that prevent the documentation from building with Texinfo-&texinfo-version;: sed -i -e 's/@colophon/@@colophon/' \ -e 's/doc@cygnus.com/doc@@cygnus.com/' bfd/doc/bfd.texinfo Create a separate build directory again: mkdir -v ../binutils-build cd ../binutils-build Prepare Binutils for compilation: CC=$LFS_TGT-gcc \ AR=$LFS_TGT-ar \ RANLIB=$LFS_TGT-ranlib \ ../binutils-&binutils-version;/configure \ --prefix=/tools \ --disable-nls \ --with-lib-path=/tools/lib \ --with-sysroot The meaning of the new configure options: CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib Because this is really a native build of Binutils, setting these variables ensures that the build system uses the cross-compiler and associated tools instead of the ones on the host system. --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. --with-sysroot The sysroot feature enables the linker to find shared objects which are required by other shared objects explicitly included on the linker's command line. Without this, some packages may not build successfully on some hosts. Compile the package: make 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 cp -v ld/ld-new /tools/bin The meaning of the make parameters: -C ld clean This tells the make program to remove all compiled files in the ld subdirectory. -C ld LIB_PATH=/usr/lib:/lib This option rebuilds everything in the ld subdirectory. Specifying the LIB_PATH Makefile variable on the command line allows us to override the default value of the temporary tools and point it to the proper final path. The value of this variable specifies the linker's default library search path. This preparation is used in the next chapter. <para>Details on this package are located in <xref linkend="contents-binutils" role="."/></para> </sect2> </sect1>