[LinuxBIOS] romcc and preprocessor problems

Eric W. Biederman ebiederman at lnxi.com
Sat Dec 2 08:54:11 CET 2006

Stefan Reinauer <stepan at coresystems.de> writes:

> Hi,
> since the romcc builtin preprocessor silently eats lines of code,
> can we just use the gcc preprocessor (cpp) before calling romcc as
> a workaround? 

I'd love to see a reproducer of that problem.  I don't have a good feel
that it has been root caused.  The parser is fairly straight forward
so if we can reproduce this problem it shouldn't be hard to fix.

I'm not convinced the problem is actually isolated to just the c pre processor.

> Is there a reason romcc has its own preprocessor?

A couple of reasons.
- It was comparatively easy.
- It makes the dependencies much easier to get right.
- We don't have to worry about gcc polluting the compile with #defines
  that are not correct for the romcc environment.
- There are several C features that you cannot implement properly unless
  you implement some level of c preprocessor.

All of that said you can look back into the history to when romcc did not have
a preprocessor and can probably make that work.  I'd much rather fix
the stupid parsing bug.


More information about the coreboot mailing list