1 | <sect2>
|
---|
2 | <title>Command explanations</title>
|
---|
3 |
|
---|
4 | <para><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;.patch:</userinput>
|
---|
5 | This new patch deals with incorrect handling of weak symbols, the
|
---|
6 | over-optimization of calls to those weak symbols, an atexit issue and
|
---|
7 | the __dso_handle symbol required for atexit's proper function.</para>
|
---|
8 |
|
---|
9 | <para><userinput>make BOOT_LDFLAGS=-static:</userinput>
|
---|
10 | This is the equivalent to make LDFLAGS=-static as we use with other
|
---|
11 | packages to compile them statically.</para>
|
---|
12 |
|
---|
13 | <para><userinput>--prefix=/usr:</userinput> This is NOT a typo. GCC hard
|
---|
14 | codes some paths while compiling and so we need to pass /usr as the
|
---|
15 | prefix during ./configure. We pass the real install prefix during the
|
---|
16 | make install command later.</para>
|
---|
17 |
|
---|
18 | <para><userinput>--enable-languages=c,c++:</userinput> This only builds the C
|
---|
19 | and C++ compilers and not the other available compilers as they are, on
|
---|
20 | the average, not often used. If those other compilers are needed,
|
---|
21 | the --enable-languages parameter can be omitted.</para>
|
---|
22 |
|
---|
23 | <para><userinput>--enable-threads=posix:</userinput> This enables C++
|
---|
24 | exception handling for multithreaded code.</para>
|
---|
25 |
|
---|
26 | <para><userinput>ln -sf ../usr/bin/cpp:</userinput> This
|
---|
27 | creates the $LFS/lib/cpp symlink. Some packages explicitly try to find
|
---|
28 | cpp in /lib.</para>
|
---|
29 |
|
---|
30 | <para><userinput>ln -sf ../bin/cpp:</userinput> This
|
---|
31 | creates the $LFS/usr/lib/cpp symlink as there are packages that expect
|
---|
32 | cpp to be in /usr/lib.</para>
|
---|
33 |
|
---|
34 | <para><userinput>rmdir $LFS/usr/*-gnu/include</userinput> and
|
---|
35 | <userinput>rmdir $LFS/usr/*-gnu</userinput>: These directories are created
|
---|
36 | as empty directories by GCC and serve absolutely no purpose whatsoever.
|
---|
37 | It's related to cross-compilers but that doesn't apply to us and it's
|
---|
38 | considered a bug in GCC that you can't turn that off, especially since they
|
---|
39 | end up being empty directories. So we remove them manually.</para>
|
---|
40 | </sect2>
|
---|
41 |
|
---|