The Tiny C Compiler
http://fabrice.bellard.free.fr/tcc
The actually maintained fork of tcc is TinyCC http://www.landley.net/code/tinycc/
AMG: As of 4 Oct 2007, TinyCC is said to be abandoned. [L1 ]
LV I don't know that I agree with that analysis. What you point to is a blog by one tinycc developer. His blog points to a post to the tinycc mailing list, asking him to go play with his fork of tinycc if he was going to reject input from users of his fork.
I don't see any indication that the primary tinycc developers are abandoning the work - just landley and his branch at landley.net. - RS 2007-10-09: The mailing list [L2 ] has a few daily posts in recent days... but for us Tclers, hanging on MJs tcltcc branch (with VFS i/o, see below) may be better-fitting.
Features (from the tcc homepage)
Reinhard Max has tried to Compile Tcl with tcc on SuSE Linux.
LGPL.
CMcC has written a tcc tcl extension - generate dlls and even dynamically compile C into memory.
Is there a way to combine critcl and one of these small c compilers? - RS: Odyce (tcc wrapper in eTcl) contains a partial Critcl emulation - the difference being that no external compiler, linker etc. is needed.
[Of possible interest to the same readers is this [L4 ] small compiler.]
LES: Are you sure it's for i386 only? What about this? [L5 ]
SDCC can generate code only for Intel 8051, Maxim 80DS390 and Zilog Z80, with Motorola 68HC08 and Microchip PIC16 and PIC18 in the works. Tcl runs on none of these, AFAIK.
See also: Small is beautiful
October 27, 2004 [email protected]:
I have a working version for windows, and have written a couple examples using Tcl C API's...Works pretty good... Still needs some work....
CMcC - Excellent. The latest version is supposed to work for windows too, the big question is: can your version create .dll files?
No, what you get is a compiled memory resident code. I use it mainly to quickly test new 'C' code segments or just needed a quick fast function call to perform something (math routine)...
I've compiled the tcc into a DLL and load it into tcl, then load/unload my 'C' scripts...I have put in hooks to call the tcl API so I can create new commands...The main difference is that you use the "main" function the same as the "init" call to initialize the code...
example 'C' script:
AMG 8 Dec 2005: I removed the example script because it's horribly corrupted. Look in the revision history if you want to try and salvage it. And remember, when pasting blocks of code in the Tcl wiki, prefix each line with a space character. Also proofread the result of your edit to see that it looks the way you intend.
PWQ 6 Jan 2005, I have used tcc 0.9.22 and I have found there are some differences in execution between compiling with gcc and tcc.
One opengl program does not display any opengl renderings even though the glut menu displays.
I think tcc has some way to go before becoming a contender for a JIT type of extension to TCL.
HJG 2005-12-08: Link appears dead "Server not found" - RS 2007-10-01: Link is alive, but latest news is of Jun 17, 2005, so tcc may be, umm, dormant. It could also have begun a new life in odyce ... :^)
RS 2007-10-06: Another tcc adaption to Tcl, as a regular loadable package, is currently in the making - contact MJ. I'm testing it on W95/Tcl 8.4.5, and it looks nice so far :^)
MJ - Source code is now hosted at GoogleCode [L6 ]
So tcltcc (MJ's code over at GoogleCode) is a Tcl extension, or a modified version of Tcc, or both? - RS 2007-10-09: Both - a Tcl extension package wrapping tcc, modified so that it does file I/O via VFS (so you can mount ZIP files to read from, etc.)
Category Language |