/
fbc.1
298 lines (294 loc) · 6.47 KB
/
fbc.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
.TH FBC 1 "2023-05-20" "FreeBASIC Compiler 1.20.0" "FreeBASIC Compiler"
.SH NAME
fbc \- The FreeBASIC compiler
.SH DESCRIPTION
Compiles FreeBASIC source code files (*.bas) to native code.
.SH SYNOPSIS
.B fbc \fR[\fIoptions\fR] \fIinput-files\fR
.SH OPTIONS
.F
.TP
.I input-files\fR
\fB*.a\fR = library, \fB*.o\fR = object, \fB*.bas\fR = source, \fB*.rc\fR = win32 resource script, \fB*.res\fR = win32 compiled resource, \fB*.xpm\fR = X11 icon resource
.TP
\fB\@\fIfile\fR
Read more command line arguments from a file
.TP
\fB\-a\fR \fIfile\fR
Treat file as .o/.a input file
.TP
\fB\-arch\fR \fItype\fR
Set target architecture (default: \fB686\fR)
.TP
\fB\-asm\fR \fBatt\fR|\fBintel\fR
Set the assembler format for Asm blocks and for code generation (x86 only)
.TP
\fB\-b\fR \fIfile\fR
Treat file as .bas input file
.TP
\fB\-buildprefix\fR \fIname\fR
Specify prefix on tool names (as, ar, ld)
.TP
\fB\-c\fR
Compile only, do not link
.TP
\fB\-C\fR
Preserve temporary .o files
.TP
\fB\-d\fR \fIname\fR[\fB=\fIval\fR]
Add a global #define
.TP
\fB\-dll\fR
Same as \fB\-dylib\fR
.TP
\fB\-dylib\fR
Create a Win32 DLL or Linux/*BSD shared library
.TP
\fB\-e\fR
Enable runtime error checking
.TP
\fB\-earray\fR
Enable array bounds checking
.TP
\fB\-eassert\fR
Enable assert() and assertwarn() checking
.TP
\fB\-edebug\fR
Enable __FB_DEBUG__
.TP
\fB\-edebuginfo\fR
Add debug information
.TP
\fB\-elocation\fR
Enable full error location reporting
.TP
\fB\-enullptr\fR
Enable null-pointer checking
.TP
\fB\-eunwind\fR
Enable call stack unwind information
.TP
\fB\-entry\fR \fIname\fR
Change the entry point of the program from main()
.TP
\fB\-ex\fR
\fB-e\fR plus RESUME support
.TP
\fB\-exx\fR
\fB-ex\fR plus array bounds/null-pointer checking
.TP
\fB\-export\fR
Export symbols for dynamic linkage
.TP
\fB\-forcelang\fR \fIname\fR
Override #lang statements in source code
.TP
\fB\-fpmode\fR \fBfast\fR|\fBprecise\fR
Select floating-point math accuracy/speed
.TP
\fB\-fpu\fR \fBx87\fR|\fBsse\fR
Set target FPU
.TP
\fB\-g\fR
Add debug info, enable __FB_DEBUG__, and enable asserts
.TP
\fB\-gen\fR \fBgas\fR|\fBgcc\fR|\fBllvm\fR|\fgas64\fR
Select code generation backend
.TP
\fB\-i\fR \fIpath\fR
Add an include file search path
.TP
\fB\-include\fR \fIfile\fR
Pre-#include a file for each input .bas
.TP
\fB\-l\fR \fIname\fR
Link in a library
.TP
\fB\-lang\fR \fIname\fR
Select FB dialect: \fBfb\fR (default), \fBdeprecated\fR, \fBqb\fR, \fBfblite\fR
.TP
\fB\-lib\fR
Create a static library
.TP
\fB\-m\fR \fIname\fR
Set main module (default if not -c: first input .bas)
.TP
\fB\-map\fR \fIfile\fR
Save linking map to file
.TP
\fB\-maxerr\fR \fIn\fR
Only show \fIn\fR errors
.TP
\fB\-mt\fR
Use thread-safe FB runtime
.TP
\fB\-nodeflibs\fR
Do not include the default libraries when linking
.TP
\fB\-noerrline\fR
Do not show source context in error messages
.TP
\fB\-nolib\fR \fIa,b,c\fR
Do not include the specified libraries when linking
.TP
\fB\-noobjinfo\fR
Do not read/write compile-time info from/to .o and .a files
.TP
\fB\-nostrip\fR
Do not strip symbol information from the output file
.TP
\fB\-o\fR \fIfile\fR
Set .o file name for corresponding input .bas
.TP
\fB\-O\fR \fIvalue\fR
Optimization level (default: 0)
.TP
\fB\-p\fR \fIpath\fR
Add a library search path
.TP
\fB\-pic\fR
Generate position-independent code (non-x86 Unix shared libs)
.TP
\fB\-pp\fR
Write out preprocessed input file (.pp.bas) only
.TP
\fB\-prefix\fR \fIpath\fR
Set the compiler prefix path
.TP
\fB\-print\fR \fBhost\fR|\fBtarget\fR
Display host/target system name
.TP
\fB\-print\fR \fBx\fR
Display output binary/library file name (if known)
.TP
\fB\-print\fR \fBsha-1\fR
Display compiler's source code commit sha-1 (if known)
.TP
\fB\-profile\fR
Enable function profiling
.TP
\fB\-r\fR
Write out .asm (-gen gas) or .c (-gen gcc) only
.TP
\fB\-rr\fR
Write out the final .asm only
.TP
\fB\-R\fR
Preserve the temporary .asm/.c file
.TP
\fB\-RR\fR
Preserve the final .asm file
.TP
\fB\-s\fR \fBconsole\fR|\fBgui\fR
Select win32 subsystem
.TP
\fB\-static\fR
Prefer static libraries over dynamic ones when linking
.TP
\fB\-strip\fR
Omit all symbol information from the output file
.TP
\fB\-t\fR \fIvalue\fR
Set Win32/DOS .exe stack size in kbytes, default: 1024
.TP
\fB\-target\fR \fIname\fR
Set cross-compilation target
.TP
\fB\-title\fR \fIname\fR
Set XBE display title (XBox)
.TP
\fB\-v\fR
Be verbose
.TP
\fB\-vec \fIn\fR
Automatic vectorization level (default: 0)
.TP
\fB\-version\fR
Show compiler version
.TP
\fB\-w\fR \fBall\fR|\fBpedantic\fR|\fIn\fR
Set minimum warning level: \fBall\fR, \fBpedantic\fR, or an integer
.TP
\fB\-w\fR \fBall\fR
Enable all warnings
.TP
\fB\-w\fR \fBnone\fR
Disable all warnings
.TP
\fB\-w\fR \fBparam\fR
Enable parameter warnings
.TP
\fB\-w\fR \fBescape\fR
Enable string escape sequence warnings
.TP
\fB\-w\fR \fBnext\fR
Enable next statement warnings
.TP
\fB\-w\fR \fBsignedness\fR
Enable type signedness warnings
.TP
\fB\-w\fR \fBconstness\fR
Enable const type warnings
.TP
\fB\-w\fR \fBsuffix\fR
Enable warning when up-casting discards initializers
.TP
\fB\-w\fR \fBerror\fR
Report warnings as errors
.TP
\fB\-w\fR \fBupcast\fR
Warn when up-casting discards initializers
.TP
\fB\-Wa\fR \fIa,b,c\fR
Pass options to GAS
.TP
\fB\-Wc\fR \fIa,b,c\fR
Pass options to GCC (with -gen gcc)
.TP
\fB\-Wl\fR \fIa,b,c\fR
Pass options to LD
.TP
\fB\-x \fIfile\fR
Set output executable/library file name
.TP
\fB\-z gosub-setjmp\fR
Use setjmp/longjmp to implement GOSUB
.TP
\fB\-z valist-as-ptr\fR
Use pointer expressions to implement CVA_*() macros
.TP
\fB\-z no-thiscall\fR
Don't use '__thiscall' calling convention
.TP
\fB\-z no-fastcall\fR
Don't use '__fastcall' calling convention
.TP
\fB\-z fbrt\fR
Link with 'fbrt' instead of 'fb' runtime library
.TP
\fB\-z retinflts\fR
Enable returning some types in floating point registers
.TP
\fB\-z nocmdline\fR
Disable #cmdline source directives
.SH ENVIRONMENT
.IP AS
Overrides location of GNU as (assembler)
.IP LD
Overrides location of GNU ld (linker)
.IP GCC
Overrides location of gcc (-gen gcc)
.SH "SEE ALSO"
The full language specification and help is available in wiki format at
.B
https://www.freebasic.net/wiki/
.SH COPYRIGHT
Copyright \(co 2004\-2023 The FreeBASIC Development Team
.br
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
.SH BUGS
Any bugs should be reported on the Sourceforge.net tracker located at https://www.sourceforge.net/projects/fbc/
.SH AUTHOR
This manpage written by Ebben Feagan (ebben.feagan@gmail.com)