View Single Post
Old 05-17-2016, 06:22 PM   #227
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
Quote:
Originally Posted by knc1 View Post
The build process should have left the (hidden) .config file around for uClibc -
see if the options where set to build the software floating point routines (they should be provided by uClibc, not by gcc).
Those options might have been disabled (since everything else in the world has floating point hardware - except your Marvell chip (isn't that a comic book publisher?) )
Static links bind to tcclib.a, which is apparently lacking in floatful pointlessness...
PHP Code:
(armv4l:1) /home/tcc-0.9.26 ls examples
ex1
.c ex2.c ex3.c ex4.c ex5.c

(armv4l:1) /home/tcc-0.9.26 $ ./tcc -o ex1 examples/ex1.c
examples
/ex1.c:2error: include file 'tcclib.h' not found

(armv4l:1) /home/tcc-0.9.26 $ ./tcc -Iinclude -o ex1 examples/ex1.c

(armv4l:1) /home/tcc-0.9.26 $ ./ex1
Hello World

(armv4l:1) /home/tcc-0.9.26 $ ./tcc -static -Iinclude -o ex1 examples/ex1.c
tcc
errorundefined symbol '__udivsi3'
tccerrorundefined symbol '__umodsi3'
tccerrorundefined symbol '__nedf2'
tccerrorundefined symbol '__eqdf2'
tccerrorundefined symbol '__divdf3'
tccerrorundefined symbol '__ltdf2'
tccerrorundefined symbol '__muldf3'
tccerrorundefined symbol '__gedf2'
tccerrorundefined symbol '__fixunsdfsi'
tccerrorundefined symbol '__floatunsidf'
tccerrorundefined symbol '__subdf3'
tccerrorundefined symbol '__modsi3'
tccerrorundefined symbol '__divsi3'

(armv4l:1) /home/tcc-0.9.26 
Okay, missing integer finctions too.. It was that "float" that caught my eye...

I looked up the missing "__udivsi3", and it says (for this and other related functions): "The integer arithmetic routines are used on platforms that don't provide hardware support for arithmetic operations on some modes." But that description was for libgcc, and we should have that (because we have gcc), I think. No build errors making tcc anyway...

We know that float is missing, but I also recall reading that integer division is missing too (and likewise on many newer arm processors as well).

EDIT: More googling for those missing symbools PLUS uclibc finds complaints of "stripped down" libraries, but a common solution is to all "-lm" to link in the math library. Two problems there though -- that is the FIRST thing I tried (unsuccessfully), and what math functions does a "Hello World" app need anyway? Well, apparently it needs ALL those missing functions, but why? And google chrome still locks me out of large parts of uclibc.org (bad certificate), so I need to use a different browser to visit uclibc.org.

Last edited by geekmaster; 05-17-2016 at 06:46 PM.
geekmaster is offline   Reply With Quote