1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
|
$! Set the def dir to proper place for use in batch. Works for interactive too.
$flnm = f$enviroment("PROCEDURE") ! get current procedure name
$set default 'f$parse(flnm,,,"DEVICE")''f$parse(flnm,,,"DIRECTORY")'
$!
$! Build the GNU "C" compiler on VMS
$! (To try to build with VAX C, replace `gcc' with `cc/noopt'
$! and delete `cc1_options="-mpcc-alignment"'.
$! Also add `/sel' after `gcclib/lib' except in the last link.
$! You also need to get alloca.mar from Bison
$! and to make definitions for bzero, bcopy and bcmp.)
$!
$ set verify
$!
$! C compiler
$!
$ CC := gcc
$!
$! Compiler options
$!
$ CFLAGS = "/debug/cc1_options=""-mpcc-alignment""/inc=([],[.config])"
$!
$! Link options
$!
$ LDFLAGS := /nomap
$!
$! Link libraries
$!
$ LIBS := gnu_cc:[000000]gcclib/libr,sys$share:vaxcrtl/libr
$!
$ if "''p1'" .eqs. "LINK" then goto Link
$!
$! Recompile
$!
$ 'CC 'CFLAGS rtl.c
$ 'CC 'CFLAGS obstack.c
$! Generate insn-flags.h
$ 'CC 'CFLAGS genflags.c
$ link 'LDFLAGS' genflags,rtl,obstack, 'LIBS'
$ assign/user insn-flags.h sys$output:
$ mcr sys$disk:[]genflags md
$! Generate insn-codes.h
$ 'CC 'CFLAGS gencodes.c
$ link 'LDFLAGS' gencodes,rtl,obstack, 'LIBS'
$ assign/user insn-codes.h sys$output:
$ mcr sys$disk:[]gencodes md
$! Generate insn-config.h
$ 'CC 'CFLAGS genconfig.c
$ link 'LDFLAGS' genconfig,rtl,obstack, 'LIBS'
$ assign/user insn-config.h sys$output:
$ mcr sys$disk:[]genconfig md
$!
$ 'CC 'CFLAGS toplev.c
$!
$ t1:='f$search("C-PARSE_TAB.C")'
$ if "''t1'" .eqs. "" then goto 10$
$ t1:='f$file_attributes("C-PARSE.Y","RDT")'
$ t1:='f$cvtime(t1)'
$ t2:='f$file_attributes("C-PARSE_TAB.C","RDT")'
$ t2:='f$cvtime(t2)'
$ if t1 .les. t2 then goto 20$
$ 10$:
$ bison /verbose c-parse.y
$ 20$:
$!
$ 'CC 'CFLAGS c-parse_tab.c /define="__inline=inline"
$ 'CC 'CFLAGS version.c
$ 'CC 'CFLAGS tree.c
$ 'CC 'CFLAGS print-tree.c
$ 'CC 'CFLAGS c-decl.c
$ 'CC 'CFLAGS c-typeck.c
$ 'CC 'CFLAGS c-convert.c
$ 'CC 'CFLAGS stor-layout.c
$ 'CC 'CFLAGS fold-const.c
$ 'CC 'CFLAGS varasm.c
$ 'CC 'CFLAGS expr.c
$ 'CC 'CFLAGS stmt.c
$ 'CC 'CFLAGS expmed.c
$ 'CC 'CFLAGS explow.c
$ 'CC 'CFLAGS optabs.c
$ 'CC 'CFLAGS symout.c
$ 'CC 'CFLAGS dbxout.c
$ 'CC 'CFLAGS rtlanal.c
$ 'CC 'CFLAGS emit-rtl.c
$! Generate insn-emit.c
$ 'CC 'CFLAGS genemit.c
$ link 'LDFLAGS' genemit,rtl,obstack, 'LIBS'
$ assign/user insn-emit.c sys$output:
$ mcr sys$disk:[]genemit md
$!
$ 'CC 'CFLAGS insn-emit.c
$ 'CC 'CFLAGS jump.c
$ 'CC 'CFLAGS cse.c
$ 'CC 'CFLAGS loop.c
$ 'CC 'CFLAGS flow.c
$ 'CC 'CFLAGS stupid.c
$ 'CC 'CFLAGS combine.c
$ 'CC 'CFLAGS regclass.c
$ 'CC 'CFLAGS local-alloc.c
$ 'CC 'CFLAGS global-alloc.c
$ 'CC 'CFLAGS reload.c
$ 'CC 'CFLAGS reload1.c
$! Generate insn-peep.c
$ 'CC 'CFLAGS genpeep.c
$ link 'LDFLAGS' genpeep,rtl,obstack, 'LIBS'
$ assign/user insn-peep.c sys$output:
$ mcr sys$disk:[]genpeep md
$!
$ 'CC 'CFLAGS insn-peep.c
$ 'CC 'CFLAGS final.c
$ 'CC 'CFLAGS recog.c
$! Generate insn-recog.c
$ 'CC 'CFLAGS genrecog.c
$ link 'LDFLAGS' genrecog,rtl,obstack, 'LIBS'
$ assign/user insn-recog.c sys$output:
$ mcr sys$disk:[]genrecog md
$!
$ 'CC 'CFLAGS insn-recog.c
$! Generate insn-extract.c
$ 'CC 'CFLAGS genextract.c
$ link 'LDFLAGS' genextract,rtl,obstack, 'LIBS'
$ assign/user insn-extract.c sys$output:
$ mcr sys$disk:[]genextract md
$!
$ 'CC 'CFLAGS insn-extract.c
$! Generate insn-output.c
$ 'CC 'CFLAGS genoutput.c
$ link 'LDFLAGS' genoutput,rtl,obstack, 'LIBS'
$ assign/user insn-output.c sys$output:
$ mcr sys$disk:[]genoutput md
$!
$ 'CC 'CFLAGS insn-output.c
$ 'CC 'CFLAGS integrate.c
$ 'CC 'CFLAGS caller-save.c
$!
$!
$! Link it
$!
$ Link:
$ link 'LDFLAGS' /exe=gcc-cc1 sys$input:/opt,'LIBS'
!
! "CC1" Linker options file
!
toplev,c-parse_tab,tree,print-tree,c-decl,c-typeck,c-convert,stor-layout,fold-const,-
varasm,rtl,rtlanal,expr,stmt,expmed,explow,optabs,symout,dbxout,emit-rtl,insn-emit,-
jump,cse,loop,flow,stupid,combine,regclass,local-alloc,global-alloc,reload,-
reload1,insn-peep,final,recog,insn-recog,insn-extract,insn-output,obstack,-
integrate,caller-save,version
$!
$! CAUTION: If you want to link gcc-cc1 to the sharable image library
$! VAXCRTL, see the notes in gcc.texinfo (or INSTALL) first.
$!
$! Done
$!
|