tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Several Question about arm-tcc


From: Bin Shi
Subject: Re: [Tinycc-devel] Several Question about arm-tcc
Date: Wed, 29 Dec 2010 11:55:25 +0800

Dear Daniel,
       Thanks for you help. But one more problem appears if I used you solution.
When I configure tcc with --with-libgcc (the cc is still gcc), the generated tcc do not work.
All a.out generated by the tcc (generated by gcc with the --with-libgcc) output segment fault.
even a simple "hello world"

2010/12/29 Daniel Glöckner <address@hidden>
On Tue, Dec 28, 2010 at 04:14:43PM +0800, Bin Shi wrote:
> 1. I can compile tcc with gcc, but failed with tcc it self
> (--cc=/tcc/bin/tcc), how to fix it?
>     the error message is listed as follow:

> /tcc/bin/tcc -o tcc tcc.o libtcc.a -lm -ldl
> tcc: error: undefined symbol '__divdi3'
> tcc: error: undefined symbol '__moddi3'
> tcc: error: undefined symbol '__udivdi3'
> tcc: error: undefined symbol '__umoddi3'
> tcc: error: undefined symbol '__lshrdi3'
> tcc: error: undefined symbol '__floatundidf'
> tcc: error: undefined symbol '__fixunsdfdi'
> make: *** [tcc] Error 1

You need to call configure with --with-libgcc

Binaries compiled with that tcc will crash immediately unless you apply
this patch:
http://www.mail-archive.com/address@hidden/msg02720.html

> 2. I notice that the macro TCC_ARM_VFP is defined, but TCC_ARM_EABI is not,
>     what is the difference between arm-vfp-gcc and arm-eabi-tcc ? What to do
> if I want arm-eabi-tcc ?

This is not an eabi arm debian image, so TCC_ARM_EABI has not been
defined. If it was, there would be a /lib/ld-linux.so.3 instead of
/lib/ld-linux.so.2.

/proc/cpuinfo mentiones VFP floating point support, so TCC_ARM_VFP
is defined. But looking at the code generated by gcc, it should not
be defined as libc will return values in FPA registers. There also
is an issue with double constants having their halves swapped when
this is defined incorrectly.

 Daniel



reply via email to

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