home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 5 / FreshFish_July-August1994.bin / bbs / gnu / gcc-2.5.8-bin.lha / info / gcc.info-6 (.txt) < prev    next >
GNU Info File  |  1994-07-11  |  51KB  |  915 lines

  1. This is Info file gcc.info, produced by Makeinfo-1.55 from the input
  2. file gcc.texi.
  3.    This file documents the use and the internals of the GNU compiler.
  4.    Published by the Free Software Foundation 675 Massachusetts Avenue
  5. Cambridge, MA 02139 USA
  6.    Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
  7.    Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.    Permission is granted to copy and distribute modified versions of
  11. this manual under the conditions for verbatim copying, provided also
  12. that the sections entitled "GNU General Public License" and "Protect
  13. Your Freedom--Fight `Look And Feel'" are included exactly as in the
  14. original, and provided that the entire resulting derived work is
  15. distributed under the terms of a permission notice identical to this
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that the sections entitled "GNU General Public
  19. License" and "Protect Your Freedom--Fight `Look And Feel'", and this
  20. permission notice, may be included in translations approved by the Free
  21. Software Foundation instead of in the original English.
  22. File: gcc.info,  Node: Build Cross,  Prev: Cross Runtime,  Up: Cross-Compiler
  23. Actually Building the Cross-Compiler
  24. ------------------------------------
  25.    Now you can proceed just as for compiling a single-machine compiler
  26. through the step of building stage 1.  If you have not provided some
  27. sort of `libgcc1.a', then compilation will give up at the point where
  28. it needs that file, printing a suitable error message.  If you do
  29. provide `libgcc1.a', then building the compiler will automatically
  30. compile and link a test program called `cross-test'; if you get errors
  31. in the linking, it means that not all of the necessary routines in
  32. `libgcc1.a' are available.
  33.    If you are making a cross-compiler for an embedded system, and there
  34. is no `stdio.h' header for it, then the compilation of `enquire' will
  35. probably fail.  The job of `enquire' is to run on the target machine
  36. and figure out by experiment the nature of its floating point
  37. representation.  `enquire' records its findings in the header file
  38. `float.h'.  If you can't produce this file by running `enquire' on the
  39. target machine, then you will need to come up with a suitable `float.h'
  40. in some other way (or else, avoid using it in your programs).
  41.    Do not try to build stage 2 for a cross-compiler.  It doesn't work to
  42. rebuild GNU CC as a cross-compiler using the cross-compiler, because
  43. that would produce a program that runs on the target machine, not on the
  44. host.  For example, if you compile a 386-to-68030 cross-compiler with
  45. itself, the result will not be right either for the 386 (because it was
  46. compiled into 68030 code) or for the 68030 (because it was configured
  47. for a 386 as the host).  If you want to compile GNU CC into 68030 code,
  48. whether you compile it on a 68030 or with a cross-compiler on a 386, you
  49. must specify a 68030 as the host when you configure it.
  50.    To install the cross-compiler, use `make install', as usual.
  51. File: gcc.info,  Node: PA Install,  Next: Sun Install,  Prev: Cross-Compiler,  Up: Installation
  52. Installing on the HP Precision Architecture
  53. ===========================================
  54.    There are two variants of this CPU, called 1.0 and 1.1, which have
  55. different machine descriptions.  You must use the right one for your
  56. machine.  All 7NN machines and 8N7 machines use 1.1, while all other
  57. 8NN machines use 1.0.
  58.    The easiest way to handle this problem is to use `configure hpNNN'
  59. or `configure hpNNN-hpux', where NNN is the model number of the
  60. machine.  Then `configure' will figure out if the machine is a 1.0 or
  61. 1.1.  Use `uname -a' to find out the model number of your machine.
  62.    `-g' does not work on HP-UX, since that system uses a peculiar
  63. debugging format which GNU CC does not know about.  There are
  64. preliminary versions of GAS and GDB for the HP-PA which do work with
  65. GNU CC for debugging.  You can get them by anonymous ftp from
  66. `jaguar.cs.utah.edu' `dist' subdirectory.  You would need to install
  67. GAS in the file
  68.      /gnu/lib/gcc-lib/CONFIGURATION/GCCVERSION/as
  69. where CONFIGURATION is the configuration name (perhaps `hpNNN-hpux')
  70. and GCCVERSION is the GNU CC version number.  Do this *before* starting
  71. the build process, otherwise you will get errors from the HPUX
  72. assembler while building `libgcc2.a'.  The command
  73.      make install-dir
  74. will create the necessary directory hierarchy so you can install GAS
  75. before building GCC.
  76.    If you obtained GAS before October 6, 1992 it is highly recommended
  77. you get a new one to avoid several bugs which have been discovered
  78. recently.
  79.    To enable debugging, configure GNU CC with the `--gas' option before
  80. building.
  81.    It has been reported that GNU CC produces invalid assembly code for
  82. 1.1 machines running HP-UX 8.02 when using the HP assembler.  Typically
  83. the errors look like this:
  84.      as: bug.s @line#15 [err#1060]
  85.        Argument 0 or 2 in FARG upper
  86.               - lookahead = ARGW1=FR,RTNVAL=GR
  87.      as: foo.s @line#28 [err#1060]
  88.        Argument 0 or 2 in FARG upper
  89.               - lookahead = ARGW1=FR
  90.    You can check the version of HP-UX you are running by executing the
  91. command `uname -r'.   If you are indeed running HP-UX 8.02 on a PA and
  92. using the HP assembler then configure GCC with "hpNNN-hpux8.02".
  93. File: gcc.info,  Node: Sun Install,  Next: 3b1 Install,  Prev: PA Install,  Up: Installation
  94. Installing GNU CC on the Sun
  95. ============================
  96.    On Solaris (version 2.1), do not use the linker or other tools in
  97. `/usr/ucb' to build GNU CC.  Use `/usr/ccs/bin'.
  98.    Make sure the environment variable `FLOAT_OPTION' is not set when
  99. you compile `libgcc.a'.  If this option were set to `f68881' when
  100. `libgcc.a' is compiled, the resulting code would demand to be linked
  101. with a special startup file and would not link properly without special
  102. pains.
  103.    The GNU compiler does not really support the Super SPARC processor
  104. that is used in SPARC Station 10 and similar class machines.  You can
  105. get code that runs by specifying `sparc' as the cpu type; however, its
  106. performance is not very good, and may vary widely according to the
  107. compiler version and optimization options used.  This is because the
  108. instruction scheduling parameters designed for the Sparc are not correct
  109. for the Super SPARC.  Implementing scheduling parameters for the Super
  110. SPARC might be a good project for someone who is willing to learn a
  111. great deal about instruction scheduling in GNU CC.
  112.    There is a bug in `alloca' in certain versions of the Sun library.
  113. To avoid this bug, install the binaries of GNU CC that were compiled by
  114. GNU CC.  They use `alloca' as a built-in function and never the one in
  115. the library.
  116.    Some versions of the Sun compiler crash when compiling GNU CC.  The
  117. problem is a segmentation fault in cpp.  This problem seems to be due to
  118. the bulk of data in the environment variables.  You may be able to avoid
  119. it by using the following command to compile GNU CC with Sun CC:
  120.      make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
  121. File: gcc.info,  Node: 3b1 Install,  Next: Unos Install,  Prev: Sun Install,  Up: Installation
  122. Installing GNU CC on the 3b1
  123. ============================
  124.    Installing GNU CC on the 3b1 is difficult if you do not already have
  125. GNU CC running, due to bugs in the installed C compiler.  However, the
  126. following procedure might work.  We are unable to test it.
  127.   1. Comment out the `#include "config.h"' line on line 37 of `cccp.c'
  128.      and do `make cpp'.  This makes a preliminary version of GNU cpp.
  129.   2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that
  130.      file name.
  131.   3. Undo your change in `cccp.c', or reinstall the original version,
  132.      and do `make cpp' again.
  133.   4. Copy this final version of GNU cpp into `/lib/cpp'.
  134.   5. Replace every occurrence of `obstack_free' in the file `tree.c'
  135.      with `_obstack_free'.
  136.   6. Run `make' to get the first-stage GNU CC.
  137.   7. Reinstall the original version of `/lib/cpp'.
  138.   8. Now you can compile GNU CC with itself and install it