Tiny Core Linux

Tiny Core Extensions => TCE News => TCE 1.x => Topic started by: Jason W on January 12, 2009, 09:50:39 PM

Title: tcc.{tce,tcz}
Post by: Jason W on January 12, 2009, 09:50:39 PM
Here is tcc.tce and tcc.tcz, the Tiny C Compiler.

Code: [Select]
Title:          tcc.tce
Description:    Tiny C compiler.
Version:        0.9.24
Author:         Fabrice Bellard
Original-site:  http://bellard.org/tcc/
Copying-policy: LGPL
Size: 227KB
Extension_by:   Jason W
Comments:       Built with-----
export PKG=/mnt/hda2/tcc
export CFLAGS="-march=i486 -mtune=i686 -Os -pipe"
./configure --prefix=/usr/local
make
make prefix=$PKG/usr/local \
      bindir=$PKG/usr/local/bin \
      tccdir=$PKG/usr/local/lib/tcc \
      libdir=$PKG/usr/local/lib \
      includedir=$PKG/usr/local/include \
      mandir=$PKG/usr/local/man \
      docdir=$PKG/usr/local/share/tcc/doc \
      install
Change-log:     First version
Current:        2009/01/12
Title: Re: tcc.{tce,tcz}
Post by: florian on January 13, 2009, 01:05:39 PM
tcc is great!
I like it for it compiles ultra fast and can be used for C scripting by add this shebang in front on top of your C file:
Code: [Select]
#!/usr/local/bin/tcc -run

<crazy talk>is there a C wrapper for FLTK? It would allow to write GUI scripts instead of having binaries</crazy talk>
Title: Re: tcc.{tce,tcz}
Post by: Jason W on January 13, 2009, 01:23:12 PM
It does work fast.  Leafpad compiled with tcc in 9 seconds, and it took gcc 28 seconds to do the same.  I didn't test the resulting binaries much for comparison, but I was impressed with the fast compile time.
Title: Re: tcc.{tce,tcz}
Post by: curaga on January 13, 2009, 02:03:01 PM
@florian: No, but as long as you don't use the special features of C++, you can just mix-n-match; the only C++ parts will be the FLTK interfacing ones, everything else in C, using only C includes. See the watcher source for the project that helped me realize this would work :)

edit: But you do have to compile it with g++ and link with stdc++ for it to work. So I guess tcc is out of the question..