gcc-exp.xml 1.3 KB

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