[llvmlinux] Clang Static Analyzer for Kernel ARM targets

hdwivedi at codeaurora.org hdwivedi at codeaurora.org
Tue Nov 26 15:12:20 UTC 2013


I was trying to run the Clang static analyzer for ARM target for kernel
and started seeing the following error:

error: unknown target CPU 'armv7-a'

warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
'-Wno-uninitialized'? [-Wunknown-warning-option]



At the end of it I see:

scan-build: 0 bugs found.

scan-build: The analyzer encountered problems on some source files.



It looks to me that since the CPU target is not being recognized, the
analyzer is probably not running on anything at all.

To sum up, would it be possible to run the scan-build utility on a kernel
for ARM target?

Thanks,
Harsh

PS: This is the build command line I'm using:

CLANG_PATH="/../llvmlinux/toolchain/clang/install/bin/clang"
time /../llvmlinux/toolchain/clang/install/bin/scan-build -o outputdir
--use-cc $CLANG_PATH make ARCH=arm CROSS_COMPILE="arm-linux-androideabi-"
CFLAGS_KERNE\

  L="-isystem $INCLUDE_FILES" CFLAGS_MODULE="-isystem $INCLUDE_FILES"
CONFIG_DEBUG_INFO=1 CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_NO_ERROR_ON_MISMATCH=y 'CC?="$CLANG_PATH -gcc-toolchain
$GCC_TOOLCHAIN"'



More information about the LLVMLinux mailing list