Name Date Size

..27-Apr.-20224 KiB

.gitignoreH A D09-May-2022753

arm-asm.cH A D09-May-2022100.7 KiB

arm-gen.cH A D05-May-202259.9 KiB

arm-link.cH A D09-May-202214.4 KiB

arm-tok.hH A D31-May-20219 KiB

arm64-asm.cH A D22-Oct.-20211.9 KiB

arm64-gen.cH A D05-May-202263 KiB

arm64-link.cH A D09-May-202211.2 KiB

c67-gen.cH A D22-Oct.-202169.4 KiB

c67-link.cH A D09-May-20223.2 KiB

ChangelogH A D25-Sep.-201717.2 KiB

CodingStyleH A D25-Sep.-20172.1 KiB

coff.hH A D25-Sep.-201721.9 KiB

configureH A D16-May-202214.9 KiB

conftest.cH A D31-May-20217.8 KiB

COPYINGH A D25-Sep.-201725.8 KiB

dwarf.hH A D05-May-202230.7 KiB

elf.hH A D13-Jun.-2022144.2 KiB

examples/H25-Sep.-20174 KiB

i386-asm.cH A D09-May-202250.6 KiB

i386-asm.hH A D18-Apr.-202223.4 KiB

i386-gen.cH A D05-May-202230.2 KiB

i386-link.cH A D09-May-20229.7 KiB

i386-tok.hH A D01-Aug.-20216.1 KiB

il-gen.cH A D25-Sep.-201716 KiB

il-opcodes.hH A D25-Sep.-20177.4 KiB

include/H28-Apr.-20224 KiB

lib/H19-May-20224 KiB

libtcc.cH A D09-May-202257.6 KiB

libtcc.hH A D22-Oct.-20213.6 KiB

MakefileH A D09-May-202216.3 KiB

READMEH A D31-May-20212.8 KiB

RELICENSINGH A D31-May-20212.8 KiB

riscv64-asm.cH A D07-Jun.-202219.8 KiB

riscv64-gen.cH A D05-May-202244.6 KiB

riscv64-link.cH A D09-May-202211.4 KiB

riscv64-tok.hH A D07-Jun.-20222.5 KiB

stab.defH A D25-Sep.-20178.9 KiB

stab.hH A D25-Sep.-2017259

tcc-doc.texiH A D09-May-202238.6 KiB

tcc.cH A D09-May-202213.7 KiB

tcc.hH A D09-May-202263.2 KiB

tccasm.cH A D22-Oct.-202136.2 KiB

tcccoff.cH A D22-Oct.-202122.2 KiB

tccdbg.cH A D25-May-202268.9 KiB

tccelf.cH A D26-May-2022123.4 KiB

tccgen.cH A D01-Jul.-2022245.1 KiB

tcclib.hH A D25-Sep.-20172.5 KiB

tccmacho.cH A D09-May-202238.5 KiB

tccpe.cH A D22-Oct.-202161.6 KiB

tccpp.cH A D14-May-2022113 KiB

tccrun.cH A D19-May-202238 KiB

tcctok.hH A D01-Aug.-202112.9 KiB

tcctools.cH A D18-Apr.-202216.3 KiB

tests/H09-May-20224 KiB

texi2pod.plH A D25-Sep.-201710.8 KiB

TODOH A D25-Sep.-20173.6 KiB

USESH A D31-May-2021982

VERSIONH A D25-Sep.-20177

win32/H21-Aug.-20214 KiB

x86_64-asm.hH A D18-Apr.-202225.9 KiB

x86_64-gen.cH A D05-May-202263.9 KiB

x86_64-link.cH A D09-May-202212.7 KiB

README

1Tiny C Compiler - C Scripting Everywhere - The Smallest ANSI C compiler
2-----------------------------------------------------------------------
3
4Features:
5--------
6
7- SMALL! You can compile and execute C code everywhere, for example on
8  rescue disks.
9
10- FAST! tcc generates optimized x86 code. No byte code
11  overhead. Compile, assemble and link about 7 times faster than 'gcc
12  -O0'.
13
14- UNLIMITED! Any C dynamic library can be used directly. TCC is
15  heading toward full ISOC99 compliance. TCC can of course compile
16  itself.
17
18- SAFE! tcc includes an optional memory and bound checker. Bound
19  checked code can be mixed freely with standard code.
20
21- Compile and execute C source directly. No linking or assembly
22  necessary. Full C preprocessor included.
23
24- C script supported : just add '#!/usr/local/bin/tcc -run' at the first
25  line of your C source, and execute it directly from the command
26  line.
27
28Documentation:
29-------------
30
311) Installation on a i386/x86_64/arm/aarch64/riscv64
32   Linux/macOS/FreeBSD/NetBSD/OpenBSD hosts.
33
34   ./configure
35   make
36   make test
37   make install
38
39   Notes: For FreeBSD, NetBSD and OpenBSD, gmake should be used instead of make.
40   For Windows read tcc-win32.txt.
41
42makeinfo must be installed to compile the doc.  By default, tcc is
43installed in /usr/local/bin.  ./configure --help  shows configuration
44options.
45
46
472) Introduction
48
49We assume here that you know ANSI C. Look at the example ex1.c to know
50what the programs look like.
51
52The include file <tcclib.h> can be used if you want a small basic libc
53include support (especially useful for floppy disks). Of course, you
54can also use standard headers, although they are slower to compile.
55
56You can begin your C script with '#!/usr/local/bin/tcc -run' on the first
57line and set its execute bits (chmod a+x your_script). Then, you can
58launch the C code as a shell or perl script :-) The command line
59arguments are put in 'argc' and 'argv' of the main functions, as in
60ANSI C.
61
623) Examples
63
64ex1.c: simplest example (hello world). Can also be launched directly
65as a script: './ex1.c'.
66
67ex2.c: more complicated example: find a number with the four
68operations given a list of numbers (benchmark).
69
70ex3.c: compute fibonacci numbers (benchmark).
71
72ex4.c: more complicated: X11 program. Very complicated test in fact
73because standard headers are being used ! As for ex1.c, can also be launched
74directly as a script: './ex4.c'.
75
76ex5.c: 'hello world' with standard glibc headers.
77
78tcc.c: TCC can of course compile itself. Used to check the code
79generator.
80
81tcctest.c: auto test for TCC which tests many subtle possible bugs. Used
82when doing 'make test'.
83
844) Full Documentation
85
86Please read tcc-doc.html to have all the features of TCC.
87
88Additional information is available for the Windows port in tcc-win32.txt.
89
90License:
91-------
92
93TCC is distributed under the GNU Lesser General Public License (see
94COPYING file).
95
96Fabrice Bellard.
97