| @@ -4,11 +4,7 @@ · 3 unmodified lines |
| 4 | @settitle Tiny C Compiler Reference Documentation | 4 | @settitle Tiny C Compiler Reference Documentation |
| 5 | @c %**end of header | 5 | @c %**end of header |
| 6 | | 6 | |
| 7 | @include version.texi | 7 | @include config.texi |
| 8 | | | |
| 9 | @ifinfo | | |
| 10 | Bla bla bla | | |
| 11 | @end ifinfo | | |
| 12 | | 8 | |
| 13 | @iftex | 9 | @iftex |
| 14 | @titlepage | 10 | @titlepage |
| @@ -20,11 +16,11 @@ Bla bla bla · 5 unmodified lines |
| 20 | @headings double | 16 | @headings double |
| 21 | @end iftex | 17 | @end iftex |
| 22 | | 18 | |
| 23 | @ifnothtml | 19 | @c @ifhtml |
| 24 | @contents | 20 | @contents |
| 25 | @end ifnothtml | 21 | @c @end ifhtml |
| 26 | | 22 | |
| 27 | @ifnottex | 23 | @ifnothtml |
| 28 | @node Top, Introduction, (dir), (dir) | 24 | @node Top, Introduction, (dir), (dir) |
| 29 | @top Tiny C Compiler Reference Documentation | 25 | @top Tiny C Compiler Reference Documentation |
| 30 | | 26 | |
| @@ -34,9 +30,9 @@ This manual documents version @value{VERSION} of the Tiny C Compiler. · 3 unmodified lines |
| 34 | * Introduction:: Introduction to tcc. | 30 | * Introduction:: Introduction to tcc. |
| 35 | * Invoke:: Invocation of tcc (command line, options). | 31 | * Invoke:: Invocation of tcc (command line, options). |
| 36 | * Bounds:: Automatic bounds-checking of C code. | 32 | * Bounds:: Automatic bounds-checking of C code. |
| 37 | * Libtcc:: bla bla bla. | 33 | * Libtcc:: The libtcc library. |
| 38 | @end menu | 34 | @end menu |
| 39 | @end ifnottex | 35 | @end ifnothtml |
| 40 | | 36 | |
| 41 | @node Introduction | 37 | @node Introduction |
| 42 | @chapter Introduction | 38 | @chapter Introduction |
| @@ -65,12 +61,14 @@ generation (@pxref{Libtcc}). · 22 unmodified lines |
| 65 | @node Invoke | 61 | @node Invoke |
| 66 | @chapter Command line invocation | 62 | @chapter Command line invocation |
| 67 | | 63 | |
| | 64 | [This manual documents version @value{VERSION} of the Tiny C Compiler] |
| | 65 | |
| 68 | @section Quick start | 66 | @section Quick start |
| 69 | | 67 | |
| 70 | @example | 68 | @example |
| 71 | usage: tcc [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym] | 69 | usage: tcc [-v] [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym] |
| 72 | [-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-static] | 70 | [-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-static] |
| 73 | [--] infile1 [infile2... --] [infile_args...] | 71 | [infile1 infile2...] [-run infile args...] |
| 74 | @end example | 72 | @end example |
| 75 | | 73 | |
| 76 | @noindent | 74 | @noindent |
| @@ -81,14 +79,14 @@ arguments. · 4 unmodified lines |
| 81 | Here are some examples to understand the logic: | 79 | Here are some examples to understand the logic: |
| 82 | | 80 | |
| 83 | @table @code | 81 | @table @code |
| 84 | @item @samp{tcc a.c} | 82 | @item @samp{tcc -run a.c} |
| 85 | Compile @file{a.c} and execute it directly | 83 | Compile @file{a.c} and execute it directly |
| 86 | | 84 | |
| 87 | @item @samp{tcc a.c arg1} | 85 | @item @samp{tcc -run a.c arg1} |
| 88 | Compile a.c and execute it directly. arg1 is given as first argument to | 86 | Compile a.c and execute it directly. arg1 is given as first argument to |
| 89 | the @code{main()} of a.c. | 87 | the @code{main()} of a.c. |
| 90 | | 88 | |
| 91 | @item @samp{tcc -- a.c b.c -- arg1} | 89 | @item @samp{tcc a.c -run b.c arg1} |
| 92 | Compile @file{a.c} and @file{b.c}, link them together and execute them. arg1 is given | 90 | Compile @file{a.c} and @file{b.c}, link them together and execute them. arg1 is given |
| 93 | as first argument to the @code{main()} of the resulting program. Because | 91 | as first argument to the @code{main()} of the resulting program. Because |
| 94 | multiple C files are specified, @option{--} are necessary to clearly separate the | 92 | multiple C files are specified, @option{--} are necessary to clearly separate the |
| @@ -119,7 +117,7 @@ Compile @file{a.c} and @file{b.c}, link them together and generate the object fi · 24 unmodified lines |
| 119 | Scripting: | 117 | Scripting: |
| 120 | | 118 | |
| 121 | TCC can be invoked from @emph{scripts}, just as shell scripts. You just | 119 | TCC can be invoked from @emph{scripts}, just as shell scripts. You just |
| 122 | need to add @code{#!/usr/local/bin/tcc} at the start of your C source: | 120 | need to add @code{#!/usr/local/bin/tcc -run} at the start of your C source: |
| 123 | | 121 | |
| 124 | @example | 122 | @example |
| 125 | #!/usr/local/bin/tcc | 123 | #!/usr/local/bin/tcc |
| @@ -137,6 +135,9 @@ int main() · 11 unmodified lines |
| 137 | General Options: | 135 | General Options: |
| 138 | | 136 | |
| 139 | @table @option | 137 | @table @option |
| | 138 | @item -v |
| | 139 | Display current TCC version. |
| | 140 | |
| 140 | @item -c | 141 | @item -c |
| 141 | Generate an object file (@option{-o} option must also be given). | 142 | Generate an object file (@option{-o} option must also be given). |
| 142 | | 143 | |
| @@ -149,6 +150,9 @@ Set the path where the tcc internal libraries can be found (default is · 6 unmodified lines |
| 149 | | 150 | |
| 150 | @item -bench | 151 | @item -bench |
| 151 | Output compilation statistics. | 152 | Output compilation statistics. |
| | 153 | |
| | 154 | @item -run |
| | 155 | Run compiled source. |
| 152 | @end table | 156 | @end table |
| 153 | | 157 | |
| 154 | Preprocessor options: | 158 | Preprocessor options: |