What about usig TCC instead of gcc to build Go under Linux.

268 views
Skip to first unread message

Serge Hulne

unread,
Nov 10, 2010, 2:45:52 AM11/10/10
to golang-nuts
- At least one expected benefit would be increased compiling speed.

Here are the characteristics of TCC:
(cf. http://bellard.org/tcc )

# SMALL! You can compile and execute C code everywhere, for example
on rescue disks (about 100KB for x86 TCC executable, including C
preprocessor, C compiler, assembler and linker).
# FAST! tcc generates x86 code. No byte code overhead. Compile,
assemble and link several 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
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 and GNU-like assembler 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.
# With libtcc, you can use TCC as a backend for dynamic code
generation

Serge.

ron minnich

unread,
Nov 10, 2010, 2:49:04 AM11/10/10
to Serge Hulne, golang-nuts
So why don't you just try it and see how it goes?

ron

Roger Pau Monné

unread,
Nov 10, 2010, 3:16:53 AM11/10/10
to ron minnich, Serge Hulne, golang-nuts
I think that until Go is more mature it's a waste of time to build support for many compilers, since the specifications are still changing, and it's more work to maintain.

2010/11/10 ron minnich <rmin...@gmail.com>

Alexander Surma

unread,
Nov 10, 2010, 3:50:36 AM11/10/10
to golan...@googlegroups.com
> 2010/11/10 ron minnich <rmin...@gmail.com <mailto:rmin...@gmail.com>>

>
> So why don't you just try it and see how it goes?
>
And while you're on it, why don't you try LLVM as well? Actually, that
would get me interested.

Surma

nsf

unread,
Nov 10, 2010, 5:28:30 AM11/10/10
to golan...@googlegroups.com

I believe it's a bootstrap question. What will you use to compile TCC
itself? Go uses GCC simply because it is available in most major and
minor linux distributions, because for a long time it was the only
compiler that is able to compile up-to-date linux kernel (I think clang
recently showed some success in this area).

So, I don't know exact reason for using GCC, but to me it's not even a
question.

Serge Hulne

unread,
Nov 10, 2010, 6:27:29 AM11/10/10
to golang-nuts
I agree, It was a naive suggestion on my part!

Serge.
Reply all
Reply to author
Forward
0 new messages