|
|
1.1.1.10! root 1: This is a copy of one node from the Info file gcc.info-2. 1.1 root 2: For full information on installing and porting GCC, refer to the 1.1.1.6 root 3: GCC manual: 1.1 root 4: 1.1.1.6 root 5: Info file gcc.info 6: TeX output gcc.dvi 7: TeX source gcc.texinfo 8: 1.1 root 9: Installing GNU CC 10: ***************** 11: 12: Here is the procedure for installing GNU CC on a Unix system. 13: 14: * Menu: 15: 16: * VMS Install:: See below for installation on VMS. 17: 1.1.1.4 root 18: 1. Edit `Makefile'. If you are using HPUX, or any form of system 19: V, you must make a few changes described in comments at the 1.1.1.8 root 20: beginning of the file. Genix requires changes also. 1.1.1.2 root 21: 22: 2. On a Sequent system, go to the Berkeley universe. 1.1 root 23: 1.1.1.7 root 24: 3. Choose configuration files. The easy way to do this is to run 25: the command file `config.gcc' with a single argument, which is 1.1.1.8 root 26: the name of the machine (and operating system, in some cases). 1.1.1.7 root 27: 1.1.1.8 root 28: Here is a list of the possible arguments: 29: 30: `vax' 31: Vaxes running BSD. 32: 33: `vms' 34: Vaxes running VMS. 35: 36: `vax-sysv' 37: Vaxes running system V. 38: 39: `i386-sysv' 40: Intel 386 PCs running system V. 41: 1.1.1.9 root 42: `i386-sysv-gas' 43: Intel 386 PCs running system V, using the GNU assembler and 44: GNU linker. 45: 1.1.1.10! root 46: `sequent-i386' 1.1.1.8 root 47: Sequent with Intel 386 processors. 48: 49: `sun2' 50: Sun 2 running system version 2 or 3. 51: 52: `sun3' 1.1.1.9 root 53: Sun 3 running system version 2 or 3, with 68881. 54: 55: `sun3-nfp' 56: Sun 3 running system version 2 or 3, without 68881. 57: 58: `sun3-fpa' 59: Sun 3 running system version 2 or 3, with 68881 and fpa. 1.1.1.8 root 60: 61: `sun4' 62: Sun 4 running system version 2 or 3. 63: 64: `sun2-os4' 65: Sun 2 running system version 4. 66: 67: `sun3-os4' 1.1.1.9 root 68: Sun 3 running system version 4, with 68881. 69: 70: `sun3-nfp-os4' 71: Sun 3 running system version 4, without 68881. 72: 73: `sun3-fpa-os4' 74: Sun 3 running system version 4, with 68881 and fpa. 1.1.1.8 root 75: 76: `sun4-os4' 77: Sun 4 running system version 4. 78: 79: `sun386' 80: Sun 386 (``roadrunner''). 81: 1.1.1.9 root 82: `alliant' 83: Alliant FX/8 computer. Currently, there are bugs in the 84: support for floating point. Also note that Alliant's 85: version of dbx does not manage to work with the output from 86: GNU CC. 87: 88: `convex-c1' 89: Convex C1 computer. 90: 91: `convex-c2' 92: Convex C2 computer. 93: 1.1.1.8 root 94: `hp9k320' 95: HP 9000 series 300 using HPUX assembler. 96: 1.1.1.10! root 97: `hp9k320g' 1.1.1.8 root 98: HP 9000 series 300 using GNU assembler, linker and debugger. 99: This requires the HP-adapt package which is or will soon be 1.1.1.9 root 100: available along with the linker. 1.1.1.8 root 101: 102: `isi68' 103: ISI 68000 or 68020 system. 104: 105: `news800' 106: Sony NEWS 68020 system. 107: 1.1.1.10! root 108: `next' ! 109: NeXT system. ! 110: 1.1.1.8 root 111: `3b1' 112: AT&T 3b1, a.k.a. 7300 PC. 113: 114: `sequent-ns32k' 115: Sequent containing ns32000 processors. 116: 117: `encore' 118: Encore ns32000 system. 119: 120: `genix' 121: National Semiconductor ns32000 system. 122: 123: `88000' 124: Motorola 88000 processor. This port is not finished. 125: 126: Here we spell out what files need to be set up: 1.1 root 127: 1.1.1.4 root 128: * Make a symbolic link named `config.h' to the top-level 129: config file for the machine you are using (*note 130: Config::.). This file is responsible for defining 131: information about the host machine. It includes `tm.h'. 132: 1.1.1.8 root 133: The file's name should be `xm-MACHINE.h', with these 1.1.1.4 root 134: exceptions: 135: 1.1.1.8 root 136: `xm-vms.h' 1.1.1.4 root 137: for vaxen running VMS. 138: 1.1.1.8 root 139: `xm-vaxv.h' 1.1.1.4 root 140: for vaxen running system V. 141: 1.1.1.8 root 142: `xm-i386v.h' 1.1.1.4 root 143: for Intel 80386's running system V. 144: 1.1.1.8 root 145: `xm-sunos4.h' 1.1.1.5 root 146: for Suns (model 2, 3 or 4) running *operating system* 1.1.1.8 root 147: version 4. (Use `xm-m68k.h' or `xm-sparc.h' for 148: version 3.) 1.1.1.4 root 149: 1.1.1.8 root 150: `xm-sun386i.h' 151: for Sun roadrunner running any version of the 152: operating system. 153: 154: `xm-hp9k320.h' 1.1.1.4 root 155: for the HP 9000 series 300. 156: 1.1.1.8 root 157: `xm-genix.h' 1.1.1.4 root 158: for the ns32000 running Genix 159: 160: If your system does not support symbolic links, you might 161: want to set up `config.h' to contain a `#include' command 162: which refers to the appropriate file. 163: 164: * Make a symbolic link named `tm.h' to the 165: machine-description macro file for your machine (its name 166: should be `tm-MACHINE.h'). 167: 168: If your system is a 68000, don't use the file `tm-m68k.h' 169: directly. Instead, use one of these files: 170: 171: `tm-sun3.h' 1.1.1.9 root 172: for Sun 3 machines with 68881. 173: 174: `tm-sun3-fpa.h' 175: for Sun 3 machines with floating point accelerator. 176: 177: `tm-sun3-nfp.h' 178: for Sun 3 machines with no hardware floating point. 1.1.1.4 root 179: 180: `tm-sun2.h' 181: for Sun 2 machines. 182: 183: `tm-3b1.h' 184: for AT&T 3b1 (aka 7300 Unix PC). 185: 186: `tm-isi68.h' 1.1.1.8 root 187: for Integrated Solutions systems. This file assumes 188: you use the GNU assembler. 1.1.1.4 root 189: 190: `tm-news800.h' 191: for SONY News systems. 192: 193: `tm-hp9k320.h' 194: for HPUX systems, if you are using GNU CC with the 195: system's assembler and linker. 196: 197: `tm-hp9k320g.h' 198: for HPUX systems, if you are using the GNU assembler, 199: linker and other utilities. Not all of the pieces of 200: GNU software needed for this mode of operation are as 201: yet in distribution; full instructions will appear 202: here in the future. 203: 204: For the vax, use `tm-vax.h' on BSD Unix, `tm-vaxv.h' on 205: system V, or `tm-vms.h' on VMS. 206: 207: For the Motorola 88000, use `tm-m88k.h'. The support for 208: the 88000 has a few unfinished spots because there was no 209: way to run the output. Bugs are suspected in handling of 210: branch-tables and in the function prologue and epilogue. 211: 212: For the 80386, don't use `tm-i386.h' directly. Use 213: `tm-i386v.h' if the target machine is running system V, 1.1.1.9 root 214: `tm-i386gas.h' if it is running system V but you are using 215: the GNU assembler and linker, `tm-seq386.h' for a Sequent 216: 386 system, or `tm-compaq.h' for a Compaq, or 217: `tm-sun386i.h' for a Sun 386 system. 1.1.1.4 root 218: 219: For the 32000, use `tm-sequent.h' if you are using a 220: Sequent machine, or `tm-encore.h' for an Encore machine, or 1.1.1.8 root 221: `tm-genix.h' if you are using Genix version 3; otherwise, 1.1.1.4 root 222: perhaps `tm-ns32k.h' will work for you. 223: 224: Note that Genix has bugs in `alloca' and `malloc'; you must 225: get the compiled versions of these from GNU Emacs and edit 226: GNU CC's `Makefile' to use them. 1.1 root 227: 1.1.1.2 root 228: Note that Encore systems are supported only under BSD. 1.1 root 229: 1.1.1.10! root 230: For Sparc (Sun 4) machines, use `tm-sparc.h' with operating ! 231: system version 4, and `tm-sun4os3.h' with system version 3. ! 232: 1.1 root 233: * Make a symbolic link named `md' to the machine description 1.1.1.7 root 234: pattern file. Its name should be `MACHINE.md', but MACHINE 235: is often not the same as the name used in the `tm.h' file 236: because the `md' files are more general. 1.1 root 237: 238: * Make a symbolic link named `aux-output.c' to the output 239: subroutine file for your machine (its name should be 1.1.1.4 root 240: `output-MACHINE.c'). 1.1 root 241: 1.1.1.4 root 242: 4. Make sure the Bison parser generator is installed. (This is 243: unnecessary if the Bison output files `c-parse.tab.c' and 244: `cexp.c' are more recent than `c-parse.y' and `cexp.y' and you 245: do not plan to change the `.y' files.) 246: 1.1.1.5 root 247: Bison versions older that Sept 8, 1988 will produce incorrect 248: output for `c-parse.tab.c'. 1.1 root 249: 1.1.1.2 root 250: 5. If you are using a Sun, make sure the environment variable 1.1.1.4 root 251: `FLOAT_OPTION' is not set. If this option were set to `f68881' 252: when `gnulib' is compiled, the resulting code would demand to be 253: linked with a special startup file and will not link properly 254: without special pains. 1.1 root 255: 1.1.1.2 root 256: 6. Build the compiler. Just type `make' in the compiler directory. 1.1 root 257: 1.1.1.7 root 258: Ignore any warnings you may see about ``statement not reached'' 259: in the `insn-emit.c'; they are normal. Any other compilation 260: errors may represent bugs in the port to your machine or 261: operating system, and should be investigated and reported (*note 262: Bugs::.). 263: 1.1.1.9 root 264: 7. If you are using COFF-encapsulation, you must convert `gnulib' 265: to a GNU-format library at this point. See the file 266: `README-ENCAP' in the directory containing the GNU binary file 267: utilities, for directions. 268: 269: 8. Move the first-stage object files and executables into a 1.1.1.4 root 270: subdirectory with this command: 1.1 root 271: 272: make stage1 273: 274: The files are moved into a subdirectory named `stage1'. Once 1.1.1.4 root 275: installation is complete, you may wish to delete these files 276: with `rm -r stage1'. 1.1 root 277: 1.1.1.9 root 278: 9. Recompile the compiler with itself, with this command: 1.1 root 279: 280: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/" 281: 1.1.1.4 root 282: On a 68000 or 68020 system lacking floating point hardware, 283: unless you have selected a `tm.h' file that expects by default 284: that there is no such hardware, do this instead: 1.1 root 285: 286: make CC=stage1/gcc CFLAGS="-g -O -Bstage1/ -msoft-float" 287: 1.1.1.9 root 288: 10. If you wish to test the compiler by compiling it with itself one 1.1.1.4 root 289: more time, do this: 1.1 root 290: 291: make stage2 1.1.1.6 root 292: make CC=stage2/gcc CFLAGS="-g -O -Bstage2/" 1.1 root 293: foreach file (*.o) 294: cmp $file stage2/$file 295: end 296: 1.1.1.4 root 297: This will notify you if any of these stage 3 object files 298: differs from those of stage 2. Any difference, no matter how 299: innocuous, indicates that the stage 2 compiler has compiled GNU 300: CC incorrectly, and is therefore a potentially serious bug which 301: you should investigate and report (*note Bugs::.). 1.1 root 302: 1.1.1.4 root 303: Aside from the `-B' option, the options should be the same as 304: when you made stage 2. 305: 1.1.1.9 root 306: 11. Install the compiler driver, the compiler's passes and run-time 1.1.1.4 root 307: support. You can use the following command: 1.1 root 308: 309: make install 310: 1.1.1.4 root 311: This copies the files `cc1', `cpp' and `gnulib' to files 312: `gcc-cc1', `gcc-cpp' and `gcc-gnulib' in directory 313: `/usr/local/lib', which is where the compiler driver program 314: looks for them. It also copies the driver program `gcc' into 1.1.1.10! root 315: the directory `/usr/local/bin', so that it appears in typical 1.1.1.4 root 316: execution search paths. 317: 318: *Warning: there is a bug in `alloca' in the Sun library. To 319: avoid this bug, install the binaries of GNU CC that were 320: compiled by GNU CC. They use `alloca' as a built-in function 321: and never the one in the library.* 322: 323: *Warning: the GNU CPP may not work for `ioctl.h', `ttychars.h' 324: and other system header files unless the `-traditional' option 325: is used.* The bug is in the header files: at least on some 326: machines, they rely on behavior that is incompatible with ANSI 327: C. This behavior consists of substituting for macro argument 328: names when they appear inside of character constants. The 329: `-traditional' option tells GNU CC to behave the way these 330: headers expect. 1.1 root 331: 1.1.1.4 root 332: Because of this problem, you might prefer to configure GNU CC to 333: use the system's own C preprocessor. To do so, make the file 1.1 root 334: `/usr/local/lib/gcc-cpp' a link to `/lib/cpp'. 335: 1.1.1.4 root 336: Alternatively, on Sun systems and 4.3BSD at least, you can 337: correct the include files by running the shell script 338: `fixincludes'. This installs modified, corrected copies of the 339: files `ioctl.h', `ttychars.h' and many others, in a special 1.1.1.7 root 340: directory where only GNU CC will normally look for them. This 1.1.1.10! root 341: script will work on various systems because it chooses the files 1.1.1.7 root 342: by searching all the system headers for the problem cases that 343: we know about. 1.1 root 344: 345: If you cannot install the compiler's passes and run-time support in 1.1.1.4 root 346: `/usr/local/lib', you can alternatively use the `-B' option to 347: specify a prefix by which they may be found. The compiler 348: concatenates the prefix with the names `cpp', `cc1' and `gnulib'. 349: Thus, you can put the files in a directory `/usr/foo/gcc' and specify 350: `-B/usr/foo/gcc/' when you run GNU CC. 351: 352: Also, you can specify an alternative default directory for these 353: files by setting the Make variable `libdir' when you make GNU CC. 1.1 root 354: 1.1.1.2 root 355: 1.1.1.6 root 356: File: gcc.info, Node: VMS Install, Prev: Installation, Up: Installation 1.1.1.2 root 357: 1.1 root 358: Installing GNU CC on VMS 359: ======================== 360: 1.1.1.8 root 361: The VMS version of GNU CC is distributed in a backup saveset 362: containing both source code and precompiled binaries. 363: 364: Sometimes the binaries will be from an older version that the 365: sources, because we don't always have time to update them. In this 366: case, you should use the binaries you get to recompile the sources. 1.1.1.4 root 367: If you must recompile, here is how: 368: 1.1.1.8 root 369: 1. Copy the file `tm-vms.h' to `tm.h', `xm-vms.h' to `config.h', 370: `vax.md' to `md.' and `output-vax.c' to `aux-output.c'. 1.1 root 371: 372: 2. Type `@make' to do recompile everything. 1.1.1.2 root 373: 1.1.1.9 root 374: If you are compiling with a version of GCC older than 1.33, 375: specify `/DEFINE=("inline=")' as an option in all the 376: compilations. This requires editing all the `gcc' commands in 377: `make-cc1.com'. (The older versions had problems supporting 378: `inline'.) Once you have a working 1.33 or newer GCC, you can 379: change this file back. 380: 1.1.1.4 root 381: To install the `GCC' command so you can use the compiler easily, in 382: the same manner as you use the VMS C compiler, you must install the 383: VMS CLD file for GNU CC as follows: 384: 385: 1. Define the VMS logical names `GNU_CC' and `GNU_CC_INCLUDE' to 386: point to the directories where the GNU CC executables 387: (`gcc-cpp', `gcc-cc1', etc.) and the C include files are kept. 388: This should be done with the commands: 1.1.1.2 root 389: 390: $ assign /super /system disk:[gcc] gnu_cc 391: $ assign /super /system disk:[gcc.include] gnu_cc_include 392: 1.1.1.4 root 393: with the appropriate disk and directory names. These commands 394: can be placed in your system startup file so they will be 395: executed whenever the machine is rebooted. 1.1.1.2 root 396: 397: 2. Install the `GCC' command with the command line: 398: 399: $ set command /table=sys$library:dcltables gnu_cc:gcc 400: 1.1.1.4 root 401: Now you can invoke the compiler with a command like `gcc 402: /verbose file.c', which is equivalent to the command `gcc -v -c 403: file.c' in Unix. 1.1.1.9 root 404: 405: There is a known problem on VMS: `const' global variables don't work 406: compatibly with the VMS C compiler; we don't know a way to get them 407: to the linker properly.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.