[coreboot] [PATCH]es for v2: build system fixes and changes, and scan-build support
mylesgw at gmail.com
Tue Mar 10 17:21:42 CET 2009
On Tue, Mar 10, 2009 at 9:08 AM, Patrick Georgi
<patrick.georgi at coresystems.de> wrote:
> 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:
> 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.
> 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.
> 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! :-)
It looks like many of the errors are in the util directory (nrv2b, x86emu, etc.)
I was interested how many parser errors there are, but I couldn't look
at them. I get permission denied with the following link:
More information about the coreboot