[coreboot] Config.lb WTF

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Sun Apr 12 00:23:56 CEST 2009

On 12.04.2009 00:02, ron minnich wrote:
> On Sat, Apr 11, 2009 at 2:24 PM, Peter Stuge <peter at stuge.se> wrote:
>> Carl-Daniel Hailfinger wrote:
>>> We have 22 different ways to invoke gcc inside Config.lb. That's
>>> just embarrassing.
>> I'd agree.
>>> Suggestion:
>>> -I$(TOP)/src -I. -nostdinc -nostdlib -fno-builtin -Wall -Os -c -S
> it's not really a fix because it depends on people not to drift again
> over time. In the beginning, there was one way to set up this rule,
> and then people changed it, and new files were created, and ... that's
> why we are where we are now.

And once all files in the tree are the same, people will have exactly
_one_ version to choose from regardless of which target they clone and

> Since the config tool supports include files, why not exploit that
> capability to fix this problem.

And how do you determine which version you have to include? Guess? Hope?
I'd prefer a systematic solution.
1. Unify the code as much as possible.
2. Explain the remaining differences (and spot the bugs).
3. Automatic/scripted conversion to include files.

> Longer term, we need a real set of Makefiles a la v3, and we need to
> remove makerule from the Config.lb files. I suggest putting effort
> there -- this is a flowery fix, and flowers are pretty, but this is
> not fixing the real problem.

Unless someone comes up with the real fix and actually bothers to check
for correctness (ha!), which will probably not happen in the next 6
months, my 3-step plan is the only viable step forward.

However, if you are willing to convert all targets to real makefiles (or
the Config.lb include solution) _and_ check for correctness (not just
rip the current code out and hope for the best), I'll gladly drop my
patch and work on other areas of coreboot. I know you can do magic with
coreboot, but are you really willing to perform this tedious task?



More information about the coreboot mailing list