1 | <sect2>
|
---|
2 | <title>Command explanations</title>
|
---|
3 |
|
---|
4 | <para><userinput>--prefix=/static:</userinput> This is NOT a typo. GCC hard
|
---|
5 | codes some paths while compiling and so we need to pass /static as the
|
---|
6 | prefix during ./configure. We pass the real install prefix during the
|
---|
7 | make install command later.</para>
|
---|
8 |
|
---|
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>
|
---|
15 |
|
---|
16 | <para><userinput>make BOOT_LDFLAGS="-static":</userinput>
|
---|
17 | This is the equivalent to make LDFLAGS="-static" as we use with other
|
---|
18 | packages to compile them statically.</para>
|
---|
19 |
|
---|
20 | <para><userinput>make install-no-fixedincludes:</userinput>
|
---|
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>
|
---|
34 |
|
---|
35 | <para><userinput>ln -s gcc $LFS/static/bin/cc:</userinput> This
|
---|
36 | creates the $LFS/static/bin/gcc symlink, which some packages need.</para>
|
---|
37 |
|
---|
38 | </sect2>
|
---|