BSD to Hitachi sh-hms cross compiler problems.
Bernie Doehner
bad@uhf.wireless.net
Fri Jun 20 05:57:00 GMT 1997
Hi:
I am using 2.7.2, binutils-2.7, newlib-1.6. Host OS=FreeBSD 2.2,
target=sh-hms.
I just found a problem with straight division such as:
BRR_PORT=BPS * 9600 / speed;
The following happens:
uhf:~/sh/link> make link.x
/usr/local/sh/bin/sh-hms-ld link.o -Tlink.lnk -o link.x
link.o(.text+0x3a4):link.c: undefined reference to `___sdivsi3'
*** Error code 1
Stop.
This problem does not occur for multiplication, only division.
I noticed that the ___sdivsi3 symbol is both in libc.a and libm.a (for the
cross compiler), so I am a bit confused on why this is happening. I
thought gcc automaticaly linked to libc?
Probably something really stupid on my side.. Thanks for your
comments/insight.
Bernie
More information about the crossgcc
mailing list