Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-devel/llvm/, sys-devel/llvm/files/
Date: Sun, 03 Jul 2016 07:18:00
Message-Id: 1467530264.bcee044c4c0e9f12b663f8886f181a7d46acea66.mgorny@gentoo
1 commit: bcee044c4c0e9f12b663f8886f181a7d46acea66
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jul 3 06:50:42 2016 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Sun Jul 3 07:17:44 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bcee044c
7
8 sys-devel/llvm: Fix static analyzer -isystem support, #586168
9
10 .../llvm/files/clang-3.7.1-ccc-analyzer-isystem.patch | 18 ++++++++++++++++++
11 sys-devel/llvm/llvm-3.7.1-r3.ebuild | 3 +++
12 2 files changed, 21 insertions(+)
13
14 diff --git a/sys-devel/llvm/files/clang-3.7.1-ccc-analyzer-isystem.patch b/sys-devel/llvm/files/clang-3.7.1-ccc-analyzer-isystem.patch
15 new file mode 100644
16 index 0000000..78ca922
17 --- /dev/null
18 +++ b/sys-devel/llvm/files/clang-3.7.1-ccc-analyzer-isystem.patch
19 @@ -0,0 +1,18 @@
20 +https://bugs.gentoo.org/586168
21 +
22 +Index: tools/clang/tools/scan-build/ccc-analyzer
23 +===================================================================
24 +--- a/tools/clang/tools/scan-build/ccc-analyzer (revision 250980)
25 ++++ b/tools/clang/tools/scan-build/ccc-analyzer (working copy)
26 +@@ -586,9 +586,9 @@
27 + }
28 +
29 + # Compile mode flags.
30 +- if ($Arg =~ /^-[D,I,U,isystem](.*)$/) {
31 ++ if ($Arg =~ /^-(D|I|U|isystem)(.*)$/) {
32 + my $Tmp = $Arg;
33 +- if ($1 eq '') {
34 ++ if ($2 eq '') {
35 + # FIXME: Check if we are going off the end.
36 + ++$i;
37 + $Tmp = $Arg . $ARGV[$i];
38
39 diff --git a/sys-devel/llvm/llvm-3.7.1-r3.ebuild b/sys-devel/llvm/llvm-3.7.1-r3.ebuild
40 index d134a06..5f6e184 100644
41 --- a/sys-devel/llvm/llvm-3.7.1-r3.ebuild
42 +++ b/sys-devel/llvm/llvm-3.7.1-r3.ebuild
43 @@ -189,6 +189,9 @@ src_prepare() {
44 eapply "${FILESDIR}"/clang-3.4-darwin_prefix-include-paths.patch
45 eprefixify tools/clang/lib/Frontend/InitHeaderSearch.cpp
46
47 + # Fix -isystem support in ccc-analyzer
48 + eapply "${FILESDIR}"/clang-3.7.1-ccc-analyzer-isystem.patch
49 +
50 sed -i -e "s^@EPREFIX@^${EPREFIX}^" \
51 tools/clang/tools/scan-build/scan-build || die