compiling cont.
Chris Johns
cjohns at cybertec.com.au
Wed Sep 27 03:18:53 UTC 2000
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?
>
How did you configure rtems when building the bare BSP ?
You need to specify the `--enable-bare-cpu-cflags' and
`--enable-bare-cpu-model' flags.
If you add -m68000 to the command I suspect things will work. I am not
sure why the `as' phase is picking up 68000. I would have thought it
would also default to 68020.
--
Chris Johns, mailto:cjohns at cybertec.com.au mailto:ccj at acm.org
More information about the users
mailing list