clang-analyze on RTEMS

Joel Sherrill joel.sherrill at OARcorp.com
Mon Sep 20 11:35:16 UTC 2010


  On 09/19/2010 10:39 PM, Ralf Corsepius wrote:
> On 09/20/2010 03:21 AM, Joel Sherrill wrote:
>> Hi,
>>
>> I have run clang-analyze on RTEMS. Running
>> it on the same subset we run Coverity Scan
>> on produced no issues. I don't know if clang
>> will turn up anything but it is another
>> tool in the arsenal. So I tried to run it
>> on everything and got this:
>>
>> checking for style of include used by gmake... GNU
>> checking for sparc-rtems4.11-gcc...
>> /usr/lib/clang-analyzer/scan-build/ccc-analyzer
>> checking for sparc-rtems4.11-gcc... (cached)
>> /usr/lib/clang-analyzer/scan-build/ccc-analyzer
>> checking whether the C compiler works... no
>> configure: error: in
>> `/home/joel/rtems-4.11-work/build/gcc-testing/rtems/clang-analyzer/b-clang-sparc-rtems4.11/sparc-rtems4.11/c/sis':
>>
>> configure: error: C compiler cannot create executables
>> See `config.log' for more details.
>> gmake[2]: *** [sis] Error 1
>> gmake[2]: Leaving directory
>> `/home/joel/rtems-4.11-work/build/gcc-testing/rtems/clang-analyzer/b-clang-sparc-rtems4.11/sparc-rtems4.11/c'
>>
>>
>> It is pretty easy to run .. just configure .. then
>>
>> scan-build -o output_dir make
>>
>> Any thoughts on why the autoconf test fails?
> Me never having used clang and you not providing sufficient informations
> to be able to help, only 2 general remarks:
>
> * General answer from the "top autoconf newbie answering templates' drawer":
>
> Do as autoconf tells you - "See 'config.log' for details"
>
OK.  Should have posted that.  My hunch from the output matches
what config.log (attached) shows.  It tries to use ccc-analyzer as
the compiler.

Attached is my script to drive this.
> * Knowing you are building on x86_64, your log message referring to
> /usr/lib/clang-ananlyser indicates your "clang"-package is likely
> misconfigured/incorrectly installed.
>
>
It is the RPM from Fedora 13 on my home laptop.  I was killing
some time and tried it.

I figured it was free and anything learned was good.
> Ralf
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log.bz2
Type: application/x-bzip
Size: 3767 bytes
Desc: not available
URL: <http://lists.rtems.org/pipermail/users/attachments/20100920/3f8614a4/attachment-0001.bin>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: do_clang_analyzer
URL: <http://lists.rtems.org/pipermail/users/attachments/20100920/3f8614a4/attachment-0001.ksh>


More information about the users mailing list