Selecting from several m68k libc.a

E. Weddington eric@ecentral.com
Tue Apr 20 12:41:00 GMT 2004


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



More information about the Newlib mailing list