2 <title>Command explanations</title>
4 <para><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;.patch:</userinput>
5 This patch fixes a few bugs. See
6 <ulink url="http://www.zipworld.com.au/~gschafer/lfs-tweaks.html"/> for
9 <para><userinput>--prefix=/static:</userinput> This is NOT a typo. GCC hard
10 codes some paths while compiling and so we need to pass /static as the
11 prefix during ./configure. We pass the real install prefix during the
12 make install command later.</para>
14 <para><userinput>--enable-languages=c:</userinput> This builds the C
15 compiler. The C++ compiler will be built in chapter 6, when we rebuild
16 GCC. Other compilers are available as well. If they are needed,
17 the --enable-languages parameter may be omitted.</para>
19 <para><userinput>--enable-threads=posix:</userinput> This enables C++
20 exception handling for multithreaded code.</para>
22 <para><userinput>echo "#define HAVE_GAS_HIDDEN 1":</userinput>
23 This defines the .hidden assembler directive so that we don't build
24 a faulty Glibc later on.</para>
26 <para><userinput>make BOOT_LDFLAGS=-static:</userinput>
27 This is the equivalent to make LDFLAGS=-static as we use with other
28 packages to compile them statically.</para>
30 <para><userinput>ln -s gcc $LFS/static/bin/cc:</userinput> This
31 creates the $LFS/static/bin/gcc symlink which some packages need.</para>