gcc-exp.xml 1.8 KB

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