[coreboot] [PATCH]es for v2: build system fixes and changes, and scan-build support
c-d.hailfinger.devel.2006 at gmx.net
Wed Mar 11 11:52:29 CET 2009
On 10.03.2009 17:08, Patrick Georgi 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! :-)
Thanks for creating the patch and making these builds available!
> All of them:
> Signed-off-by: Patrick Georgi <patrick.georgi at coresystems.de>
AFAICS --scan-build and --nostackprotect can be specified at the same
time, interacting badly.
Should we name the parameter "scan-build" or "scanbuild"?
If the two points above are resolved, the whole patchset is
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
More information about the coreboot