This project is a fork of the tinycc.git project. If you have that one already cloned locally, you can use
git clone --reference /path/to/your/tinycc.git/incarnation mirror_URL
to save bandwidth during cloning.
descriptiontinycc fork to help me test changes before commit to mob
last changeWed, 27 Jun 2012 18:48:08 +0000 (27 14:48 -0400)
content tags
Tiny C Compiler - C Scripting Everywhere - The Smallest ANSI C compiler


- SMALL! You can compile and execute C code everywhere, for example on
  rescue disks.

- FAST! tcc generates optimized x86 code. No byte code
  overhead. Compile, assemble and link about 7 times faster than 'gcc

- UNLIMITED! Any C dynamic library can be used directly. TCC is
  heading torward full ISOC99 compliance. TCC can of course compile

- SAFE! tcc includes an optional memory and bound checker. Bound
  checked code can be mixed freely with standard code.

- Compile and execute C source directly. No linking or assembly
  necessary. Full C preprocessor included. 

- C script supported : just add '#!/usr/local/bin/tcc -run' at the first
  line of your C source, and execute it directly from the command


1) Installation on a i386 Linux host (for Windows read tcc-win32.txt)

   make test
   make install

By default, tcc is installed in /usr/local/bin.
./configure --help  shows configuration options.

2) Introduction

We assume here that you know ANSI C. Look at the example ex1.c to know
what the programs look like.

The include file <tcclib.h> can be used if you want a small basic libc
include support (especially useful for floppy disks). Of course, you
can also use standard headers, although they are slower to compile.

You can begin your C script with '#!/usr/local/bin/tcc -run' on the first
line and set its execute bits (chmod a+x your_script). Then, you can
launch the C code as a shell or perl script :-) The command line
arguments are put in 'argc' and 'argv' of the main functions, as in

3) Examples

ex1.c: simplest example (hello world). Can also be launched directly
as a script: './ex1.c'.

ex2.c: more complicated example: find a number with the four
operations given a list of numbers (benchmark).

ex3.c: compute fibonacci numbers (benchmark).

ex4.c: more complicated: X11 program. Very complicated test in fact
because standard headers are being used ! As for ex1.c, can also be launched
directly as a script: './ex4.c'.

ex5.c: 'hello world' with standard glibc headers.

tcc.c: TCC can of course compile itself. Used to check the code

tcctest.c: auto test for TCC which tests many subtle possible bugs. Used
when doing 'make test'.

4) Full Documentation

Please read tcc-doc.html to have all the features of TCC.

Additional information is available for the Windows port in tcc-win32.txt.


TCC is distributed under the GNU Lesser General Public License (see
COPYING file).

Fabrice Bellard.
2012-06-27 Milutin Jovanovićtests: Minor adjustments selecting which tests are... mob
2012-06-27 Vincent LefevreIncorrect shift result type with 64-bit ABI
2012-06-18 Milutin Jovanovićtests: Added numerous tests.
2012-06-13 Thomas Preud... Detect multiarch on Kfreebsd and Hurd
2012-06-12 Thomas Preud... Evaluate configure arguments
2012-06-12 grischkaRevert "Make ex1.c and ex4.c be executable on any systems"master
2012-06-12 grischkatcc.c: fix argv index for parse_args
2012-06-11 Milutin Jovanovosx: Removed some optimizations for x86 builds as they...
2012-06-10 Michael Matzx86-64: Fix call saved register restore
2012-06-05 Thomas Preud... tccelf.c: Add R_ARM_REL32 relocation
2012-06-05 Thomas Preud... Add support for arm hardfloat calling convention
2012-06-05 Thomas Preud... Fix removal of vnrott
2012-05-28 Thomas Preud... Only warn for unknown options in configure script
2012-05-22 Thomas Preud... Several multiarch/biarch fixes
2012-05-22 Thomas Preud... Fix CONFIG_LDDIR usage
2012-05-13 Michael Matzx86_64: Fix compares with NaNs.
8 years ago release_0_9_25
9 years ago release_0_9_24
12 years ago release_0_9_23
12 years ago release_0_9_22
13 years ago release_0_9_20
14 years ago release_0_9_19
14 years ago release_0_9_18
15 years ago initial
5 years ago mob
5 years ago master
7 years ago tcc-xref
7 years ago mob-stuff