[Top][All Lists]

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

Re: [Tinycc-devel] Can you compile TCC using TCC?

From: avih
Subject: Re: [Tinycc-devel] Can you compile TCC using TCC?
Date: Tue, 17 Jan 2017 09:36:28 +0000 (UTC)

The property of a compiler that it can compile itself is called self-hosting, and yes, tcc is self-hosting and so it can compile itself.

As for building without a makefile, for windows, there's a batch file at the win32 dir of the tcc sources which can compile tcc without using a makefile, but it's not very configurable and it assumes gcc is available for that. It could be modified to allow also tcc to be used, but right now it can't.

However, I believe the last officially released windows tcc binaries (0.26) which was released some years ago cannot compile the current tcc sources if I recall correctly.

I'd suggest to compile tcc using gcc first (using a makefile) and then using the resulting tcc to compile itself. Instructions from scratch for doing exactly that on windows (using msys2) are available here: http://lists.nongnu.org/archive/html/tinycc-devel/2016-10/msg00067.html

Step 6 in the linked instructions will build tcc using gcc, and step 7 will built tcc again, now using the newly built tcc. In those steps (6, 7) remove the "--enable-cross" parts.

On Tuesday, January 17, 2017 7:32 AM, Ben Hutchinson <address@hidden> wrote:

I would like to fix a bug in TCC, but to do this I would like to compile it using the simplest known C compiler for Windows that has ever existed, TCC itself. However, I don't know how to use the MAKEFILE in TCC. The TCC source code comes with a MAKEFILE file, and I don't know how to use that with TCC. In the event that TCC can't use the MAKEFILE file, is there an alternative way to compile TCC using TCC? Or is it simply impossible to use TCC to compile TCC?

Tinycc-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]