[llvmlinux] Clang Static Analyzer for Kernel ARM targets
mcharleb at quicinc.com
Tue Nov 26 16:37:51 UTC 2013
You are not passing the -target flag to clang so it has no idea what target you are building for.
From: llvmlinux-bounces at lists.linuxfoundation.org [llvmlinux-bounces at lists.linuxfoundation.org] on behalf of hdwivedi at codeaurora.org [hdwivedi at codeaurora.org]
Sent: Tuesday, November 26, 2013 7:12 AM
To: llvmlinux at lists.linuxfoundation.org
Subject: [llvmlinux] Clang Static Analyzer for Kernel ARM targets
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
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?
PS: This is the build command line I'm using:
time /../llvmlinux/toolchain/clang/install/bin/scan-build -o outputdir
--use-cc $CLANG_PATH make ARCH=arm CROSS_COMPILE="arm-linux-androideabi-"
L="-isystem $INCLUDE_FILES" CFLAGS_MODULE="-isystem $INCLUDE_FILES"
CONFIG_NO_ERROR_ON_MISMATCH=y 'CC?="$CLANG_PATH -gcc-toolchain
LLVMLinux mailing list
LLVMLinux at lists.linuxfoundation.org
More information about the LLVMLinux