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: Jeff Johnston <jjohnstn at redhat dot com>
- Cc: newlib at sources dot redhat dot com
- Date: Tue, 20 Apr 2004 13:04:44 +0200 (MEST)
- Subject: Re: Selecting from several m68k libc.a
- References: <40846310.2000907@redhat.com>
Hello Jeff,
> Vitus Jensen wrote:
> >
> > In my build there are several libc.a (and libm.a, libhwdos.a) created
> > and installed:
> >
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\libc.a
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\m5200\libc.a
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\m68000\libc.a
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\mcpu32\libc.a
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\msoft-float\libc.a
> >
> > All different :-(
> >
> > Using the following linker commands:
> > STARTUP(hwdos-crt0.o)
> > OUTPUT_ARCH(m68k)
> > OUTPUT_FORMAT(srec)
> > SEARCH_DIR(m68000)
> > SEARCH_DIR(m68k)
> > GROUP(-lc -lhwdos)
> >
> > T:\C\coldfire\gcc-m68k\m68k-coff\lib\libc.a is used. But this libc.a
> > seems
> > to be created for a different MC68000 brand than DragonBall, I ran into
> > a
> > "tst a1" opcode which isn't supported.
> >
> > So I would like to try other libcs. Something compiled for the
> > original
> > MC68000. Which one is it? And how do I tell the linker to use it?
> >
> > Thank you for your help,
> > Vitus
> >
> > PS: simply copying the file is no solution :-((
> >
>
> The way this is supposed to work is that you specify compile options that
> the
> compiler uses to select the proper library directory. You should see a
> bunch of
> other subdirectories off of your gcc-m68k\m68k-coff directory.
>
> If you run the cross-compiler with the option -print-multi-lib you will
> see a
> list of compiler options and to what directory they match up with. You
> can also
> specify compiler options and ask it to tell you what subdirectory it is
> going to
> fish out of using the -print-multi-directory option.
...
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...
Bye,
Vitus
--
Dipl-Ing Vitus Jensen
Tischlerstr. 8, D-30916 Isernhagen
Tel +49-5136-893002, Fax +49-5136-893003