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
8383
8484 @noindent
8585 @c man begin DESCRIPTION
86−TCC options are a very much like gcc options. The main difference is that TCC
86+TCC options are very much like gcc options. The main difference is that TCC
8787 can also execute directly the resulting program and give it runtime
8888 arguments.
8989
@@ -185,6 +185,16 @@ Show included files. As sole argument, print search dirs. -vvv shows tries too · 95 unmodified lines
185185 @item -bench
186186 Display compilation statistics.
187187
188+@item -pthread
189+Preprocess with @option{-D_REENTRANT}, link with @option{-lpthread}.
190+
191+@item -On
192+Pretend to optimise: set @option{-D__OPTIMIZE__} to the numeric value of n.
193+Note that TCC performs no additional optimisation.
194+
195+@item -dt
196+With @option{-run}/@option{-E}: auto-define 'test_...' macros
197+
188198 @end table
189199
190200 Preprocessor options:
@@ -199,6 +209,16 @@ include paths are: @file{/usr/local/include}, @file{/usr/include} · 8 unmodified lines
199209 and @file{PREFIX/lib/tcc/include}. (@file{PREFIX} is usually
200210 @file{/usr} or @file{/usr/local}).
201211
212+@item -isystem dir
213+Specify a system include path to be added to the defaults.
214+
215+@item -nostdinc
216+Do not search the default system include paths; only search include paths
217+provided on the command line.
218+
219+@item -include file
220+Include @option{file} above each input file.
221+
202222 @item -Dsym[=val]
203223 Define preprocessor symbol @samp{sym} to
204224 val. 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
210230 @item -E
211231 Preprocess only, to stdout or file (with -o).
212232
233+@item -P
234+Do not output @code{#line} directives.
235+
236+@item -P1
237+Output alternative @code{#line} directives.
238+
239+@item -dD, -dM
240+Output @code{#define} directives.
241+
242+@item -Wp,-opt
243+Same as @option{-opt}.
244+
213245 @end table
214246
215247 Compilation flags:
@@ -238,6 +270,15 @@ behaves like an unnamed one. · 22 unmodified lines
238270 @item -fdollars-in-identifiers
239271 Allow dollar signs in identifiers
240272
273+@item -freverse-funcargs
274+Evaluate 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
280+Create eh_frame section [on]
281+
241282 @item -ftest-coverage
242283 Create code coverage code. After running the resulting code an executable.tcov
243284 or 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
257298
258299 @table @option
259300 @item -Wimplicit-function-declaration
260−Warn about implicit function declaration.
301+Warn about implicit function declaration (missing prototype).
302+
303+@item -Wdiscarded-qualifiers
304+Warn when const is dropped.
261305
262306 @item -Wunsupported
263307 Warn 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
272316 @option{-Werror=unsupported}.
273317
274318 @item -Wall
275−Activate some useful warnings.
319+Activate some useful warnings (@option{-Wimplicit-function-declaration},
320+@option{-Wdiscard-qualifiers}).
276321
277322 @end table
278323
@@ -288,6 +333,9 @@ Link your program with dynamic library libxxx.so or static library · 9 unmodified lines
288333 libxxx.a. The library is searched in the paths specified by the
289334 @option{-L} option and @env{LIBRARY_PATH} variable.
290335
336+@item -nostdlib
337+Don't implicitly link with libc, the C runtime files, and libtcc1.
338+
291339 @item -Bdir
292340 Set the path where the tcc internal libraries (and include files) can be
293341 found (default is @file{PREFIX/lib/tcc}).
@@ -376,6 +424,13 @@ Misc options: · 82 unmodified lines
376424
377425 @table @option
378426
427+@item -std=version
428+Define @code{__STDC_VERSION__}: @code{201112} if @option{version} is c11 or
429+gnu11; @code{199901} otherwise.
430+
431+@item -x[c|a|b|n]
432+Specify content of next input file: respectively C, assembly, binary, or none.
433+
379434 @item -M
380435 Just output makefile fragment with dependencies
381436
@@ -418,8 +473,7 @@ Pass command line to the i386/x86_64 cross compiler. · 36 unmodified lines
418473
419474 @end table
420475
421−Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are
422−ignored.
476+Note: GCC options @option{-fx} and @option{-mx} are ignored.
423477 @c man end
424478
425479 @c man begin ENVIRONMENT
tcc.c+3−3
@@ -50,12 +50,14 @@ static const char help[] = · 49 unmodified lines
5050 " -Dsym[=val] define 'sym' with value 'val'\n"
5151 " -Usym undefine 'sym'\n"
5252 " -E preprocess only\n"
53+ " -nostdinc do not use standard system include paths\n"
5354 "Linker options:\n"
5455 " -Ldir add library path 'dir'\n"
5556 " -llib link with dynamic or static library 'lib'\n"
57+ " -nostdlib do not link with standard crt and libraries\n"
5658 " -r generate (relocatable) object file\n"
57− " -shared generate a shared library/dll\n"
5859 " -rdynamic export all global symbols to dynamic linker\n"
60+ " -shared generate a shared library/dll\n"
5961 " -soname set name for shared library to be used at runtime\n"
6062 " -Wl,-opt[=val] set linker option (see tcc -hh)\n"
6163 "Debugger options:\n"
@@ -73,8 +75,6 @@ static const char help[] = · 11 unmodified lines
7375 "Misc. options:\n"
7476 " -std=version define __STDC_VERSION__ according to version (c11/gnu11)\n"
7577 " -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"
7878 " -Bdir set tcc's private include/library dir\n"
7979 " -M[M]D generate make dependency file [ignore system files]\n"
8080 " -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