OSDN Git Service

PR preprocessor/30805:
[pf3gnuchains/gcc-fork.git] / gcc / ada / bindusg.adb
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 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 ------------------------------------------------------------------------------
25
26 with Osint;  use Osint;
27 with Output; use Output;
28
29 package body Bindusg is
30
31    Already_Displayed : Boolean := False;
32    --  Set True if Display called, used to avoid showing usage information
33    --  more than once.
34
35    -------------
36    -- Display --
37    -------------
38
39    procedure Display is
40    begin
41       if Already_Displayed then
42          return;
43       else
44          Already_Displayed := True;
45       end if;
46
47       --  Usage line
48
49       Write_Str ("Usage: ");
50       Write_Program_Name;
51       Write_Char (' ');
52       Write_Str ("switches lfile");
53       Write_Eol;
54       Write_Eol;
55
56       --  Line for @response_file
57
58       Write_Line ("  @<resp_file> Get arguments from response file");
59       Write_Eol;
60
61       --  Line for -aO switch
62
63       Write_Line ("  -aOdir    Specify library files search path");
64
65       --  Line for -aI switch
66
67       Write_Line ("  -aIdir    Specify source files search path");
68
69       --  Line for a switch
70
71       Write_Line ("  -a        Automatically initialize elaboration " &
72                   "procedure");
73
74       --  Line for A switch
75
76       Write_Line ("  -A        Generate binder program in Ada (default)");
77
78       --  Line for -b switch
79
80       Write_Line ("  -b        Generate brief messages to stderr " &
81                   "even if verbose mode set");
82
83       --  Line for -c switch
84
85       Write_Line ("  -c        Check only, no generation of " &
86                   "binder output file");
87
88       --  Line for C switch
89
90       Write_Line ("  -C        Generate binder program in C");
91
92       --  Line for -d switch
93
94       Write_Line ("  -dnn[k|m] Default primary stack " &
95                   "size = nn [kilo|mega] bytes");
96
97       --  Line for D switch
98
99       Write_Line ("  -Dnn[k|m] Default secondary stack " &
100                   "size = nnn [kilo|mega] bytes");
101
102       --  Line for -e switch
103
104       Write_Line ("  -e        Output complete list of elaboration " &
105                   "order dependencies");
106
107       --  Line for -E switch
108
109       Write_Line ("  -E        Store tracebacks in Exception occurrences");
110
111       --  The -f switch is voluntarily omitted, because it is obsolete
112
113       --  Line for -F switch
114
115       Write_Line ("  -F        Force checking of elaboration Flags");
116
117       --  Line for -h switch
118
119       Write_Line ("  -h        Output this usage (help) information");
120
121       --  Lines for -I switch
122
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");
126
127       --  Line for -K switch
128
129       Write_Line ("  -K        Give list of linker options specified " &
130                   "for link");
131
132       --  Line for -l switch
133
134       Write_Line ("  -l        Output chosen elaboration order");
135
136       --  Line of -L switch
137
138       Write_Line ("  -Lxyz     Library build: adainit/final " &
139                   "renamed to xyzinit/final, implies -n");
140
141       --  Line for -m switch
142
143       Write_Line ("  -mnnn     Limit number of detected errors " &
144                   "to nnn (1-999999)");
145
146       --  Line for -M switch
147
148       Write_Line ("  -Mxyz     Rename generated main program from " &
149                   "main to xyz");
150
151       --  Line for -n switch
152
153       Write_Line ("  -n        No Ada main program (foreign main routine)");
154
155       --  Line for -nostdinc
156
157       Write_Line ("  -nostdinc Don't look for source files " &
158                   "in the system default directory");
159
160       --  Line for -nostdlib
161
162       Write_Line ("  -nostdlib Don't look for library files " &
163                   "in the system default directory");
164
165       --  Line for -o switch
166
167       Write_Line ("  -o file   Give the output file name " &
168                   "(default is b~xxx.adb)");
169
170       --  Line for -O switch
171
172       Write_Line ("  -O        Give list of objects required for link");
173
174       --  Line for -p switch
175
176       Write_Line ("  -p        Pessimistic (worst-case) elaboration order");
177
178       --  Line for -r switch
179
180       Write_Line ("  -r        List restrictions that could be applied " &
181                   "to this partition");
182
183       --  Line for -R switch
184
185       Write_Line
186         ("  -R        List sources referenced in closure (implies -c)");
187
188       --  Line for -s switch
189
190       Write_Line ("  -s        Require all source files to be present");
191
192       --  Line for -S?? switch
193
194       Write_Line ("  -S??      Sin/lo/hi/xx/ev Initialize_Scalars " &
195                   "invalid/low/high/hex/env var");
196
197       --  Line for -static
198
199       Write_Line ("  -static   Link against a static GNAT run time");
200
201       --  Line for -shared
202
203       Write_Line ("  -shared   Link against a shared GNAT run time");
204
205       --  Line for -t switch
206
207       Write_Line ("  -t        Tolerate time stamp and other " &
208                   "consistency errors");
209
210       --  Line for -T switch
211
212       Write_Line ("  -Tn       Set time slice value to n " &
213                   "milliseconds (n >= 0)");
214
215       --  Line for -u switch
216
217       Write_Line ("  -un       Enable dynamic stack analysis, with " &
218                   "n results stored");
219
220       --  Line for -v switch
221
222       Write_Line ("  -v        Verbose mode. Error messages, " &
223                   "header, summary output to stdout");
224
225       --  Lines for -w switch
226
227       Write_Line ("  -wx       Warning mode. (x=s/e for " &
228                   "suppress/treat as error)");
229
230       --  Line for -x switch
231
232       Write_Line ("  -x        Exclude source files (check object " &
233                   "consistency only)");
234
235       --  Line for -X switch
236
237       Write_Line ("  -Xnnn     Default exit status value = nnn");
238
239       --  Line for -y switch
240
241       Write_Line ("  -y        Enable leap seconds");
242
243       --  Line for -z switch
244
245       Write_Line ("  -z        No main subprogram (zero main)");
246
247       --  Line for --RTS
248
249       --  Line for -Z switch
250
251       Write_Line ("  -Z        " &
252                   "Zero formatting in auxiliary outputs (-e, -K, -l, -R)");
253
254       --  Line for --RTS
255
256       Write_Line ("  --RTS=dir specify the default source and " &
257                   "object search path");
258
259       --  Line for sfile
260
261       Write_Line ("  lfile     Library file names");
262    end Display;
263
264 end Bindusg;