tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] compile TCC without another compiler


From: Basile Starynkevitch
Subject: Re: [Tinycc-devel] compile TCC without another compiler
Date: Wed, 14 Dec 2011 14:23:48 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 14, 2011 at 06:10:45PM +0530, harish badrinath wrote:
> Hello,
> I know this is bit of a OT question, but is it possible to compile TCC
> or any other C compiler, without any another C compiler.
> 
> 
> Suppose i have a system with busybox and a bunch of symlinks, how do i
> really (as in, in the literal sense of the word) bootstrap my system.

Practically speaking it is not possible.

You could in principle do several things:

* first, get a cross-compiler targetting your new machine. For instance, GCC
can be configured as a cross-compiler to many processors, and often when a
new processor is designed with a new instruction set, a GCC back-end for
that processor is also developped.

* second, you could code your C compiler with a language available on your
machine. For instance, you could code an Ocaml virtual machine for your
target, and write a C compiler in Ocaml, and run the bytecode on your
target.


* you could also code an emnulator (for an existing processor) on your
target machine, and run a compiler under that emulator.


You question don't matter that much, because what is really important is not
the processor, but the instruction set architecture, and ISAs don't change
much and they are very few of them (e.g. x86, ARM, PowerPC).

An organization rich enough to develop its own processor (today, that may
mean an investment in billions of dollars) is also abla to pay a compiler
team.


But in the 1970 & 1980 that question mattered much more.

Cheers.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***



reply via email to

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