$ cat files/clang-patch-tools_clang_tools_scan-build_libexec_ccc-analyzer $FreeBSD$ --- tools/clang/tools/scan-build/libexec/ccc-analyzer.orig +++ tools/clang/tools/scan-build/libexec/ccc-analyzer @@ -81,6 +81,9 @@ if (-x "/usr/bin/xcrun") { $UseXCRUN = 1; } +} elsif (`uname -s` == "FreeBSD") { + $DefaultCCompiler = 'cc'; + $DefaultCXXCompiler = 'c++'; } else { $DefaultCCompiler = 'gcc'; $DefaultCXXCompiler = 'g++'; With this patch running scan-build gives a lot of warnings like this: ``` Argument "FreeBSD" isn't numeric in numeric eq (==) at /usr/local/llvm38/bin/../libexec/ccc-analyzer line 84. Argument "FreeBSD\n" isn't numeric in numeric eq (==) at /usr/local/llvm38/bin/../libexec/ccc-analyzer line 84. ``` Besides newline character is missing in "FreeBSD" string. So it should be actually: elsif(`uname -s` eq "FreeBSD\n")
This seems related to the fix for PR 207065 (but doesn't apply to the original fix).
A commit references this bug: Author: brooks Date: Fri Mar 18 21:15:28 UTC 2016 New revision: 411371 URL: https://svnweb.freebsd.org/changeset/ports/411371 Log: Use more correct perl in ccc-analyzer. PR: 208052, 20706 Submitted by: Aleksander Alekseev <afiskon@devzen.ru> Changes: head/devel/llvm38/Makefile head/devel/llvm38/files/clang-patch-tools_clang_tools_scan-build_libexec_ccc-analyzer
I believe this issue is fixed.