gcc-exp.xml 1.1 KB

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