[Coco] [LWTOOLS] GCC 4.6.1 cross compiler
Luis Antoniosi (CoCoDemus)
retrocanada76 at gmail.com
Sun Feb 15 19:51:06 EST 2015
Well it's missing the libraries for the gcc. Alone gcc doesn't know how to
divide or multiply and even to abort.
you must provide the crt and clib when porting the gcc.
there is already a gcc ported to 6809 all these libs were present. I dont
have it anymore but i remember it worked.
Luis Felipe Antoniosi
On Sun, Feb 15, 2015 at 2:12 PM, Frederic Perret <
frederic.perret at laposte.net> wrote:
> 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.
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> https://pairlist5.pair.net/mailman/listinfo/coco
>
More information about the Coco
mailing list