History

tcc --help: update option summary

tcc-doc.texi: also

grischka committed 13 years ago

Commit 82965591 parent 80421212 files · +55 −34Browse files

Unified · Split

2 files
  1. tcc-doc.texi +40 −28
  2. tcc.c +15 −6
tcc-doc.texi+40−28
@@ -157,47 +157,38 @@ General Options: · 156 unmodified lines
157157
158158 @c man begin OPTIONS
159159 @table @option
160−@item -v
161−Display current TCC version, increase verbosity.
162−
163−@item -print-search-dirs
164−Print the name of the configured installation directory and a list
165−of program and library directories tcc will search.
166−
167160 @item -c
168161 Generate an object file.
169162
170163 @item -o outfile
171164 Put object file, executable, or dll into output file @file{outfile}.
172165
173−@item -Bdir
174−Set the path where the tcc internal libraries can be found (default is
175−@file{PREFIX/lib/tcc}).
176−
177−@item -bench
178−Output compilation statistics.
179−
180166 @item -run source [args...]
181167 Compile file @var{source} and run it with the command line arguments
182168 @var{args}. In order to be able to give more than one argument to a
183169 script, several TCC options can be given @emph{after} the
184−@option{-run} option, separated by spaces. Example:
185−
170+@option{-run} option, separated by spaces:
186171 @example
187172 tcc "-run -L/usr/X11R6/lib -lX11" ex4.c
188173 @end example
189−
190174 In a script, it gives the following header:
191−
192175 @example
193176 #!/usr/local/bin/tcc -run -L/usr/X11R6/lib -lX11
194−#include <stdlib.h>
195−int main(int argc, char **argv)
196−@{
197− ...
198−@}
199177 @end example
200178
179+@item -v
180+Display TCC version.
181+
182+@item -vv
183+Show included files. As sole argument, print search dirs (as below).
184+
185+@item -bench
186+Display compilation statistics.
187+
188+@item -print-search-dirs
189+Print the configured installation directory and a list of library
190+and include directories tcc will search.
191+
201192 @end table
202193
203194 Preprocessor options:
@@ -284,6 +275,10 @@ Link your program with dynamic library libxxx.so or static library · 80 unmodified lines
284275 libxxx.a. The library is searched in the paths specified by the
285276 @option{-L} option.
286277
278+@item -Bdir
279+Set the path where the tcc internal libraries (and include files) can be
280+found (default is @file{PREFIX/lib/tcc}).
281+
287282 @item -shared
288283 Generate a shared library instead of an executable.
289284
@@ -301,10 +296,10 @@ opened with @code{dlopen()} needs to access executable symbols. · 11 unmodified lines
301296 @item -r
302297 Generate an object file combining all input files.
303298
304−@item -Wl,-Ttext,address
305−Set the start of the .text section to @var{address}.
299+@item -Wl,-rpath=path
300+Put custom seatch path for dynamic libraries into executable.
306301
307−@item -Wl,--oformat,fmt
302+@item -Wl,--oformat=fmt
308303 Use @var{fmt} as output format. The supported output formats are:
309304 @table @code
310305 @item elf32-i386
@@ -315,8 +310,14 @@ Binary image (only for executable output) · 4 unmodified lines
315310 COFF output format (only for executable output for TMS320C67xx target)
316311 @end table
317312
318−@item -Wl,-rpath=path
319−Set custom library search path
313+@item -Wl,-subsystem=console/gui/wince/...
314+Set type for PE (Windows) executables.
315+
316+@item -Wl,-[Ttext=# | section-alignment=# | file-alignment=# | image-base=# | stack=#]
317+Modify executable layout.
318+
319+@item -Wl,-Bsymbolic
320+Set DT_SYMBOLIC tag.
320321
321322 @end table
322323
@@ -342,6 +343,17 @@ Display N callers in stack traces. This is useful with @option{-g} or · 19 unmodified lines
342343
343344 @end table
344345
346+Misc options:
347+
348+@table @option
349+@item -MD
350+Generate makefile fragment with dependencies.
351+
352+@item -MF depfile
353+Use @file{depfile} as output for -MD.
354+
355+@end table
356+
345357 Note: GCC options @option{-Ox}, @option{-fx} and @option{-mx} are
346358 ignored.
347359 @c man end
tcc.c+15−6
@@ -46,29 +46,33 @@ static void help(void) · 45 unmodified lines
4646 "Usage: tcc [options...] [-o outfile] [-c] infile(s)...\n"
4747 " tcc [options...] -run infile [arguments...]\n"
4848 "General options:\n"
49− " -v display current version, increase verbosity\n"
5049 " -c compile only - generate an object file\n"
5150 " -o outfile set output filename\n"
52− " -Bdir set tcc internal library and include path\n"
53− " -bench output compilation statistics\n"
5451 " -run run compiled source\n"
5552 " -fflag set or reset (with 'no-' prefix) 'flag' (see man page)\n"
5653 " -Wwarning set or reset (with 'no-' prefix) 'warning' (see man page)\n"
5754 " -w disable all warnings\n"
55+ " -v show version\n"
56+ " -vv show included files (as sole argument: show search paths)\n"
57+ " -bench show compilation statistics\n"
5858 "Preprocessor options:\n"
5959 " -E preprocess only\n"
6060 " -Idir add include path 'dir'\n"
6161 " -Dsym[=val] define 'sym' with value 'val'\n"
6262 " -Usym undefine 'sym'\n"
63+ " -nostdinc do not use standard system include paths\n"
6364 "Linker options:\n"
6465 " -Ldir add library path 'dir'\n"
6566 " -llib link with dynamic or static library 'lib'\n"
67+ " -Bdir use 'dir' as tcc internal library and include path\n"
68+ " -nostdlib do not link with standard crt and libraries\n"
6669 " -pthread link with -lpthread and -D_REENTRANT (POSIX Linux)\n"
70+ " -r generate (relocatable) object file\n"
71+ " -rdynamic export all global symbols to dynamic linker\n"
6772 " -shared generate a shared library\n"
6873 " -soname set name for shared library to be used at runtime\n"
6974 " -static static linking\n"
70− " -rdynamic export all global symbols to dynamic linker\n"
71− " -r generate (relocatable) object file\n"
75+ " -Wl,opt[=val] set linker option 'opt' (see manual)\n"
7276 "Debugger options:\n"
7377 " -g generate runtime debug info\n"
7478 #ifdef CONFIG_TCC_BCHECK
@@ -175,7 +179,7 @@ static const TCCOption tcc_options[] = { · 100 unmodified lines
175179 { "MD", TCC_OPTION_MD, 0},
176180 { "MF", TCC_OPTION_MF, TCC_OPTION_HAS_ARG },
177181 { "x", TCC_OPTION_x, TCC_OPTION_HAS_ARG },
178− { NULL },
182+ { NULL, 0, 0 },
179183 };
180184
181185 static int64_t getclock_us(void)
@@ -458,7 +462,12 @@ static int parse_args(TCCState *s, int argc, char **argv) · 276 unmodified lines
458462 case TCC_OPTION_MF:
459463 deps_outfile = optarg;
460464 break;
465+ case TCC_OPTION_O:
466+ case TCC_OPTION_pedantic:
467+ case TCC_OPTION_pipe:
468+ case TCC_OPTION_s:
461469 case TCC_OPTION_x:
470+ /* ignored */
462471 break;
463472 default:
464473 if (s->warn_unsupported) {

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