Non-FPU 68000 libm.a
Tue Oct 22 12:42:00 GMT 2002
Doug Broadwell wrote:
> 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
> ../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
As stated, newlib is not in control of multilibs. It is the gcc compiler
that dictates what options newlib uses when it builds multilibs. For m68k, the libm
code is entirely C code so if you are experiencing problems with generated code, it
is the compiler, not the library's fault. You can check to verify that the multilib
options from the compiler (m68-coff-gcc -print-multi-lib) are properly being passed
down to the various subdirectories. If newlib is indeed doing what gcc told it to do,
I can't help you; you will have to talk to the gcc folks.
-- Jeff J.
> ----- 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
> > point
> > > 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