tinycc

Vlad VissoultchevAdd READMEb91835d8 years agoHistory
NameLast commit messageLast commit date
examplesmakefile: unify cross with native builds9 years ago
includeOverhauled WIN32 math and added missing functions: 1) Cleanup: moved function implementations from win32/include/math.h to win32/include/tcc/tcc_libm.h 2) Added missing math functions: MUSL: asinh(), acosh(), atanh(), scalbn(). My impl: log1p(), expm1(), ilogb(), scalbln(), nexttoward() - now only a few are missing: remquo(), remainder(), fma(), nan(), erf(), erfc(), nearbyint(). 3) Added/defined all missing *f() and *l() math functions. 4) Added functions have short but accurate/fast implementations. 5) Added <tgmath.h> for all platforms. (not too useful, IMO, but is C99 standard).5 years ago
libDisable signals in bcheck.c pthread_create5 years ago
testsFix fork problem 114_bound_signal5 years ago
win32Cleanup and minor fixes in win32/tcc/tcc_libm.h: truncf(), cbrtf(), exp2f(), log2f(), scalbln*()5 years ago
.gitignoreWIN32/64 only: Added C99 math functions: tgamma(), tgammaf(), lgamma(), lgammaf(), cbrt(), cbrtf(), log2(), log2f(), exp2(), exp2f(). The gamma() functions are accurate to 13 digits over the full range. Returns INFINITY / NAN identical to other compiler's math libs.5 years ago
.travis.ymlAdd README8 years ago
arm-asm.callow libtcc states to be used concurrently6 years ago
arm-gen.cBound checking fixes6 years ago
arm-link.cAdd arm dll support6 years ago
arm64-gen.cBound checking fixes6 years ago
arm64-link.cAdd arm64 dll support6 years ago
c67-gen.ctccgen.c: cleanup debug support6 years ago
c67-link.callow libtcc states to be used concurrently6 years ago
Changelog'long' review9 years ago
CodingStyleCodingStyle: Remove reference to misaligned struct CString.10 years ago
coff.hSpelling fixes in C comments only9 years ago
configuresome cleanups related to recent commits6 years ago
conftest.csome cleanups related to recent commits6 years ago
COPYINGchanged license to LGPL23 years ago
elf.hriscv64: Add skeleton target7 years ago
i386-asm.ctccgen: flex arrays etc.6 years ago
i386-asm.hx86-asm: Fix lar opcode operands10 years ago
i386-gen.cMove bound functions to tccgen.c6 years ago
i386-link.cFix boundschecking for signal/sigaction/fork6 years ago
i386-tok.hx86-64-asm: Support high registers %r8 - %r1510 years ago
il-gen.cSpelling fixes in C comments only9 years ago
il-opcodes.hRevert all of my changes to directories & codingstyle.11 years ago
libtcc.cthree small fixes & three reverts6 years ago
libtcc.hlibtcc: accept tcc_define_symbol(s1, "sym=value", NULL)6 years ago
MakefileRevert commit 55f8963dfab5c543f7f34589d3ef9d3f2da3db14 from wanjochan until better tested on all platforms6 years ago
READMEREADME: Fix typo and remove trailing whitespace7 years ago
README.mdAdd README8 years ago
RELICENSINGAdd note about native Windows bootstrap using Cygwin.9 years ago
riscv64-asm.cAdd bound checking to arm, arm64 and riscv646 years ago
riscv64-gen.cBound checking fixes6 years ago
riscv64-link.cAdd riscv dll support6 years ago
stab.defRevert all of my changes to directories & codingstyle.11 years ago
stab.hRevert all of my changes to directories & codingstyle.11 years ago
tcc-doc.texiFix boundschecking for signal/sigaction/fork6 years ago
tcc.cAdd -C gcc compatible option which does currently nothing. This allows, among others, to compile gnumake from git ROOTB.6 years ago
tcc.hthree small fixes & three reverts6 years ago
tccasm.csome cleanups related to recent commits6 years ago
tcccoff.callow libtcc states to be used concurrently6 years ago
tccelf.ctccgen: flex arrays etc.6 years ago
tccgen.cthree small fixes & three reverts6 years ago
tcclib.hRevert all of my changes to directories & codingstyle.11 years ago
tccmacho.cRevert commit 55f8963dfab5c543f7f34589d3ef9d3f2da3db14 from wanjochan until better tested on all platforms6 years ago
tccpe.cthree small fixes & three reverts6 years ago
tccpp.ctccgen: flex arrays etc.6 years ago
tccrun.criscv64: Work around qemu bug6 years ago
tcctok.hbcheck: remove static (compile-time) control6 years ago
tcctools.ctcc -MD: drop system includes and duplicates6 years ago
texi2pod.plRevert all of my changes to directories & codingstyle.11 years ago
TODORemove a bit-field TODO9 years ago
USESUSES: add mpc library6 years ago
VERSIONupdate VERSION to 0.9.279 years ago
x86_64-asm.hx86-64-asm: Fix mov im64,rax encoding9 years ago
x86_64-gen.cStruct va_arg fix6 years ago
x86_64-link.cFix boundschecking for signal/sigaction/fork6 years ago
README.md

TinyCC (or tcc) is short for Tiny C Compiler.

This is a clone of the mob development repo at http://repo.or.cz/tinycc.git

Branch Status
mob Build Status
dev Build Status

License

Tiny C Compiler project is licensed under LGPL but currently there is an effort to relicense the project under MIT License. See RELICENSING file in root for current status.

Branch Policy

The "dev" branch is the one where all contributions will be merged before reaching "mob". If you plan to propose a patch, please commit into the "dev" branch or its own feature branch. Direct commit to "mob" are not permitted.

Original Fabrice Bellard readme

Tiny C Compiler - C Scripting Everywhere - The Smallest ANSI C compiler
-----------------------------------------------------------------------

Features:
--------

- 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
  -O0'.

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

- 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
  line.

Documentation:
-------------

1) Installation on a i386/x86_64/arm Linux/OSX/FreeBSD host (for Windows read tcc-win32.txt)

Note: For OSX and FreeBSD, gmake should be used instead of make.

   ./configure
   make
   make test
   make install

Alternatively, out-of-tree builds are supported: you may use different
directories to hold build objects, kept separate from your source tree:

   mkdir _build
   cd _build
   ../configure
   make
   make test
   make install

Texi2html must be installed to compile the doc. 
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
ANSI C.

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
generator.

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.

License:
-------

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

Fabrice Bellard.