gcc-inst.xml 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <sect2>
  2. <title>Installation of GCC</title>
  3. <para>
  4. Install GCC by running the following commands. These commands will build
  5. the C and C++ compiler. Other compilers are available within the gcc
  6. package. If you want to build all the other availble compilers too,
  7. leave out the --enable-languages=c,c++ option in the configure command.
  8. See the GCC documentation for more details on which additional compilers
  9. are available.
  10. </para>
  11. <para>
  12. Note: the build of other compilers is not tested by the people
  13. who actively work on LFS.
  14. </para>
  15. <blockquote><literallayout>
  16. <userinput>mkdir /usr/src/gcc-build &amp;&amp;</userinput>
  17. <userinput>cd /usr/src/gcc-build &amp;&amp;</userinput>
  18. <userinput>../gcc-&gcc-version;/configure --prefix=/usr \</userinput>
  19. <userinput>&nbsp;&nbsp;&nbsp;--with-slibdir=/lib
  20. --enable-shared \</userinput>
  21. <userinput>&nbsp;&nbsp;&nbsp;--enable-languages=c,c++
  22. &amp;&amp;</userinput>
  23. <userinput>make bootstrap &amp;&amp;</userinput>
  24. <userinput>make install</userinput>
  25. </literallayout></blockquote>
  26. </sect2>