History

Update tcc-doc.texi: bring in line with `tcc -hh' output

remph committed 1 year ago

Commit f8bd1361 parent f6385c02 files · +62 −8Browse files

Unified · Split

2 files
  1. tcc-doc.texi +59 −5
  2. tcc.c +3 −3
tcc-doc.texi+59−5
@@ -83,7 +83,7 @@ usage: tcc [options] [@var{infile1} @var{infile2}@dots{}] [@option{-run} @var{in · 82 unmodified lines
83 83
84@noindent84@noindent
85@c man begin DESCRIPTION85@c man begin DESCRIPTION
86TCC options are a very much like gcc options. The main difference is that TCC86TCC options are very much like gcc options. The main difference is that TCC
87can also execute directly the resulting program and give it runtime87can also execute directly the resulting program and give it runtime
88arguments.88arguments.
89 89
@@ -185,6 +185,16 @@ Show included files. As sole argument, print search dirs. -vvv shows tries too · 95 unmodified lines
185@item -bench185@item -bench
186Display compilation statistics.186Display compilation statistics.
187 187
188@item -pthread
189Preprocess with @option{-D_REENTRANT}, link with @option{-lpthread}.
190
191@item -On
192Pretend to optimise: set @option{-D__OPTIMIZE__} to the numeric value of n.
193Note that TCC performs no additional optimisation.
194
195@item -dt
196With @option{-run}/@option{-E}: auto-define 'test_...' macros
197
188@end table198@end table
189 199
190Preprocessor options:200Preprocessor options:
@@ -199,6 +209,16 @@ include paths are: @file{/usr/local/include}, @file{/usr/include} · 8 unmodified lines
199and @file{PREFIX/lib/tcc/include}. (@file{PREFIX} is usually209and @file{PREFIX/lib/tcc/include}. (@file{PREFIX} is usually
200@file{/usr} or @file{/usr/local}).210@file{/usr} or @file{/usr/local}).
201 211
212@item -isystem dir
213Specify a system include path to be added to the defaults.
214
215@item -nostdinc
216Do not search the default system include paths; only search include paths
217provided on the command line.
218
219@item -include file
220Include @option{file} above each input file.
221
202@item -Dsym[=val]222@item -Dsym[=val]
203Define preprocessor symbol @samp{sym} to223Define preprocessor symbol @samp{sym} to
204val. If val is not present, its value is @samp{1}. Function-like macros can224val. If val is not present, its value is @samp{1}. Function-like macros can
@@ -210,6 +230,18 @@ Undefine preprocessor symbol @samp{sym}. · 5 unmodified lines
210@item -E230@item -E
211Preprocess only, to stdout or file (with -o).231Preprocess only, to stdout or file (with -o).
212 232
233@item -P
234Do not output @code{#line} directives.
235
236@item -P1
237Output alternative @code{#line} directives.
238
239@item -dD, -dM
240Output @code{#define} directives.
241
242@item -Wp,-opt
243Same as @option{-opt}.
244
213@end table245@end table
214 246
215Compilation flags:247Compilation flags:
@@ -238,6 +270,15 @@ behaves like an unnamed one. · 22 unmodified lines
238@item -fdollars-in-identifiers270@item -fdollars-in-identifiers
239Allow dollar signs in identifiers271Allow dollar signs in identifiers
240 272
273@item -freverse-funcargs
274Evaluate function arguments right to left.
275
276@item -fgnu89-inline
277@code{extern inline} is like @code{static inline}.
278
279@item -fasynchronous-unwind-tables
280Create eh_frame section [on]
281
241@item -ftest-coverage282@item -ftest-coverage
242Create code coverage code. After running the resulting code an executable.tcov283Create code coverage code. After running the resulting code an executable.tcov
243or sofile.tcov file is generated with code coverage.284or sofile.tcov file is generated with code coverage.
@@ -257,7 +298,10 @@ Note: each of the following warning options has a negative form beginning with · 13 unmodified lines
257 298
258@table @option299@table @option
259@item -Wimplicit-function-declaration300@item -Wimplicit-function-declaration
260Warn about implicit function declaration.301Warn about implicit function declaration (missing prototype).
302
303@item -Wdiscarded-qualifiers
304Warn when const is dropped.
261 305
262@item -Wunsupported306@item -Wunsupported
263Warn about unsupported GCC features that are ignored by TCC.307Warn about unsupported GCC features that are ignored by TCC.
@@ -272,7 +316,8 @@ the specified warning and turn it into an error, for example · 8 unmodified lines
272@option{-Werror=unsupported}.316@option{-Werror=unsupported}.
273 317
274@item -Wall 318@item -Wall
275Activate some useful warnings.319Activate some useful warnings (@option{-Wimplicit-function-declaration},
320@option{-Wdiscard-qualifiers}).
276 321
277@end table322@end table
278 323
@@ -288,6 +333,9 @@ Link your program with dynamic library libxxx.so or static library · 9 unmodified lines
288libxxx.a. The library is searched in the paths specified by the333libxxx.a. The library is searched in the paths specified by the
289@option{-L} option and @env{LIBRARY_PATH} variable.334@option{-L} option and @env{LIBRARY_PATH} variable.
290 335
336@item -nostdlib
337Don't implicitly link with libc, the C runtime files, and libtcc1.
338
291@item -Bdir339@item -Bdir
292Set the path where the tcc internal libraries (and include files) can be340Set the path where the tcc internal libraries (and include files) can be
293found (default is @file{PREFIX/lib/tcc}).341found (default is @file{PREFIX/lib/tcc}).
@@ -376,6 +424,13 @@ Misc options: · 82 unmodified lines
376 424
377@table @option425@table @option
378 426
427@item -std=version
428Define @code{__STDC_VERSION__}: @code{201112} if @option{version} is c11 or
429gnu11; @code{199901} otherwise.
430
431@item -x[c|a|b|n]
432Specify content of next input file: respectively C, assembly, binary, or none.
433
379@item -M434@item -M
380Just output makefile fragment with dependencies435Just output makefile fragment with dependencies
381 436
@@ -418,8 +473,7 @@ Pass command line to the i386/x86_64 cross compiler. · 36 unmodified lines
418 473
419@end table474@end table
420 475
421Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are476Note: GCC options @option{-fx} and @option{-mx} are ignored.
422ignored.
423@c man end477@c man end
424 478
425@c man begin ENVIRONMENT479@c man begin ENVIRONMENT
tcc.c+3−3
@@ -50,12 +50,14 @@ static const char help[] = · 49 unmodified lines
50 " -Dsym[=val] define 'sym' with value 'val'\n"50 " -Dsym[=val] define 'sym' with value 'val'\n"
51 " -Usym undefine 'sym'\n"51 " -Usym undefine 'sym'\n"
52 " -E preprocess only\n"52 " -E preprocess only\n"
53 " -nostdinc do not use standard system include paths\n"
53 "Linker options:\n"54 "Linker options:\n"
54 " -Ldir add library path 'dir'\n"55 " -Ldir add library path 'dir'\n"
55 " -llib link with dynamic or static library 'lib'\n"56 " -llib link with dynamic or static library 'lib'\n"
57 " -nostdlib do not link with standard crt and libraries\n"
56 " -r generate (relocatable) object file\n"58 " -r generate (relocatable) object file\n"
57 " -shared generate a shared library/dll\n"
58 " -rdynamic export all global symbols to dynamic linker\n"59 " -rdynamic export all global symbols to dynamic linker\n"
60 " -shared generate a shared library/dll\n"
59 " -soname set name for shared library to be used at runtime\n"61 " -soname set name for shared library to be used at runtime\n"
60 " -Wl,-opt[=val] set linker option (see tcc -hh)\n"62 " -Wl,-opt[=val] set linker option (see tcc -hh)\n"
61 "Debugger options:\n"63 "Debugger options:\n"
@@ -73,8 +75,6 @@ static const char help[] = · 11 unmodified lines
73 "Misc. options:\n"75 "Misc. options:\n"
74 " -std=version define __STDC_VERSION__ according to version (c11/gnu11)\n"76 " -std=version define __STDC_VERSION__ according to version (c11/gnu11)\n"
75 " -x[c|a|b|n] specify type of the next infile (C,ASM,BIN,NONE)\n"77 " -x[c|a|b|n] specify type of the next infile (C,ASM,BIN,NONE)\n"
76 " -nostdinc do not use standard system include paths\n"
77 " -nostdlib do not link with standard crt and libraries\n"
78 " -Bdir set tcc's private include/library dir\n"78 " -Bdir set tcc's private include/library dir\n"
79 " -M[M]D generate make dependency file [ignore system files]\n"79 " -M[M]D generate make dependency file [ignore system files]\n"
80 " -M[M] as above but no other output\n"80 " -M[M] as above but no other output\n"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t