tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] TCC on ARM


From: Rob Landley
Subject: Re: [Tinycc-devel] TCC on ARM
Date: Sat, 2 Dec 2006 12:49:07 -0500
User-agent: KMail/1.9.1

On Friday 01 December 2006 4:36 pm, Daniel Glöckner wrote:
> On Fri, Dec 01, 2006 at 05:29:11AM -0800, tike64 wrote:
> > Thanks for hint. Why wasn't -lm needed when host machine was i386?
> 
> Glibc on i386 has ldexp in libc.so.6 as well as in libm.so.6, so -lm is
> not needed.
> 
> Are you trying to compile it on Linux?
> 
> > tcc.c:9505:2: warning: #warning add arch specific rt_get_caller_pc()
> > 
> > Hope that is not critical.
> 
> It's not critical. I didn't implement it because the TCC stackframe is
> not the same as the one produced by GCC, so backtraces would show only
> TCC compiled functions.

I yanked it entirely from my version.  Might add it back in a seperate 
(optional) file, but for right now it looked like unnecessary complication.

> > arm-linux-gcc -O2 -Wall -c -o libtcc1.o libtcc1.c
> > libtcc1.c:140:2: #error unsupported CPU type
> 
> There are several reasons why ARM isn't supported by libtcc1 in the
> official TCC distribution:
> 
> 1. TCC has no ARM assembler

Ah.  I wonder what would be involved in adding one?

> 2. ARMv4 has no instructions for divisions
> 3. There are more functions needed in libtcc1 for ARM than for i386
> 4. libgcc1.a or libgcc1_s.so can be used instead
> 
> If you don't use the EABI patch that I posted some weeks ago, you can
> use the libtcc1 from my homepage:
> http://www.stud.uni-hannover.de/~daniel/tcc/

Um, hang on.

I merged the EABI patch into my tree (pretty sure I did), but the copy I have 
still seems to have a funky 386-only libtcc1.c.

I glanced at your libtcc1 source and it's got a big .S file, so until tcc 
grows an arm assembler it can't recompile itself with that.

> I prefer to just ln -s libgcc1_s.so to libtcc1.a.

That's one way, but I'm still hoping someday to bootstrap a Linux system 
(recompile it from source code) without any gnu code in it at all.

> > Building bcheck fails also. Why does it try to build that when it
> > doesn't in case of i386 host?
> 
> The Makefile is stupid.
> Bounds checking is not supported for ARM.
> Feel free to add support for it.

That's a debug feature.  I'm not so worried about that just yet.

>   Daniel
> 
> 
> 
> _______________________________________________
> Tinycc-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/tinycc-devel
> 
> 

-- 
"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]