This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Selecting from several m68k libc.a
- From: "Vitus Jensen" <Vitus_Jensen at gmx dot de>
- To: "E. Weddington" <eric at ecentral dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 20 Apr 2004 16:23:10 +0200 (MEST)
- Subject: Re: Selecting from several m68k libc.a
- References: <4084BF66.12098.134B54@localhost>
> On 20 Apr 2004 at 13:04, Vitus Jensen wrote:
>
> > Thank you, that was part of the solution. Option is "-m68000" and it
> > links
> > now libc.a from the subdirectory "m68000" which should contain usable
> > opcodes.
> >
> > OK, but it doesn't link libm.a?!?
> >
> > STARTUP(hwdos-crt0.o)
> > OUTPUT_ARCH(m68k)
> > OUTPUT_FORMAT(srec)
> > GROUP(-lc -lhwdos -lm)
> >
> > Results in:
> > ...
> > START GROUP
> > LOAD \gcc-m68k\m68k-coff\lib\m68000/libc.a
> > LOAD \gcc-m68k\m68k-coff\lib\m68000/libhwdos.a
> > LOAD \gcc-m68k\m68k-coff\lib\m68000/libm.a
> > END GROUP
> > ...
> >
> > And the linker complains about all math symbols (`__udivsi3' etc),
> > which ARE
> > available in libm.a. No messages about not finding the file libm.a.
They aren't. They are in libgcc.a.
> > Any tips? Though this could belong to a different mailing list...
>
> Please read the GCC User Manual. There you'll find the -l (lowercase L)
> flag, and what you want is -lm which tells the compiler driver (and
> hence the linker) to link in the math library.
Yup. It includes libm.a (see above). But I needed -lgcc, copied libgcc.a
from the gcc installation and got a successfull link.
Now there is only one thing left: my syscall code is always compiled without
any "-mXXXX" option. Well, back to makefile recursion and CFLAGS_xxx
setup...
Bye,
Vitus
--
Dipl-Ing Vitus Jensen
Tischlerstr. 8, D-30916 Isernhagen
Tel +49-5136-893002, Fax +49-5136-893003