release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > Main > LLVMClangStaticAnalyzer

LLVM/Clang Static Analyzer

Instructions (Linux)

  • Copy llvm/Debug/bin/clang-cc and the following files to the RB build diretory.
    "llvm/tools/clang/utils": ccc-analyzer, scan-build, scanview.css, sortable.js

  • Because Clang doesn't seem to handle ARM ASM, uncomment all ASM parts in:
    firmware/target/arm/system-arm.h
    firmware/target/arm/system-target.h
    There are many more places with ASM which stop the parser,
    but these 2 files get included very often..

  • Go to the build directory.

  • Add the compiler to the path:
    "export PATH=$PATH:/usr/local/arm-elf/bin/"

  • Configure (select sansa e200):
    "../tools/configure"

  • Make the dependencies (because Clang can't do that):
    "make dep"

  • Comment out "export CC=.." in the Makefile (build dir)

  • Add the following directory to the "C include path" (for Clang)
    "export C_INCLUDE_PATH=/usr/local/arm-elf/lib/gcc/arm-elf/4.0.3/include/"

  • Start the compiler:
    "./scan-build --use-cc=/usr/local/arm-elf/bin/arm-elf-gcc make"
    Report gets saved in /tmp/scan-build-xxx_something

I Attachment Action Size Date Who Comment
scan-build-2009-03-31-1.tar.bz2bz2 scan-build-2009-03-31-1.tar.bz2 manage 2233.2 K 31 Mar 2009 - 12:41 ChristophReiter A report for a Sansa e200 build.
r1 - 31 Mar 2009 - 12:41:49 - ChristophReiter
Copyright by the contributing authors.