dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: ColdFire-rockbox and GCC 4.2.1

ColdFire-rockbox and GCC 4.2.1

From: Tapio Kelloniemi <>
Date: Mon, 24 Sep 2007 21:56:48 +0300


I've been trying to build Rockbox for H300 and X5 using Gcc 4.2.1 and binutils
2.18. As you may expect, I have not succeeded, and I have a few question.

Here is my story:
My first problem was that in the generated Makefile the following compiler
flags are specified: "-m5206e -Wa\,-m5249". m68k-elf-as complained that
-m5206e option is not accepted since since -m5249 was already specified. This
is because gcc seems to put -Wa options before the ones it gives itself
(-m5206e in this case). I worked around this my creating a script which
filters this -m5206e option out. However, I don't understand why -m5206e is
passed to GCC, but AS gets -m5249. I don't know what are the differences
between these two cpu models, perhaps the only reason is that gcc does not
accept -m5249.

Then I got more serious problems: Compilation of apps/screens.c failed with
the following output:
   screens.c: In function 'set_time_screen':
   screens.c:1109: error: unable to find a register to spill in class
   screens.c:1109: error: this is the insn:
   (insn 433 431 435 28 (set (reg:SI 8 %a0 [283])
           (plus:SI (subreg:SI (mem/s:QI (plus:SI (reg/f:SI 14 %a6)
                           (const_int -45 [0xffffffd3])) [0 cursor+5 S1 A8]) 0)
               (subreg:SI (reg:QI 3 %d3 [orig:279 cursor+2 ] [279]) 0))) 136
                {*addsi3_5200} (nil)
       (expr_list:REG_DEAD (reg:QI 3 %d3 [orig:279 cursor+2 ] [279])
   screens.c:1109: confused by earlier errors, bailing out

I resolved this by compiling screens.c with -O0 (even -O did not work).

Last comes the problem I could not resolve: linker errors.
For H300, I get the following output:
   LD rockbox.elf
   m68k-elf/bin/ld: m68k:isa-a:mac architecture of input file
      `/opt/m68k/lib/gcc/m68k-elf/4.2.1/m5206e/libgcc.a(_muldi3.o)' is
      incompatible with m68k:isa-a:emac output
   ..... and the same for (_divdi3.o) and (_udivdi3.o)

The X5 build gives has lots of undefined symbols (in addition to the above
   .../build-x5/apps/menus/main_menu.o: In function `show_info':
   main_menu.c:(.text+0x10a): undefined reference to `audiobufend'
   .../build-x5/apps/plugin.o: In function `plugin_get_buffer':
   plugin.c:(.text+0x32): undefined reference to `pluginbuf'

So it seems that I have gone wrong when trying to resolve problems.
If someone has any ideas (in addition to installing gcc-3.4 and
binutils-2.17), I'm very eager to read them. Thanks in advance!

Received on 2007-09-24

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy