]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gas/configure.com
[PATCH] fix windmc typedef bug
[thirdparty/binutils-gdb.git] / gas / configure.com
1 $! configure.com
2 $! This file sets things up to build gas on a VMS system to generate object
3 $! files for a VMS system. We do not use the configure script, since we
4 $! do not have /bin/sh to execute it.
5 $!
6 $! Copyright (C) 2012-2020 Free Software Foundation, Inc.
7 $!
8 $! This file is free software; you can redistribute it and/or modify
9 $! it under the terms of the GNU General Public License as published by
10 $! the Free Software Foundation; either version 3 of the License, or
11 $! (at your option) any later version.
12 $!
13 $! This program is distributed in the hope that it will be useful,
14 $! but WITHOUT ANY WARRANTY; without even the implied warranty of
15 $! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 $! GNU General Public License for more details.
17 $!
18 $! You should have received a copy of the GNU General Public License
19 $! along with this program; see the file COPYING3. If not see
20 $! <http://www.gnu.org/licenses/>.
21 $!
22 $!
23 $ arch=F$GETSYI("ARCH_NAME")
24 $ arch=F$EDIT(arch,"LOWERCASE")
25 $ if arch.eqs."alpha"
26 $ then
27 $ format = "evax"
28 $ env = "generic"
29 $ target_alias = "alpha-dec-openvms"
30 $ target_canonical = "alpha-dec-openvms"
31 $ endif
32 $ if arch.eqs."ia64"
33 $ then
34 $ format = "elf"
35 $ env = "vms"
36 $ target_alias = "ia64-openvms"
37 $ target_canonical = "ia64-unknown-openvms"
38 $ endif
39 $!
40 $!
41 $ write sys$output "Generate targ-cpu.[ch]"
42 $!
43 $! Target specific information
44 $ open/write outfile targ-cpu.h
45 $ write outfile "#include ""tc-''arch'.h"""
46 $ close outfile
47 $! Target specific information
48 $ open/write outfile targ-cpu.c
49 $ write outfile "#include ""tc-''arch'.c"""
50 $ close outfile
51 $!
52 $ write sys$output "Generate targ-env.h"
53 $!
54 $ open/write outfile targ-env.h
55 $ write outfile "#include ""te-''env'.h"""
56 $ close outfile
57 $!
58 $ write sys$output "Generate obj-format.[ch]"
59 $!
60 $! Code to handle the object file format.
61 $ open/write outfile obj-format.h
62 $ write outfile "#include ""obj-''format'.h"""
63 $ close outfile
64 $ open/write outfile obj-format.c
65 $ write outfile "#include ""obj-''format'.c"""
66 $ close outfile
67 $!
68 $ write sys$output "Generate atof-targ.c"
69 $!
70 $ create atof-targ.c
71 #include "atof-ieee.c"
72 $!
73 $ write sys$output "Generate gas/config.h"
74 $!
75 $ create config-vms.in
76 /* config.h. Generated by configure.com. */
77 /* Define to 1 if using `alloca.c'. */
78 #undef C_ALLOCA
79
80 /* Default architecture. */
81 #undef DEFAULT_ARCH
82
83 /* Default emulation. */
84 #define DEFAULT_EMULATION ""
85
86 /* Supported emulations. */
87 #define EMULATIONS
88
89 /* Define if you want run-time sanity checks. */
90 #undef ENABLE_CHECKING
91
92 /* Define to 1 if translation of program messages to the user's native
93 language is requested. */
94 #undef ENABLE_NLS
95
96 /* Define to 1 if you have `alloca', as a function or macro. */
97 #define HAVE_ALLOCA 1
98 #include <builtins.h>
99 #define C_alloca(x) __ALLOCA(x)
100
101 /* Define to 1 if you have the `basename' function. */
102 #define HAVE_DECL_BASENAME 1
103
104 /* Is the prototype for getopt in <unistd.h> in the expected format? */
105 #define HAVE_DECL_GETOPT 1
106
107 /* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
108 don't. */
109 #undef HAVE_DECL_VSNPRINTF
110
111 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
112 don't. */
113 #define HAVE_DECL_SNPRINTF 1
114
115 /* Define to 1 if you have the <errno.h> header file. */
116 #define HAVE_ERRNO_H 1
117
118 /* Define to 1 if you have the <limits.h> header file. */
119 #undef HAVE_LIMITS_H
120
121 /* Define to 1 if you have the `remove' function. */
122 #define HAVE_REMOVE 1
123
124 /* Define to 1 if you have the <stdarg.h> header file. */
125 #define HAVE_STDARG_H 1
126
127 /* Define to 1 if you have the <stdint.h> header file. */
128 #undef HAVE_STDINT_H
129
130 /* Define to 1 if you have the <stdlib.h> header file. */
131 #define HAVE_STDLIB_H 1
132
133 /* Define to 1 if you have the <strings.h> header file. */
134 #define HAVE_STRINGS_H 1
135
136 /* Define to 1 if you have the <string.h> header file. */
137 #define HAVE_STRING_H 1
138
139 /* Define to 1 if you have the <sys/stat.h> header file. */
140 #undef HAVE_SYS_STAT_H
141
142 /* Define to 1 if you have the <sys/types.h> header file. */
143 #define HAVE_SYS_TYPES_H
144
145 /* Define to 1 if you have the <unistd.h> header file. */
146 #define HAVE_UNISTD_H
147
148 /* Define to 1 if you have the `unlink' function. */
149 #undef HAVE_UNLINK
150
151 /* Name of package */
152 #define PACKAGE "gas"
153
154 /* Define to the address where bug reports for this package should be sent. */
155 #define PACKAGE_BUGREPORT ""
156
157 /* Define to the full name of this package. */
158 #define PACKAGE_NAME ""
159
160 /* Define to the full name and version of this package. */
161 #define PACKAGE_STRING ""
162
163 /* Define to the one symbol short name of this package. */
164 #define PACKAGE_TARNAME ""
165
166 /* Define to the version of this package. */
167 #define PACKAGE_VERSION ""
168
169 /* Define to 1 if you have the ANSI C header files. */
170 #define STDC_HEADERS 1
171
172 /* Target OS. */
173 #define TARGET_OS "openvms"
174
175 /* Target vendor. */
176 #define TARGET_VENDOR "dec"
177
178 /* Define to 1 if your processor stores words with the most significant byte
179 first (like Motorola and SPARC, unlike Intel and VAX). */
180 #define WORDS_BIGENDIAN 1
181
182 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
183 `char[]'. */
184 #undef YYTEXT_POINTER
185
186 /* Version number of package */
187 $!
188 $! Get VERSION from ../bfd/version.m4
189 $!
190 $ edit/tpu/nojournal/nosection/nodisplay/command=sys$input
191 $DECK
192 set (success, off);
193 mfile := CREATE_BUFFER("mfile", "[-.bfd]version.m4");
194 match_pos := SEARCH_QUIETLY('m4_define([BFD_VERSION], [', FORWARD, EXACT, mfile);
195 IF match_pos <> 0 THEN;
196 POSITION(BEGINNING_OF(match_pos));
197 ERASE(match_pos);
198 vers := CURRENT_LINE-"])";
199 ELSE;
200 vers := "unknown";
201 ENDIF;
202
203 file := CREATE_BUFFER("file", "config-vms.in");
204 POSITION(END_OF(file));
205 COPY_TEXT("#define VERSION """);
206 COPY_TEXT(vers);
207 COPY_TEXT("""");
208 WRITE_FILE(file, "config.h");
209 QUIT
210 $EOD
211 $del/nolog config-vms.in;
212 $ open/append outfile config.h
213 $ write outfile ""
214 $ write outfile "/* Target alias. */"
215 $ write outfile "#define TARGET_ALIAS ""''target_alias'"""
216 $ write outfile ""
217 $ write outfile "/* Canonical target. */"
218 $ write outfile "#define TARGET_CANONICAL ""''target_canonical'"""
219 $ write outfile ""
220 $ write outfile "/* Target CPU. */"
221 $ write outfile "#define TARGET_CPU ""'arch'"""
222 $ close outfile
223 $!
224 $ write sys$output "Generate gas/build.com"
225 $!
226 $ create build.com
227 $DECK
228 $ DEFS=""
229 $ OPT="/noopt/debug"
230 $ CFLAGS=OPT + "/include=([],""../include"",[-.bfd],""../"",[.config])" +-
231 "/name=(as_is,shortened)" +-
232 "/prefix=(all,exc=(""getopt"",""optarg"",""optopt"",""optind"",""opterr""))"
233 $ FILES="obj-format,atof-targ,app,as,atof-generic,cond,depend,"+-
234 "expr,flonum-konst,flonum-copy,flonum-mult,frags,hash,input-file,"+-
235 "input-scrub,literal,messages,output-file,read,subsegs,symbols,write,"+-
236 "listing,ecoff,stabs,sb,macro,ehopt,dw2gencfi,dwarf2dbg,remap"
237 $ LIBBFD = ",[-.bfd]libbfd.olb/lib"
238 $ LIBIBERTY = ",[-.libiberty]libiberty.olb/lib"
239 $ LIBOPCODES = ",[-.opcodes]libopcodes.olb/lib"
240 $!
241 $ AS_OBJS="targ-cpu," + FILES
242 $!
243 $ write sys$output "CFLAGS=",CFLAGS
244 $!
245 $EOD
246 $!
247 $ if arch.eqs."ia64"
248 $ then
249 $ open/append outfile build.com
250 $ write outfile "$ write sys$output ""Compiling te-vms.c"""
251 $ write outfile "$ cc 'CFLAGS /obj=te-vms.obj [.config]te-vms.c + " +-
252 "sys$library:sys$lib_c.tlb/lib"
253 $ write outfile "$ AS_OBJS=AS_OBJS + "",te-vms.obj"""
254 $ close outfile
255 $ endif
256 $!
257 $ append sys$input build.com
258 $DECK
259 $ if p1.nes."LINK"
260 $ then
261 $ write sys$output "Compiling targ-cpu.c (/noopt)"
262 $ cc 'CFLAGS /noopt targ-cpu
263 $ NUM = 0
264 $ LOOP:
265 $ F = F$ELEMENT(NUM,",",FILES)
266 $ IF F.EQS."," THEN GOTO END
267 $ write sys$output "Compiling ", F, ".c"
268 $ cc 'CFLAGS 'F.c
269 $ NUM = NUM + 1
270 $ GOTO LOOP
271 $ END:
272 $ endif
273 $ purge
274 $!
275 $ write sys$output "Building as.exe"
276 $ AS_OBJS=AS_OBJS + LIBOPCODES + LIBBFD + LIBIBERTY
277 $ link/exe=as 'AS_OBJS
278 $EOD
279 $exit
280