[Coco] [LWTOOLS] GCC 4.6.1 cross compiler

Frederic Perret frederic.perret at laposte.net
Sun Feb 15 14:12:12 EST 2015


Hello to all the CoCo enthusiasts,

I just subscribed to the list because I'm having trouble using the cross
compiler provided in the EXTRA folder of LWTOOLS.

I managed to patch GCC 4.6.1 and compile it from scratch (for the record,
latest versions of GCC are not recommended for that).

Then I compiled a very simple C program (a clear screen) into a DECB binary
that loads and run fine into XRoar.

Then I wanted to use some simple operators like / and % in my code (on
unsigned short), and things started to go wrong :

lwlink --format=decb --entry=_main --section-base=.text=2000 -o div
div.o   -L=/usr/local/lib -L=/usr/lib -L=/lib
External symbol _udivhi3 not found in div.o:.text
Incomplete reference at div.o:.text+0B

So I realized I had to link it with libgcc :

lwlink --format=decb --entry=_main --section-base=.text=2000 -o div
div.o   --library-path=/home/youpla/coco/lib/gcc/m6809-unknown/4.6.1
-L=/usr/local/lib -L=/usr/lib -L=/lib  --library=gcc
External symbol _abort not found in _udivhi3.o:.text
Incomplete reference at _udivhi3.o:.text+05
makefile:22: recipe for target 'div' failed

And this is where I'm stuck. I have no idea how to solve this _abort symbol
missing. I dont even know if what i'm trying do to is possible.

Can anyone help me understand what's happening here ?
Thx,
Fred, from France.

ps : I will take this opportunity to thank William Astle for his great job.


More information about the Coco mailing list