diff options
Diffstat (limited to 'chapter05/binutils-pass2.xml')
-rw-r--r-- | chapter05/binutils-pass2.xml | 51 |
1 files changed, 41 insertions, 10 deletions
diff --git a/chapter05/binutils-pass2.xml b/chapter05/binutils-pass2.xml index 7cfcb6421..dd7e7d912 100644 --- a/chapter05/binutils-pass2.xml +++ b/chapter05/binutils-pass2.xml @@ -41,7 +41,7 @@ </sect2> <sect2 role="installation"> - <title>Re-installation of Binutils</title> + <title>Installation of Binutils</title> <para>Binutils does not recognize versions of Texinfo newer than 4.9. Fix this issue by applying the following patch:</para> @@ -55,13 +55,24 @@ cd ../binutils-build</userinput></screen> <para>Prepare Binutils for compilation:</para> -<screen><userinput remap="configure">../binutils-&binutils-version;/configure --prefix=/tools \ - --disable-nls --with-lib-path=/tools/lib</userinput></screen> +<screen><userinput remap="configure">CC="$LFS_TGT-gcc -B/tools/lib/" \ + AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib \ + ../binutils-&binutils-version;/configure --prefix=/tools \ + --disable-nls --with-lib-path=/tools/lib</userinput></screen> <variablelist> <title>The meaning of the new configure options:</title> <varlistentry> + <term><parameter>CC="$LFS_TGT-gcc -B/tools/lib/" AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</parameter></term> + <listitem> + <para>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.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><parameter>--with-lib-path=/tools/lib</parameter></term> <listitem> <para>This tells the configure script to specify the library @@ -78,13 +89,6 @@ cd ../binutils-build</userinput></screen> <screen><userinput remap="make">make</userinput></screen> - <para>Compilation is now complete. As discussed earlier, running the - test suite is not mandatory for the temporary tools here in this - chapter. To run the Binutils test suite anyway, issue the following - command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> @@ -96,6 +100,33 @@ cd ../binutils-build</userinput></screen> make -C ld LIB_PATH=/usr/lib:/lib cp -v ld/ld-new /tools/bin</userinput></screen> + <variablelist> + <title>The meaning of the make parameters:</title> + + <varlistentry> + <term><parameter>-C ld clean</parameter></term> + <listitem> + <para>This tells the make program to remove all compiled + files in the <filename class="directory">ld</filename> + subdirectory.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>-C ld LIB_PATH=/usr/lib:/lib</parameter></term> + <listitem> + <para>This option rebuilds everything in the <filename + class="directory">ld</filename> subdirectory. Specifying the + <envar>LIB_PATH</envar> 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> + </listitem> + </varlistentry> + + </variablelist> + </sect2> <sect2 role="content"> |