Subversion Repositories tendra.SVN

Rev

Rev 6 | Details | Compare with Previous | Last modification | View Log | RSS feed

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