tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).


From: Rob Landley
Subject: Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).
Date: Thu, 12 Oct 2006 17:11:50 -0400
User-agent: KMail/1.9.1

On Thursday 12 October 2006 4:59 pm, Daniel Glöckner wrote:
> On Thu, Oct 12, 2006 at 04:35:31PM -0400, Rob Landley wrote:
> > I just don't see why what machine you're running the compiler on is any of 
the 
> > compiler's business.  It should only care what machine it's producing 
target 
> > binaries for.  So the difference between cross-compiling and native 
compiling 
> > is pretty darn artificial, from the compiler's point of view.
> 
> TinyCC assumes that the target has the same endianness und floatingpoint
> format as the host.

This needs to be fixed then.  However, I'm still reading through tcc.c (it's 
205 pages printed out), and when I'm done I'll probably break my copy into 
multiple files (break out the assembler and the linker into separate source 
files, although not separate binaries).

I also have a patch to fix initializing a 10 byte floating point constant in a 
12 byte storage space that leaves 2 bytes of uninitialized random data that 
gets written into binaries.  Although by "patch" I mean "perl script david 
wheeler wrote to run against the source code":
http://www.dwheeler.com/trusting-trust/

Todo items...

But first, I would like to get it to build qemu on x86.  And at least 
an "allnoconfig" unmodified Linux kernel, although sending patches back to 
the kernel guys is a valid approach to making that work. :)

> > And you have a code generator backend.  Currently specified by the name of 
the 
> > compiler binary you're running, but "-m arch" would work too.
> 
> That requires separate compilation of the backends due to name clashes,
> many ifs instead of #ifdefs and a lot less constants.

I.E. muchly cleanup.  Didn't say it would be easy. :)

> Who really needs more than one target and doesn't have enough space for
> separate binaries?
> 
> Keep it simple.

*shrug*  Depends on your definition of simple.  Right now, getting the Windows 
#ifdefs out of the main code, making it build stuff I use, and teaching it 
about dead code elimination are higher priority for me than most other 
things.

>   Daniel

Rob
-- 
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery




reply via email to

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