[Bug 208052] devel/llvm38: wrong patch for ccc-analyzer causes a lot of warning

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 16 06:12:17 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208052

            Bug ID: 208052
           Summary: devel/llvm38: wrong patch for ccc-analyzer causes a
                    lot of warning
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: brooks at FreeBSD.org
          Reporter: afiskon at devzen.ru
          Assignee: brooks at FreeBSD.org
             Flags: maintainer-feedback?(brooks at FreeBSD.org)

$ 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")

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list