Using scan-build vs gcc cross-compiler

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>/-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,