On 9/24/10 7:16 PM, ron minnich wrote:
On Fri, Sep 24, 2010 at 8:43 AM, Stefan Reinauer stefan.reinauer@coresystems.de wrote:
We could do a lot of such or similar improvements if we started not including code but adding it to an object list.
Who's gonna do it?
First you have to stop using romcc, right? Or is this one of those legacy cases where we included code even though it was gcc-based (that happened once in a while if people got mixed up)
Most (all new) boards are gcc based. Since this is a per mainboard/per chipset thing anyways, we don't need to drop romcc from all boards in order to fix this.
Alternatively, we could collect object lists for gcc based builds and for romcc based builds we create a list of source files and include them in an autogenerated file. Same effect, but much more readable. i.e.
initobj-y += pc80/serial.o initobj-y += <mainboard>/romstage.o
would lead to a file "romstage_includes.c" containing
#include "src/pc80/serial.c" #include "src/<mainboard>/romstage.c" ...
Then, in the next (or prior) step we can also collect source files instead of objects (initsrc instead of initobj) and it'll be even easier. Plus, it will allow GCC to do better optimization, too (Especially for size even though it starts being less of an issue than it used to be)
Stefan