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: "E. Weddington" <eric at ecentral dot com>
- To: "Vitus Jensen" <Vitus_Jensen at gmx dot de>
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 20 Apr 2004 06:12:54 -0600
- Subject: Re: Selecting from several m68k libc.a
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. What
> is he smoking now??
>
> 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.
These questions should really be asked on the gcc list or the gcc-help list. See
http://gcc.gnu.org
Eric