--- gcc/INSTALL 2018/04/24 16:52:40 1.1.1.12 +++ gcc/INSTALL 2018/04/24 16:57:31 1.1.1.15 @@ -1,4 +1,4 @@ -This is a copy of one node from the Info file gcc.info-2. +This is a copy of one node from the Info file gcc.info-3. For full information on installing and porting GCC, refer to the GCC manual: @@ -16,11 +16,16 @@ Here is the procedure for installing GNU * Other Dir:: Compiling in a separate directory (not where the source is). * Sun Install:: See below for installation on the Sun. * 3B1 Install:: See below for installation on the 3B1. +* SCO Install:: See below for installation on SCO System V 3.2. (Or ESIX.) * VMS Install:: See below for installation on VMS. +* HPUX Install:: See below for installation on HPUX. +* MIPS Install:: See below for installation on MIPS. +* Tower Install:: See below for installation on an NCR Tower. 1. Edit `Makefile'. If you are using HPUX, or any form of system V, you must make a few changes described in comments at the - beginning of the file. Genix requires changes also. + beginning of the file. Genix requires changes also, and so does + the Pyramid. 2. On a Sequent system, go to the Berkeley universe. @@ -85,7 +90,7 @@ Here is the procedure for installing GNU (sparc). `sun386' - Sun 386 (``roadrunner''). + Sun 386 ("roadrunner"). `alliant' Alliant FX/8 computer. Note that the standard installed C @@ -94,7 +99,7 @@ Here is the procedure for installing GNU as follows: cp /bin/pcc ./pcc - adb -w ./pcc - << 'EOF' + adb -w ./pcc - << EOF 15f6?w 6610 EOF @@ -110,7 +115,7 @@ Here is the procedure for installing GNU The tahoe computer (running BSD, and using DBX). `decstation' - The DEC 3100 Mips machine (``pmax''). Note that GNU CC + The DEC 3100 Mips machine ("pmax"). Note that GNU CC cannot generate debugging information in the unusual format used on the Mips. @@ -130,9 +135,9 @@ Here is the procedure for installing GNU on the Mips. `iris' - The Mips computer, as delivered by Iris. Note that GNU CC - cannot generate debugging information in the unusual format - used on the Mips. + Another variant of the Mips computer, the Silicon Graphics + Iris 4D. Note that GNU CC cannot generate debugging + information in the unusual format used on the Mips. `convex-c1' Convex C1 computer. @@ -151,7 +156,7 @@ Here is the procedure for installing GNU `hp9k320-gas' HP 9000 series 300 using GNU assembler, linker and debugger. This requires the HP-adapt package, which is available - along with the GNU linker as part of the ``binutils'' + along with the GNU linker as part of the "binutils" distribution. This is on the GNU CC distribution tape. `hp9k320-old' @@ -175,6 +180,9 @@ Here is the procedure for installing GNU `next' NeXT system. + `tower' + NCR Tower 32 system. + `altos' Altos 3068. Note that you must use the GNU assembler, linker and debugger, with COFF-encapsulation. Also, you @@ -187,6 +195,9 @@ Here is the procedure for installing GNU Install::. You can bootstrap it more easily with previous versions of GNU CC if you have them. + `3b1-gas' + AT&T 3b1 using the GNU assembler. + `sequent-ns32k' Sequent containing ns32000 processors. @@ -281,13 +292,16 @@ Here is the procedure for installing GNU yet in distribution; full instructions will appear here in the future. + `tm-tower-as.h' + for NCR Tower 32 systems, using the standard system + assembler. + For the vax, use `tm-vax.h' on BSD Unix, `tm-vaxv.h' on system V, or `tm-vms.h' on VMS. For the Motorola 88000, use `tm-m88k.h'. The support for - the 88000 has a few unfinished spots because there was no - way to run the output. Bugs are suspected in handling of - branch-tables and in the function prologue and epilogue. + the 88000 does not currently work; it requires extensive + changes which we hope to reconcile in version 2. For the 80386, don't use `tm-i386.h' directly. Use `tm-i386v.h' if the target machine is running system V, @@ -316,6 +330,15 @@ Here is the procedure for installing GNU For Sparc (Sun 4) machines, use `tm-sparc.h' with operating system version 4, and `tm-sun4os3.h' with system version 3. + For Convex systems before version 8.1, use `tm-conv1os7.h' + or `tm-conv2os7.h'. For versions 8.1 and greater, use + `tm-convex1.h' or `tm-convex2.h'. You should also + bootstrap GCC with `pcc' rather than `cc'; one way to do + this is with the following commands. + + ln -s /bin/pcc ./cc + set path = (. $path) + * Make a symbolic link named `md' to the machine description pattern file. It should be in the `config' subdirectory and its name should be `MACHINE.md'; but MACHINE is often @@ -331,21 +354,31 @@ Here is the procedure for installing GNU `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you do not plan to change the `.y' files.) - Bison versions older that Sept 8, 1988 will produce incorrect + Bison versions older than Sept 8, 1988 will produce incorrect output for `c-parse.tab.c'. - 5. Build the compiler. Just type `make' in the compiler directory. + 5. If you have a previous version of GCC installed, then chances + are you can compile the new version with that. Do the following: - Ignore any warnings you may see about ``statement not reached'' - in the `insn-emit.c'; they are normal. Any other compilation + make CC="gcc -O" + + Since this produces an optimized executable right away, there is + no need to bootstrap the result with itself except to test it. + Therefore, you can skip directly to the `make install' step below. + + 6. Build the compiler. Just type `make' in the compiler directory. + + Ignore any warnings you may see about "statement not reached" in + the `insn-emit.c'; they are normal. Any other compilation errors may represent bugs in the port to your machine or operating system, and should be investigated and reported (*note Bugs::.). - 6. Optionally, install the library functions for 64-bit integer - arithmetic. You do this with the command `make gnulib2'. In - the future this will happen automatically; for now, it is - optional, until we are sure it works on all machines. + Some commercial compilers fail to compile GNU CC because they + have bugs or limitations. For example, the Microsoft compiler + is said to run out of macro space. Some Ultrix compilers run + out of expression space; then you need to break up the statement + where the problem happens. 7. If you are using COFF-encapsulation, you must convert `gnulib' to a GNU-format library at this point. See the file @@ -365,6 +398,8 @@ Here is the procedure for installing GNU make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" + This is called making the stage 2 compiler. + On a 68000 or 68020 system lacking floating point hardware, unless you have selected a `tm.h' file that expects by default that there is no such hardware, do this instead: @@ -380,8 +415,9 @@ Here is the procedure for installing GNU cmp $file stage2/$file end - Aside from the `-B' option, the options should be the same as - when you made stage 2. + This is called making the stage 3 compiler. Aside from the `-B' + option, the options should be the same as when you made the + stage 2 compiler. The `foreach' command (written in C shell) will notify you if any of these stage 3 object files differs from those of stage 2. @@ -396,11 +432,14 @@ Here is the procedure for installing GNU for file in *.o; do echo $file - tail +10 $file > foo1 - tail +10 stage2/$file > foo2 + tail +10c $file > foo1 + tail +10c stage2/$file > foo2 cmp foo1 foo2 done + On MIPS machines, you should use the shell script `ecoff-cmp' to + compare two object files. + 11. Install the compiler driver, the compiler's passes and run-time support. You can use the following command: @@ -440,6 +479,18 @@ Here is the procedure for installing GNU by searching all the system headers for the problem cases that we know about. + Use the following command to do this: + + make includes + + If you selected a different directory for GNU CC installation + when you installed it, by specifying the Make variable `prefix' + or `libdir', specify it the same way in this command. + + Note that some systems are starting to come with ANSI C system + header files. On these systems, don't run `fixincludes'; it may + not work, and is certainly not necessary. + If you cannot install the compiler's passes and run-time support in `/usr/local/lib', you can alternatively use the `-B' option to specify a prefix by which they may be found. The compiler @@ -504,18 +555,35 @@ To avoid this bug, install the binaries 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: +Some versions of the Sun compiler crash when compiling GNU CC, with a +segmentation fault in cpp. This can sometimes 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" +Another problem that often happens on Suns is that you get a crash +when building stage 2, when `genflags' is run. + +One reason for such as crash is if you configured GNU CC for the +wrong version of SunOS. Starting with version 1.38, configurations +`sun3' and `sun4' are for SunOS 4, so this problem should no longer +happen. + +Another cause of the same symptom is having installed the GNU linker +with an earlier version of SunOS. The version that worked before +stopped working due to a change in the format of executables in SunOS +4.1. Many sites have installed the GNU linker as +`/usr/local/lib/gcc-ld', often as part of installing GNU C++. So if +you get such crashes and you have used the proper configuration, try +deleting `/usr/local/lib/gcc-ld'. + +The current version of the GNU linker, found in the current binutils +release, does work with SunOS 4.1. +  -File: gcc.info, Node: 3b1 Install, Next: VMS Install, Prev: Sun Install, Up: Installation +File: gcc.info, Node: 3b1 Install, Next: SCO Install, Prev: Sun Install, Up: Installation Installing GNU CC on the 3b1 ============================ @@ -536,7 +604,7 @@ the following procedure might work. We 4. Copy this final version of GNU cpp into `/lib/cpp'. - 5. Replace every occurance of `obstack_free' in `tree.c' with + 5. Replace every occurrence of `obstack_free' in `tree.c' with `_obstack_free'. 6. Run `make' to get the first-stage GNU CC. @@ -546,9 +614,39 @@ the following procedure might work. We 8. Now you can compile GNU CC with itself and install it in the normal fashion. +If you have installed an earlier version of GCC, you can compile the +newer version with that. However, you will run into trouble +compiling `gnulib', since that is normally compiled with CC. To +solve the problem, uncomment this line in `Makefile': + + CCLIBFLAGS = -B/usr/local/lib/gcc- -tp -Wp,-traditional +  -File: gcc.info, Node: VMS Install, Prev: 3B1 Install, Up: Installation +File: gcc.info, Node: SCO Install, Next: VMS Install, Prev: 3B1 Install, Up: Installation + +Installing GNU CC on SCO System V 3.2 +===================================== + +The compiler that comes with this system does not work properly with +`-O'. Therefore, you should redefine the Make variable `CCLIBFLAGS' +not to use `-O'. + +You should also edit `Makefile' to enable the lines that set `CLIB' +to `-lPW', and the ones specifically labeled as being for SCO, that +set `RANLIB', and that set `CC' and `OLDCC' to `rcc'. + +Also, edit the definition of `USER_H' to remove the file `limits.h'. + +Then you can run `config.gcc i386-sco' and finish building GNU CC +normally. + +The same recipe should work on ESIX, but use `config.gcc i386-esix' +instead. + + + +File: gcc.info, Node: VMS Install, Next: HPUX Install, Prev: SCO Install, Up: Installation Installing GNU CC on VMS ======================== @@ -622,12 +720,84 @@ get to recompile the sources. If you mu `inline'.) Once you have a working 1.33 or newer GNU CC, you can change this file back. -There is a known problem on VMS: `const' global variables don't work -compatibly with the VMS C compiler; we don't know a way to get them -to the linker properly. - -Note that GNU CC on VMS does not generate debugging information to -describe the program's symbols. It is not straightforward to -implement this, and we have no time to spend on it, but we might -consent to install a very modular implementation if you write it. -You will probably have to modify GAS as well as GNU CC. +With this version of GNU CC, `const' global variables now work +properly. Unless, however, the `const' modifier is also specified in +every external declaration of the variable in all of the source files +that use that variable, the linker will issue warnings about +conflicting attributes for the variable, since the linker does not +know if the variable should be read-only. The program will still +work, but the variable will be placed in writable storage. + +Under previous versions of GNU CC, the generated code would +occasionally give strange results when linked to the sharable +`VAXCRTL' library. Now this should work. + +Even with this version, however, GNU CC itself should not be linked +to the sharable `VAXCRTL', unless you force the linker to use the +`qsort' routine from `gcclib.olb'. The `qsort' routine supplied with +`VAXCRTL' has a bug which causes a compiler crash. The executable +that is generated by `make-cc1.com' uses the non-shared version of +`VAXCRTL' (and thus the `qsort' routine from `gcclib.olb'). + +Note that GNU CC on VMS now generates debugging information to +describe the programs symbols to the VMS debugger. However, you need +version 1.37 or later of GAS in order to output them properly in the +object file. + + + +File: gcc.info, Node: HPUX Install, Next: MIPS Install, Prev: VMS Install, Up: Installation + +Installing GNU CC on HPUX +========================= + +To install GNU CC on HPUX, you must start by editing the file +`Makefile'. Search for the string `HPUX' to find comments saying +what to change. You need to change some variable definitions and (if +you are using GAS) some lines in the rule for the target `gnulib'. + +To avoid errors when linking programs with `-g', create an empty +library named `libg.a'. An easy way to do this is: + + ar rc /usr/local/lib/libg.a + +To compile with the HPUX C compiler, you must specify get the file +`alloca.c' from GNU Emacs. Then, when you run `make', use this +argument: + + make ALLOCA=alloca.o + +When recompiling GNU CC with itself, do not define `ALLOCA'. +Instead, an `-I' option needs to be added to `CFLAGS' as follows: + + make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -I../binutils/hp-include" + + + +File: gcc.info, Node: MIPS Install, Next: Tower Install, Prev: HPUX Install, Up: Installation + +Installing GNU CC on MIPS +========================= + +To avoid errors when linking programs with `-g', create an empty +library named `libg.a'. An easy way to do this is: + + ar rc /usr/local/lib/libg.a + + + +File: gcc.info, Node: Tower Install, Prev: MIPS Install, Up: Installation + +Installing GNU CC on an NCR Tower +================================= + +On an NCR Tower model 4x0 or 6x0, you may have trouble because the +default maximum virtual address size of a process is just 1 Mb. Most +often you will find this problem while compiling GNU CC with itself. + +The only way to solve the problem is to reconfigure the kernel. Add +a line such as this to the configuration file: + + MAXUMEM = 4096 + +and then relink the kernel and reboot the machine.