This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Non-FPU 68000 libm.a


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
> 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.
> 

Doug,

  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" <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
> > >
> > >
> >
> >


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]