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]

Re: undefined reference in libm.a (__gtsf2,__ltsfw,__lesf2,__eqsf2,__nesf2...)


I did linking with libgcc.a.
But still have the same problem.
After linking with libgcc1.o these errros disappeard.
But I'm wondering that,should libgcc.a should include "libgcc1.o".
Did I make any mistake when building gcc?(which also produce libgcc.a)

Thanks!


----- Original Message -----
From: "J. Johnston" <jjohnstn@cygnus.com>
To: "Cliff Tsai" <clifftsai@minecard.com.tw>
Cc: <newlib@sources.redhat.com>
Sent: Tuesday, April 03, 2001 2:41 AM
Subject: Re: undefined reference in libm.a
(__gtsf2,__ltsfw,__lesf2,__eqsf2,__nesf2...)


> > Cliff Tsai wrote:
> >
> > Hi:
> >     I'm testing libm on my m68k platform,but have following errors.
> >     I can't find any document about this symbol,what do they mean?
> >     And how to solve these?Thanks!
> >
> > C:/cygwin/tools/m68k-coff/m68k-coff/lib/m68000/libm.a(wf_acos.o): In
function `acosf':
> > /src/newlib/newlib-1.9.0/newlib/libm/math/wf_acos.c:37: undefined
reference to `__gtsf2'
> >
> > C:/cygwin/tools/m68k-coff/m68k-coff/lib/m68000/libm.a(wf_acosh.o): In
function `acoshf':
> > /src/newlib/newlib-1.9.0/newlib/libm/math/wf_acosh.c:38: undefined
reference to `__ltsf2'
> >
> > C:/cygwin/tools/m68k-coff/m68k-coff/lib/m68000/libm.a(wf_atan2.o): In
function `atan2f':
> > /src/newlib/newlib-1.9.0/newlib/libm/math/wf_atan2.c:38: undefined
reference to `__eqsf2'
> >
> > C:/cygwin/tools/m68k-coff/m68k-coff/lib/m68000/libm.a(wf_log10.o): In
function `log10f':
> > /src/newlib/newlib-1.9.0/newlib/libm/math/wf_log10.c:37: undefined
reference to `__lesf2'
> > /src/newlib/newlib-1.9.0/newlib/libm/math/wf_log10.c:51: undefined
reference to `__eqsf2'
> >
> > C:/cygwin/tools/m68k-coff/m68k-coff/lib/m68000/libm.a(erf_lgamma.o): In
function `sin_pif':
> > /src/newlib/newlib-1.9.0/newlib/libm/math/erf_lgamma.c:118: undefined
reference to `__nesf2'
>
> Cliff,
>
>   These are calls to float math comparison operators that are generated by
the compiler.  They will
> be found in the libgcc.a for the compiler.  You can resolve them by
adding -lgcc at the end of your
> link.  The libgcc routines may subsequently make references to the C
library in which case add -lc
> to the end.  Continue adding -lgcc and/or -lc until the undefined
references are all resolved.
>
>
> -- Jeff J.
>
>



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