[llvmlinux] Clang Static Analyzer for Kernel ARM targets
renato.golin at linaro.org
Tue Nov 26 15:35:45 UTC 2013
On 26 November 2013 15:12, <hdwivedi at codeaurora.org> wrote:
> error: unknown target CPU 'armv7-a'
Indeed, that's not a CPU, and even if it was looking for Arch, the correct
form is "armv7a".
warning: unknown warning option '-Wno-maybe-uninitialized'; did you mean
> '-Wno-uninitialized'? [-Wunknown-warning-option]
I suppose this comes from GCC. You can ignore, I guess.
It looks to me that since the CPU target is not being recognized, the
> analyzer is probably not running on anything at all.
I agree with your analysis.
To sum up, would it be possible to run the scan-build utility on a kernel
> for ARM target?
I can't see why not, I don't think the analyser is platform-specific. But
you have to make it run, which it'll need the right options and not bail
while still in the command-line options.
> time /../llvmlinux/toolchain/clang/install/bin/scan-build -o outputdir
> --use-cc $CLANG_PATH make ARCH=arm CROSS_COMPILE="arm-linux-androideabi-"
AFAIK, "androideabi" is not recognized (or has no effect), but this should
at least get you close to "gnueabi" soft-float.
Try ARCH=armv7a CROSS_COMPILE="armv7a-linux-androideabi" to force the CPU
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the LLVMLinux