gcc-2953-inst.xml 1.5 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <sect2><title>&nbsp;</title><para>&nbsp;</para></sect2>
  2. <sect2>
  3. <title>Installation of GCC</title>
  4. <para>This package is known to behave badly when you have changed its
  5. default optimization flags (including the -march and -mcpu options).
  6. Therefore, if you have defined any environment variables that override
  7. default optimizations, such as CFLAGS and CXXFLAGS, we recommend unsetting
  8. or modifying them when building GCC.</para>
  9. <para>This is an older release of GCC which we are going to install for the
  10. purpose of compiling the Linux kernel in Chapter 8. This version is recommended
  11. by the kernel developers when you need absolute stability. Later versions of
  12. GCC have not received as much testing for Linux kernel compilation. Using a
  13. later version is likely to work, however, we recommend adhering to the kernel
  14. developer's advice and using the version here to compile your kernel.</para>
  15. <para>We'll install this older release of GCC into the non-standard prefix of
  16. <filename class="directory">/opt</filename> so as to avoid interfering with
  17. the system GCC already installed in <filename class="directory">/usr</filename>
  18. .</para>
  19. <para><screen><userinput>patch -Np1 -i ../gcc-2.95.3-2.patch
  20. patch -Np1 -i ../gcc-2.95.3-returntype-fix.patch
  21. echo timestamp > gcc/cstamp-h.in
  22. mkdir ../gcc-2-build
  23. cd ../gcc-2-build
  24. ../gcc-2.95.3/configure --prefix=/opt/gcc-2.95.3 \
  25. &nbsp;&nbsp;&nbsp;&nbsp;--enable-shared --enable-languages=c \
  26. &nbsp;&nbsp;&nbsp;&nbsp;--enable-threads=posix
  27. make bootstrap
  28. make install</userinput></screen></para>
  29. </sect2>