gcc-inst.xml 1.3 KB

1234567891011121314151617181920212223242526272829
  1. <sect2>
  2. <title>Installation of GCC</title>
  3. <para>This package is known to behave badly when you have changed its default
  4. optimization flags (including the -march and -mcpu options). GCC is best
  5. left alone, so we recommend you unsetting CFLAGS, CXXFLAGS and other
  6. such variables/settings that would change the default optimization that
  7. it comes with.</para>
  8. <para>Install GCC by running the following commands. These commands will build
  9. the C and C++ compiler. Other compilers are available within the gcc
  10. package. If you want to build all the other availble compilers too,
  11. leave out the --enable-languages=c,c++ option in the configure command.
  12. See the GCC documentation for more details on which additional compilers
  13. are available.</para>
  14. <para>Note: the build of other compilers is not tested by the people
  15. who actively work on LFS.</para>
  16. <para><screen><userinput>patch -Np1 -i ../gcc-&gcc-patch-version;.patch &amp;&amp;</userinput>
  17. <userinput>mkdir ../gcc-build &amp;&amp;</userinput>
  18. <userinput>cd ../gcc-build &amp;&amp;</userinput>
  19. <userinput>../gcc-&gcc-version;/configure --prefix=/usr --enable-shared \</userinput>
  20. <userinput>&nbsp;&nbsp;&nbsp;--enable-languages=c,c++ --enable-threads=posix &amp;&amp;</userinput>
  21. <userinput>make bootstrap &amp;&amp;</userinput>
  22. <userinput>make install</userinput></screen></para>
  23. </sect2>