[cfe-dev] Using scan-build vs gcc cross-compiler

Slavon Slavon rino4work at gmail.com
Fri Feb 20 02:37:15 PST 2015


Hi! I'm new to clang and wondering if I can use clang analyzer with our gcc
cross-compiler.

I've tried to run scan-build-3.5 from Ubuntu package, but it fails when
preprocessing project sources.

The command I use to run scan-build is as follow:
' scan-build-3.5 --use-cc <toolchain_path>/<triple>-gcc make'

>From the output I see that it's confused by host's standard headers. In
particular, it encounters conflicting definition for ssize_t from <stdio.h>
which scan-build picks from /usr/include directory.

The resolution may be to force scan-build use headers from my toolchain,
but I can't find a way to do this.

Is there a proper way to specify standard headers location when running
scan-build, or am I looking in a wrong way?

Thanks in advance,
Viacheslav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150220/f05c5e33/attachment.html>


More information about the cfe-dev mailing list