2007-06-06 Benjamin Kosnik <bkoz@redhat.com>
[official-gcc.git] / gcc / ada / bindusg.adb
blob4efb5fe19c228ccb4c9694fdb4aeadc8091a96fc
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-2007, 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 2, 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 COPYING. If not, write --
19 -- to the Free Software Foundation, 51 Franklin Street, Fifth Floor, --
20 -- Boston, MA 02110-1301, USA. --
21 -- --
22 -- GNAT was originally developed by the GNAT team at New York University. --
23 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 -- --
25 ------------------------------------------------------------------------------
27 with Osint; use Osint;
28 with Output; use Output;
30 package body Bindusg is
32 Already_Displayed : Boolean := False;
33 -- Set True if Display called, used to avoid showing usage information
34 -- more than once.
36 -------------
37 -- Display --
38 -------------
40 procedure Display is
41 begin
42 if Already_Displayed then
43 return;
44 else
45 Already_Displayed := True;
46 end if;
48 -- Usage line
50 Write_Str ("Usage: ");
51 Write_Program_Name;
52 Write_Char (' ');
53 Write_Str ("switches lfile");
54 Write_Eol;
55 Write_Eol;
57 -- Line for @response_file
59 Write_Line (" @<resp_file> Get arguments from response file");
60 Write_Eol;
62 -- Line for -aO switch
64 Write_Line (" -aOdir Specify library files search path");
66 -- Line for -aI switch
68 Write_Line (" -aIdir Specify source files search path");
70 -- Line for a switch
72 Write_Line (" -a Automatically initialize elaboration " &
73 "procedure");
75 -- Line for A switch
77 Write_Line (" -A Generate binder program in Ada (default)");
79 -- Line for -b switch
81 Write_Line (" -b Generate brief messages to stderr " &
82 "even if verbose mode set");
84 -- Line for -c switch
86 Write_Line (" -c Check only, no generation of " &
87 "binder output file");
89 -- Line for C switch
91 Write_Line (" -C Generate binder program in C");
93 -- Line for -d switch
95 Write_Line (" -dnn[k|m] Default primary stack " &
96 "size = nn [kilo|mega] bytes");
98 -- Line for D switch
100 Write_Line (" -Dnn[k|m] Default secondary stack " &
101 "size = nnn [kilo|mega] bytes");
103 -- Line for -e switch
105 Write_Line (" -e Output complete list of elaboration " &
106 "order dependencies");
108 -- Line for -E switch
110 Write_Line (" -E Store tracebacks in Exception occurrences");
112 -- The -f switch is voluntarily omitted, because it is obsolete
114 -- Line for -F switch
116 Write_Line (" -F Force checking of elaboration Flags");
118 -- Line for -h switch
120 Write_Line (" -h Output this usage (help) information");
122 -- Lines for -I switch
124 Write_Line (" -Idir Specify library and source files search path");
125 Write_Line (" -I- Don't look for sources & library files " &
126 "in default directory");
128 -- Line for -K switch
130 Write_Line (" -K Give list of linker options specified " &
131 "for link");
133 -- Line for -l switch
135 Write_Line (" -l Output chosen elaboration order");
137 -- Line of -L switch
139 Write_Line (" -Lxyz Library build: adainit/final " &
140 "renamed to xyzinit/final, implies -n");
142 -- Line for -m switch
144 Write_Line (" -mnnn Limit number of detected errors " &
145 "to nnn (1-999999)");
147 -- Line for -M switch
149 Write_Line (" -Mxyz Rename generated main program from " &
150 "main to xyz");
152 -- Line for -n switch
154 Write_Line (" -n No Ada main program (foreign main routine)");
156 -- Line for -nostdinc
158 Write_Line (" -nostdinc Don't look for source files " &
159 "in the system default directory");
161 -- Line for -nostdlib
163 Write_Line (" -nostdlib Don't look for library files " &
164 "in the system default directory");
166 -- Line for -o switch
168 Write_Line (" -o file Give the output file name " &
169 "(default is b~xxx.adb)");
171 -- Line for -O switch
173 Write_Line (" -O Give list of objects required for link");
175 -- Line for -p switch
177 Write_Line (" -p Pessimistic (worst-case) elaboration order");
179 -- Line for -r switch
181 Write_Line (" -r List restrictions that could be applied " &
182 "to this partition");
184 -- Line for -R switch
186 Write_Line
187 (" -R List sources referenced in closure (implies -c)");
189 -- Line for -s switch
191 Write_Line (" -s Require all source files to be present");
193 -- Line for -S?? switch
195 Write_Line (" -S?? Sin/lo/hi/xx/ev Initialize_Scalars " &
196 "invalid/low/high/hex/env var");
198 -- Line for -static
200 Write_Line (" -static Link against a static GNAT run time");
202 -- Line for -shared
204 Write_Line (" -shared Link against a shared GNAT run time");
206 -- Line for -t switch
208 Write_Line (" -t Tolerate time stamp and other " &
209 "consistency errors");
211 -- Line for -T switch
213 Write_Line (" -Tn Set time slice value to n " &
214 "milliseconds (n >= 0)");
216 -- Line for -u switch
218 Write_Line (" -un Enable dynamic stack analysis, with " &
219 "n results stored");
221 -- Line for -v switch
223 Write_Line (" -v Verbose mode. Error messages, " &
224 "header, summary output to stdout");
226 -- Lines for -w switch
228 Write_Line (" -wx Warning mode. (x=s/e for " &
229 "suppress/treat as error)");
231 -- Line for -x switch
233 Write_Line (" -x Exclude source files (check object " &
234 "consistency only)");
236 -- Line for X switch
238 Write_Line (" -Xnnn Default exit status value = nnn");
240 -- Line for -z switch
242 Write_Line (" -z No main subprogram (zero main)");
244 -- Line for --RTS
246 -- Line for -Z switch
248 Write_Line (" -Z " &
249 "Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
251 -- Line for --RTS
253 Write_Line (" --RTS=dir specify the default source and " &
254 "object search path");
256 -- Line for sfile
258 Write_Line (" lfile Library file names");
259 end Display;
261 end Bindusg;