From 4e82d4787a775438ce10fc7e3ccefe9fcd23ccd0 Mon Sep 17 00:00:00 2001 From: Jeremy Huntwork Date: Fri, 5 Dec 2008 20:46:02 +0000 Subject: Bring in DIY's next generation build method. Move GRUB to chapter 8. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8755 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter05/binutils-pass2.xml | 51 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) (limited to 'chapter05/binutils-pass2.xml') 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 @@ - Re-installation of Binutils + Installation of Binutils Binutils does not recognize versions of Texinfo newer than 4.9. Fix this issue by applying the following patch: @@ -55,12 +55,23 @@ cd ../binutils-build Prepare Binutils for compilation: -../binutils-&binutils-version;/configure --prefix=/tools \ - --disable-nls --with-lib-path=/tools/lib +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 The meaning of the new configure options: + + CC="$LFS_TGT-gcc -B/tools/lib/" 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 @@ -78,13 +89,6 @@ cd ../binutils-build make - 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: - -make check - Install the package: make install @@ -96,6 +100,33 @@ cd ../binutils-build 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. + + + + + -- cgit v1.2.3-54-g00ecf