|
|
1.1 ! root 1: $! Set the def dir to proper place for use in batch. Works for interactive too. ! 2: $flnm = f$enviroment("PROCEDURE") ! get current procedure name ! 3: $set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")' ! 4: $! ! 5: $! ! 6: $! CAUTION: If you want to link gcc-cc1 to the sharable image library ! 7: $! VAXCRTL, see the notes in gcc.texinfo (or INSTALL) first. ! 8: $! ! 9: $! Build a GNU compiler on VMS ! 10: $! ! 11: $! First we figure out what needs to be done. This is sort of like a limited ! 12: $! make facility - the command line options specify exactly what components ! 13: $! we want to build. The following options are understood: ! 14: $! ! 15: $! LINK: Assume that the object modules for the selected compiler(s) ! 16: $! have already been compiled, perform link phase only. ! 17: $! ! 18: $! CC1: Compile and link "C" compiler. ! 19: $! ! 20: $! CC1PLUS:Compile and link "C++" compiler. ! 21: $! ! 22: $! CC1OBJ: Compile and link objective C compiler. ! 23: $! ! 24: $! ALL: Compile and link all of the CC1 passes. ! 25: $! ! 26: $! INDEPENDENT: ! 27: $! Compile language independent source modules. (On by default). ! 28: $! ! 29: $! DEBUG: Link images with /debug. ! 30: $! ! 31: $! If you want to list more than one option, you should use a spaces to ! 32: $! separate them. ! 33: $! ! 34: $! Any one of the above options can be prefaced with a "NO". For example, ! 35: $! if you had already built GCC, and you wanted to build G++, you could use the ! 36: $! "CC1PLUS NOINDEPENDENT" options, which would only compile the C++ language ! 37: $! specific source files, and then link the C++ compiler. ! 38: $! ! 39: $! If you do not specify which compiler you want to build, it is assumed that ! 40: $! you want to build GNU-C ("CC1"). ! 41: $! ! 42: $p1 = p1+" "+p2+" "+p3+" "+p4+" "+p5+" "+p6+" "+p7 ! 43: $p1 = f$edit(p1,"COMPRESS") ! 44: $i=0 ! 45: $DO_ALL = 0 ! 46: $DO_LINK = 0 ! 47: $DO_DEBUG = 0 ! 48: $DO_CC1 = 0 ! 49: $DO_CC1PLUS = 0 ! 50: $DO_CC1OBJ = 0 ! 51: $DO_INDEPENDENT = 1 ! 52: $DO_DEFAULT = 1 ! 53: $loop: ! 54: $string = f$element(i," ",p1) ! 55: $if string.eqs." " then goto done ! 56: $flag = 1 ! 57: $if string.eqs."CC1PLUS" then DO_DEFAULT = 0 ! 58: $if string.eqs."CC1OBJ" then DO_DEFAULT = 0 ! 59: $if f$extract(0,2,string).nes."NO" then goto parse_option ! 60: $ string=f$extract(2,f$length(string)-2,string) ! 61: $ flag = 0 ! 62: $parse_option: ! 63: $DO_'string' = flag ! 64: $i=i+1 ! 65: $goto loop ! 66: $! ! 67: $done: ! 68: $if DO_DEFAULT.eq.1 then DO_CC1 = 1 ! 69: $if DO_ALL.eq.1 then DO_CC1 = 1 ! 70: $if DO_ALL.eq.1 then DO_CC1PLUS = 1 ! 71: $if DO_ALL.eq.1 then DO_CC1OBJ = 1 ! 72: $say:==write sys$Output ! 73: $say "This command file will now perform the following actions: ! 74: $if DO_LINK.eq.1 then goto link_only ! 75: $if DO_CC1.eq.1 then say " Compile C specific object modules." ! 76: $if DO_CC1PLUS.eq.1 then say " Compile C++ specific object modules." ! 77: $if DO_CC1OBJ.eq.1 then say " Compile obj-C specific object modules." ! 78: $if DO_INDEPENDENT.eq.1 then say " Compile language independent object modules." ! 79: $link_only: ! 80: $if DO_CC1.eq.1 then say " Link C compiler (gcc-cc1.exe)." ! 81: $if DO_CC1PLUS.eq.1 then say " Link C++ compiler (gcc-cc1plus.exe)." ! 82: $if DO_CC1OBJ.eq.1 then say " Link objective-C compiler (gcc-cc1obj.exe)." ! 83: $if DO_DEBUG.eq.1 then say " Link images to run under debugger." ! 84: $type sys$input ! 85: ! 86: Note: GCC 2.0 treats external variables differently than GCC 1.40 does. ! 87: Before you use GCC 2.0, you should obtain a version of the assembler which ! 88: contains the patches to work with GCC 2.0 (GCC-AS 1.38 does not contain ! 89: these patches - whatever comes after this probably will). ! 90: ! 91: If you do not update the assembler, the compiler will still work, ! 92: but `extern const' variables will be treated as `extern'. This will result ! 93: in linker warning messages about mismatched psect attributes, and these ! 94: variables will be placed in read/write storage. ! 95: ! 96: $! ! 97: $! ! 98: $! ! 99: $! CAUTION: If you want to link gcc-cc1 to the sharable image library ! 100: $! VAXCRTL, see the notes in gcc.texinfo (or INSTALL) first. ! 101: $! ! 102: $! Build the GNU "C" compiler on VMS ! 103: $! (To try to build with VAX C, replace `gcc' with `cc/noopt' ! 104: $! and delete `cc1_options="-mpcc-alignment"'. ! 105: $! Also add `/sel' after `gcclib/lib' except in the last link. ! 106: $! You also need to get alloca.mar from Bison ! 107: $! and to make definitions for bzero, bcopy and bcmp.) ! 108: $! ! 109: $! C compiler ! 110: $! ! 111: $ CC := gcc ! 112: $ BISON := bison ! 113: $ RENAME := rename ! 114: $ LINK := link ! 115: $! ! 116: $! Compiler options ! 117: $! ! 118: $ CFLAGS = "/debug/cc1_options=""-mpcc-alignment""/inc=([],[.config])" ! 119: $! ! 120: $! Link options ! 121: $! ! 122: $ LDFLAGS := /nomap ! 123: $ if DO_DEBUG.eq.1 then LDFLAGS :='LDFLAGS'/debug ! 124: $! ! 125: $! Link libraries ! 126: $! ! 127: $ LIBS := gnu_cc:[000000]gcclib/libr,sys$share:vaxcrtl/libr ! 128: $! ! 129: $! ! 130: $! ! 131: $! ! 132: $! Language independent object and header files. ! 133: $! ! 134: $! create a linker options file that lists all of the language independent ! 135: $! object modules. ! 136: $! ! 137: $create independent.opt ! 138: ! ! 139: ! List of object files for the linker - these are language independent ! 140: ! (i.e. the same files will be used for all of the compilers). ! 141: ! ! 142: toplev,tree,print-tree,stor-layout,fold-const,varasm,rtl,rtlanal,expr,stmt ! 143: expmed,explow,optabs,emit-rtl,insn-emit,jump,cse,loop,flow,stupid,combine ! 144: regclass,local-alloc,global-alloc,reload,reload1,insn-peep,final,recog ! 145: insn-recog,insn-extract,insn-output,obstack,integrate,caller-save,calls ! 146: dwarfout,function,insn-attrtab,reorg,sched,sdbout,dbxout,unroll,reg-stack ! 147: aux-output,print-rtl,version ! 148: $! ! 149: $pur/nolog independent.opt ! 150: $! ! 151: $ if DO_LINK.eq.1 then goto compile_cc1 ! 152: $if DO_INDEPENDENT.eq.0 THEN GOTO compile_cc1 ! 153: $! ! 154: $! First build a couple of header files from the machine description ! 155: $! These are used by many of the source modules, so we build them now. ! 156: $! ! 157: $ 'CC 'CFLAGS rtl.c ! 158: $ 'CC 'CFLAGS obstack.c ! 159: $ 'CC 'CFLAGS print-rtl.c ! 160: $! Generate insn-attr.h ! 161: $ 'CC 'CFLAGS genattr.c ! 162: $ link 'LDFLAGS' genattr,rtl,obstack, 'LIBS' ! 163: $ assign/user insn-attr.h sys$output: ! 164: $ mcr sys$disk:[]genattr md ! 165: $! Generate insn-flags.h ! 166: $ 'CC 'CFLAGS genflags.c ! 167: $ link 'LDFLAGS' genflags,rtl,obstack, 'LIBS' ! 168: $ assign/user insn-flags.h sys$output: ! 169: $ mcr sys$disk:[]genflags md ! 170: $! Generate insn-codes.h ! 171: $ 'CC 'CFLAGS gencodes.c ! 172: $ link 'LDFLAGS' gencodes,rtl,obstack, 'LIBS' ! 173: $ assign/user insn-codes.h sys$output: ! 174: $ mcr sys$disk:[]gencodes md ! 175: $! Generate insn-config.h ! 176: $ 'CC 'CFLAGS genconfig.c ! 177: $ link 'LDFLAGS' genconfig,rtl,obstack, 'LIBS' ! 178: $ assign/user insn-config.h sys$output: ! 179: $ mcr sys$disk:[]genconfig md ! 180: $! ! 181: $! Now compile the source modules ! 182: $! ! 183: $ 'CC 'CFLAGS toplev.c ! 184: $ 'CC 'CFLAGS version.c ! 185: $ 'CC 'CFLAGS tree.c ! 186: $ 'CC 'CFLAGS print-tree.c ! 187: $ 'CC 'CFLAGS stor-layout.c ! 188: $ 'CC 'CFLAGS fold-const.c ! 189: $ 'CC 'CFLAGS varasm.c ! 190: $ 'CC 'CFLAGS expr.c ! 191: $ 'CC 'CFLAGS stmt.c ! 192: $ 'CC 'CFLAGS expmed.c ! 193: $ 'CC 'CFLAGS explow.c ! 194: $ 'CC 'CFLAGS optabs.c ! 195: $ 'CC 'CFLAGS rtlanal.c ! 196: $ 'CC 'CFLAGS emit-rtl.c ! 197: $! Generate insn-emit.c ! 198: $ 'CC 'CFLAGS genemit.c ! 199: $ link 'LDFLAGS' genemit,rtl,obstack, 'LIBS' ! 200: $ assign/user insn-emit.c sys$output: ! 201: $ mcr sys$disk:[]genemit md ! 202: $! ! 203: $ 'CC 'CFLAGS insn-emit.c ! 204: $ 'CC 'CFLAGS jump.c ! 205: $ 'CC 'CFLAGS cse.c ! 206: $ 'CC 'CFLAGS loop.c ! 207: $ 'CC 'CFLAGS flow.c ! 208: $ 'CC 'CFLAGS stupid.c ! 209: $ 'CC 'CFLAGS combine.c ! 210: $ 'CC 'CFLAGS regclass.c ! 211: $ 'CC 'CFLAGS local-alloc.c ! 212: $ 'CC 'CFLAGS global-alloc.c ! 213: $ 'CC 'CFLAGS reload.c ! 214: $ 'CC 'CFLAGS reload1.c ! 215: $! Generate insn-peep.c ! 216: $ 'CC 'CFLAGS genpeep.c ! 217: $ link 'LDFLAGS' genpeep,rtl,obstack, 'LIBS' ! 218: $ assign/user insn-peep.c sys$output: ! 219: $ mcr sys$disk:[]genpeep md ! 220: $! ! 221: $ 'CC 'CFLAGS insn-peep.c ! 222: $ 'CC 'CFLAGS final.c ! 223: $ 'CC 'CFLAGS recog.c ! 224: $! Generate insn-recog.c ! 225: $ 'CC 'CFLAGS genrecog.c ! 226: $ link 'LDFLAGS' genrecog,rtl,obstack, 'LIBS' ! 227: $ assign/user insn-recog.c sys$output: ! 228: $ mcr sys$disk:[]genrecog md ! 229: $! ! 230: $ 'CC 'CFLAGS insn-recog.c ! 231: $! Generate insn-extract.c ! 232: $ 'CC 'CFLAGS genextract.c ! 233: $ link 'LDFLAGS' genextract,rtl,obstack, 'LIBS' ! 234: $ assign/user insn-extract.c sys$output: ! 235: $ mcr sys$disk:[]genextract md ! 236: $! ! 237: $ 'CC 'CFLAGS insn-extract.c ! 238: $! Generate insn-output.c ! 239: $ 'CC 'CFLAGS genoutput.c ! 240: $ link 'LDFLAGS' genoutput,rtl,obstack, 'LIBS' ! 241: $ assign/user insn-output.c sys$output: ! 242: $ mcr sys$disk:[]genoutput md ! 243: $! ! 244: $ 'CC 'CFLAGS insn-output.c ! 245: $ 'CC 'CFLAGS integrate.c ! 246: $ 'CC 'CFLAGS caller-save.c ! 247: $ 'CC 'CFLAGS calls.c ! 248: $ 'CC 'CFLAGS dwarfout.c ! 249: $ 'CC 'CFLAGS dbxout.c ! 250: $ 'CC 'CFLAGS reg-stack.c ! 251: $ 'CC 'CFLAGS function.c ! 252: $ 'CC 'CFLAGS reorg.c ! 253: $ 'CC 'CFLAGS sched.c ! 254: $ 'CC 'CFLAGS sdbout.c ! 255: $ 'CC 'CFLAGS unroll.c ! 256: $! Generate insn-attrtab.c ! 257: $ 'CC 'CFLAGS genattrtab.c ! 258: $ link 'LDFLAGS' genattrtab,rtl,rtlanal,obstack, 'LIBS' ! 259: $ assign/user insn-attrtab.c sys$output: ! 260: $ mcr sys$disk:[]genattrtab md ! 261: $ 'CC 'CFLAGS insn-attrtab.c ! 262: $ 'CC 'CFLAGS aux-output.c ! 263: $! ! 264: $compile_cc1: ! 265: $! ! 266: $! C language specific modules ! 267: $! ! 268: $if DO_CC1.eq.0 then goto compile_cc1plus ! 269: $if DO_LINK.eq.1 then goto link_cc1 ! 270: $! ! 271: $ if (f$search("C-PARSE.C") .eqs. "") then goto gcc_bison ! 272: $ if (f$cvtime(f$file_attributes("C-PARSE.Y","RDT")).les. - ! 273: f$cvtime(f$file_attributes("C-PARSE.C","RDT"))) - ! 274: then goto gcc_nobison ! 275: $gcc_bison: 'BISON' /define /verbose c-parse.y ! 276: $ 'RENAME' c-parse_tab.c c-parse.c ! 277: $ 'RENAME' c-parse_tab.h c-parse.h ! 278: $gcc_nobison: ! 279: $ 'CC 'CFLAGS c-parse.c ! 280: $ 'CC 'CFLAGS c-lex.c ! 281: $ 'CC 'CFLAGS c-decl.c ! 282: $ 'CC 'CFLAGS c-typeck.c ! 283: $ 'CC 'CFLAGS c-convert.c ! 284: $ 'CC 'CFLAGS c-aux-info.c ! 285: $ 'CC 'CFLAGS c-common.c ! 286: $ 'CC 'CFLAGS c-lang.c ! 287: $! ! 288: $! CAUTION: If you want to link gcc-cc1 to the sharable image library ! 289: $! VAXCRTL, see the notes in gcc.texinfo (or INSTALL) first. ! 290: $! ! 291: $link_cc1: ! 292: $ link 'LDFLAGS' /exe=gcc-cc1 version.opt/opt,sys$input:/opt, - ! 293: independent.opt/opt,'LIBS' ! 294: ! ! 295: ! "CC1" Linker options file ! 296: ! ! 297: ! ! 298: c-parse,c-decl,c-typeck,c-convert,c-aux-info,c-common,c-lang,c-lex ! 299: $! ! 300: $! C++ language specific modules ! 301: $! ! 302: $compile_cc1plus: ! 303: $! ! 304: $if DO_CC1PLUS.eq.0 then goto compile_cc1obj ! 305: $if DO_LINK.eq.1 then goto link_cc1plus ! 306: $! ! 307: $ if (f$search("CP-PARSE.C") .eqs. "") then goto cplus_bison ! 308: $ if (f$cvtime(f$file_attributes("CP-PARSE.Y","RDT")).les. - ! 309: f$cvtime(f$file_attributes("CP-PARSE.C","RDT"))) - ! 310: then goto cplus_nobison ! 311: $cplus_bison: ! 312: $ 'BISON' /define /verbose cp-parse.y ! 313: $ 'RENAME' cp-parse_tab.c cp-parse.c ! 314: $ 'RENAME' cp-parse_tab.h cp-parse.h ! 315: $cplus_nobison: ! 316: $! ! 317: $ 'CC 'CFLAGS cp-parse.c ! 318: $ 'CC 'CFLAGS cp-decl.c ! 319: $ 'CC 'CFLAGS cp-decl2.c ! 320: $ 'CC 'CFLAGS cp-typeck.c ! 321: $ 'CC 'CFLAGS cp-type2.c ! 322: $ 'CC 'CFLAGS cp-tree.c ! 323: $ 'CC 'CFLAGS cp-ptree.c ! 324: $ 'CC 'CFLAGS cp-cvt.c ! 325: $ 'CC 'CFLAGS cp-search.c ! 326: $ 'CC 'CFLAGS cp-lex.c ! 327: $ 'CC 'CFLAGS cp-gc.c ! 328: $ 'CC 'CFLAGS cp-call.c ! 329: $ 'CC 'CFLAGS cp-class.c ! 330: $ 'CC 'CFLAGS cp-init.c ! 331: $ 'CC 'CFLAGS cp-method.c ! 332: $ 'CC 'CFLAGS cp-except.c ! 333: $ 'CC 'CFLAGS cp-expr.c ! 334: $ 'CC 'CFLAGS cp-pt.c ! 335: $ 'CC 'CFLAGS cp-edsel.c ! 336: $ 'CC 'CFLAGS cp-xref.c ! 337: $ 'CC 'CFLAGS cp-spew.c ! 338: $ 'CC 'CFLAGS c-common.c ! 339: $! ! 340: $link_cc1plus: ! 341: $ link 'LDFLAGS' /exe=gcc-cc1plus version.opt/opt,sys$input:/opt, - ! 342: independent.opt/opt,'LIBS' ! 343: ! ! 344: ! "CC1PLUS" Linker options file ! 345: ! ! 346: cp-parse,cp-decl,cp-decl2,cp-typeck,cp-type2,cp-tree ! 347: cp-ptree,cp-cvt,cp-search,cp-lex,cp-gc,cp-call,cp-class ! 348: cp-init,cp-method,cp-except,cp-expr,cp-pt,cp-edsel ! 349: cp-xref,cp-spew,c-common ! 350: $! ! 351: $! objective language specific modules ! 352: $! ! 353: $compile_cc1obj: ! 354: $if DO_CC1OBJ.eq.0 then goto all_done ! 355: $if DO_LINK.eq.1 then goto LINK_CC1OBJ ! 356: $! ! 357: $ if (f$search("OBJC-PARSE.C") .eqs. "") then goto objc_bison ! 358: $ if (f$cvtime(f$file_attributes("OBJC-PARSE.Y","RDT")).les. - ! 359: f$cvtime(f$file_attributes("OBJC-PARSE.C","RDT"))) - ! 360: then goto objc_nobison ! 361: $objc_bison: ! 362: $ 'BISON' /define /verbose OBJC-PARSE.y ! 363: $ 'RENAME' OBJC-PARSE_tab.c OBJC-PARSE.c ! 364: $ 'RENAME' OBJC-PARSE_tab.h OBJC-PARSE.h ! 365: $objc_nobison: ! 366: $ 'CC 'CFLAGS objc-parse.c ! 367: $ 'CC 'CFLAGS objc-actions.c ! 368: $! ! 369: $! If have also built CC1, we do not need to recompile these modules. ! 370: $! ! 371: $if DO_CC1.eq.1 then goto LINK_CC1OBJ ! 372: $ 'CC 'CFLAGS c-lex.c ! 373: $ 'CC 'CFLAGS c-decl.c ! 374: $ 'CC 'CFLAGS c-typeck.c ! 375: $ 'CC 'CFLAGS c-convert.c ! 376: $ 'CC 'CFLAGS c-aux-info.c ! 377: $ 'CC 'CFLAGS c-common.c ! 378: $! ! 379: $! ! 380: $LINK_CC1OBJ: ! 381: $ link 'LDFLAGS' /exe=gcc-cc1obj version.opt/opt,sys$input:/opt, - ! 382: independent.opt/opt,'LIBS' ! 383: ! ! 384: ! "Objective C" Linker options file ! 385: ! ! 386: objc-parse,objc-actions,c-lex,c-decl,c-typeck,c-convert,c-aux-info,c-common ! 387: $! ! 388: $all_done: ! 389: $! ! 390: $! Done ! 391: $!
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.