From 723635127fd9c263517e4d84da04ded415fc5a48 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 18 Feb 2014 18:16:02 +0000 Subject: [PATCH] Backport of a r201586 from upstream. scan-build was failing on some project like firefox build system. (Yeh, advantage to be the packager of a software that I use ;) ). See scan-build-fix-clang-detection.diff --- debian/changelog | 3 +++ .../scan-build-fix-clang-detection.diff | 26 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 30 insertions(+) create mode 100644 debian/patches/scan-build-fix-clang-detection.diff diff --git a/debian/changelog b/debian/changelog index ba2a5b4f..27e08dfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,9 @@ llvm-toolchain-3.4 (1:3.4-3) UNRELEASED; urgency=medium * Symlink for current build mode missing (Closes upstream #18836) * Add link usr/lib/llvm-3.4/ to usr/lib/llvm-3.4/build/Debug+Asserts + * Backport of a r201586 from upstream. scan-build was failing on some project + like firefox build system. (Yeh, advantage to be the packager of a software + that I use ;) ). See scan-build-fix-clang-detection.diff -- Sylvestre Ledru Sat, 15 Feb 2014 11:31:13 +0100 diff --git a/debian/patches/scan-build-fix-clang-detection.diff b/debian/patches/scan-build-fix-clang-detection.diff new file mode 100644 index 00000000..3b6a2dae --- /dev/null +++ b/debian/patches/scan-build-fix-clang-detection.diff @@ -0,0 +1,26 @@ +Index: llvm-toolchain-3.4-3.4/clang/tools/scan-build/ccc-analyzer +=================================================================== +--- llvm-toolchain-3.4-3.4.orig/clang/tools/scan-build/ccc-analyzer 2013-10-22 20:55:18.000000000 +0200 ++++ llvm-toolchain-3.4-3.4/clang/tools/scan-build/ccc-analyzer 2014-02-18 18:58:07.185575339 +0100 +@@ -40,17 +40,17 @@ + + if ($FindBin::Script =~ /c\+\+-analyzer/) { + $Compiler = $ENV{'CCC_CXX'}; +- if (!defined $Compiler) { $Compiler = $DefaultCXXCompiler; } ++ if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCXXCompiler; } + + $Clang = $ENV{'CLANG_CXX'}; +- if (!defined $Clang) { $Clang = 'clang++'; } ++ if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++'; } + } + else { + $Compiler = $ENV{'CCC_CC'}; +- if (!defined $Compiler) { $Compiler = $DefaultCCompiler; } ++ if (!defined $Compiler || ! -x $Compiler) { $Compiler = $DefaultCCompiler; } + + $Clang = $ENV{'CLANG'}; +- if (!defined $Clang) { $Clang = 'clang'; } ++ if (!defined $Clang || ! -x $Clang) { $Clang = 'clang'; } + } + + ##===----------------------------------------------------------------------===## diff --git a/debian/patches/series b/debian/patches/series index f5a89149..420da260 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -36,3 +36,4 @@ fix-an-issue-in-chroot-witout-proc.diff lldb-link-atomic.diff 0007-install-dejagnu-files.patch fix-llvm-config-obj-src-root.patch +scan-build-fix-clang-detection.diff