2 |
7u83 |
1 |
/*
|
|
|
2 |
Crown Copyright (c) 1997
|
|
|
3 |
|
|
|
4 |
This TenDRA(r) Computer Program is subject to Copyright
|
|
|
5 |
owned by the United Kingdom Secretary of State for Defence
|
|
|
6 |
acting through the Defence Evaluation and Research Agency
|
|
|
7 |
(DERA). It is made available to Recipients with a
|
|
|
8 |
royalty-free licence for its use, reproduction, transfer
|
|
|
9 |
to other parties and amendment for any purpose not excluding
|
|
|
10 |
product development provided that any such use et cetera
|
|
|
11 |
shall be deemed to be acceptance of the following conditions:-
|
|
|
12 |
|
|
|
13 |
(1) Its Recipients shall ensure that this Notice is
|
|
|
14 |
reproduced upon any copies or amended versions of it;
|
|
|
15 |
|
|
|
16 |
(2) Any amended version of it shall be clearly marked to
|
|
|
17 |
show both the nature of and the organisation responsible
|
|
|
18 |
for the relevant amendment or amendments;
|
|
|
19 |
|
|
|
20 |
(3) Its onward transfer from a recipient to another
|
|
|
21 |
party shall be deemed to be that party's acceptance of
|
|
|
22 |
these conditions;
|
|
|
23 |
|
|
|
24 |
(4) DERA gives no warranty or assurance as to its
|
|
|
25 |
quality or suitability for any purpose and DERA accepts
|
|
|
26 |
no liability whatsoever in relation to any use to which
|
|
|
27 |
it may be put.
|
|
|
28 |
*/
|
|
|
29 |
|
|
|
30 |
|
|
|
31 |
#ifndef FLAGS_INCLUDED
|
|
|
32 |
#define FLAGS_INCLUDED
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
/*
|
|
|
36 |
PROCEDURE DECLARATIONS
|
|
|
37 |
|
|
|
38 |
These routines are concerned with initialising and updating the
|
|
|
39 |
values of the various compilation options.
|
|
|
40 |
*/
|
|
|
41 |
|
|
|
42 |
extern void initialise_options PROTO_S ( ( void ) ) ;
|
|
|
43 |
extern void update_options PROTO_S ( ( void ) ) ;
|
|
|
44 |
extern void set_machine PROTO_S ( ( void ) ) ;
|
|
|
45 |
extern void set_stage PROTO_S ( ( int, int ) ) ;
|
|
|
46 |
|
|
|
47 |
|
|
|
48 |
/*
|
|
|
49 |
STRING VARIABLES
|
|
|
50 |
|
|
|
51 |
These variables give various compilation constants.
|
|
|
52 |
*/
|
|
|
53 |
|
|
|
54 |
extern char *api_info ;
|
|
|
55 |
extern char *api_output ;
|
|
|
56 |
extern char *dump_opts ;
|
|
|
57 |
extern char *environ_dir ;
|
|
|
58 |
extern char *final_name ;
|
|
|
59 |
extern char *machine_name ;
|
|
|
60 |
extern char *name_E_file ;
|
|
|
61 |
extern char *name_h_file ;
|
|
|
62 |
extern char *name_j_file ;
|
|
|
63 |
extern char *name_k_file ;
|
|
|
64 |
extern char *name_K_file ;
|
|
|
65 |
extern char *name_d_file ;
|
|
|
66 |
extern char *name_p_file ;
|
|
|
67 |
extern char *temporary_dir ;
|
|
|
68 |
extern char *tokdef_output ;
|
|
|
69 |
extern char *version_flag ;
|
|
|
70 |
|
|
|
71 |
|
|
|
72 |
/*
|
|
|
73 |
INTERNAL OPTIONS
|
|
|
74 |
|
|
|
75 |
These variables control the behaviour of tcc.
|
|
|
76 |
*/
|
|
|
77 |
|
|
|
78 |
extern boolean api_checks ;
|
|
|
79 |
extern boolean checker ;
|
|
|
80 |
extern boolean copyright ;
|
|
|
81 |
extern boolean dry_run ;
|
|
|
82 |
extern boolean link_specs ;
|
|
|
83 |
extern boolean make_up_names ;
|
|
|
84 |
extern boolean show_api ;
|
|
|
85 |
extern boolean show_errors ;
|
|
|
86 |
extern boolean suffix_overrides ;
|
|
|
87 |
extern boolean taciturn ;
|
|
|
88 |
extern boolean tidy_up ;
|
|
|
89 |
extern boolean time_commands ;
|
|
|
90 |
extern boolean verbose ;
|
|
|
91 |
extern boolean warnings ;
|
|
|
92 |
|
|
|
93 |
|
|
|
94 |
/*
|
|
|
95 |
COMPILATION CONTROL OPTIONS
|
|
|
96 |
|
|
|
97 |
These variables control the overall flow of the compilation.
|
|
|
98 |
*/
|
|
|
99 |
|
|
|
100 |
|
|
|
101 |
extern boolean make_archive ;
|
|
|
102 |
extern boolean make_complex ;
|
|
|
103 |
extern boolean make_preproc ;
|
|
|
104 |
extern boolean make_pretty ;
|
|
|
105 |
extern boolean make_tspec ;
|
|
|
106 |
extern boolean use_assembler ;
|
|
|
107 |
extern boolean use_mips_assembler ;
|
|
|
108 |
extern boolean use_alpha_assembler ;
|
|
|
109 |
extern boolean use_hp_linker ;
|
|
|
110 |
extern boolean use_sparc_cc ;
|
|
|
111 |
extern boolean use_system_cc ;
|
|
|
112 |
extern boolean use_dynlink ;
|
|
|
113 |
extern boolean allow_cpp ;
|
|
|
114 |
extern boolean allow_notation ;
|
|
|
115 |
extern boolean allow_pl_tdf ;
|
|
|
116 |
extern boolean allow_specs ;
|
|
|
117 |
|
|
|
118 |
|
|
|
119 |
/*
|
|
|
120 |
FILE PRESERVATION AND CONSTRUCTION OPTIONS
|
|
|
121 |
|
|
|
122 |
These tables control whether output files of the various file types
|
|
|
123 |
should be kept and whether the compilation stops after they are
|
|
|
124 |
produced.
|
|
|
125 |
*/
|
|
|
126 |
|
|
|
127 |
extern boolean keeps [] ;
|
|
|
128 |
extern boolean keeps_aux [] ;
|
|
|
129 |
extern boolean stops [] ;
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
/*
|
|
|
133 |
EXTRA FILE TYPES
|
|
|
134 |
|
|
|
135 |
These dummy file types are in addition to those listed in filename.h.
|
|
|
136 |
They are used in the keeps and stops arrays to resolve questions about,
|
|
|
137 |
for example, TDF building, which in terms of file types maps :
|
|
|
138 |
|
|
|
139 |
INDEP_TDF x ... x INDEP_TDF -> INDEP_TDF
|
|
|
140 |
|
|
|
141 |
By introducing a dummy type for the output we can refine the keeps and
|
|
|
142 |
stops information to, for example, keep the output but not the input.
|
|
|
143 |
*/
|
|
|
144 |
|
|
|
145 |
#define INDEP_TDF_COMPLEX ( UNKNOWN_TYPE + 1 )
|
|
|
146 |
#define C_SPEC_1 ( UNKNOWN_TYPE + 2 )
|
|
|
147 |
#define C_SPEC_2 ( UNKNOWN_TYPE + 3 )
|
|
|
148 |
#define CPP_SPEC_1 ( UNKNOWN_TYPE + 4 )
|
|
|
149 |
#define CPP_SPEC_2 ( UNKNOWN_TYPE + 5 )
|
|
|
150 |
#define INDEP_TDF_AUX ( UNKNOWN_TYPE + 6 )
|
|
|
151 |
#define BINARY_OBJ_AUX ( UNKNOWN_TYPE + 7 )
|
|
|
152 |
#define TYPE_ARRAY_SIZE ( UNKNOWN_TYPE + 8 )
|
|
|
153 |
|
|
|
154 |
|
|
|
155 |
/*
|
|
|
156 |
PRESERVATION AND CONSTRUCTION FLAGS
|
|
|
157 |
|
|
|
158 |
These identifiers are used by set_stage to set the keeps and stops
|
|
|
159 |
options for the various file types. STOP_STAGE means "stop and keep",
|
|
|
160 |
STOP_ONLY_STAGE means "stop", KEEP_STAGE means "keep" and
|
|
|
161 |
DONT_KEEP_STAGE means "don't keep".
|
|
|
162 |
*/
|
|
|
163 |
|
|
|
164 |
#define STOP_STAGE 0
|
|
|
165 |
#define STOP_ONLY_STAGE 1
|
|
|
166 |
#define KEEP_STAGE 2
|
|
|
167 |
#define DONT_KEEP_STAGE 3
|
|
|
168 |
|
|
|
169 |
|
|
|
170 |
/*
|
|
|
171 |
INDIVIDUAL OPTIONS
|
|
|
172 |
|
|
|
173 |
These flags control those individual executable options which are
|
|
|
174 |
not easily integrated into the main scheme of things.
|
|
|
175 |
*/
|
|
|
176 |
|
|
|
177 |
extern boolean flag_diag ;
|
|
|
178 |
extern boolean flag_incl ;
|
|
|
179 |
extern boolean flag_keep_err ;
|
|
|
180 |
extern boolean flag_merge_all ;
|
|
|
181 |
extern boolean flag_nepc ;
|
|
|
182 |
extern boolean flag_no_files ;
|
|
|
183 |
extern boolean flag_optim ;
|
|
|
184 |
extern boolean flag_prof ;
|
|
|
185 |
extern boolean flag_startup ;
|
|
|
186 |
extern boolean flag_strip ;
|
|
|
187 |
|
|
|
188 |
|
|
|
189 |
/*
|
|
|
190 |
EXECUTABLES
|
|
|
191 |
|
|
|
192 |
These variables give the values of the various executables used by
|
|
|
193 |
the system.
|
|
|
194 |
*/
|
|
|
195 |
|
|
|
196 |
extern list *exec_produce ;
|
|
|
197 |
extern list *exec_preproc ;
|
|
|
198 |
extern list *exec_cpp_produce ;
|
|
|
199 |
extern list *exec_cpp_preproc ;
|
|
|
200 |
extern list *exec_tdf_link ;
|
|
|
201 |
extern list *exec_translate ;
|
|
|
202 |
extern list *exec_assemble ;
|
|
|
203 |
extern list *exec_assemble_mips ;
|
|
|
204 |
extern list *exec_link ;
|
|
|
205 |
extern list *exec_notation ;
|
|
|
206 |
extern list *exec_pl_tdf ;
|
|
|
207 |
extern list *exec_pretty ;
|
|
|
208 |
extern list *exec_spec_link ;
|
|
|
209 |
extern list *exec_cpp_spec_link ;
|
|
|
210 |
extern list *exec_split_arch ;
|
|
|
211 |
extern list *exec_build_arch ;
|
|
|
212 |
extern list *exec_cat ;
|
|
|
213 |
extern list *exec_cc ;
|
|
|
214 |
extern list *exec_mkdir ;
|
|
|
215 |
extern list *exec_move ;
|
|
|
216 |
extern list *exec_remove ;
|
|
|
217 |
extern list *exec_touch ;
|
|
|
218 |
extern list *exec_dynlink ;
|
|
|
219 |
extern list *exec_dump_anal ;
|
|
|
220 |
extern list *exec_dump_link ;
|
|
|
221 |
|
|
|
222 |
|
|
|
223 |
/*
|
|
|
224 |
BUILT-IN OPTIONS
|
|
|
225 |
|
|
|
226 |
These lists of options are built into the system, although they may
|
|
|
227 |
be altered by environments and command-line options.
|
|
|
228 |
*/
|
|
|
229 |
|
|
|
230 |
extern list *std_prod_incldirs ;
|
|
|
231 |
extern list *std_prod_portfile ;
|
|
|
232 |
extern list *std_prod_startdirs ;
|
|
|
233 |
extern list *std_prod_startup ;
|
|
|
234 |
extern list *std_cpp_prod_incldirs ;
|
|
|
235 |
extern list *std_cpp_prod_startdirs ;
|
|
|
236 |
extern list *std_cpp_prod_startup ;
|
|
|
237 |
extern list *std_tdf_link_libdirs ;
|
|
|
238 |
extern list *std_tdf_link_libs ;
|
|
|
239 |
extern list *std_link_crt0 ;
|
|
|
240 |
extern list *std_link_crt1 ;
|
|
|
241 |
extern list *std_link_crtp_n ;
|
|
|
242 |
extern list *std_link_crtn ;
|
|
|
243 |
extern list *std_link_libdirs ;
|
|
|
244 |
extern list *std_link_libs ;
|
|
|
245 |
extern list *std_link_c_libs ;
|
|
|
246 |
extern list *std_link_entry ;
|
|
|
247 |
|
|
|
248 |
|
|
|
249 |
/*
|
|
|
250 |
COMMAND-LINE OPTIONS
|
|
|
251 |
|
|
|
252 |
These lists of options are those specified on the command-line.
|
|
|
253 |
*/
|
|
|
254 |
|
|
|
255 |
extern list *usr_prod_incldirs ;
|
|
|
256 |
extern list *usr_prod_foptions ;
|
|
|
257 |
extern list *usr_prod_eoptions ;
|
|
|
258 |
extern list *usr_prod_startup ;
|
|
|
259 |
extern list *usr_cpp_prod_startup ;
|
|
|
260 |
extern list *usr_pl_tdf_incldirs ;
|
|
|
261 |
extern list *usr_tdf_link_libdirs ;
|
|
|
262 |
extern list *usr_tdf_link_libs ;
|
|
|
263 |
extern list *usr_link_libdirs ;
|
|
|
264 |
extern list *usr_link_libs ;
|
|
|
265 |
|
|
|
266 |
|
|
|
267 |
/*
|
|
|
268 |
EXECUTABLE OPTIONS
|
|
|
269 |
|
|
|
270 |
These lists record the command-line options which are passed
|
|
|
271 |
directly to the various executables.
|
|
|
272 |
*/
|
|
|
273 |
|
|
|
274 |
extern list *opt_produce ;
|
|
|
275 |
extern list *opt_preproc ;
|
|
|
276 |
extern list *opt_cpp_produce ;
|
|
|
277 |
extern list *opt_cpp_preproc ;
|
|
|
278 |
extern list *opt_tdf_link ;
|
|
|
279 |
extern list *opt_translate ;
|
|
|
280 |
extern list *opt_assemble ;
|
|
|
281 |
extern list *opt_assemble_mips ;
|
|
|
282 |
extern list *opt_dynlink ;
|
|
|
283 |
extern list *opt_link ;
|
|
|
284 |
extern list *opt_notation ;
|
|
|
285 |
extern list *opt_pl_tdf ;
|
|
|
286 |
extern list *opt_pretty ;
|
|
|
287 |
extern list *opt_spec_link ;
|
|
|
288 |
extern list *opt_cpp_spec_link ;
|
|
|
289 |
extern list *opt_dump_anal ;
|
|
|
290 |
extern list *opt_dump_link ;
|
|
|
291 |
extern list *opt_archive ;
|
|
|
292 |
extern list *opt_joiner ;
|
|
|
293 |
extern list *opt_cc ;
|
|
|
294 |
extern list *opt_startup ;
|
|
|
295 |
extern list *opt_endup ;
|
|
|
296 |
extern list *opt_unknown ;
|
|
|
297 |
|
|
|
298 |
|
|
|
299 |
#endif
|