--- gcc/INSTALL 2018/04/24 16:38:01 1.1.1.1 +++ gcc/INSTALL 2018/04/24 16:41:07 1.1.1.3 @@ -11,16 +11,18 @@ Installing GNU CC Here is the procedure for installing GNU CC on a Unix system. - * Menu: * VMS Install:: See below for installation on VMS. - 1. Edit `Makefile'. If you are using HPUX, you must make a few changes - described in comments at the beginning of the file. + 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. + + 2. On a Sequent system, go to the Berkeley universe. - 2. Choose configuration files. + 3. Choose configuration files. * Make a symbolic link named `config.h' to the top-level config file for the machine you are using (*Note Config::.). This file @@ -53,11 +55,24 @@ Here is the procedure for installing GNU this mode of operation are as yet in distribution; full instructions will appear here in the future. + For the vax, use `tm-vax.h' on Unix, or `tm-vms.h' on VMS. + + For the SPARC, use `tm-sparc.h'. Note that the SPARC support + *has a fatal bug*; to use it, you will have to debug it. + For the 32000, use `tm-sequent.h' if you are using a Sequent - machine; otherwise, use `tm-ns32k.h'. + machine, or `tm-encore.h' for an Encore machine; otherwise, + perhaps `tm-ns32k.h' will work for you. If you are trying to use + GNU CC on GENIX, you may need to get the version of `malloc' from + GNU Emacs instead of the system library version, and you probably + need to cause the following assembler code to be executed in + `crt0.o' in order to run the GNU CC output: + + lprd sb,$0 + sprd mod,r0 + movqd $0,0(r0) - For the vax, use `tm-vax.h' on BSD Unix, `tm-ultrix.h' on Ultrix, - or `tm-vms.h' on VMS. + Note that Encore systems are supported only under BSD. * Make a symbolic link named `md' to the machine description pattern file (its name should be `MACHINE.md'). @@ -66,45 +81,43 @@ Here is the procedure for installing GNU subroutine file for your machine (its name should be `OUTPUT-MACHINE.c'). - 3. Make sure the Bison parser generator is installed. (This is unnecessary - if the Bison output file `parse.tab.c' is more recent than `parse.y' - and you do not plan to change `parse.y'.) + 4. Make sure the Bison parser generator is installed. (This is unnecessary + if the Bison output files `parse.tab.c' and `cexp.c' are more recent + than `parse.y' and `cexp.y' and you do not plan to change the `.y' + files.) Note that if you have an old version of Bison you may get an error from the line with the `%expect' directive. If so, simply remove that line from `parse.y' and proceed. - 4. If you are using a Sun, make sure the environment variable + 5. If you are using a Sun, make sure the environment variable `FLOAT_OPTION' is not set. If this option were set to `f68881' when `gnulib' is compiled, the resulting code would demand to be linked with a special startup file and will not link properly without special pains. - 5. Build the compiler. Just type `make' in the compiler directory. + 6. Build the compiler. Just type `make' in the compiler directory. - 6. Move the first-stage object files and executables into a subdirectory + 7. Move the first-stage object files and executables into a subdirectory with this command: make stage1 - The files are moved into a subdirectory named `stage1'. Once installation is complete, you may wish to delete these files with `rm -r stage1'. - 7. Recompile the compiler with itself, with this command: + 8. Recompile the compiler with itself, with this command: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" - 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: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float" - - 8. If you wish to test the compiler by compiling it with itself one more + 9. If you wish to test the compiler by compiling it with itself one more time, do this: make stage2 @@ -113,19 +126,17 @@ Here is the procedure for installing GNU cmp $file stage2/$file end - This will notify you if any of these stage 3 object files differs from those of stage 2. Any difference, no matter how innocuous, indicates that the stage 2 compiler has compiled GNU CC incorrectly, and is therefore a potentially serious bug which you should investigate and report (*Note Bugs::.). - 9. Install the compiler driver, the compiler's passes and run-time support. - You can use the following command: + 10. Install the compiler driver, the compiler's passes and run-time support. + You can use the following command: make install - This copies the files `cc1', `cpp' and `gnulib' to files `gcc-cc1', `gcc-cpp' and `gcc-gnulib' in directory `/usr/local/lib', which is where the compiler driver program looks for them. It also copies the @@ -146,12 +157,12 @@ Here is the procedure for installing GNU Alternatively, on Sun systems and 4.3BSD at least, you can correct the include files by running the shell script `fixincludes'. This - installs modified, corrected copies of the files `ioctl.h' and - `ttychars.h' in a special directory where only GNU CC will normally - look for them. + installs modified, corrected copies of the files `ioctl.h', + `ttychars.h' and many others, in a special directory where only GNU CC + will normally look for them. - The file `/usr/include/vaxuba/qvioctl.h' used in the X window system - needs a similar correction. + See the file `fixincludes' for a list of all the files we know to + require correction. 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 @@ -159,14 +170,52 @@ prefix by which they may be found. The with the names `cpp', `cc1' and `gnulib'. Thus, you can put the files in a directory `/usr/foo/gcc' and specify `-B/usr/foo/gcc/' when you run GNU CC. +Also, you can specify an alternative default directory for these files by +setting the Make variable `libdir' when you make GNU CC. + + +File: internals, Node: VMS Install, Prev: Installation, Up: Installation + Installing GNU CC on VMS ======================== -The VMS version of GNU CC is normally distributed as a Backup saveset, so -the only installation required is to copy the files. But here is how to -rebuild GNU CC if you change it: +The VMS version of GNU CC is distributed in an unusual tape format which +consists of several tape files. The first is a command file; the second is +an executable program which reads Unix tar format; the third is another +command file which uses this program to read the remainder of the tape. + +To load the tape, it suffices to mount it `/foreign' and then do `@mta0:' +to execute the command file at the beginning of the tape. + +The tape contains executables and object files as well as sources, so no +compilation is necessary unless you change the sources. (This is a good +thing, since you probably don't have any other C compiler.) If you must +recompile, here is how: 1. Copy the file `tm-vms.h' to `tm.h', `config-vms.h' to `config.h', `vax.md' to `md.' and `output-vax.c' to `aux-output.c'. 2. Type `@make' to do recompile everything. + +To install the `GCC' command so you can use the compiler easily, in the +same manner as you use the VMS C compiler, you must install the VMS CLD +file for GNU CC as follows: + + 1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to point to + the directories where the GNU CC executables (`gcc-cpp', `gcc-cc1', + etc.) and the C include files are kept. This should be done with the + commands: + + $ assign /super /system disk:[gcc] gnu_cc + $ assign /super /system disk:[gcc.include] gnu_cc_include + + with the appropriate disk and directory names. These commands can be + placed in your system startup file so they will be executed whenever + the machine is rebooted. + + 2. Install the `GCC' command with the command line: + + $ set command /table=sys$library:dcltables gnu_cc:gcc + + Now you can invoke the compiler with a command like `gcc /verbose + file.c', which is equivalent to the command `gcc -v -c file.c' in Unix.