|
Rockbox mail archiveSubject: Re: ColdFire-rockbox and GCC 4.2.1Re: ColdFire-rockbox and GCC 4.2.1
From: Magnus Holmgren <lear_at_algonet.se>
Date: Mon, 24 Sep 2007 22:15:26 +0200 Tapio Kelloniemi wrote: > 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. I think you're better off with binutils 2.16.1. I used that when I tested GCC 4.2.0 a while ago. > 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. GCC ColdFire support is limited in any GCC before 4.3. -m5206e is simply the best we can use. However, AS has better support, and actually needs -m5249 for the inline assembler code in Rockbox. > Then I got more serious problems: Compilation of apps/screens.c failed with > the following output: I didn't have any problem like that when building for a H120 using GCC 4.2.0 - but then the H120 doesn't have an RTC... > I resolved this by compiling screens.c with -O0 (even -O did not work). Minor changes in the code can be enough avoid problems like that - or so I've heard... > Last comes the problem I could not resolve: linker errors. The linker in binutils 2.17+ is picky about the CPU architecture (e.g., whether it has a normal or enhanced MAC); it must match in all object files. But GCC's knowledge about them is very limited, so the GCC-specific libraries are only made for the architectures GCC knows about. That does not include the one for 5249, used when building Rockbox. > The X5 build gives has lots of undefined symbols (in addition to the above > errors): Don't know what they are caused by though... > 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! Use binutils 2.16 with GCC 4.2.1. It should fix the link problems at least. No good solution for screens.c though. However, in terms of code size and speed of the generated code, you might want to stick to GCC 3.4.6 (and perhaps my multiply patch :) for the time being. Magnus Received on 2007-09-24 Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy |