111
|
1 ------------------------------------------------------------------------------
|
|
2 -- --
|
|
3 -- GNAT COMPILER COMPONENTS --
|
|
4 -- --
|
|
5 -- B I N D U S G --
|
|
6 -- --
|
|
7 -- B o d y --
|
|
8 -- --
|
|
9 -- Copyright (C) 1992-2017, Free Software Foundation, Inc. --
|
|
10 -- --
|
|
11 -- GNAT is free software; you can redistribute it and/or modify it under --
|
|
12 -- terms of the GNU General Public License as published by the Free Soft- --
|
|
13 -- ware Foundation; either version 3, or (at your option) any later ver- --
|
|
14 -- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
|
|
15 -- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
|
|
16 -- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
|
|
17 -- for more details. You should have received a copy of the GNU General --
|
|
18 -- Public License distributed with GNAT; see file COPYING3. If not, go to --
|
|
19 -- http://www.gnu.org/licenses for a complete copy of the license. --
|
|
20 -- --
|
|
21 -- GNAT was originally developed by the GNAT team at New York University. --
|
|
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
|
|
23 -- --
|
|
24 ------------------------------------------------------------------------------
|
|
25
|
|
26 with Osint; use Osint;
|
|
27 with Output; use Output;
|
|
28 with Switch; use Switch;
|
|
29
|
|
30 with System.WCh_Con; use System.WCh_Con;
|
|
31
|
|
32 package body Bindusg is
|
|
33
|
|
34 Already_Displayed : Boolean := False;
|
|
35 -- Set True if Display called, used to avoid showing usage information
|
|
36 -- more than once.
|
|
37
|
|
38 -------------
|
|
39 -- Display --
|
|
40 -------------
|
|
41
|
|
42 procedure Display is
|
|
43 begin
|
|
44 if Already_Displayed then
|
|
45 return;
|
|
46 else
|
|
47 Already_Displayed := True;
|
|
48 end if;
|
|
49
|
|
50 -- Usage line
|
|
51
|
|
52 Write_Str ("Usage: ");
|
|
53 Write_Program_Name;
|
|
54 Write_Char (' ');
|
|
55 Write_Str ("switches lfile");
|
|
56 Write_Eol;
|
|
57 Write_Eol;
|
|
58
|
|
59 Display_Usage_Version_And_Help;
|
|
60
|
|
61 -- Line for @response_file
|
|
62
|
|
63 Write_Line
|
|
64 (" @<resp_file> Get arguments from response file");
|
|
65 Write_Eol;
|
|
66
|
|
67 -- Line for -aO switch
|
|
68
|
|
69 Write_Line
|
|
70 (" -aOdir Specify library files search path");
|
|
71
|
|
72 -- Line for -aI switch
|
|
73
|
|
74 Write_Line
|
|
75 (" -aIdir Specify source files search path");
|
|
76
|
|
77 -- Line for a switch
|
|
78
|
|
79 Write_Line
|
|
80 (" -a Automatically initialize elaboration procedure");
|
|
81
|
|
82 -- Lines for -A switch
|
|
83
|
|
84 Write_Line
|
|
85 (" -A Give list of ALI files in partition");
|
|
86 Write_Line
|
|
87 (" -A=file Write ALI file list to named file");
|
|
88
|
|
89 -- Line for -b switch
|
|
90
|
|
91 Write_Line
|
|
92 (" -b Generate brief messages to stderr even if verbose mode "
|
|
93 & "set");
|
|
94
|
|
95 -- Line for -c switch
|
|
96
|
|
97 Write_Line
|
|
98 (" -c Check only, no generation of binder output file");
|
|
99
|
|
100 -- Line for -d switch
|
|
101
|
|
102 Write_Line
|
|
103 (" -dnn[k|m] Default primary stack size = nn [kilo|mega] bytes");
|
|
104
|
|
105 -- Line for D switch
|
|
106
|
|
107 Write_Line
|
|
108 (" -Dnn[k|m] Default secondary stack size = nn [kilo|mega] bytes");
|
|
109
|
|
110 -- Line for -e switch
|
|
111
|
|
112 Write_Line
|
|
113 (" -e Output complete list of elaboration order dependencies");
|
|
114
|
|
115 -- Line for -E switch
|
|
116
|
|
117 Write_Line
|
|
118 (" -Ea Store tracebacks in exception occurrences");
|
|
119 Write_Line
|
|
120 (" -Es Store tracebacks in exception occurrences,");
|
|
121 Write_Line
|
|
122 (" and enable symbolic tracebacks");
|
|
123 Write_Line
|
|
124 (" -E Same as -Ea");
|
|
125
|
|
126 -- Line for -f switch
|
|
127
|
|
128 Write_Line
|
|
129 (" -ffile Force elaboration order from given file");
|
|
130
|
|
131 -- Line for -F switch
|
|
132
|
|
133 Write_Line
|
|
134 (" -F Force checking of elaboration Flags");
|
|
135
|
|
136 -- Line for -h switch
|
|
137
|
|
138 Write_Line
|
|
139 (" -h Output this usage (help) information");
|
|
140
|
|
141 -- Lines for -I switch
|
|
142
|
|
143 Write_Line
|
|
144 (" -Idir Specify library and source files search path");
|
|
145 Write_Line
|
|
146 (" -I- Don't look for sources & library files in default "
|
|
147 & "directory");
|
|
148
|
|
149 -- Line for -K switch
|
|
150
|
|
151 Write_Line
|
|
152 (" -K Give list of linker options specified for link");
|
|
153
|
|
154 -- Line for -l switch
|
|
155
|
|
156 Write_Line
|
|
157 (" -l Output chosen elaboration order");
|
|
158
|
|
159 -- Line of -L switch
|
|
160
|
|
161 Write_Line
|
|
162 (" -Lxyz Library build: adainit/final renamed to xyzinit/final, "
|
|
163 & "implies -n");
|
|
164
|
|
165 -- Line for -m switch
|
|
166
|
|
167 Write_Line
|
|
168 (" -mnnn Limit number of detected errors/warnings to nnn "
|
|
169 & "(1-999999)");
|
|
170
|
|
171 -- Line for -M switch
|
|
172
|
|
173 Write_Line
|
|
174 (" -Mxyz Rename generated main program from main to xyz");
|
|
175
|
|
176 -- Line for -n switch
|
|
177
|
|
178 Write_Line
|
|
179 (" -n No Ada main program (foreign main routine)");
|
|
180
|
|
181 -- Line for -nostdinc
|
|
182
|
|
183 Write_Line
|
|
184 (" -nostdinc Don't look for source files in the system default "
|
|
185 & "directory");
|
|
186
|
|
187 -- Line for -nostdlib
|
|
188
|
|
189 Write_Line
|
|
190 (" -nostdlib Don't look for library files in the system default "
|
|
191 & "directory");
|
|
192
|
|
193 -- Line for -o switch
|
|
194
|
|
195 Write_Line
|
|
196 (" -o file Give the output file name (default is b~xxx.adb)");
|
|
197
|
|
198 -- Line for -O switch
|
|
199
|
|
200 Write_Line
|
|
201 (" -O Give list of objects required for link");
|
|
202
|
|
203 -- Line for -p switch
|
|
204
|
|
205 Write_Line
|
|
206 (" -p Pessimistic (worst-case) elaboration order");
|
|
207
|
|
208 -- Line for -P switch
|
|
209
|
|
210 Write_Line
|
|
211 (" -P Generate binder file suitable for CodePeer");
|
|
212
|
|
213 -- Line for Q switch
|
|
214
|
|
215 Write_Line
|
|
216 (" -Qnnn Generate nnn default-sized secondary stacks");
|
|
217
|
|
218 -- Line for -r switch
|
|
219
|
|
220 Write_Line
|
|
221 (" -r List restrictions that could be applied to this "
|
|
222 & "partition");
|
|
223
|
|
224 -- Line for -R switch
|
|
225
|
|
226 Write_Line
|
|
227 (" -R List sources referenced in closure");
|
|
228
|
|
229 -- Line for -s switch
|
|
230
|
|
231 Write_Line
|
|
232 (" -s Require all source files to be present");
|
|
233
|
|
234 -- Line for -S?? switch
|
|
235
|
|
236 Write_Line
|
|
237 (" -S?? Sin/lo/hi/xx/ev Initialize_Scalars "
|
|
238 & "invalid/low/high/hex/env var");
|
|
239
|
|
240 -- Line for -static
|
|
241
|
|
242 Write_Line
|
|
243 (" -static Link against a static GNAT run time");
|
|
244
|
|
245 -- Line for -shared
|
|
246
|
|
247 Write_Line
|
|
248 (" -shared Link against a shared GNAT run time");
|
|
249
|
|
250 -- Line for -t switch
|
|
251
|
|
252 Write_Line
|
|
253 (" -t Tolerate time stamp and other consistency errors");
|
|
254
|
|
255 -- Line for -T switch
|
|
256
|
|
257 Write_Line
|
|
258 (" -Tn Set time slice value to n milliseconds (n >= 0)");
|
|
259
|
|
260 -- Line for -u switch
|
|
261
|
|
262 Write_Line
|
|
263 (" -un Enable dynamic stack analysis, with n results stored");
|
|
264
|
|
265 -- Line for -v switch
|
|
266
|
|
267 Write_Line
|
|
268 (" -v Verbose mode. Error messages, header, summary output to "
|
|
269 & "stdout");
|
|
270
|
|
271 -- Line for -V switch
|
|
272
|
|
273 Write_Line
|
|
274 (" -Vkey=val Record bind-time variable key with value val");
|
|
275 -- Line for -w switch
|
|
276
|
|
277 Write_Line
|
|
278 (" -wx Warning mode. (x=s/e for suppress/treat as error)");
|
|
279
|
|
280 -- Line for -W switch
|
|
281
|
|
282 Write_Str
|
|
283 (" -W? Wide character encoding method (");
|
|
284
|
|
285 for J in WC_Encoding_Method loop
|
|
286 Write_Char (WC_Encoding_Letters (J));
|
|
287
|
|
288 if J = WC_Encoding_Method'Last then
|
|
289 Write_Char (')');
|
|
290 else
|
|
291 Write_Char ('/');
|
|
292 end if;
|
|
293 end loop;
|
|
294
|
|
295 Write_Eol;
|
|
296
|
|
297 -- Line for -x switch
|
|
298
|
|
299 Write_Line
|
|
300 (" -x Exclude source files (check object consistency only)");
|
|
301
|
|
302 -- Line for -X switch
|
|
303
|
|
304 Write_Line
|
|
305 (" -Xnnn Default exit status value = nnn");
|
|
306
|
|
307 -- Line for -y switch
|
|
308
|
|
309 Write_Line
|
|
310 (" -y Enable leap seconds");
|
|
311
|
|
312 -- Line for -z switch
|
|
313
|
|
314 Write_Line
|
|
315 (" -z No main subprogram (zero main)");
|
|
316
|
|
317 -- Line for -Z switch
|
|
318
|
|
319 Write_Line
|
|
320 (" -Z Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
|
|
321
|
|
322 -- Line for --RTS
|
|
323
|
|
324 Write_Line
|
|
325 (" --RTS=dir Specify the default source and object search path");
|
|
326
|
|
327 -- Line for sfile
|
|
328
|
|
329 Write_Line
|
|
330 (" lfile Library file names");
|
|
331 end Display;
|
|
332
|
|
333 end Bindusg;
|