Non-FPU 68000 libm.a
Tue Oct 22 11:19:00 GMT 2002
This is the command line I use. I do include -m68000 and -msoft-float. If
I do not specifically include the libm.a on the command line I get unfound
reference errors from my one floating point operation (sqrt), so it does not
automatically link in libm.
Also, horrors of horrors, even the .../m68000/libm.a has non-68000
instructions in it, e.g., bpls and bsrl (op codes 6a04 and 61ff
respectively) ! It seems as if newlib has not made a 68000 non-FPU math
$GCCBIN/m68k-coff-gcc -nostartfiles -O2 -fno-builtin -Xlinker -T -Xlinker
-o main.coff -m68000 -msoft-float stubs.c \
init.c power.c interrupts.c buttons.c run.c demo.c timer.c \
main.c error.c graph.c util.c sound.c dispatch.c count.c menu.c version.c
Thanks, Doug Broadwell
----- Original Message -----
From: "yy_tseng" <email@example.com>
To: "Doug Broadwell" <firstname.lastname@example.org>
Sent: Monday, October 21, 2002 10:13 PM
Subject: Re: Non-FPU 68000 libm.a
> Hello Doug Broadwell,
> You should link your program with correct liberary.
> Change your CFLAGS with -mc68000 ,since you don't have FPU.
> the option -msoft-float is force to soft-float while using with FPU .
> ----- Original Message -----
> From: "Doug Broadwell" <email@example.com>
> To: "Newlib Mail List" <firstname.lastname@example.org>
> Sent: Tuesday, October 22, 2002 10:30 AM
> Subject: Non-FPU 68000 libm.a
> > Hi,
> > I'm getting "address errors" that seem to be coming from linking a
> > that is assuming that there's an FPU. The libm.a in both .../m68000 and
> > .../msoft-float all seem to reference (in the assembly code) floating
> > registers; %fpA, %fp0, %fp1, etc. Is there no math library built that
> > doesn't assume an FPU?
> > Thanks,
> > Doug Broadwell
More information about the Newlib