home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
gnu
/
info
/
gcc.info-6
(
.txt
)
< prev
next >
Wrap
GNU Info File
|
1994-07-11
|
51KB
|
915 lines
This is Info file gcc.info, produced by Makeinfo-1.55 from the input
file gcc.texi.
This file documents the use and the internals of the GNU compiler.
Published by the Free Software Foundation 675 Massachusetts Avenue
Cambridge, MA 02139 USA
Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided also
that the sections entitled "GNU General Public License" and "Protect
Your Freedom--Fight `Look And Feel'" are included exactly as in the
original, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that the sections entitled "GNU General Public
License" and "Protect Your Freedom--Fight `Look And Feel'", and this
permission notice, may be included in translations approved by the Free
Software Foundation instead of in the original English.
File: gcc.info, Node: Build Cross, Prev: Cross Runtime, Up: Cross-Compiler
Actually Building the Cross-Compiler
------------------------------------
Now you can proceed just as for compiling a single-machine compiler
through the step of building stage 1. If you have not provided some
sort of `libgcc1.a', then compilation will give up at the point where
it needs that file, printing a suitable error message. If you do
provide `libgcc1.a', then building the compiler will automatically
compile and link a test program called `cross-test'; if you get errors
in the linking, it means that not all of the necessary routines in
`libgcc1.a' are available.
If you are making a cross-compiler for an embedded system, and there
is no `stdio.h' header for it, then the compilation of `enquire' will
probably fail. The job of `enquire' is to run on the target machine
and figure out by experiment the nature of its floating point
representation. `enquire' records its findings in the header file
`float.h'. If you can't produce this file by running `enquire' on the
target machine, then you will need to come up with a suitable `float.h'
in some other way (or else, avoid using it in your programs).
Do not try to build stage 2 for a cross-compiler. It doesn't work to
rebuild GNU CC as a cross-compiler using the cross-compiler, because
that would produce a program that runs on the target machine, not on the
host. For example, if you compile a 386-to-68030 cross-compiler with
itself, the result will not be right either for the 386 (because it was
compiled into 68030 code) or for the 68030 (because it was configured
for a 386 as the host). If you want to compile GNU CC into 68030 code,
whether you compile it on a 68030 or with a cross-compiler on a 386, you
must specify a 68030 as the host when you configure it.
To install the cross-compiler, use `make install', as usual.
File: gcc.info, Node: PA Install, Next: Sun Install, Prev: Cross-Compiler, Up: Installation
Installing on the HP Precision Architecture
===========================================
There are two variants of this CPU, called 1.0 and 1.1, which have
different machine descriptions. You must use the right one for your
machine. All 7NN machines and 8N7 machines use 1.1, while all other
8NN machines use 1.0.
The easiest way to handle this problem is to use `configure hpNNN'
or `configure hpNNN-hpux', where NNN is the model number of the
machine. Then `configure' will figure out if the machine is a 1.0 or
1.1. Use `uname -a' to find out the model number of your machine.
`-g' does not work on HP-UX, since that system uses a peculiar
debugging format which GNU CC does not know about. There are
preliminary versions of GAS and GDB for the HP-PA which do work with
GNU CC for debugging. You can get them by anonymous ftp from
`jaguar.cs.utah.edu' `dist' subdirectory. You would need to install
GAS in the file
/gnu/lib/gcc-lib/CONFIGURATION/GCCVERSION/as
where CONFIGURATION is the configuration name (perhaps `hpNNN-hpux')
and GCCVERSION is the GNU CC version number. Do this *before* starting
the build process, otherwise you will get errors from the HPUX
assembler while building `libgcc2.a'. The command
make install-dir
will create the necessary directory hierarchy so you can install GAS
before building GCC.
If you obtained GAS before October 6, 1992 it is highly recommended
you get a new one to avoid several bugs which have been discovered
recently.
To enable debugging, configure GNU CC with the `--gas' option before
building.
It has been reported that GNU CC produces invalid assembly code for
1.1 machines running HP-UX 8.02 when using the HP assembler. Typically
the errors look like this:
as: bug.s @line#15 [err#1060]
Argument 0 or 2 in FARG upper
- lookahead = ARGW1=FR,RTNVAL=GR
as: foo.s @line#28 [err#1060]
Argument 0 or 2 in FARG upper
- lookahead = ARGW1=FR
You can check the version of HP-UX you are running by executing the
command `uname -r'. If you are indeed running HP-UX 8.02 on a PA and
using the HP assembler then configure GCC with "hpNNN-hpux8.02".
File: gcc.info, Node: Sun Install, Next: 3b1 Install, Prev: PA Install, Up: Installation
Installing GNU CC on the Sun
============================
On Solaris (version 2.1), do not use the linker or other tools in
`/usr/ucb' to build GNU CC. Use `/usr/ccs/bin'.
Make sure the environment variable `FLOAT_OPTION' is not set when
you compile `libgcc.a'. If this option were set to `f68881' when
`libgcc.a' is compiled, the resulting code would demand to be linked
with a special startup file and would not link properly without special
pains.
The GNU compiler does not really support the Super SPARC processor
that is used in SPARC Station 10 and similar class machines. You can
get code that runs by specifying `sparc' as the cpu type; however, its
performance is not very good, and may vary widely according to the
compiler version and optimization options used. This is because the
instruction scheduling parameters designed for the Sparc are not correct
for the Super SPARC. Implementing scheduling parameters for the Super
SPARC might be a good project for someone who is willing to learn a
great deal about instruction scheduling in GNU CC.
There is a bug in `alloca' in certain versions of the Sun library.
To avoid this bug, install the binaries of GNU CC that were compiled by
GNU CC. They use `alloca' as a built-in function and never the one in
the library.
Some versions of the Sun compiler crash when compiling GNU CC. The
problem is a segmentation fault in cpp. This problem seems to be due to
the bulk of data in the environment variables. You may be able to avoid
it by using the following command to compile GNU CC with Sun CC:
make CC="TERMCAP=x OBJS=x LIBFUNCS=x STAGESTUFF=x cc"
File: gcc.info, Node: 3b1 Install, Next: Unos Install, Prev: Sun Install, Up: Installation
Installing GNU CC on the 3b1
============================
Installing GNU CC on the 3b1 is difficult if you do not already have
GNU CC running, due to bugs in the installed C compiler. However, the
following procedure might work. We are unable to test it.
1. Comment out the `#include "config.h"' line on line 37 of `cccp.c'
and do `make cpp'. This makes a preliminary version of GNU cpp.
2. Save the old `/lib/cpp' and copy the preliminary GNU cpp to that
file name.
3. Undo your change in `cccp.c', or reinstall the original version,
and do `make cpp' again.
4. Copy this final version of GNU cpp into `/lib/cpp'.
5. Replace every occurrence of `obstack_free' in the file `tree.c'
with `_obstack_free'.
6. Run `make' to get the first-stage GNU CC.
7. Reinstall the original version of `/lib/cpp'.
8. Now you can compile GNU CC with itself and install it