[6370fa6] | 1 | <sect2>
|
---|
| 2 | <title>Command explanations</title>
|
---|
| 3 |
|
---|
[2c094d6] | 4 | <para><userinput>--prefix=/static:</userinput> This is NOT a typo. GCC hard
|
---|
[da20dc6] | 5 | codes some paths while compiling and so we need to pass /static as the
|
---|
[2c094d6] | 6 | prefix during ./configure. We pass the real install prefix during the
|
---|
[f36a666] | 7 | make install command later.</para>
|
---|
| 8 |
|
---|
[8b8f29ab] | 9 | <para><userinput>--with-as and --with-ld:</userinput> GCC can be
|
---|
| 10 | miscompiled if your host distribution's Binutils package is quite old. We
|
---|
| 11 | need a good working static GCC until we reinstall GCC later in chapter 6.
|
---|
| 12 | So by using <filename>as</filename> and <filename>ld</filename> from the
|
---|
| 13 | Binutils package we just compiled we ensure that GCC will work
|
---|
| 14 | correctly.</para>
|
---|
[6f9d1a9] | 15 |
|
---|
[8f93b15] | 16 | <para><userinput>make BOOT_LDFLAGS="-static":</userinput>
|
---|
| 17 | This is the equivalent to make LDFLAGS="-static" as we use with other
|
---|
[6f9d1a9] | 18 | packages to compile them statically.</para>
|
---|
[fde5bc7] | 19 |
|
---|
[8b8f29ab] | 20 | <para><userinput>make install-no-fixedincludes:</userinput>
|
---|
[72bab45] | 21 | This prevents the fixincludes script from running. Preventing this is
|
---|
| 22 | necessary because under normal circumstances the GCC installation will run
|
---|
| 23 | the fixincludes script which scans your system for header files that need to
|
---|
| 24 | be fixed. It might find that the Glibc header files of your host system need
|
---|
| 25 | to be fixed. If so, it will fix them and put them in
|
---|
| 26 | <filename>$LFS/static/lib/gcc-lib/i686-pc-linux-gnu/3.2</filename>.
|
---|
| 27 | Later on in chapter 6 you will install Glibc which will put its header
|
---|
| 28 | files in <filename>/usr/include</filename>. Next you will install other
|
---|
| 29 | programs that use the Glibc headers. GCC will look in
|
---|
| 30 | <filename>/static/lib/gcc-lib</filename> before looking in
|
---|
| 31 | <filename>/usr/include</filename>, with the result of finding and using
|
---|
| 32 | the fixed Glibc header files from your host distribution, which are probably
|
---|
| 33 | incompatible with the Glibc version actually used on the LFS system.</para>
|
---|
[8b8f29ab] | 34 |
|
---|
[c18d261] | 35 | <para><userinput>ln -s gcc $LFS/static/bin/cc:</userinput> This
|
---|
[695ae0bc] | 36 | creates the $LFS/static/bin/gcc symlink, which some packages need.</para>
|
---|
[6370fa6] | 37 |
|
---|
| 38 | </sect2>
|
---|