[coreboot] [PATCH]es for v2: build system fixes and changes, and scan-build support

Patrick Georgi patrick.georgi at coresystems.de
Tue Mar 10 17:08:57 CET 2009


Hi,

scan-build is a part of clang, a C language frontend of llvm.
(www.llvm.org, clang.llvm.org). scan-build uses the compiler
infrastructure to statically analyze the code, for serious and
not-so-serious mistakes.
llvm, clang and scan-build are still work in progress, and their results
should be used with caution. However, they're quite useful at this time.

The attached patches do the following:
20090310-1-paths:
The rules changed in this patch originally wanted to write c_start.o
into the source tree. That triggered a bug in my other work, and is
generally not what we want.

20090310-2-gcc-for-real:
Create a variable "GCC", which defaults to the content of CC, but allows
the user to provide a gcc to use in this instance, even when normally a
different tool is chosen. That helps with scan-build (see next patch),
and might help with distcc, ccache etc, too.

20090310-3-scanbuild:
Add support for clang's scan-build utility to abuild. scan-build wraps
the compiler and runs its own compiler on the same sources to do some
static analysis on them. It adds an option "-sb" or "--scan-build" that
creates a coreboot-builds/$target-scanbuild directory for every $target,
containing the output of scan-build, which is a HTML documentation on
its results.
Be aware, that scanbuild significantly increases build time: A board
that takes 6-7 seconds normally requires 60 seconds with that option
enabled on my test system.
The patch also moves the stack-protector option down a bit, so it
applies to crosscompiled targets, too (which overwrote the compiler
settings before)

I'm currently doing a full abuild run on a recent tree, with the above
changes, and the resulting coreboot-builds directory is public at
http://www.coresystems.de/~patrick/coreboot-builds/. Feel free to look
for bugs in your favorite board support, and fix them! :-)

All of them:
Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>


Regards,
Patrick Georgi




More information about the coreboot mailing list