Hi,
attached patch adds scan-build support to coreboot-v4. It's configurable using Kconfig and defaults to off.
If set, it expects scan-build to be around and runs it. The target directory for the scan-build report is configurable. If not set, the default (/tmp/scan-build-$date-$number) is used.
Also, abuild is adapted to make use of the feature when running with the -sb flag.
While adding it, I discovered an issue in the build system that I worked around in this patch, and will fix in a future patch: $(obj)/$path/$file.c -> $(obj)/$path/$file.o rules rely on implicit default rules in make. For some reasons, these are missing when make is invoked by make.
There should also be some path normalization for object file paths (using $(abspath)), so the option_table.c rule hack can go.
Maybe it's a good idea to avoid reading in all Makefile.incs in the outer make in a scan-build based build, but it's probably not worth the trouble (it's harder to keep make clean and the likes working with such an optimization)
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
On 3/14/10 9:47 PM, Patrick Georgi wrote:
Hi,
attached patch adds scan-build support to coreboot-v4. It's configurable using Kconfig and defaults to off.
If set, it expects scan-build to be around and runs it. The target directory for the scan-build report is configurable. If not set, the default (/tmp/scan-build-$date-$number) is used.
Also, abuild is adapted to make use of the feature when running with the -sb flag.
While adding it, I discovered an issue in the build system that I worked around in this patch, and will fix in a future patch: $(obj)/$path/$file.c -> $(obj)/$path/$file.o rules rely on implicit default rules in make. For some reasons, these are missing when make is invoked by make.
There should also be some path normalization for object file paths (using $(abspath)), so the option_table.c rule hack can go.
Maybe it's a good idea to avoid reading in all Makefile.incs in the outer make in a scan-build based build, but it's probably not worth the trouble (it's harder to keep make clean and the likes working with such an optimization)
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de
Acked-by: Stefan Reinauer stepan@coresystems.de