This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Non-FPU 68000 libm.a
- From: "Doug Broadwell" <dougb at value dot net>
- To: "yy_tseng" <yy_tseng at goodwill dot com dot tw>
- Cc: "Newlib Mail List" <newlib at sources dot redhat dot com>
- Date: Tue, 22 Oct 2002 11:16:05 -0700
- Subject: Re: Non-FPU 68000 libm.a
- Organization: DBA Associates
- References: <000901c27973$10dfaf50$3cfea8c0@dba03> <00a601c27989$c279fc50$120510ac@joe>
- Reply-to: "Doug Broadwell" <dougb at value dot net>
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
library.
$GCCBIN/m68k-coff-gcc -nostartfiles -O2 -fno-builtin -Xlinker -T -Xlinker
../lib/proto.ld \
-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
\
$GCCBASE/m68k-coff/lib/m68000/libc.a $GCCBASE/m68k-coff/lib/m68000/libm.a
Help.
Thanks, Doug Broadwell
----- Original Message -----
From: "yy_tseng" <yy_tseng@goodwill.com.tw>
To: "Doug Broadwell" <dougb@value.net>
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" <dougb@value.net>
> To: "Newlib Mail List" <newlib@sources.redhat.com>
> 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
libm.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
> point
> > registers; %fpA, %fp0, %fp1, etc. Is there no math library built that
> > doesn't assume an FPU?
> >
> > Thanks,
> > Doug Broadwell
> >
> >
>
>