Wno-frame-address.c: Skip on hppa*-*-*.
[official-gcc.git] / gcc / ada / bindusg.adb
blobf1a61777bfbfd1ed2d9b21e454cbc3f6030961e3
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-2015, 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 (" @<resp_file> Get arguments from response file");
64 Write_Eol;
66 -- Line for -aO switch
68 Write_Line (" -aOdir Specify library files search path");
70 -- Line for -aI switch
72 Write_Line (" -aIdir Specify source files search path");
74 -- Line for a switch
76 Write_Line (" -a Automatically initialize elaboration " &
77 "procedure");
79 -- Lines for -A switch
81 Write_Line (" -A Give list of ALI files in partition");
82 Write_Line (" -A=file Write ALI file list to named file");
84 -- Line for -b switch
86 Write_Line (" -b Generate brief messages to stderr " &
87 "even if verbose mode set");
89 -- Line for -c switch
91 Write_Line (" -c Check only, no generation of " &
92 "binder output file");
94 -- Line for -d switch
96 Write_Line (" -dnn[k|m] Default primary stack " &
97 "size = nn [kilo|mega] bytes");
99 -- Line for D switch
101 Write_Line (" -Dnn[k|m] Default secondary stack " &
102 "size = nn [kilo|mega] bytes");
104 -- Line for -e switch
106 Write_Line (" -e Output complete list of elaboration " &
107 "order dependencies");
109 -- Line for -E switch
111 Write_Line (" -Ea Store tracebacks in exception occurrences");
112 Write_Line (" -Es Store tracebacks in exception occurrences,");
113 Write_Line (" and enable symbolic tracebacks");
114 Write_Line (" -E Same as -Ea");
116 -- The -f switch is voluntarily omitted, because it is obsolete
118 -- Line for -F switch
120 Write_Line (" -F Force checking of elaboration Flags");
122 -- Line for -h switch
124 Write_Line (" -h Output this usage (help) information");
126 -- Lines for -I switch
128 Write_Line (" -Idir Specify library and source files search path");
129 Write_Line (" -I- Don't look for sources & library files " &
130 "in default directory");
132 -- Line for -K switch
134 Write_Line (" -K Give list of linker options specified " &
135 "for link");
137 -- Line for -l switch
139 Write_Line (" -l Output chosen elaboration order");
141 -- Line of -L switch
143 Write_Line (" -Lxyz Library build: adainit/final " &
144 "renamed to xyzinit/final, implies -n");
146 -- Line for -m switch
148 Write_Line (" -mnnn Limit number of detected errors/warnings " &
149 "to nnn (1-999999)");
151 -- Line for -M switch
153 Write_Line (" -Mxyz Rename generated main program from " &
154 "main to xyz");
156 -- Line for -n switch
158 Write_Line (" -n No Ada main program (foreign main routine)");
160 -- Line for -nostdinc
162 Write_Line (" -nostdinc Don't look for source files " &
163 "in the system default directory");
165 -- Line for -nostdlib
167 Write_Line (" -nostdlib Don't look for library files " &
168 "in the system default directory");
170 -- Line for -o switch
172 Write_Line (" -o file Give the output file name " &
173 "(default is b~xxx.adb)");
175 -- Line for -O switch
177 Write_Line (" -O Give list of objects required for link");
179 -- Line for -p switch
181 Write_Line (" -p Pessimistic (worst-case) elaboration order");
183 -- Line for -P switch
185 Write_Line (" -P Generate binder file suitable for CodePeer");
187 -- Line for -r switch
189 Write_Line (" -r List restrictions that could be applied " &
190 "to this partition");
192 -- Line for -R switch
194 Write_Line
195 (" -R List sources referenced in closure");
197 -- Line for -s switch
199 Write_Line (" -s Require all source files to be present");
201 -- Line for -S?? switch
203 Write_Line (" -S?? Sin/lo/hi/xx/ev Initialize_Scalars " &
204 "invalid/low/high/hex/env var");
206 -- Line for -static
208 Write_Line (" -static Link against a static GNAT run time");
210 -- Line for -shared
212 Write_Line (" -shared Link against a shared GNAT run time");
214 -- Line for -t switch
216 Write_Line (" -t Tolerate time stamp and other " &
217 "consistency errors");
219 -- Line for -T switch
221 Write_Line (" -Tn Set time slice value to n " &
222 "milliseconds (n >= 0)");
224 -- Line for -u switch
226 Write_Line (" -un Enable dynamic stack analysis, with " &
227 "n results stored");
229 -- Line for -v switch
231 Write_Line (" -v Verbose mode. Error messages, " &
232 "header, summary output to stdout");
234 -- Line for -V switch
236 Write_Line (" -Vkey=val Record bind-time variable key " &
237 "with value val");
238 -- Line for -w switch
240 Write_Line (" -wx Warning mode. (x=s/e for " &
241 "suppress/treat as error)");
243 -- Line for -W switch
245 Write_Str (" -W? Wide character encoding method (");
247 for J in WC_Encoding_Method loop
248 Write_Char (WC_Encoding_Letters (J));
250 if J = WC_Encoding_Method'Last then
251 Write_Char (')');
252 else
253 Write_Char ('/');
254 end if;
255 end loop;
257 Write_Eol;
259 -- Line for -x switch
261 Write_Line (" -x Exclude source files (check object " &
262 "consistency only)");
264 -- Line for -X switch
266 Write_Line (" -Xnnn Default exit status value = nnn");
268 -- Line for -y switch
270 Write_Line (" -y Enable leap seconds");
272 -- Line for -z switch
274 Write_Line (" -z No main subprogram (zero main)");
276 -- Line for --RTS
278 -- Line for -Z switch
280 Write_Line (" -Z " &
281 "Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
283 -- Line for --RTS
285 Write_Line (" --RTS=dir Specify the default source and " &
286 "object search path");
288 -- Line for sfile
290 Write_Line (" lfile Library file names");
291 end Display;
293 end Bindusg;