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 <[email protected]>

> 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/[email protected]/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
>
>
_______________________________________________
Tinycc-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to