1 ------------------------------------------------------------------------------
3 -- GNAT COMPILER COMPONENTS --
9 -- Copyright (C) 1992-2007, 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 package body Bindusg is
31 Already_Displayed : Boolean := False;
32 -- Set True if Display called, used to avoid showing usage information
41 if Already_Displayed then
44 Already_Displayed := True;
49 Write_Str ("Usage: ");
52 Write_Str ("switches lfile");
56 -- Line for @response_file
58 Write_Line (" @<resp_file> Get arguments from response file");
61 -- Line for -aO switch
63 Write_Line (" -aOdir Specify library files search path");
65 -- Line for -aI switch
67 Write_Line (" -aIdir Specify source files search path");
71 Write_Line (" -a Automatically initialize elaboration " &
76 Write_Line (" -A Generate binder program in Ada (default)");
80 Write_Line (" -b Generate brief messages to stderr " &
81 "even if verbose mode set");
85 Write_Line (" -c Check only, no generation of " &
86 "binder output file");
90 Write_Line (" -C Generate binder program in C");
94 Write_Line (" -dnn[k|m] Default primary stack " &
95 "size = nn [kilo|mega] bytes");
99 Write_Line (" -Dnn[k|m] Default secondary stack " &
100 "size = nnn [kilo|mega] bytes");
102 -- Line for -e switch
104 Write_Line (" -e Output complete list of elaboration " &
105 "order dependencies");
107 -- Line for -E switch
109 Write_Line (" -E Store tracebacks in Exception occurrences");
111 -- The -f switch is voluntarily omitted, because it is obsolete
113 -- Line for -F switch
115 Write_Line (" -F Force checking of elaboration Flags");
117 -- Line for -h switch
119 Write_Line (" -h Output this usage (help) information");
121 -- Lines for -I switch
123 Write_Line (" -Idir Specify library and source files search path");
124 Write_Line (" -I- Don't look for sources & library files " &
125 "in default directory");
127 -- Line for -K switch
129 Write_Line (" -K Give list of linker options specified " &
132 -- Line for -l switch
134 Write_Line (" -l Output chosen elaboration order");
138 Write_Line (" -Lxyz Library build: adainit/final " &
139 "renamed to xyzinit/final, implies -n");
141 -- Line for -m switch
143 Write_Line (" -mnnn Limit number of detected errors " &
144 "to nnn (1-999999)");
146 -- Line for -M switch
148 Write_Line (" -Mxyz Rename generated main program from " &
151 -- Line for -n switch
153 Write_Line (" -n No Ada main program (foreign main routine)");
155 -- Line for -nostdinc
157 Write_Line (" -nostdinc Don't look for source files " &
158 "in the system default directory");
160 -- Line for -nostdlib
162 Write_Line (" -nostdlib Don't look for library files " &
163 "in the system default directory");
165 -- Line for -o switch
167 Write_Line (" -o file Give the output file name " &
168 "(default is b~xxx.adb)");
170 -- Line for -O switch
172 Write_Line (" -O Give list of objects required for link");
174 -- Line for -p switch
176 Write_Line (" -p Pessimistic (worst-case) elaboration order");
178 -- Line for -r switch
180 Write_Line (" -r List restrictions that could be applied " &
181 "to this partition");
183 -- Line for -R switch
186 (" -R List sources referenced in closure (implies -c)");
188 -- Line for -s switch
190 Write_Line (" -s Require all source files to be present");
192 -- Line for -S?? switch
194 Write_Line (" -S?? Sin/lo/hi/xx/ev Initialize_Scalars " &
195 "invalid/low/high/hex/env var");
199 Write_Line (" -static Link against a static GNAT run time");
203 Write_Line (" -shared Link against a shared GNAT run time");
205 -- Line for -t switch
207 Write_Line (" -t Tolerate time stamp and other " &
208 "consistency errors");
210 -- Line for -T switch
212 Write_Line (" -Tn Set time slice value to n " &
213 "milliseconds (n >= 0)");
215 -- Line for -u switch
217 Write_Line (" -un Enable dynamic stack analysis, with " &
220 -- Line for -v switch
222 Write_Line (" -v Verbose mode. Error messages, " &
223 "header, summary output to stdout");
225 -- Lines for -w switch
227 Write_Line (" -wx Warning mode. (x=s/e for " &
228 "suppress/treat as error)");
230 -- Line for -x switch
232 Write_Line (" -x Exclude source files (check object " &
233 "consistency only)");
235 -- Line for -X switch
237 Write_Line (" -Xnnn Default exit status value = nnn");
239 -- Line for -y switch
241 Write_Line (" -y Enable leap seconds");
243 -- Line for -z switch
245 Write_Line (" -z No main subprogram (zero main)");
249 -- Line for -Z switch
252 "Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
256 Write_Line (" --RTS=dir specify the default source and " &
257 "object search path");
261 Write_Line (" lfile Library file names");