osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Python compiled by tcc


Am 21.05.17 um 12:38 schrieb bartc:
> On 21/05/2017 10:32, Christian Gollwitzer wrote:
>> Am 18.05.17 um 10:10 schrieb Christian Gollwitzer:
>>> The whole discussion reminds me of the "bumblebees can't fly" thing.
>>> tcc is a very small compiler (some 100kb) which supports most of C99.
>>
>> For what it's worth, I compiled Python 3.6.1 on Linux/x86 using tcc. It
>> was a simple matter of cloning tcc, compiling/installing it and the doing
>>
>>     CC=tcc ./configure
>>     make

> BTW, how long did an incremental change take to build? I've measured 5 
> seconds before with gcc. Tcc might be slower in its generated code, but 
> if you just want to quickly see the result of a modification, that the 
> result might run at half the speed is irrelevant.

If I do

touch Python/Python-ast.c
time make python

it says

real	0m0.564s
user	0m0.394s
sys	0m0.149s


BTW the Xlinker option is a good example to see why autoconf is needed. 
They were lazy and had a simple switch on `uname` to find the option, 
instead of testing it with the compile-macros of autoconf.

> (Not such good news for me, as now I feel obliged to make my own C 
> compiler manage it. And it sort of competes with tcc for compilation 
> speed (and size too but that wasn't intentional). However it lacks some 
> C99 features at the minute.)

haha :) Good luck with that. Remember, tcc supports x86, x86_64, MIPS, 
ARM, ARM64, and C67, so it is a serious beast.

	Christian