[PATCH v4 1/3] RISC-V: Add support for XCVelw extension in CV32E40P
[official-gcc.git] / gcc / ada / bindusg.adb
blob89a6caedf3147a9494d33bd81503247781a60b06
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-2023, 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 ------------------------------------------------------------------------------
26 with Osint; use Osint;
27 with Output; use Output;
28 with Switch; use Switch;
30 with System.WCh_Con; use System.WCh_Con;
32 package body Bindusg is
34 Already_Displayed : Boolean := False;
35 -- Set True if Display called, used to avoid showing usage information
36 -- more than once.
38 -------------
39 -- Display --
40 -------------
42 procedure Display is
43 begin
44 if Already_Displayed then
45 return;
46 else
47 Already_Displayed := True;
48 end if;
50 -- Usage line
52 Write_Str ("Usage: ");
53 Write_Program_Name;
54 Write_Char (' ');
55 Write_Str ("switches lfile");
56 Write_Eol;
57 Write_Eol;
59 Display_Usage_Version_And_Help;
61 -- Line for @response_file
63 Write_Line
64 (" @<resp_file> Get arguments from response file");
65 Write_Eol;
67 -- Line for -aO switch
69 Write_Line
70 (" -aOdir Specify library files search path");
72 -- Line for -aI switch
74 Write_Line
75 (" -aIdir Specify source files search path");
77 -- Line for a switch
79 Write_Line
80 (" -a Automatically initialize elaboration procedure");
82 -- Lines for -A switch
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");
89 -- Line for -b switch
91 Write_Line
92 (" -b Generate brief messages to stderr even if verbose mode "
93 & "set");
95 -- Line for -c switch
97 Write_Line
98 (" -c Check only, no generation of binder output file");
100 -- Line for -d switch
102 Write_Line
103 (" -dnn[k|m] Default primary stack size = nn [kilo|mega] bytes");
105 -- Line for D switch
107 Write_Line
108 (" -Dnn[k|m] Default secondary stack size = nn [kilo|mega] bytes");
110 -- Line for -e switch
112 Write_Line
113 (" -e Output complete list of elaboration order dependencies");
115 -- Line for -E switch
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");
126 -- Line for -f switch
128 Write_Line
129 (" -ffile Force elaboration order from given file");
131 -- Line for -F switch
133 Write_Line
134 (" -F Force checking of elaboration Flags");
136 -- Line for -G switch
138 Write_Line
139 (" -G Generate binder file suitable for CCG");
141 -- Line for -h switch
143 Write_Line
144 (" -h Output this usage (help) information");
146 -- Line for -H switch
148 Write_Line
149 (" -H Legacy elaboration order model enabled");
151 -- Lines for -I switch
153 Write_Line
154 (" -Idir Specify library and source files search path");
155 Write_Line
156 (" -I- Don't look for sources & library files in default "
157 & "directory");
159 -- Line for -k switch
161 Write_Line
162 (" -k Disable checking of elaboration flags");
164 -- Line for -K switch
166 Write_Line
167 (" -K Give list of linker options specified for link");
169 -- Line for -l switch
171 Write_Line
172 (" -l Output chosen elaboration order");
174 -- Line of -L switch
176 Write_Line
177 (" -Lxyz Library build: adainit/final renamed to xyzinit/final, "
178 & "implies -n");
180 -- Line for -m switch
182 Write_Line
183 (" -mnnn Limit number of detected errors/warnings to nnn "
184 & "(1-999999)");
186 -- Line for -minimal switch
188 Write_Line
189 (" -minimal Generate binder file suitable for space-constrained "
190 & "applications");
192 -- Line for -M switch
194 Write_Line
195 (" -Mxyz Rename generated main program from main to xyz");
197 -- Line for -n switch
199 Write_Line
200 (" -n No Ada main program (foreign main routine)");
202 -- Line for -nostdinc
204 Write_Line
205 (" -nostdinc Don't look for source files in the system default "
206 & "directory");
208 -- Line for -nostdlib
210 Write_Line
211 (" -nostdlib Don't look for library files in the system default "
212 & "directory");
214 -- Line for -o switch
216 Write_Line
217 (" -o file Give the output file name (default is b~xxx.adb)");
219 -- Line for -O switch
221 Write_Line
222 (" -O Give list of objects required for link");
224 -- Line for -p switch
226 Write_Line
227 (" -p Pessimistic (worst-case) elaboration order");
229 -- Line for -P switch
231 Write_Line
232 (" -P Generate binder file suitable for CodePeer");
234 -- Line for Q switch
236 Write_Line
237 (" -Qnnn Generate nnn additional default-sized secondary stacks");
239 -- Line for -r switch
241 Write_Line
242 (" -r List restrictions that could be applied to this "
243 & "partition");
245 -- Line for -R switch
247 Write_Line
248 (" -R List sources referenced in closure");
250 -- Line for -s switch
252 Write_Line
253 (" -s Require all source files to be present");
255 -- Line for -S?? switch
257 Write_Line
258 (" -S?? Sin/lo/hi/xx/ev Initialize_Scalars "
259 & "invalid/low/high/hex/env var");
261 -- Line for -static
263 Write_Line
264 (" -static Link against a static GNAT run time");
266 -- Line for -shared
268 Write_Line
269 (" -shared Link against a shared GNAT run time");
271 -- Line for -t switch
273 Write_Line
274 (" -t Tolerate time stamp and other consistency errors");
276 -- Line for -T switch
278 Write_Line
279 (" -Tn Set time slice value to n milliseconds (n >= 0)");
281 -- Line for -u switch
283 Write_Line
284 (" -un Enable dynamic stack analysis, with n results stored");
286 -- Line for -v switch
288 Write_Line
289 (" -v Verbose mode. Error messages, header, summary output to "
290 & "stdout");
292 -- Line for -V switch
294 Write_Line
295 (" -Vkey=val Record bind-time variable key with value val");
296 -- Line for -w switch
298 Write_Line
299 (" -wx Warning mode. (x=s/e for suppress/treat as error)");
301 -- Line for -W switch
303 Write_Str
304 (" -W? Wide character encoding method (");
306 for J in WC_Encoding_Method loop
307 Write_Char (WC_Encoding_Letters (J));
309 if J = WC_Encoding_Method'Last then
310 Write_Char (')');
311 else
312 Write_Char ('/');
313 end if;
314 end loop;
316 Write_Eol;
318 -- Line for -x switch
320 Write_Line
321 (" -x Exclude source files (check object consistency only)");
323 -- Line for -xdr switch
325 Write_Line
326 (" -xdr Use the XDR protocol for streaming");
328 -- Line for -X switch
330 Write_Line
331 (" -Xnnn Default exit status value = nnn");
333 -- Line for -y switch
335 Write_Line
336 (" -y Enable leap seconds");
338 -- Line for -z switch
340 Write_Line
341 (" -z No main subprogram (zero main)");
343 -- Line for -Z switch
345 Write_Line
346 (" -Z Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
348 -- Line for --RTS
350 Write_Line
351 (" --RTS=dir Specify the default source and object search path");
353 -- Line for sfile
355 Write_Line
356 (" lfile Library file names");
357 end Display;
359 end Bindusg;