1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
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. --
21 -- GNAT was originally developed by the GNAT team at New York University. --
22 -- Extensive contributions were provided by Ada Core Technologies Inc. --
24 ------------------------------------------------------------------------------
26 with Osint
; use Osint
;
27 with Output
; use Output
;
29 with System
.WCh_Con
; use System
.WCh_Con
;
31 package body Bindusg
is
33 Already_Displayed
: Boolean := False;
34 -- Set True if Display called, used to avoid showing usage information
43 if Already_Displayed
then
46 Already_Displayed
:= True;
51 Write_Str
("Usage: ");
54 Write_Str
("switches lfile");
58 -- Line for @response_file
60 Write_Line
(" @<resp_file> Get arguments from response file");
63 -- Line for -aO switch
65 Write_Line
(" -aOdir Specify library files search path");
67 -- Line for -aI switch
69 Write_Line
(" -aIdir Specify source files search path");
73 Write_Line
(" -a Automatically initialize elaboration " &
78 Write_Line
(" -A Give list of ALI files in partition");
82 Write_Line
(" -b Generate brief messages to stderr " &
83 "even if verbose mode set");
87 Write_Line
(" -c Check only, no generation of " &
88 "binder output file");
92 Write_Line
(" -dnn[k|m] Default primary stack " &
93 "size = nn [kilo|mega] bytes");
97 Write_Line
(" -Dnn[k|m] Default secondary stack " &
98 "size = nn [kilo|mega] bytes");
100 -- Line for -e switch
102 Write_Line
(" -e Output complete list of elaboration " &
103 "order dependencies");
105 -- Line for -E switch
107 Write_Line
(" -E Store tracebacks in exception occurrences");
109 -- The -f switch is voluntarily omitted, because it is obsolete
111 -- Line for -F switch
113 Write_Line
(" -F Force checking of elaboration Flags");
115 -- Line for -h switch
117 Write_Line
(" -h Output this usage (help) information");
119 -- Line for -H switch
121 Write_Line
(" -Hnn Use nn bit heap where nn is 32 or 64 " &
124 -- Lines for -I switch
126 Write_Line
(" -Idir Specify library and source files search path");
127 Write_Line
(" -I- Don't look for sources & library files " &
128 "in default directory");
130 -- Line for -K switch
132 Write_Line
(" -K Give list of linker options specified " &
135 -- Line for -l switch
137 Write_Line
(" -l Output chosen elaboration order");
141 Write_Line
(" -Lxyz Library build: adainit/final " &
142 "renamed to xyzinit/final, implies -n");
144 -- Line for -m switch
146 Write_Line
(" -mnnn Limit number of detected errors/warnings " &
147 "to nnn (1-999999)");
149 -- Line for -M switch
151 Write_Line
(" -Mxyz Rename generated main program from " &
154 -- Line for -n switch
156 Write_Line
(" -n No Ada main program (foreign main routine)");
158 -- Line for -nostdinc
160 Write_Line
(" -nostdinc Don't look for source files " &
161 "in the system default directory");
163 -- Line for -nostdlib
165 Write_Line
(" -nostdlib Don't look for library files " &
166 "in the system default directory");
168 -- Line for -o switch
170 Write_Line
(" -o file Give the output file name " &
171 "(default is b~xxx.adb)");
173 -- Line for -O switch
175 Write_Line
(" -O Give list of objects required for link");
177 -- Line for -p switch
179 Write_Line
(" -p Pessimistic (worst-case) elaboration order");
181 -- Line for -r switch
183 Write_Line
(" -r List restrictions that could be applied " &
184 "to this partition");
186 -- Line for -R switch
189 (" -R List sources referenced in closure");
191 -- Line for -s switch
193 Write_Line
(" -s Require all source files to be present");
195 -- Line for -S?? switch
197 Write_Line
(" -S?? Sin/lo/hi/xx/ev Initialize_Scalars " &
198 "invalid/low/high/hex/env var");
202 Write_Line
(" -static Link against a static GNAT run time");
206 Write_Line
(" -shared Link against a shared GNAT run time");
208 -- Line for -t switch
210 Write_Line
(" -t Tolerate time stamp and other " &
211 "consistency errors");
213 -- Line for -T switch
215 Write_Line
(" -Tn Set time slice value to n " &
216 "milliseconds (n >= 0)");
218 -- Line for -u switch
220 Write_Line
(" -un Enable dynamic stack analysis, with " &
223 -- Line for -v switch
225 Write_Line
(" -v Verbose mode. Error messages, " &
226 "header, summary output to stdout");
228 -- Line for -w switch
230 Write_Line
(" -wx Warning mode. (x=s/e for " &
231 "suppress/treat as error)");
233 -- Line for -W switch
235 Write_Str
(" -W? Wide character encoding method (");
237 for J
in WC_Encoding_Method
loop
238 Write_Char
(WC_Encoding_Letters
(J
));
240 if J
= WC_Encoding_Method
'Last then
249 -- Line for -x switch
251 Write_Line
(" -x Exclude source files (check object " &
252 "consistency only)");
254 -- Line for -X switch
256 Write_Line
(" -Xnnn Default exit status value = nnn");
258 -- Line for -y switch
260 Write_Line
(" -y Enable leap seconds");
262 -- Line for -z switch
264 Write_Line
(" -z No main subprogram (zero main)");
268 -- Line for -Z switch
271 "Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
275 Write_Line
(" --RTS=dir Specify the default source and " &
276 "object search path");
280 Write_Line
(" lfile Library file names");