LFS 6.8 (Part 6): Temporary Toolchain Overview

The LFS temporary toolchain is going to take a while to cover completely, so I’m breaking it up into several parts for readability.

The first part of actually building LFS is building a temporary toolchain to prevent contamination from the host environment (in my case, the LFS live CD).

I will build Binutils and GCC twice during the beginning of this process: first to tune them for the hardware I’m using; and second to allow them to refer only to themselves, and not to the liveCD versions. This was the trickiest part of the build for me to understand, but it made sense the more I thought about it. Next, I will build a minimal set of tools that will let me build (and test) my final LFS system.

At several points in this process, I must adjust the temporary toolchain to be more self-referential, until finally I chroot into the final build environment and discard the temporary toolchain.

Before I actually begin building the temporary toolchain, I am going to explain my process for actually building the toolchain, and most of the rest of LFS, so it can be assumed in later entries for brevity’s sake:

  • Since my sources are in /sources (/mnt/lfs/sources during the temporary toolchain build), I will be there to begin with each program build.
  • I will then use tar -zxf on .tar.gz sources and tar -jxf on .tar.bz2 sources to decompress them into their own directory (usually <package-name>-<version>).
  • I will the cd into the newly extracted directories and follow the instructions as given in the book.
  • I will, where possible, use a time { ./configure && make && make install } template so I can give an accurate account of the length of each build (this is slightly deviant from the book, other than the first time I build Binutils for the temporary toolchain).
  • I will then cd back into /sources (again, /mnt/lfs/sources during the temporary toolchain build) and rm -rf the extracted source files and any dedicated build directories. This keeps down the amount of hard disk space needed, especially for a very constrained system like Pressie, and it will ensure a completely clean build for software that I have to build multiple times.

And with these preliminaries, I am ready to build the temporary toolchain.

Advertisements

7 thoughts on “LFS 6.8 (Part 6): Temporary Toolchain Overview

  1. Pingback: LFS 6.8 (Part 7): Temporary Toolchain First Pass and Adjustments « Becoming A Glider

    1. bgbraithwaite Post author

      You’re very welcome! I am enjoying building LFS, and writing out my experiences is forcing me to have a deeper understanding of both the technical and intuitive aspects of Linux than I would have otherwise.

      Reply
  2. Pingback: LFS 6.8 (Part 8): Temporary Toolchain Second Pass « Becoming A Glider

  3. Pingback: LFS 6.8 (Part 9): The First Part of the Rest of the Temporary Toolchain « Becoming A Glider

  4. Pingback: LFS 6.8 (Part 10): The Second Part of the Rest of the Temporary Toolchain « Becoming A Glider

  5. Pingback: LFS 6.8 (Part 11): Tweaking and Backing Up the Temporary Toolchain « Becoming A Glider

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s