[fossil-users] Compile Fossil with Tiny C Compiler

2013-01-30 Thread Sergei Gavrikov
Hi

[The below is thanking -static issue]

I search through the list for /Fabrice Bellard/ and found nothing. His
famous Tiny C Compiler (http://en.wikipedia.org/wiki/Tiny_C_Compiler
http://bellard.org/tcc/) is well-known in Tcl community and they know
its strengths.

I want to share here my 2-minutes experiment (below is cp from a
terminal):

Make the very virgin environment


  sg@...:build fossil clean -f
  sg@...:build ../configure --quiet --json --markdown
  sg@...:build ccache -Cc
  Cleared cache
  Cleaned cache

Build Fossil with `tcc' and run it
--

  sg@...:build time make -s BCC=tcc TCC=tcc  ./fossil version
  ../src/diffcmd.c:290: warning: assignment makes pointer from integer
  without a cast
  ../src/diffcmd.c:447: warning: assignment makes pointer from integer
  without a cast
  ../src/diffcmd.c:449: warning: assignment makes pointer from integer
  without a cast
  ../src/rebuild.c:849: warning: assignment from incompatible pointer type
  ../src/vfile.c:467: warning: assignment from incompatible pointer type
  ../src/sqlite3.c:20089: warning: assignment makes pointer from integer
  without a cast
  ../src/sqlite3.c:43635: warning: assignment makes pointer from integer
  without a cast
  
  real  0m1.926s
  user  0m1.776s
  sys   0m0.680s
  This is fossil version 1.25 [8027c7e648] 2013-01-30 18:14:26 UTC

It took 2 seconds on my laptop and I've got working copy of Fossil!

Make again a virgin
---

  sg@...:build ccache -Cc
  Cleared cache
  Cleaned cache
  sg@...:build make clean
  rm -rf bld/* fossil

Build Fossil with `gcc' (no `ccache') and run it


  sg@...:build time make -s  ./fossil version
  
  real  1m8.647s
  user  1m2.852s
  sys   0m4.760s
  This is fossil version 1.25 [8027c7e648] 2013-01-30 18:14:26 UTC

Yep, it takes about 1 minute. So, I use `ccache'. Though, no warnings
:-)

Just clean (but do not break ccache caches)
---

  sg@...:build make clean
  rm -rf bld/* fossil

Repeat build and run with `gcc' + `ccache'
--

  sg@...:build time make -s  ./fossil version
  
  real  0m7.823s
  user  0m6.016s
  sys   0m1.784s
  This is fossil version 1.25 [8027c7e648] 2013-01-30 18:14:26 UTC

It took ~8 seconds.

What `tcc' I used here
--

  sg@...:build tcc -v
  tcc version 0.9.24

Afterwords
--

I like to see how `tcc' compile sqlite3.c in a second :-)

Why this here? IMHO, it is cool, and if you pack `jimsh0' with
`autosetup', perhaps, some one can try to pack `tcc' with some ...
autobuild.

BTW, there is Windows binary distribution of `tcc':

  http://bellard.org/tcc/
  http://download.savannah.nongnu.org/releases/tinycc/tcc-0.9.25-win32-bin.zip

but, I have no chance to try it.

WARNING! Thus, I installed the built fossil with `tcc' under
 /usr/local/bin, I do not test the build heavily!

Regards,
Sergei
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compile Fossil with Tiny C Compiler

2013-01-30 Thread Stephan Beal
On Wed, Jan 30, 2013 at 10:29 PM, Sergei Gavrikov sergei.gavri...@gmail.com
 wrote:

 I search through the list for /Fabrice Bellard/ and found nothing. His
 famous Tiny C Compiler (http://en.wikipedia.org/wiki/Tiny_C_Compiler
 http://bellard.org/tcc/) is well-known in Tcl community and they know
 its strengths.


It's funny you mention this now - the past week or two the tcc dev team has
been collecting last-minute fixes for a new release (the first one in an
obscenely long time).

It took 2 seconds on my laptop and I've got working copy of Fossil!


The current tcc release (0.9.25) fails on some 64-bit platforms with a
'missing stddef.h' error :(.


   sg@...:build tcc -v
   tcc version 0.9.24


0.9.26 should be released next Wednesday (according to list chatter).
0.9.25 is widespread on Linux platforms, but has a long history of
compile-time errors on 64-bit platforms. The so-called mob branch (which
fixes those problems) has been the unofficial trunk of tcc for at least a
year or so, but no distro i'm aware of ships a version based on that branch.

I like to see how `tcc' compile sqlite3.c in a second :-)


On my old 32-bit/1.2GHz netbook tcc 0.9.25 compiles sqlite3 in 0.4 seconds
:-D. gcc takes well over a minute.

i've written the tcc team expressing my amazement at this type of result,
but they respond to my excitement with a sober, but the runtime code is
not as fast as gcc's. (Also, tcc's warning/error messages are, in general,
not nearly as detailed.) Nonetheless, tcc's compile times are absolutely
amazing - i regularly see 10x+ increases in compile speed with tcc.

-- 
- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Compile Fossil with Tiny C Compiler

2013-01-30 Thread Paolo Bolzoni
On Wed, Jan 30, 2013 at 10:46 PM, Stephan Beal sgb...@googlemail.com wrote:
 i've written the tcc team expressing my amazement at this type of result,
 but they respond to my excitement with a sober, but the runtime code is not
 as fast as gcc's. (Also, tcc's warning/error messages are, in general, not
 nearly as detailed.) Nonetheless, tcc's compile times are absolutely amazing
 - i regularly see 10x+ increases in compile speed with tcc.

I can understand tcc team answer, after all most of the users of a
program do not
see the compiling time.

But it does sound cool for development!
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users