compiling cont.
Joel Sherrill
joel.sherrill at OARcorp.com
Wed Oct 11 18:02:40 UTC 2000
I don't know if this is resolved or not. First __umodsi3 should be
coming from the RPMs. It looks like you are not linking against the
correct multilib version. Try adding a -Map to the link arguments
and seeing where it comes from.
russ wrote:
>
> Hi,
>
> I found that I can narrow the problem down to this:
>
> c code: long1 = long2 % long3; -> crashes
> asm: jsr __umodsi3
>
> c code: short1 = short2 % short3; -> works
> asm: divu.w 14(%sp),%d0
>
> My question is, would __umodsi3 be a function in the pre-built
> libraries I downloaded in RPM form and if so, how would I know if the
> rpm library was compiled with the m68000 flag or the m68020 flag?
>
> Thanks
> russ
>
> Charles-Antoine Gauthier wrote:
> >
> > russ wrote:
> > >
> > > Hi,
> > >
> > > This is a better example of my problem. This is the output when I compile a single file from the
> > > command line:
> > >
> > > russ > m68k-rtems-gcc -v -I/opt/rtems/bare-m68302/lib/include heapallocate.c
> > > Reading specs from /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/specs
> > > gcc version 2.95.2 19991024 (release)
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/cpp -lang-c -v -I/opt/rtems/bare-m68302/lib/include
> > > -D__GNUC__=2 -D__GNUC_MINOR__=95 -Dmc68000 -Drtems -D__rtems__ -D__ELF__ -D__mc68000__ -D__rtems__
> > > -D__rtems__ -D__ELF__ -D__mc68000 -D__rtems -Asystem(rtems) -Acpu(mc68000) -Acpu(m68k)
> > > -Amachine(m68k) -Dmc68000 -D__mc68000 -D__mc68000__ heapallocate.c /tmp/cciqFySH.i
> > > GNU CPP version 2.95.2 19991024 (release) (68k, Motorola syntax)
> > > #include "..." search starts here:
> > > #include <...> search starts here:
> > > /opt/rtems/bare-m68302/lib/include
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/include
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/../../../../m68k-rtems/include
> > > End of search list.
> > > The following default directories have been omitted from the search path:
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/../../../../include/g++-3
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/../../../../m68k-rtems/sys-include
> > > End of omitted list.
> > > /opt/rtems/lib/gcc-lib/m68k-rtems/2.95.2/cc1 /tmp/cciqFySH.i -quiet -dumpbase heapallocate.c
> > > -version -o /tmp/ccQjQxOm.s
> > > GNU C version 2.95.2 19991024 (release) (m68k-rtems) compiled by GNU C version 2.7.2.3.
> > > /opt/rtems/m68k-rtems/bin/as -mc68000 -o /tmp/ccgd17n4.o /tmp/ccQjQxOm.s
> > > /tmp/ccQjQxOm.s: Assembler messages:
> > > /tmp/ccQjQxOm.s:22: Error: invalid instruction for this architecture; needs 68020 or 68030 or 68040
> > > or 68060 or cpu32 -- statement `divul.l 20(%a0),%d1:%d0' ignored
> > >
> > > The m68k I use is for the 68000, not the 68020, but the assembler wants 68020. Is this built into
> > > the rpm's? Do I have to rebuild everything from source and not use the rpm's. Or is there something
> > > I'm missing?
> > >
> > > Thanks
> > > russ
> >
> > Seems to me your assembler is bitching about getting 68020 code but was
> > told to assemble for the 68000. It is complaining that it was given
> > instructions that do not exist on the 68000. Somehow, your compiler is
> > not compiling for the 68000, but for the default 68020.
> >
> > Also, your bsp_specs file is wrong if your compiler does not understand
> > -qrtems. Check against other working targets, such as the mvme167 or
> > gen68360.
> > --
> > Charles-Antoine Gauthier
> > Institute for Information Technology Institut de technologie de
> > l'information
> > National Research Council of Canada Conseil national de recherches du
> > Canada
--
Joel Sherrill, Ph.D. Director of Research & Development
joel at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list