[Top][All Lists]

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

[Tinycc-devel] __aeabi_idivmod & __aeabi_idiv are undefined

From: Christian Jullien
Subject: [Tinycc-devel] __aeabi_idivmod & __aeabi_idiv are undefined
Date: Sun, 11 Nov 2012 19:53:27 +0100

Sorry if this is a known issue.


I’m Still running tcc on my Rpi box.


1)  Download latest mob

2)  Patch configure to add armv6l

3)  ./configure; make               <- no error, 1 warning tccelf.c:1327:12: warning: ‘tcc_add_support’ defined but not used

4)  make install


So, expect for armv6l patch, is compiles and installs ROOTB (congrat!)


NOTE tcc bootstrap was done with official gcc 4.6.3 (as upgraded last week)

$ gcc -v

Using built-in specs.



Target: arm-linux-gnueabihf

Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.3-12+rpi1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf

Thread model: posix

gcc version 4.6.3 (Debian 4.6.3-12+rpi1)


Now testing with foo.c:


#include <stdio.h>





        int i = 103;

        int j = 10;


        printf("%d, %d\n", i / j, i % j);



I get

tcc: error: undefined symbol '__aeabi_idiv'

tcc: error: undefined symbol '__aeabi_idivmod'


To compile (in fact to link, I have to add libgcc.a)


tcc -o foo foo.c -L/usr/lib/gcc/arm-linux-gnueabihf/4.6 -lgcc


.. and this binary (as other more complex examples) worked well.


Changing int to unsigned int results in:

tcc: error: undefined symbol '__aeabi_uidiv'

tcc: error: undefined symbol '__aeabi_uidivmod'


Now the question:

Is it expected to link with libgcc.a ? What other __aeabi_xxx functions are missing?

Could we add them in libtcc.a ?


If tcc is expected to replace gcc, imho it should not use any gcc specific lib.

I’ve also checked that no .a exist in /usr/lib having those missing functions.



reply via email to

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