tcc 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
 - data/README.md +17 -6
 - data/ext/tcc/tcc-0.9.26/.gitignore +58 -0
 - data/lib/tcc.rb +2 -3
 - data/tcc.gemspec +3 -2
 - metadata +254 -244
 - data/ext/tcc/tcc-0.9.26/config.h +0 -8
 - data/ext/tcc/tcc-0.9.26/config.mak +0 -28
 - data/ext/tcc/tcc-0.9.26/config.texi +0 -1
 - data/ext/tcc/tcc-0.9.26/tcc-doc.info +0 -1151
 - data/ext/tcc/tcc-0.9.26/tcc.1 +0 -415
 
    
        data/ext/tcc/tcc-0.9.26/tcc.1
    DELETED
    
    | 
         @@ -1,415 +0,0 @@ 
     | 
|
| 
       1 
     | 
    
         
            -
            .\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
         
     | 
| 
       2 
     | 
    
         
            -
            .\"
         
     | 
| 
       3 
     | 
    
         
            -
            .\" Standard preamble:
         
     | 
| 
       4 
     | 
    
         
            -
            .\" ========================================================================
         
     | 
| 
       5 
     | 
    
         
            -
            .de Sp \" Vertical space (when we can't use .PP)
         
     | 
| 
       6 
     | 
    
         
            -
            .if t .sp .5v
         
     | 
| 
       7 
     | 
    
         
            -
            .if n .sp
         
     | 
| 
       8 
     | 
    
         
            -
            ..
         
     | 
| 
       9 
     | 
    
         
            -
            .de Vb \" Begin verbatim text
         
     | 
| 
       10 
     | 
    
         
            -
            .ft CW
         
     | 
| 
       11 
     | 
    
         
            -
            .nf
         
     | 
| 
       12 
     | 
    
         
            -
            .ne \\$1
         
     | 
| 
       13 
     | 
    
         
            -
            ..
         
     | 
| 
       14 
     | 
    
         
            -
            .de Ve \" End verbatim text
         
     | 
| 
       15 
     | 
    
         
            -
            .ft R
         
     | 
| 
       16 
     | 
    
         
            -
            .fi
         
     | 
| 
       17 
     | 
    
         
            -
            ..
         
     | 
| 
       18 
     | 
    
         
            -
            .\" Set up some character translations and predefined strings.  \*(-- will
         
     | 
| 
       19 
     | 
    
         
            -
            .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
         
     | 
| 
       20 
     | 
    
         
            -
            .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
         
     | 
| 
       21 
     | 
    
         
            -
            .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
         
     | 
| 
       22 
     | 
    
         
            -
            .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
         
     | 
| 
       23 
     | 
    
         
            -
            .\" nothing in troff, for use with C<>.
         
     | 
| 
       24 
     | 
    
         
            -
            .tr \(*W-
         
     | 
| 
       25 
     | 
    
         
            -
            .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
         
     | 
| 
       26 
     | 
    
         
            -
            .ie n \{\
         
     | 
| 
       27 
     | 
    
         
            -
            .    ds -- \(*W-
         
     | 
| 
       28 
     | 
    
         
            -
            .    ds PI pi
         
     | 
| 
       29 
     | 
    
         
            -
            .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
         
     | 
| 
       30 
     | 
    
         
            -
            .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
         
     | 
| 
       31 
     | 
    
         
            -
            .    ds L" ""
         
     | 
| 
       32 
     | 
    
         
            -
            .    ds R" ""
         
     | 
| 
       33 
     | 
    
         
            -
            .    ds C` ""
         
     | 
| 
       34 
     | 
    
         
            -
            .    ds C' ""
         
     | 
| 
       35 
     | 
    
         
            -
            'br\}
         
     | 
| 
       36 
     | 
    
         
            -
            .el\{\
         
     | 
| 
       37 
     | 
    
         
            -
            .    ds -- \|\(em\|
         
     | 
| 
       38 
     | 
    
         
            -
            .    ds PI \(*p
         
     | 
| 
       39 
     | 
    
         
            -
            .    ds L" ``
         
     | 
| 
       40 
     | 
    
         
            -
            .    ds R" ''
         
     | 
| 
       41 
     | 
    
         
            -
            .    ds C`
         
     | 
| 
       42 
     | 
    
         
            -
            .    ds C'
         
     | 
| 
       43 
     | 
    
         
            -
            'br\}
         
     | 
| 
       44 
     | 
    
         
            -
            .\"
         
     | 
| 
       45 
     | 
    
         
            -
            .\" Escape single quotes in literal strings from groff's Unicode transform.
         
     | 
| 
       46 
     | 
    
         
            -
            .ie \n(.g .ds Aq \(aq
         
     | 
| 
       47 
     | 
    
         
            -
            .el       .ds Aq '
         
     | 
| 
       48 
     | 
    
         
            -
            .\"
         
     | 
| 
       49 
     | 
    
         
            -
            .\" If the F register is turned on, we'll generate index entries on stderr for
         
     | 
| 
       50 
     | 
    
         
            -
            .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
         
     | 
| 
       51 
     | 
    
         
            -
            .\" entries marked with X<> in POD.  Of course, you'll have to process the
         
     | 
| 
       52 
     | 
    
         
            -
            .\" output yourself in some meaningful fashion.
         
     | 
| 
       53 
     | 
    
         
            -
            .\"
         
     | 
| 
       54 
     | 
    
         
            -
            .\" Avoid warning from groff about undefined register 'F'.
         
     | 
| 
       55 
     | 
    
         
            -
            .de IX
         
     | 
| 
       56 
     | 
    
         
            -
            ..
         
     | 
| 
       57 
     | 
    
         
            -
            .nr rF 0
         
     | 
| 
       58 
     | 
    
         
            -
            .if \n(.g .if rF .nr rF 1
         
     | 
| 
       59 
     | 
    
         
            -
            .if (\n(rF:(\n(.g==0)) \{
         
     | 
| 
       60 
     | 
    
         
            -
            .    if \nF \{
         
     | 
| 
       61 
     | 
    
         
            -
            .        de IX
         
     | 
| 
       62 
     | 
    
         
            -
            .        tm Index:\\$1\t\\n%\t"\\$2"
         
     | 
| 
       63 
     | 
    
         
            -
            ..
         
     | 
| 
       64 
     | 
    
         
            -
            .        if !\nF==2 \{
         
     | 
| 
       65 
     | 
    
         
            -
            .            nr % 0
         
     | 
| 
       66 
     | 
    
         
            -
            .            nr F 2
         
     | 
| 
       67 
     | 
    
         
            -
            .        \}
         
     | 
| 
       68 
     | 
    
         
            -
            .    \}
         
     | 
| 
       69 
     | 
    
         
            -
            .\}
         
     | 
| 
       70 
     | 
    
         
            -
            .rr rF
         
     | 
| 
       71 
     | 
    
         
            -
            .\"
         
     | 
| 
       72 
     | 
    
         
            -
            .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
         
     | 
| 
       73 
     | 
    
         
            -
            .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
         
     | 
| 
       74 
     | 
    
         
            -
            .    \" fudge factors for nroff and troff
         
     | 
| 
       75 
     | 
    
         
            -
            .if n \{\
         
     | 
| 
       76 
     | 
    
         
            -
            .    ds #H 0
         
     | 
| 
       77 
     | 
    
         
            -
            .    ds #V .8m
         
     | 
| 
       78 
     | 
    
         
            -
            .    ds #F .3m
         
     | 
| 
       79 
     | 
    
         
            -
            .    ds #[ \f1
         
     | 
| 
       80 
     | 
    
         
            -
            .    ds #] \fP
         
     | 
| 
       81 
     | 
    
         
            -
            .\}
         
     | 
| 
       82 
     | 
    
         
            -
            .if t \{\
         
     | 
| 
       83 
     | 
    
         
            -
            .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
         
     | 
| 
       84 
     | 
    
         
            -
            .    ds #V .6m
         
     | 
| 
       85 
     | 
    
         
            -
            .    ds #F 0
         
     | 
| 
       86 
     | 
    
         
            -
            .    ds #[ \&
         
     | 
| 
       87 
     | 
    
         
            -
            .    ds #] \&
         
     | 
| 
       88 
     | 
    
         
            -
            .\}
         
     | 
| 
       89 
     | 
    
         
            -
            .    \" simple accents for nroff and troff
         
     | 
| 
       90 
     | 
    
         
            -
            .if n \{\
         
     | 
| 
       91 
     | 
    
         
            -
            .    ds ' \&
         
     | 
| 
       92 
     | 
    
         
            -
            .    ds ` \&
         
     | 
| 
       93 
     | 
    
         
            -
            .    ds ^ \&
         
     | 
| 
       94 
     | 
    
         
            -
            .    ds , \&
         
     | 
| 
       95 
     | 
    
         
            -
            .    ds ~ ~
         
     | 
| 
       96 
     | 
    
         
            -
            .    ds /
         
     | 
| 
       97 
     | 
    
         
            -
            .\}
         
     | 
| 
       98 
     | 
    
         
            -
            .if t \{\
         
     | 
| 
       99 
     | 
    
         
            -
            .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
         
     | 
| 
       100 
     | 
    
         
            -
            .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
         
     | 
| 
       101 
     | 
    
         
            -
            .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
         
     | 
| 
       102 
     | 
    
         
            -
            .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
         
     | 
| 
       103 
     | 
    
         
            -
            .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
         
     | 
| 
       104 
     | 
    
         
            -
            .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
         
     | 
| 
       105 
     | 
    
         
            -
            .\}
         
     | 
| 
       106 
     | 
    
         
            -
            .    \" troff and (daisy-wheel) nroff accents
         
     | 
| 
       107 
     | 
    
         
            -
            .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
         
     | 
| 
       108 
     | 
    
         
            -
            .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
         
     | 
| 
       109 
     | 
    
         
            -
            .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
         
     | 
| 
       110 
     | 
    
         
            -
            .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
         
     | 
| 
       111 
     | 
    
         
            -
            .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
         
     | 
| 
       112 
     | 
    
         
            -
            .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
         
     | 
| 
       113 
     | 
    
         
            -
            .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
         
     | 
| 
       114 
     | 
    
         
            -
            .ds ae a\h'-(\w'a'u*4/10)'e
         
     | 
| 
       115 
     | 
    
         
            -
            .ds Ae A\h'-(\w'A'u*4/10)'E
         
     | 
| 
       116 
     | 
    
         
            -
            .    \" corrections for vroff
         
     | 
| 
       117 
     | 
    
         
            -
            .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
         
     | 
| 
       118 
     | 
    
         
            -
            .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
         
     | 
| 
       119 
     | 
    
         
            -
            .    \" for low resolution devices (crt and lpr)
         
     | 
| 
       120 
     | 
    
         
            -
            .if \n(.H>23 .if \n(.V>19 \
         
     | 
| 
       121 
     | 
    
         
            -
            \{\
         
     | 
| 
       122 
     | 
    
         
            -
            .    ds : e
         
     | 
| 
       123 
     | 
    
         
            -
            .    ds 8 ss
         
     | 
| 
       124 
     | 
    
         
            -
            .    ds o a
         
     | 
| 
       125 
     | 
    
         
            -
            .    ds d- d\h'-1'\(ga
         
     | 
| 
       126 
     | 
    
         
            -
            .    ds D- D\h'-1'\(hy
         
     | 
| 
       127 
     | 
    
         
            -
            .    ds th \o'bp'
         
     | 
| 
       128 
     | 
    
         
            -
            .    ds Th \o'LP'
         
     | 
| 
       129 
     | 
    
         
            -
            .    ds ae ae
         
     | 
| 
       130 
     | 
    
         
            -
            .    ds Ae AE
         
     | 
| 
       131 
     | 
    
         
            -
            .\}
         
     | 
| 
       132 
     | 
    
         
            -
            .rm #[ #] #H #V #F C
         
     | 
| 
       133 
     | 
    
         
            -
            .\" ========================================================================
         
     | 
| 
       134 
     | 
    
         
            -
            .\"
         
     | 
| 
       135 
     | 
    
         
            -
            .IX Title "TCC 1"
         
     | 
| 
       136 
     | 
    
         
            -
            .TH TCC 1 "2013-10-29" " " " "
         
     | 
| 
       137 
     | 
    
         
            -
            .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
         
     | 
| 
       138 
     | 
    
         
            -
            .\" way too many mistakes in technical documents.
         
     | 
| 
       139 
     | 
    
         
            -
            .if n .ad l
         
     | 
| 
       140 
     | 
    
         
            -
            .nh
         
     | 
| 
       141 
     | 
    
         
            -
            .SH "NAME"
         
     | 
| 
       142 
     | 
    
         
            -
            tcc \- Tiny C Compiler
         
     | 
| 
       143 
     | 
    
         
            -
            .SH "SYNOPSIS"
         
     | 
| 
       144 
     | 
    
         
            -
            .IX Header "SYNOPSIS"
         
     | 
| 
       145 
     | 
    
         
            -
            usage: tcc [options] [\fIinfile1\fR \fIinfile2\fR...] [\fB\-run\fR \fIinfile\fR \fIargs\fR...]
         
     | 
| 
       146 
     | 
    
         
            -
            .SH "DESCRIPTION"
         
     | 
| 
       147 
     | 
    
         
            -
            .IX Header "DESCRIPTION"
         
     | 
| 
       148 
     | 
    
         
            -
            \&\s-1TCC\s0 options are a very much like gcc options. The main difference is that \s-1TCC\s0
         
     | 
| 
       149 
     | 
    
         
            -
            can also execute directly the resulting program and give it runtime
         
     | 
| 
       150 
     | 
    
         
            -
            arguments.
         
     | 
| 
       151 
     | 
    
         
            -
            .PP
         
     | 
| 
       152 
     | 
    
         
            -
            Here are some examples to understand the logic:
         
     | 
| 
       153 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-run a.c\f(CW""" 4
         
     | 
| 
       154 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-run a.c\f(CW\fR" 4
         
     | 
| 
       155 
     | 
    
         
            -
            .IX Item "tcc -run a.c"
         
     | 
| 
       156 
     | 
    
         
            -
            Compile \fIa.c\fR and execute it directly
         
     | 
| 
       157 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-run a.c arg1\f(CW""" 4
         
     | 
| 
       158 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-run a.c arg1\f(CW\fR" 4
         
     | 
| 
       159 
     | 
    
         
            -
            .IX Item "tcc -run a.c arg1"
         
     | 
| 
       160 
     | 
    
         
            -
            Compile a.c and execute it directly. arg1 is given as first argument to
         
     | 
| 
       161 
     | 
    
         
            -
            the \f(CW\*(C`main()\*(C'\fR of a.c.
         
     | 
| 
       162 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc a.c \-run b.c arg1\f(CW""" 4
         
     | 
| 
       163 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc a.c \-run b.c arg1\f(CW\fR" 4
         
     | 
| 
       164 
     | 
    
         
            -
            .IX Item "tcc a.c -run b.c arg1"
         
     | 
| 
       165 
     | 
    
         
            -
            Compile \fIa.c\fR and \fIb.c\fR, link them together and execute them. arg1 is given
         
     | 
| 
       166 
     | 
    
         
            -
            as first argument to the \f(CW\*(C`main()\*(C'\fR of the resulting program.
         
     | 
| 
       167 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-o myprog a.c b.c\f(CW""" 4
         
     | 
| 
       168 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-o myprog a.c b.c\f(CW\fR" 4
         
     | 
| 
       169 
     | 
    
         
            -
            .IX Item "tcc -o myprog a.c b.c"
         
     | 
| 
       170 
     | 
    
         
            -
            Compile \fIa.c\fR and \fIb.c\fR, link them and generate the executable \fImyprog\fR.
         
     | 
| 
       171 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-o myprog a.o b.o\f(CW""" 4
         
     | 
| 
       172 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-o myprog a.o b.o\f(CW\fR" 4
         
     | 
| 
       173 
     | 
    
         
            -
            .IX Item "tcc -o myprog a.o b.o"
         
     | 
| 
       174 
     | 
    
         
            -
            link \fIa.o\fR and \fIb.o\fR together and generate the executable \fImyprog\fR.
         
     | 
| 
       175 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-c a.c\f(CW""" 4
         
     | 
| 
       176 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-c a.c\f(CW\fR" 4
         
     | 
| 
       177 
     | 
    
         
            -
            .IX Item "tcc -c a.c"
         
     | 
| 
       178 
     | 
    
         
            -
            Compile \fIa.c\fR and generate object file \fIa.o\fR.
         
     | 
| 
       179 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-c asmfile.S\f(CW""" 4
         
     | 
| 
       180 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-c asmfile.S\f(CW\fR" 4
         
     | 
| 
       181 
     | 
    
         
            -
            .IX Item "tcc -c asmfile.S"
         
     | 
| 
       182 
     | 
    
         
            -
            Preprocess with C preprocess and assemble \fIasmfile.S\fR and generate
         
     | 
| 
       183 
     | 
    
         
            -
            object file \fIasmfile.o\fR.
         
     | 
| 
       184 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-c asmfile.s\f(CW""" 4
         
     | 
| 
       185 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-c asmfile.s\f(CW\fR" 4
         
     | 
| 
       186 
     | 
    
         
            -
            .IX Item "tcc -c asmfile.s"
         
     | 
| 
       187 
     | 
    
         
            -
            Assemble (but not preprocess) \fIasmfile.s\fR and generate object file
         
     | 
| 
       188 
     | 
    
         
            -
            \&\fIasmfile.o\fR.
         
     | 
| 
       189 
     | 
    
         
            -
            .ie n .IP """\f(CBtcc \-r \-o ab.o a.c b.c\f(CW""" 4
         
     | 
| 
       190 
     | 
    
         
            -
            .el .IP "\f(CW\f(CBtcc \-r \-o ab.o a.c b.c\f(CW\fR" 4
         
     | 
| 
       191 
     | 
    
         
            -
            .IX Item "tcc -r -o ab.o a.c b.c"
         
     | 
| 
       192 
     | 
    
         
            -
            Compile \fIa.c\fR and \fIb.c\fR, link them together and generate the object file \fIab.o\fR.
         
     | 
| 
       193 
     | 
    
         
            -
            .PP
         
     | 
| 
       194 
     | 
    
         
            -
            Scripting:
         
     | 
| 
       195 
     | 
    
         
            -
            .PP
         
     | 
| 
       196 
     | 
    
         
            -
            \&\s-1TCC\s0 can be invoked from \fIscripts\fR, just as shell scripts. You just
         
     | 
| 
       197 
     | 
    
         
            -
            need to add \f(CW\*(C`#!/usr/local/bin/tcc \-run\*(C'\fR at the start of your C source:
         
     | 
| 
       198 
     | 
    
         
            -
            .PP
         
     | 
| 
       199 
     | 
    
         
            -
            .Vb 2
         
     | 
| 
       200 
     | 
    
         
            -
            \&        #!/usr/local/bin/tcc \-run
         
     | 
| 
       201 
     | 
    
         
            -
            \&        #include <stdio.h>
         
     | 
| 
       202 
     | 
    
         
            -
            \&        
         
     | 
| 
       203 
     | 
    
         
            -
            \&        int main() 
         
     | 
| 
       204 
     | 
    
         
            -
            \&        {
         
     | 
| 
       205 
     | 
    
         
            -
            \&            printf("Hello World\en");
         
     | 
| 
       206 
     | 
    
         
            -
            \&            return 0;
         
     | 
| 
       207 
     | 
    
         
            -
            \&        }
         
     | 
| 
       208 
     | 
    
         
            -
            .Ve
         
     | 
| 
       209 
     | 
    
         
            -
            .PP
         
     | 
| 
       210 
     | 
    
         
            -
            \&\s-1TCC\s0 can read C source code from \fIstandard input\fR when \fB\-\fR is used in 
         
     | 
| 
       211 
     | 
    
         
            -
            place of \fBinfile\fR. Example:
         
     | 
| 
       212 
     | 
    
         
            -
            .PP
         
     | 
| 
       213 
     | 
    
         
            -
            .Vb 1
         
     | 
| 
       214 
     | 
    
         
            -
            \&        echo \*(Aqmain(){puts("hello");}\*(Aq | tcc \-run \-
         
     | 
| 
       215 
     | 
    
         
            -
            .Ve
         
     | 
| 
       216 
     | 
    
         
            -
            .SH "OPTIONS"
         
     | 
| 
       217 
     | 
    
         
            -
            .IX Header "OPTIONS"
         
     | 
| 
       218 
     | 
    
         
            -
            .IP "\fB\-c\fR" 4
         
     | 
| 
       219 
     | 
    
         
            -
            .IX Item "-c"
         
     | 
| 
       220 
     | 
    
         
            -
            Generate an object file.
         
     | 
| 
       221 
     | 
    
         
            -
            .IP "\fB\-o outfile\fR" 4
         
     | 
| 
       222 
     | 
    
         
            -
            .IX Item "-o outfile"
         
     | 
| 
       223 
     | 
    
         
            -
            Put object file, executable, or dll into output file \fIoutfile\fR.
         
     | 
| 
       224 
     | 
    
         
            -
            .IP "\fB\-run source [args...]\fR" 4
         
     | 
| 
       225 
     | 
    
         
            -
            .IX Item "-run source [args...]"
         
     | 
| 
       226 
     | 
    
         
            -
            Compile file \fIsource\fR and run it with the command line arguments
         
     | 
| 
       227 
     | 
    
         
            -
            \&\fIargs\fR. In order to be able to give more than one argument to a
         
     | 
| 
       228 
     | 
    
         
            -
            script, several \s-1TCC\s0 options can be given \fIafter\fR the
         
     | 
| 
       229 
     | 
    
         
            -
            \&\fB\-run\fR option, separated by spaces:
         
     | 
| 
       230 
     | 
    
         
            -
            .Sp
         
     | 
| 
       231 
     | 
    
         
            -
            .Vb 1
         
     | 
| 
       232 
     | 
    
         
            -
            \&        tcc "\-run \-L/usr/X11R6/lib \-lX11" ex4.c
         
     | 
| 
       233 
     | 
    
         
            -
            .Ve
         
     | 
| 
       234 
     | 
    
         
            -
            .Sp
         
     | 
| 
       235 
     | 
    
         
            -
            In a script, it gives the following header:
         
     | 
| 
       236 
     | 
    
         
            -
            .Sp
         
     | 
| 
       237 
     | 
    
         
            -
            .Vb 1
         
     | 
| 
       238 
     | 
    
         
            -
            \&        #!/usr/local/bin/tcc \-run \-L/usr/X11R6/lib \-lX11
         
     | 
| 
       239 
     | 
    
         
            -
            .Ve
         
     | 
| 
       240 
     | 
    
         
            -
            .IP "\fB\-dumpversion\fR" 4
         
     | 
| 
       241 
     | 
    
         
            -
            .IX Item "-dumpversion"
         
     | 
| 
       242 
     | 
    
         
            -
            Print only the compiler version and nothing else.
         
     | 
| 
       243 
     | 
    
         
            -
            .IP "\fB\-v\fR" 4
         
     | 
| 
       244 
     | 
    
         
            -
            .IX Item "-v"
         
     | 
| 
       245 
     | 
    
         
            -
            Display \s-1TCC\s0 version.
         
     | 
| 
       246 
     | 
    
         
            -
            .IP "\fB\-vv\fR" 4
         
     | 
| 
       247 
     | 
    
         
            -
            .IX Item "-vv"
         
     | 
| 
       248 
     | 
    
         
            -
            Show included files.  As sole argument, print search dirs (as below).
         
     | 
| 
       249 
     | 
    
         
            -
            .IP "\fB\-bench\fR" 4
         
     | 
| 
       250 
     | 
    
         
            -
            .IX Item "-bench"
         
     | 
| 
       251 
     | 
    
         
            -
            Display compilation statistics.
         
     | 
| 
       252 
     | 
    
         
            -
            .IP "\fB\-print\-search\-dirs\fR" 4
         
     | 
| 
       253 
     | 
    
         
            -
            .IX Item "-print-search-dirs"
         
     | 
| 
       254 
     | 
    
         
            -
            Print the configured installation directory and a list of library
         
     | 
| 
       255 
     | 
    
         
            -
            and include directories tcc will search.
         
     | 
| 
       256 
     | 
    
         
            -
            .PP
         
     | 
| 
       257 
     | 
    
         
            -
            Preprocessor options:
         
     | 
| 
       258 
     | 
    
         
            -
            .IP "\fB\-Idir\fR" 4
         
     | 
| 
       259 
     | 
    
         
            -
            .IX Item "-Idir"
         
     | 
| 
       260 
     | 
    
         
            -
            Specify an additional include path. Include paths are searched in the
         
     | 
| 
       261 
     | 
    
         
            -
            order they are specified.
         
     | 
| 
       262 
     | 
    
         
            -
            .Sp
         
     | 
| 
       263 
     | 
    
         
            -
            System include paths are always searched after. The default system
         
     | 
| 
       264 
     | 
    
         
            -
            include paths are: \fI/usr/local/include\fR, \fI/usr/include\fR
         
     | 
| 
       265 
     | 
    
         
            -
            and \fIPREFIX/lib/tcc/include\fR. (\fI\s-1PREFIX\s0\fR is usually
         
     | 
| 
       266 
     | 
    
         
            -
            \&\fI/usr\fR or \fI/usr/local\fR).
         
     | 
| 
       267 
     | 
    
         
            -
            .IP "\fB\-Dsym[=val]\fR" 4
         
     | 
| 
       268 
     | 
    
         
            -
            .IX Item "-Dsym[=val]"
         
     | 
| 
       269 
     | 
    
         
            -
            Define preprocessor symbol \fBsym\fR to
         
     | 
| 
       270 
     | 
    
         
            -
            val. If val is not present, its value is \fB1\fR. Function-like macros can
         
     | 
| 
       271 
     | 
    
         
            -
            also be defined: \fB\-DF(a)=a+1\fR
         
     | 
| 
       272 
     | 
    
         
            -
            .IP "\fB\-Usym\fR" 4
         
     | 
| 
       273 
     | 
    
         
            -
            .IX Item "-Usym"
         
     | 
| 
       274 
     | 
    
         
            -
            Undefine preprocessor symbol \fBsym\fR.
         
     | 
| 
       275 
     | 
    
         
            -
            .PP
         
     | 
| 
       276 
     | 
    
         
            -
            Compilation flags:
         
     | 
| 
       277 
     | 
    
         
            -
            .PP
         
     | 
| 
       278 
     | 
    
         
            -
            Note: each of the following warning options has a negative form beginning with
         
     | 
| 
       279 
     | 
    
         
            -
            \&\fB\-fno\-\fR.
         
     | 
| 
       280 
     | 
    
         
            -
            .IP "\fB\-funsigned\-char\fR" 4
         
     | 
| 
       281 
     | 
    
         
            -
            .IX Item "-funsigned-char"
         
     | 
| 
       282 
     | 
    
         
            -
            Let the \f(CW\*(C`char\*(C'\fR type be unsigned.
         
     | 
| 
       283 
     | 
    
         
            -
            .IP "\fB\-fsigned\-char\fR" 4
         
     | 
| 
       284 
     | 
    
         
            -
            .IX Item "-fsigned-char"
         
     | 
| 
       285 
     | 
    
         
            -
            Let the \f(CW\*(C`char\*(C'\fR type be signed.
         
     | 
| 
       286 
     | 
    
         
            -
            .IP "\fB\-fno\-common\fR" 4
         
     | 
| 
       287 
     | 
    
         
            -
            .IX Item "-fno-common"
         
     | 
| 
       288 
     | 
    
         
            -
            Do not generate common symbols for uninitialized data.
         
     | 
| 
       289 
     | 
    
         
            -
            .IP "\fB\-fleading\-underscore\fR" 4
         
     | 
| 
       290 
     | 
    
         
            -
            .IX Item "-fleading-underscore"
         
     | 
| 
       291 
     | 
    
         
            -
            Add a leading underscore at the beginning of each C symbol.
         
     | 
| 
       292 
     | 
    
         
            -
            .PP
         
     | 
| 
       293 
     | 
    
         
            -
            Warning options:
         
     | 
| 
       294 
     | 
    
         
            -
            .IP "\fB\-w\fR" 4
         
     | 
| 
       295 
     | 
    
         
            -
            .IX Item "-w"
         
     | 
| 
       296 
     | 
    
         
            -
            Disable all warnings.
         
     | 
| 
       297 
     | 
    
         
            -
            .PP
         
     | 
| 
       298 
     | 
    
         
            -
            Note: each of the following warning options has a negative form beginning with
         
     | 
| 
       299 
     | 
    
         
            -
            \&\fB\-Wno\-\fR.
         
     | 
| 
       300 
     | 
    
         
            -
            .IP "\fB\-Wimplicit\-function\-declaration\fR" 4
         
     | 
| 
       301 
     | 
    
         
            -
            .IX Item "-Wimplicit-function-declaration"
         
     | 
| 
       302 
     | 
    
         
            -
            Warn about implicit function declaration.
         
     | 
| 
       303 
     | 
    
         
            -
            .IP "\fB\-Wunsupported\fR" 4
         
     | 
| 
       304 
     | 
    
         
            -
            .IX Item "-Wunsupported"
         
     | 
| 
       305 
     | 
    
         
            -
            Warn about unsupported \s-1GCC\s0 features that are ignored by \s-1TCC.\s0
         
     | 
| 
       306 
     | 
    
         
            -
            .IP "\fB\-Wwrite\-strings\fR" 4
         
     | 
| 
       307 
     | 
    
         
            -
            .IX Item "-Wwrite-strings"
         
     | 
| 
       308 
     | 
    
         
            -
            Make string constants be of type \f(CW\*(C`const char *\*(C'\fR instead of \f(CW\*(C`char
         
     | 
| 
       309 
     | 
    
         
            -
            *\*(C'\fR.
         
     | 
| 
       310 
     | 
    
         
            -
            .IP "\fB\-Werror\fR" 4
         
     | 
| 
       311 
     | 
    
         
            -
            .IX Item "-Werror"
         
     | 
| 
       312 
     | 
    
         
            -
            Abort compilation if warnings are issued.
         
     | 
| 
       313 
     | 
    
         
            -
            .IP "\fB\-Wall\fR" 4
         
     | 
| 
       314 
     | 
    
         
            -
            .IX Item "-Wall"
         
     | 
| 
       315 
     | 
    
         
            -
            Activate all warnings, except \fB\-Werror\fR, \fB\-Wunusupported\fR and
         
     | 
| 
       316 
     | 
    
         
            -
            \&\fB\-Wwrite\-strings\fR.
         
     | 
| 
       317 
     | 
    
         
            -
            .PP
         
     | 
| 
       318 
     | 
    
         
            -
            Linker options:
         
     | 
| 
       319 
     | 
    
         
            -
            .IP "\fB\-Ldir\fR" 4
         
     | 
| 
       320 
     | 
    
         
            -
            .IX Item "-Ldir"
         
     | 
| 
       321 
     | 
    
         
            -
            Specify an additional static library path for the \fB\-l\fR option. The
         
     | 
| 
       322 
     | 
    
         
            -
            default library paths are \fI/usr/local/lib\fR, \fI/usr/lib\fR and \fI/lib\fR.
         
     | 
| 
       323 
     | 
    
         
            -
            .IP "\fB\-lxxx\fR" 4
         
     | 
| 
       324 
     | 
    
         
            -
            .IX Item "-lxxx"
         
     | 
| 
       325 
     | 
    
         
            -
            Link your program with dynamic library libxxx.so or static library
         
     | 
| 
       326 
     | 
    
         
            -
            libxxx.a. The library is searched in the paths specified by the
         
     | 
| 
       327 
     | 
    
         
            -
            \&\fB\-L\fR option.
         
     | 
| 
       328 
     | 
    
         
            -
            .IP "\fB\-Bdir\fR" 4
         
     | 
| 
       329 
     | 
    
         
            -
            .IX Item "-Bdir"
         
     | 
| 
       330 
     | 
    
         
            -
            Set the path where the tcc internal libraries (and include files) can be
         
     | 
| 
       331 
     | 
    
         
            -
            found (default is \fIPREFIX/lib/tcc\fR).
         
     | 
| 
       332 
     | 
    
         
            -
            .IP "\fB\-shared\fR" 4
         
     | 
| 
       333 
     | 
    
         
            -
            .IX Item "-shared"
         
     | 
| 
       334 
     | 
    
         
            -
            Generate a shared library instead of an executable.
         
     | 
| 
       335 
     | 
    
         
            -
            .IP "\fB\-soname name\fR" 4
         
     | 
| 
       336 
     | 
    
         
            -
            .IX Item "-soname name"
         
     | 
| 
       337 
     | 
    
         
            -
            set name for shared library to be used at runtime
         
     | 
| 
       338 
     | 
    
         
            -
            .IP "\fB\-static\fR" 4
         
     | 
| 
       339 
     | 
    
         
            -
            .IX Item "-static"
         
     | 
| 
       340 
     | 
    
         
            -
            Generate a statically linked executable (default is a shared linked
         
     | 
| 
       341 
     | 
    
         
            -
            executable).
         
     | 
| 
       342 
     | 
    
         
            -
            .IP "\fB\-rdynamic\fR" 4
         
     | 
| 
       343 
     | 
    
         
            -
            .IX Item "-rdynamic"
         
     | 
| 
       344 
     | 
    
         
            -
            Export global symbols to the dynamic linker. It is useful when a library
         
     | 
| 
       345 
     | 
    
         
            -
            opened with \f(CW\*(C`dlopen()\*(C'\fR needs to access executable symbols.
         
     | 
| 
       346 
     | 
    
         
            -
            .IP "\fB\-r\fR" 4
         
     | 
| 
       347 
     | 
    
         
            -
            .IX Item "-r"
         
     | 
| 
       348 
     | 
    
         
            -
            Generate an object file combining all input files.
         
     | 
| 
       349 
     | 
    
         
            -
            .IP "\fB\-Wl,\-rpath=path\fR" 4
         
     | 
| 
       350 
     | 
    
         
            -
            .IX Item "-Wl,-rpath=path"
         
     | 
| 
       351 
     | 
    
         
            -
            Put custom seatch path for dynamic libraries into executable.
         
     | 
| 
       352 
     | 
    
         
            -
            .IP "\fB\-Wl,\-\-oformat=fmt\fR" 4
         
     | 
| 
       353 
     | 
    
         
            -
            .IX Item "-Wl,--oformat=fmt"
         
     | 
| 
       354 
     | 
    
         
            -
            Use \fIfmt\fR as output format. The supported output formats are:
         
     | 
| 
       355 
     | 
    
         
            -
            .RS 4
         
     | 
| 
       356 
     | 
    
         
            -
            .ie n .IP """elf32\-i386""" 4
         
     | 
| 
       357 
     | 
    
         
            -
            .el .IP "\f(CWelf32\-i386\fR" 4
         
     | 
| 
       358 
     | 
    
         
            -
            .IX Item "elf32-i386"
         
     | 
| 
       359 
     | 
    
         
            -
            \&\s-1ELF\s0 output format (default)
         
     | 
| 
       360 
     | 
    
         
            -
            .ie n .IP """binary""" 4
         
     | 
| 
       361 
     | 
    
         
            -
            .el .IP "\f(CWbinary\fR" 4
         
     | 
| 
       362 
     | 
    
         
            -
            .IX Item "binary"
         
     | 
| 
       363 
     | 
    
         
            -
            Binary image (only for executable output)
         
     | 
| 
       364 
     | 
    
         
            -
            .ie n .IP """coff""" 4
         
     | 
| 
       365 
     | 
    
         
            -
            .el .IP "\f(CWcoff\fR" 4
         
     | 
| 
       366 
     | 
    
         
            -
            .IX Item "coff"
         
     | 
| 
       367 
     | 
    
         
            -
            \&\s-1COFF\s0 output format (only for executable output for TMS320C67xx target)
         
     | 
| 
       368 
     | 
    
         
            -
            .RE
         
     | 
| 
       369 
     | 
    
         
            -
            .RS 4
         
     | 
| 
       370 
     | 
    
         
            -
            .RE
         
     | 
| 
       371 
     | 
    
         
            -
            .IP "\fB\-Wl,\-subsystem=console/gui/wince/...\fR" 4
         
     | 
| 
       372 
     | 
    
         
            -
            .IX Item "-Wl,-subsystem=console/gui/wince/..."
         
     | 
| 
       373 
     | 
    
         
            -
            Set type for \s-1PE \s0(Windows) executables.
         
     | 
| 
       374 
     | 
    
         
            -
            .IP "\fB\-Wl,\-[Ttext=# | section\-alignment=# | file\-alignment=# | image\-base=# | stack=#]\fR" 4
         
     | 
| 
       375 
     | 
    
         
            -
            .IX Item "-Wl,-[Ttext=# | section-alignment=# | file-alignment=# | image-base=# | stack=#]"
         
     | 
| 
       376 
     | 
    
         
            -
            Modify executable layout.
         
     | 
| 
       377 
     | 
    
         
            -
            .IP "\fB\-Wl,\-Bsymbolic\fR" 4
         
     | 
| 
       378 
     | 
    
         
            -
            .IX Item "-Wl,-Bsymbolic"
         
     | 
| 
       379 
     | 
    
         
            -
            Set \s-1DT_SYMBOLIC\s0 tag.
         
     | 
| 
       380 
     | 
    
         
            -
            .PP
         
     | 
| 
       381 
     | 
    
         
            -
            Debugger options:
         
     | 
| 
       382 
     | 
    
         
            -
            .IP "\fB\-g\fR" 4
         
     | 
| 
       383 
     | 
    
         
            -
            .IX Item "-g"
         
     | 
| 
       384 
     | 
    
         
            -
            Generate run time debug information so that you get clear run time
         
     | 
| 
       385 
     | 
    
         
            -
            error messages: \f(CW\*(C` test.c:68: in function \*(Aqtest5()\*(Aq: dereferencing
         
     | 
| 
       386 
     | 
    
         
            -
            invalid pointer\*(C'\fR instead of the laconic \f(CW\*(C`Segmentation
         
     | 
| 
       387 
     | 
    
         
            -
            fault\*(C'\fR.
         
     | 
| 
       388 
     | 
    
         
            -
            .IP "\fB\-b\fR" 4
         
     | 
| 
       389 
     | 
    
         
            -
            .IX Item "-b"
         
     | 
| 
       390 
     | 
    
         
            -
            Generate additional support code to check
         
     | 
| 
       391 
     | 
    
         
            -
            memory allocations and array/pointer bounds. \fB\-g\fR is implied. Note
         
     | 
| 
       392 
     | 
    
         
            -
            that the generated code is slower and bigger in this case.
         
     | 
| 
       393 
     | 
    
         
            -
            .Sp
         
     | 
| 
       394 
     | 
    
         
            -
            Note: \fB\-b\fR is only available on i386 for the moment.
         
     | 
| 
       395 
     | 
    
         
            -
            .IP "\fB\-bt N\fR" 4
         
     | 
| 
       396 
     | 
    
         
            -
            .IX Item "-bt N"
         
     | 
| 
       397 
     | 
    
         
            -
            Display N callers in stack traces. This is useful with \fB\-g\fR or
         
     | 
| 
       398 
     | 
    
         
            -
            \&\fB\-b\fR.
         
     | 
| 
       399 
     | 
    
         
            -
            .PP
         
     | 
| 
       400 
     | 
    
         
            -
            Misc options:
         
     | 
| 
       401 
     | 
    
         
            -
            .IP "\fB\-MD\fR" 4
         
     | 
| 
       402 
     | 
    
         
            -
            .IX Item "-MD"
         
     | 
| 
       403 
     | 
    
         
            -
            Generate makefile fragment with dependencies.
         
     | 
| 
       404 
     | 
    
         
            -
            .IP "\fB\-MF depfile\fR" 4
         
     | 
| 
       405 
     | 
    
         
            -
            .IX Item "-MF depfile"
         
     | 
| 
       406 
     | 
    
         
            -
            Use \fIdepfile\fR as output for \-MD.
         
     | 
| 
       407 
     | 
    
         
            -
            .PP
         
     | 
| 
       408 
     | 
    
         
            -
            Note: \s-1GCC\s0 options \fB\-Ox\fR, \fB\-fx\fR and \fB\-mx\fR are
         
     | 
| 
       409 
     | 
    
         
            -
            ignored.
         
     | 
| 
       410 
     | 
    
         
            -
            .SH "SEE ALSO"
         
     | 
| 
       411 
     | 
    
         
            -
            .IX Header "SEE ALSO"
         
     | 
| 
       412 
     | 
    
         
            -
            \&\fIgcc\fR\|(1)
         
     | 
| 
       413 
     | 
    
         
            -
            .SH "AUTHOR"
         
     | 
| 
       414 
     | 
    
         
            -
            .IX Header "AUTHOR"
         
     | 
| 
       415 
     | 
    
         
            -
            Fabrice Bellard
         
     |