@@ -4,27 +4,55 @@ $! files for a VMS system. We do not use the configure script, since we
4
4
$! do not have /bin/sh to execute it.
5
5
$!
6
6
$!
7
- $ arch_indx = 1 + ((f$getsyi("CPU").ge.128).and.1) ! vax==1, alpha==2
8
- $ arch = f$element(arch_indx,"|","|VAX|Alpha|")
9
- $!
10
- $ if arch.eqs."Alpha"
7
+ $ arch=F$GETSYI("ARCH_NAME")
8
+ $ arch=F$EDIT(arch,"LOWERCASE")
9
+ $ if arch.eqs."alpha"
10
+ $ then
11
+ $ format = "evax"
12
+ $ target_alias = "alpha-dec-openvms"
13
+ $ target_canonical = "alpha-dec-openvms"
14
+ $ endif
15
+ $ if arch.eqs."ia64"
11
16
$ then
17
+ $ format = "elf"
18
+ $ target_alias = "ia64-openvms"
19
+ $ target_canonical = "ia64-unknown-openvms"
20
+ $ endif
21
+ $!
22
+ $!
23
+ $ write sys$output "Generate targ-cpu.[ch]"
24
+ $!
25
+ $! Target specific information
26
+ $ open/write outfile targ-cpu.h
27
+ $ write outfile "#include ""tc-''arch'.h"""
28
+ $ close outfile
12
29
$! Target specific information
13
- $ create targ-cpu.h
14
- #include "tc-alpha.h"
15
- $ create targ-cpu.c
16
- #include "tc-alpha.c"
17
- $ create targ-env.h
18
- #define TE_VMS
19
- #include "obj-format.h"
20
- $
30
+ $ open/write outfile targ-cpu.c
31
+ $ write outfile "#include ""tc-''arch'.c"""
32
+ $ close outfile
33
+ $!
34
+ $ write sys$output "Generate targ-env.h"
35
+ $!
36
+ $ create targ-env.h
37
+ #include "te-generic.h"
38
+ $!
39
+ $ write sys$output "Generate obj-format.[ch]"
40
+ $!
21
41
$! Code to handle the object file format.
22
- $ create obj-format.h
23
- #include "obj-evax.h"
24
- $ create obj-format.c
25
- #include "obj-evax.c"
26
- $ create atof-targ.c
42
+ $ open/write outfile obj-format.h
43
+ $ write outfile "#include ""obj-''format'.h"""
44
+ $ close outfile
45
+ $ open/write outfile obj-format.c
46
+ $ write outfile "#include ""obj-''format'.c"""
47
+ $ close outfile
48
+ $!
49
+ $ write sys$output "Generate atof-targ.c"
50
+ $!
51
+ $ create atof-targ.c
27
52
#include "atof-ieee.c"
53
+ $!
54
+ $ write sys$output "Generate gas/config.h"
55
+ $!
28
56
$ create config-vms.in
29
57
/* config.h. Generated by configure.com. */
30
58
/* Define to 1 if using `alloca.c'. */
@@ -51,6 +79,9 @@ $ create config-vms.in
51
79
#include <builtins.h>
52
80
#define C_alloca(x) __ALLOCA(x)
53
81
82
+ /* Define to 1 if you have the `basename' function. */
83
+ #define HAVE_DECL_BASENAME 1
84
+
54
85
/* Is the prototype for getopt in <unistd.h> in the expected format? */
55
86
#define HAVE_DECL_GETOPT 1
56
87
@@ -119,15 +150,6 @@ $ create config-vms.in
119
150
/* Define to 1 if you have the ANSI C header files. */
120
151
#define STDC_HEADERS 1
121
152
122
- /* Target alias. */
123
- #define TARGET_ALIAS "alpha-dec-openvms"
124
-
125
- /* Canonical target. */
126
- #define TARGET_CANONICAL "alpha-dec-openvms"
127
-
128
- /* Target CPU. */
129
- #define TARGET_CPU "alpha"
130
-
131
153
/* Target OS. */
132
154
#define TARGET_OS "openvms"
133
155
@@ -143,13 +165,12 @@ $ create config-vms.in
143
165
#undef YYTEXT_POINTER
144
166
145
167
/* Version number of package */
146
- $
147
- $ endif
148
168
$!
149
169
$! Get VERSION from ../bfd/configure.in
150
170
$!
151
171
$ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
152
172
$DECK
173
+ set (success, off);
153
174
mfile := CREATE_BUFFER("mfile", "[-.bfd]configure.in");
154
175
match_pos := SEARCH_QUIETLY('AM_INIT_AUTOMAKE(bfd, ', FORWARD, EXACT, mfile);
155
176
IF match_pos <> 0 THEN;
@@ -167,6 +188,56 @@ $DECK
167
188
COPY_TEXT("""");
168
189
WRITE_FILE(file, "config.h");
169
190
QUIT
170
- $ EOD
191
+ $EOD
171
192
$del/nolog config-vms.in;
193
+ $ open/append outfile config.h
194
+ $ write outfile ""
195
+ $ write outfile "/* Target alias. */"
196
+ $ write outfile "#define TARGET_ALIAS ""''target_alias'"""
197
+ $ write outfile ""
198
+ $ write outfile "/* Canonical target. */"
199
+ $ write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
200
+ $ write outfile ""
201
+ $ write outfile "/* Target CPU. */"
202
+ $ write outfile "#define TARGET_CPU ""'arch'"""
203
+ $ close outfile
204
+ $!
205
+ $ write sys$output "Generate gas/build.com"
206
+ $!
207
+ $ create build.com
208
+ $DECK
209
+ $ DEFS=""
210
+ $ OPT="/noopt/debug"
211
+ $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
212
+ "/name=(as_is,shortened)" +-
213
+ "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
214
+ $ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
215
+ "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
216
+ "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
217
+ "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
218
+ $ LIBBFD = ",[-.bfd]libbfd.olb/lib"
219
+ $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
220
+ $ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
221
+ $!
222
+ $ write sys$output "CFLAGS=",CFLAGS
223
+ $ if p1.nes."LINK"
224
+ $ then
225
+ $ write sys$output "Compiling targ-cpu.c (/noopt)"
226
+ $ cc 'CFLAGS /noopt targ-cpu
227
+ $ NUM = 0
228
+ $ LOOP:
229
+ $ F = F$ELEMENT(NUM,",",FILES)
230
+ $ IF F.EQS."," THEN GOTO END
231
+ $ write sys$output "Compiling ", F, ".c"
232
+ $ cc 'CFLAGS 'F.c
233
+ $ NUM = NUM + 1
234
+ $ GOTO LOOP
235
+ $ END:
236
+ $ endif
237
+ $ purge
238
+ $!
239
+ $ write sys$output "Building as.exe"
240
+ $ AS_OBJS="targ-cpu," + FILES + LIBOPCODES + LIBBFD + LIBIBERTY
241
+ $ link/exe=as 'AS_OBJS
172
242
$exit
243
+
0 commit comments