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 fixed header files from being installed. This is needed
|
---|
22 | because under normal circumstances the GCC installation will run the
|
---|
23 | fixincludes scripts which scans your system for header files that need to be
|
---|
24 | fixed. Say it finds Glibc header files. It will fix them and will end up in
|
---|
25 | $LFS/static/lib/gcc-lib/i686-pc-linux-gnu/ Later on in chapter 6 you
|
---|
26 | will install Glibc which will install header files in /usr/include. Next
|
---|
27 | you will install other programs which will use Glibc headers. GCC will look
|
---|
28 | in /static/lib/gcc-lib before looking in /usr/include, which has the result
|
---|
29 | of Glibc header files from your host distribution being found and used which
|
---|
30 | are probably incompatible with the Glibc version actually in use on the LFS
|
---|
31 | system.</para>
|
---|
32 |
|
---|
33 | <para><userinput>ln -s gcc $LFS/static/bin/cc:</userinput> This
|
---|
34 | creates the $LFS/static/bin/gcc symlink, which some packages need.</para>
|
---|
35 |
|
---|
36 | </sect2>
|
---|