diff options
author | Patrick Griffis | 2016-12-27 12:14:18 -0500 |
---|---|---|
committer | Patrick Griffis | 2016-12-27 12:14:18 -0500 |
commit | 9aa0133a7baad89c1650b4db47df9805194ef16c (patch) | |
tree | 5d27a90d5c360334044a5daff9dfcd025b70fa15 | |
parent | 7a13d7f35cc5b8084bde29ee8866a9da0e4b4248 (diff) | |
download | aur-tartan.tar.gz |
Fix building against llvm 3.9
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | gnome-clang-llvm-3.9.patch | 35 |
3 files changed, 44 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = tartan pkgdesc = Clang analysis plugin for GLib and GNOME pkgver = 0.3.0 - pkgrel = 1 + pkgrel = 2 url = https://people.collabora.com/~pwith/gnome-clang/ arch = i686 arch = x86_64 @@ -12,8 +12,10 @@ pkgbase = tartan depends = gobject-introspection source = https://www.freedesktop.org/software/tartan/releases/tartan-0.3.0.tar.xz source = fix-clang-3.8.patch::https://cgit.freedesktop.org/tartan/patch/clang-plugin?id=53f9d7cbf5e0c0f9445e7e7af382a546de2f4a89 + source = gnome-clang-llvm-3.9.patch sha256sums = 008f8195de142900443f10d7a0a1e5a0360c1296e5684274fa39c148a161c731 sha256sums = 785445a36752a87934d9d3d32df39cd2af8aba70c25f6f72bd34f7194b46501f + sha256sums = 6e06fb4b942700e2428b865562bfbc831323d07d36443db6147b75c2e39cc61d pkgname = tartan @@ -2,21 +2,24 @@ pkgname='tartan' pkgver=0.3.0 -pkgrel=1 +pkgrel=2 pkgdesc='Clang analysis plugin for GLib and GNOME' url='https://people.collabora.com/~pwith/gnome-clang/' arch=('i686' 'x86_64') license=('GPL3') depends=('llvm' 'clang' 'glib2' 'gobject-introspection') source=("https://www.freedesktop.org/software/tartan/releases/tartan-$pkgver.tar.xz" - 'fix-clang-3.8.patch::https://cgit.freedesktop.org/tartan/patch/clang-plugin?id=53f9d7cbf5e0c0f9445e7e7af382a546de2f4a89') + 'fix-clang-3.8.patch::https://cgit.freedesktop.org/tartan/patch/clang-plugin?id=53f9d7cbf5e0c0f9445e7e7af382a546de2f4a89' + 'gnome-clang-llvm-3.9.patch') sha256sums=('008f8195de142900443f10d7a0a1e5a0360c1296e5684274fa39c148a161c731' - '785445a36752a87934d9d3d32df39cd2af8aba70c25f6f72bd34f7194b46501f') + '785445a36752a87934d9d3d32df39cd2af8aba70c25f6f72bd34f7194b46501f' + '6e06fb4b942700e2428b865562bfbc831323d07d36443db6147b75c2e39cc61d') prepare() { cd "$pkgname-$pkgver" patch -p1 < "$srcdir/fix-clang-3.8.patch" + patch -p1 < "$srcdir/gnome-clang-llvm-3.9.patch" } build() { diff --git a/gnome-clang-llvm-3.9.patch b/gnome-clang-llvm-3.9.patch new file mode 100644 index 000000000000..c6a18d48617a --- /dev/null +++ b/gnome-clang-llvm-3.9.patch @@ -0,0 +1,35 @@ +diff --git a/clang-plugin/gir-attributes.cpp b/clang-plugin/gir-attributes.cpp +index eca02ba..8309eca 100644 +--- a/clang-plugin/gir-attributes.cpp ++++ b/clang-plugin/gir-attributes.cpp +@@ -338,7 +338,13 @@ GirAttributesConsumer::_handle_function_decl (FunctionDecl& func) + * or replacement function so we can’t make use of them. */ + if (g_base_info_is_deprecated (info) && + !func.hasAttr<DeprecatedAttr> ()) { +-#ifdef HAVE_LLVM_3_5 ++#ifdef HAVE_LLVM_3_8 ++ DeprecatedAttr* deprecated_attr = ++ ::new (func.getASTContext ()) ++ DeprecatedAttr (func.getSourceRange (), ++ func.getASTContext (), ++ 0); ++#elif HAVE_LLVM_3_5 + DeprecatedAttr* deprecated_attr = + ::new (func.getASTContext ()) + DeprecatedAttr (func.getSourceRange (), +diff --git a/clang-plugin/gsignal-checker.cpp b/clang-plugin/gsignal-checker.cpp +index 44ce813..57537e8 100644 +--- a/clang-plugin/gsignal-checker.cpp ++++ b/clang-plugin/gsignal-checker.cpp +@@ -624,7 +624,10 @@ calling_convention_is_safe (CallingConv conv) + case CC_IntelOclBicc: + /* Intel OpenCL Built-Ins. I can’t find any documentation about + * this, so let’s consider it unsafe. */ +-#ifdef HAVE_LLVM_3_7 ++#ifdef HAVE_LLVM_3_8 ++ case CC_SpirFunction: ++ case CC_OpenCLKernel: ++#elif HAVE_LLVM_3_7 + case CC_SpirFunction: + case CC_SpirKernel: + /* OpenCL SPIR calling conventions. These are ‘defined’ in §3.7 |