Import llvm-toolchain-3.9_3.9.1-9.debian.tar.xz
authorGianfranco Costamagna <locutusofborg@debian.org>
Fri, 2 Jun 2017 13:14:18 +0000 (13:14 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Fri, 2 Jun 2017 13:14:18 +0000 (13:14 +0000)
[dgit import tarball llvm-toolchain-3.9 1:3.9.1-9 llvm-toolchain-3.9_3.9.1-9.debian.tar.xz]

151 files changed:
NEWS [new file with mode: 0644]
README.source [new file with mode: 0644]
TODO [new file with mode: 0644]
changelog [new file with mode: 0644]
clang-X.Y-doc.docs.in [new file with mode: 0644]
clang-X.Y-examples.examples.in [new file with mode: 0644]
clang-X.Y.install.in [new file with mode: 0644]
clang-X.Y.links.in [new file with mode: 0644]
clang-X.Y.lintian-overrides.in [new file with mode: 0644]
clang-X.Y.manpages.in [new file with mode: 0644]
clang-format-X.Y.install.in [new file with mode: 0644]
clang-format-X.Y.lintian-overrides.in [new file with mode: 0644]
clang-format-X.Y.manpages.in [new file with mode: 0644]
clang-tidy-X.Y.install.in [new file with mode: 0644]
clang-tidy-X.Y.links.in [new file with mode: 0644]
clang-tidy-X.Y.lintian-overrides.in [new file with mode: 0644]
clang-tidy-X.Y.manpages.in [new file with mode: 0644]
compat [new file with mode: 0644]
control [new file with mode: 0644]
copyright [new file with mode: 0644]
debian_path.h [new file with mode: 0644]
libclang-X.Y-dev.install.in [new file with mode: 0644]
libclang-X.Y-dev.links.in [new file with mode: 0644]
libclang-common-X.Y-dev.install.in [new file with mode: 0644]
libclang-common-X.Y-dev.links.in [new file with mode: 0644]
libclang1-X.Y.install.in [new file with mode: 0644]
libclang1-X.Y.links.in [new file with mode: 0644]
libclang1-X.Y.lintian-overrides.in [new file with mode: 0644]
libclang1-X.Y.symbols.in [new file with mode: 0644]
liblld-X.Y-dev.install.in [new file with mode: 0644]
liblld-X.Y.install.in [new file with mode: 0644]
liblld-X.Y.links.in [new file with mode: 0644]
liblldb-X.Y-dev.install.in [new file with mode: 0644]
liblldb-X.Y-dev.links.in [new file with mode: 0644]
liblldb-X.Y.install.in [new file with mode: 0644]
liblldb-X.Y.links.in [new file with mode: 0644]
liblldb-X.Y.lintian-overrides.in [new file with mode: 0644]
libllvm-X.Y-ocaml-dev.META.in [new file with mode: 0644]
libllvm-X.Y-ocaml-dev.dirs.in [new file with mode: 0644]
libllvm-X.Y-ocaml-dev.install.in [new file with mode: 0644]
libllvm-X.Y-ocaml-dev.lintian-overrides.in [new file with mode: 0644]
libllvmX.Y.install.in [new file with mode: 0644]
libllvmX.Y.links.in [new file with mode: 0644]
libllvmX.Y.lintian-overrides.in [new file with mode: 0644]
lld-X.Y.install.in [new file with mode: 0644]
lldb-X.Y.install.in [new file with mode: 0644]
lldb-X.Y.lintian-overrides.in [new file with mode: 0644]
lldb-X.Y.manpages.in [new file with mode: 0644]
lldb-X.Y.postinst.in [new file with mode: 0644]
llvm-X.Y-dev.dirs.in [new file with mode: 0644]
llvm-X.Y-dev.install.in [new file with mode: 0644]
llvm-X.Y-dev.links.in [new file with mode: 0644]
llvm-X.Y-doc.dirs.in [new file with mode: 0644]
llvm-X.Y-doc.install.in [new file with mode: 0644]
llvm-X.Y-examples.dirs.in [new file with mode: 0644]
llvm-X.Y-examples.examples.in [new file with mode: 0644]
llvm-X.Y-examples.links.in [new file with mode: 0644]
llvm-X.Y-runtime.binfmt.in [new file with mode: 0644]
llvm-X.Y-runtime.install.in [new file with mode: 0644]
llvm-X.Y-runtime.lintian-overrides.in [new file with mode: 0644]
llvm-X.Y-runtime.manpages.in [new file with mode: 0644]
llvm-X.Y-runtime.postinst.in [new file with mode: 0644]
llvm-X.Y-runtime.prerm.in [new file with mode: 0644]
llvm-X.Y-tools.dirs.in [new file with mode: 0644]
llvm-X.Y-tools.install.in [new file with mode: 0644]
llvm-X.Y.dirs.in [new file with mode: 0644]
llvm-X.Y.install.in [new file with mode: 0644]
llvm-X.Y.lintian-overrides.in [new file with mode: 0644]
llvm-X.Y.manpages.in [new file with mode: 0644]
llvm-priv-dev.dirs [new file with mode: 0644]
orig-tar.sh [new file with mode: 0755]
patches/0003-Debian-version-info-and-bugreport.patch [new file with mode: 0644]
patches/0021-shared-lib-debian.patch [new file with mode: 0644]
patches/0023-link-libopagent.patch [new file with mode: 0644]
patches/0044-soname.diff [new file with mode: 0644]
patches/19-clang_debian_version.patch [new file with mode: 0644]
patches/23-strlcpy_strlcat_warning_removed.diff [new file with mode: 0644]
patches/26-set-correct-float-abi.diff [new file with mode: 0644]
patches/27-fix_clang_stdint.diff [new file with mode: 0644]
patches/31-powerpcspe.diff [new file with mode: 0644]
patches/34-powerpc-no-altivec.diff [new file with mode: 0644]
patches/857623-allow-opencl-pointer-to-bool.diff [new file with mode: 0644]
patches/D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff [new file with mode: 0644]
patches/D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff [new file with mode: 0644]
patches/add_symbols_versioning.patch [new file with mode: 0644]
patches/amdgpu-regression.diff [new file with mode: 0644]
patches/atomic_library_1.diff [new file with mode: 0644]
patches/atomic_library_2.diff [new file with mode: 0644]
patches/clang-analyzer-force-version.diff [new file with mode: 0644]
patches/clang-apply-replacements.diff [new file with mode: 0644]
patches/clang-arm-default-vfp3-on-armv7a.patch [new file with mode: 0644]
patches/clang-default-to-i686-on-32bit-x86-targets.patch [new file with mode: 0644]
patches/clang-fix-cmpxchg8-detection-on-i386.patch [new file with mode: 0644]
patches/clang-format-version.diff [new file with mode: 0644]
patches/clang-tidy-run-bin.diff [new file with mode: 0644]
patches/compiler-rt-i586.diff [new file with mode: 0644]
patches/compiler-rt-path.diff [new file with mode: 0644]
patches/declare_clear_cache.diff [new file with mode: 0644]
patches/disable-display-PASS-UNSUPPORTED-XFAIL.diff [new file with mode: 0644]
patches/disable-execinfo-usage.diff [new file with mode: 0644]
patches/disable-llvm-symbolizer-test.diff [new file with mode: 0644]
patches/disable-test-failing-sparc-i386.diff [new file with mode: 0644]
patches/do-not-fail-on-unexpected-pass.diff [new file with mode: 0644]
patches/drop-wrong-hack-arm64.patch [new file with mode: 0644]
patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot.diff [new file with mode: 0644]
patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot2.diff [new file with mode: 0644]
patches/fix-R_AARCH64_MOVW_UABS_G3-relocation.patch [new file with mode: 0644]
patches/fix-clang-path-and-build.diff [new file with mode: 0644]
patches/fix-cmake-config-prefix.diff [new file with mode: 0644]
patches/fix-llvm-config-obj-src-root.patch [new file with mode: 0644]
patches/fix-scan-view-path.diff [new file with mode: 0644]
patches/follow-parallel-var.diff [new file with mode: 0644]
patches/force-gcc-header-obj.diff [new file with mode: 0644]
patches/force-link-pass.o.diff [new file with mode: 0644]
patches/hurd-EIEIO-undef.diff [new file with mode: 0644]
patches/hurd-pathmax.diff [new file with mode: 0644]
patches/install-scan-build-py.diff [new file with mode: 0644]
patches/kfreebsd-support.diff [new file with mode: 0644]
patches/lit-force-lang.diff [new file with mode: 0644]
patches/lldb-addversion-suffix-to-llvm-server-exec.patch [new file with mode: 0644]
patches/lldb-libname.diff [new file with mode: 0644]
patches/lldb-link-atomic-cmake.patch [new file with mode: 0644]
patches/lldb-link-atomic.diff [new file with mode: 0644]
patches/lldb-server-link.diff [new file with mode: 0644]
patches/lldb-soname.diff [new file with mode: 0644]
patches/llvm26003-sanitizer-check-env.diff [new file with mode: 0644]
patches/mips-fpxx-enable.diff [new file with mode: 0644]
patches/python-clangpath.diff [new file with mode: 0644]
patches/removeduplicatedeclaration.diff [new file with mode: 0644]
patches/scan-build-clang-path.diff [new file with mode: 0644]
patches/scan-build-py-default.diff [new file with mode: 0644]
patches/scan-view-fix-path.diff [new file with mode: 0644]
patches/series [new file with mode: 0644]
patches/silent-MCJIIT-tests.diff [new file with mode: 0644]
patches/silent-more-tests.diff [new file with mode: 0644]
patches/strip-svn.diff [new file with mode: 0644]
patches/ubuntu-precise-compiler-rt.diff [new file with mode: 0644]
patches/unwind-chain-inclusion.diff [new file with mode: 0644]
patches/upstream-asan-msan-fix-reallocation-logic.diff [new file with mode: 0644]
patches/upstream-fix-asan-initialization.diff [new file with mode: 0644]
patches/upstream-msan-prevent-initialization-failure.diff [new file with mode: 0644]
patches/use-deb-json.diff [new file with mode: 0644]
pollycc.in [new file with mode: 0755]
prepare-new-release.sh [new file with mode: 0644]
python-clang-X.Y.install.in [new file with mode: 0644]
python-lldb-X.Y.install.in [new file with mode: 0644]
python-lldb-X.Y.links.in [new file with mode: 0644]
rules [new file with mode: 0755]
source.lintian-overrides [new file with mode: 0644]
source/format [new file with mode: 0644]
watch [new file with mode: 0644]

diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..91160e6
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,5 @@
+llvm-toolchain-snapshot (1:3.6~svn214630-1~exp1) experimental; urgency=medium
+
+  * clang is now co-instalable. Available on version 3.4, 3.5 and 3.6
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 02 Aug 2014 12:57:41 +0200
diff --git a/README.source b/README.source
new file mode 100644 (file)
index 0000000..deeb3f2
--- /dev/null
@@ -0,0 +1,5 @@
+
+Repack of the snapshot release are done with orig-tar.sh which will checkout the sources.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>, Tue, 26 Feb 2013 14:57:56 +0100
+
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..0ce53db
--- /dev/null
+++ b/TODO
@@ -0,0 +1,6 @@
+* add the support of libclang in llvm default (for now, it is
+called libclang1-3.3.so)
+
+* move the header at the right place in libclang-dev
+
+* bootstrap of clang with itself
diff --git a/changelog b/changelog
new file mode 100644 (file)
index 0000000..0e3d8a3
--- /dev/null
+++ b/changelog
@@ -0,0 +1,1588 @@
+llvm-toolchain-3.9 (1:3.9.1-9) unstable; urgency=medium
+
+  * debian/patches/fix-R_AARCH64_MOVW_UABS_G3-relocation.patch:
+    fix relocation issue, preventing Julia from working correctly on
+    arm64 (Closes: #862535)
+  * Fix doc generation (Closes: #862597)
+    - there was a missing install file
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Fri, 02 Jun 2017 15:14:18 +0200
+
+llvm-toolchain-3.9 (1:3.9.1-8) unstable; urgency=medium
+
+  * Really fix "use versioned symbols" for llvm
+    Thanks to Julien Cristau for the patch (Closes: #849098)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 25 Apr 2017 15:10:10 +0200
+
+llvm-toolchain-3.9 (1:3.9.1-7) unstable; urgency=medium
+
+  * Limit the archs where the ocaml binding is built
+    Should fix the FTBFS
+    Currently amd64 arm64 armel armhf i386
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 15 Apr 2017 12:03:30 +0200
+
+llvm-toolchain-3.9 (1:3.9.1-6) unstable; urgency=medium
+
+  * Upload in unstable
+  * Bring back ocaml. Thanks to Cyril Soldani (Closes: #858626)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 14 Apr 2017 10:02:03 +0200
+
+llvm-toolchain-3.9 (1:3.9.1-6~exp2) experimental; urgency=medium
+
+  * Add override_dh_makeshlibs for the libllvm or liblldb versions
+    Thanks to Julien Cristau for the patch
+  * change the min version of the libclang1 symbols to 1:3.9.1-6~
+  * Fix the symlink on scan-build-py
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 28 Mar 2017 06:32:40 +0200
+
+llvm-toolchain-3.9 (1:3.9.1-6~exp1) experimental; urgency=medium
+
+  [ Rebecca N. Palmer ]
+  * Allow '!pointer' in OpenCL (Closes: #857623)
+  * Add missing liblldb symlink (Closes: #857683)
+  * Use versioned symbols (Closes: #848368)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 19 Mar 2017 10:12:03 +0100
+
+llvm-toolchain-3.9 (1:3.9.1-5) unstable; urgency=medium
+
+  * Fix the incorrect symlink to scan-build-py (Closes: #856869)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 12 Mar 2017 10:01:10 +0100
+
+llvm-toolchain-3.9 (1:3.9.1-4) unstable; urgency=medium
+
+  * d/p/amdgpu-regression.diff Fix a regression impacting mesa
+    (Closes: #852616)
+  * d/p/esan-Fix-ESan-test-failure-on-Debian-Sid-bot*.diff:
+    cherry-pick upsream patch to make esan work with the new glibc
+    Thanks to Nobert Lange for investigating (Closes: #844092)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 27 Jan 2017 11:02:15 +0100
+
+llvm-toolchain-3.9 (1:3.9.1-3) unstable; urgency=medium
+
+  * Also install python-lldb-3.9 when installing lldb-3.9 (Closes: #851171)
+  * Bring back the content of llvm-3.9-doc (Closes: #844616)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 14 Jan 2017 11:46:16 +0100
+
+llvm-toolchain-3.9 (1:3.9.1-2) unstable; urgency=medium
+
+  * debian/orig-tar.sh: less verbose
+  * Remove the info section from the generated manpages (Closes: #846269)
+  * Disable libedit usage in lldb because of garbage (Closes: #846616)
+  * Fix the path to lldb-server (to lldb-server-3.9) (Closes: #846638)
+  * d/p/lldb-server-link.diff Fix the lldb hang. It was due to a linking issue.
+    Thanks to Pavel Labath (Closes: #846640)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 17 Dec 2016 17:55:44 +0100
+
+llvm-toolchain-3.9 (1:3.9.1-1) unstable; urgency=medium
+
+  * New stable release
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 14 Dec 2016 09:22:02 +0100
+
+llvm-toolchain-3.9 (1:3.9.1~+rc3-1~exp1) experimental; urgency=medium
+
+  * rc 3 of a new release (3.9.1)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 10 Dec 2016 03:17:38 +0100
+
+llvm-toolchain-3.9 (1:3.9.1~+rc2-1~exp1) experimental; urgency=medium
+
+  * rc 2 of a new release (3.9.1)
+  * Disable NEON generation on armhf (Closes: #841474, #842142)
+    Thanks to Pauli for the fix
+  * patches/bug-30342.diff 0011-SimplifyCFG-Hoisting-invalidates-metadata.patch removed. Applied upstream (3.9.1)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 02 Dec 2016 16:19:14 +0100
+
+llvm-toolchain-3.9 (1:3.9-6) unstable; urgency=medium
+
+  * Fix segfaults in the memory sanitizers (Closes: #842642)
+    Caused by the newer glibc. Many thanks for Nobert Lange for everything
+  * Enable the sanitizers testsuite
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 11 Nov 2016 17:01:38 +0100
+
+llvm-toolchain-3.9 (1:3.9-5) unstable; urgency=medium
+
+  * d/p/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch: Also apply bug 29163
+    to fix some issues in rust (Closes: #842956)
+    Many thanks to Ximin Luo for the investigation
+
+  * libclang-common-3.9-dev: missing multilib binaries for the sanitizer
+    libraries (Closes: #841923)
+    Many thanks to Norbert Lange for the changes
+
+  [ Pauli ]
+  * d/p/clang-fix-cmpxchg8-detection-on-i386.patch:
+    libcxx atomic tests for old i386 fail with wrong Atomic inline width.
+    Needed for libc++
+    (See https://llvm.org/bugs/show_bug.cgi?id=19355)
+  * d/p lldb-addversion-suffix-to-llvm-server-exec.patch:
+    Fix the lldb-server call in some cases
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 04 Nov 2016 17:18:07 +0100
+
+llvm-toolchain-3.9 (1:3.9-4) unstable; urgency=medium
+
+  * d/p/bug-30342.diff:
+    Backport upstream bug 30342 to fix an infinity loop in rust testsuite
+  * LLVMConfig.cmake was installed into wrong location
+    Install a symlink from lib/cmake/llvm to share/llvm/cmake
+    (Closes: #839234)
+  * Fix a path issue in scan-view. Thanks Riccardo Magliocchetti
+    (Closes: #838572)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 31 Oct 2016 10:47:52 +0100
+
+llvm-toolchain-3.9 (1:3.9-3) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * The libstdc++-6-dev & libobjc-6-dev are only install with clang-X.Y
+    and libclang-X.Y-dev and no longer with libclang1-X.Y
+    (Closes: #841309)
+
+  [ Gianfranco Costamagna ]
+  * Team upload
+  * d/p/drop-wrong-hack-arm64.patch:
+    - drop hack that was preventing the package from building on
+      non-amd64 64bit architectures:
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Thu, 27 Oct 2016 11:45:28 +0200
+
+llvm-toolchain-3.9 (1:3.9-2) unstable; urgency=medium
+
+  * Merge clang-include-fixer-3.9 into clang-3.9. Don't think
+    it deserves it own package
+  * python-lldb-3.9 archs "any" to a list like others pkg
+    Should fix the transition issue
+  * Fix a version issue with run-clang-tidy-4.0.py
+  * Fix the VCS-* fields (Closes: #839095)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 02 Sep 2016 13:11:56 +0200
+
+llvm-toolchain-3.9 (1:3.9-1) unstable; urgency=medium
+
+  * New stable release
+  * Port to kfreebsd. Many thanks to Pino Toscano
+    (Closes: #835665)
+  * Build lldb on arm64. Hopefully, works.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 01 Sep 2016 12:05:33 +0200
+
+llvm-toolchain-3.9 (1:3.9~+rc3-1) unstable; urgency=medium
+
+  * Upload in unstable
+  * Fix the usage of jsoncpp in polly. Thanks to James Clarke for the patch
+    (Closes: #835607)
+  * Fix the renaming of the manpages (Closes: #834077)
+  * Use the manpage from clang.rst instead of help2man
+  * Fix a crash with clang-tidy (Closes: #833802)
+    Fixed in 1:3.9~+rc1-1~exp1
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 26 Aug 2016 23:34:16 +0200
+
+llvm-toolchain-3.9 (1:3.9~+rc3-1~exp1) experimental; urgency=medium
+
+  * new RC release
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 25 Aug 2016 16:54:25 +0200
+
+llvm-toolchain-3.9 (1:3.9~+rc2-1~exp1) experimental; urgency=medium
+
+  * New RC release
+  * Introduce clang-include-fixer-3.9
+  * Disable the build of lldb on mips64el, ppc64 and s390x for real
+  * Add symlink from ./build to ../share and ../lib etc
+    Thanks to Ximin Luo for the patch (Closes: #834144)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 19 Aug 2016 09:57:21 +0200
+
+llvm-toolchain-3.9 (1:3.9~+rc1-1~exp1) experimental; urgency=medium
+
+  * new testing version
+  * Sync the 3.8 changes into 3.9
+  * amd64 llvm testsuite is green, bring back the failure in case of error
+  * Bring back the lto (gone with the cmake migration)
+    (Closes: #819333) (upstream: #27223)
+  * Fix the cmake paths in llvm-3.9-dev deb package. Thanks to Brad King
+    for the patch (Closes: #819072)
+  * LLVMConfig.cmake is now installed to <prefix>/lib/cmake/llvm instead of
+    <prefix>/share/llvm/cmake
+    Thanks to Brad King of the fix
+  * Disable lldb on sparc64 (Closes: #832371)
+  * Generate manpages for lli, lldb-mi & git-clang-format
+  * Fix some lintian overrides
+  * Generate more manpages
+  * Remove some garbage from the manpages (Closes: #815991, #804347)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 25 Jul 2016 12:18:52 +0200
+
+llvm-toolchain-3.9 (1:3.9~svn275918-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Silent test CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
+  * Bring back llvm-3.9-tools to life
+  * ship clang-tblgen & yaml-bench as part of the libclang-common-X.Y-dev
+    package
+  * ship lli-child-target as part of the llvm-X.Y-runtime package
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 19 Jul 2016 15:34:08 +0200
+
+llvm-toolchain-snapshot (1:3.9~svn274438-1) unstable; urgency=medium
+
+  * Remove the autoconf section
+  * Bring back the removal of the build dir
+  * Fix the coverage builds (didn't allow several cflags)
+  * Set the correct conflicts on python-lldb-3.8 (Closes: #817873)
+  * Set the correct conflicts on python-clang-3.8 (Closes: #817872)
+  * remove llvm26003-sanitizer-check-env.diff (merged upstream)
+  * Do not fail the build if the manpages cannot be built (failing on
+    Ubuntu precise)
+  * Install libfindAllSymbols.a as part of libclang-X.Y-dev
+  * Ship scan-build-py
+  * Use the libjsoncpp library embedded (fails to link otherwise)
+  * Standards-Version 3.9.8
+  * cmake files moved from usr/lib/llvm-3.9/share/llvm/cmake/
+    to usr/lib/llvm-3.9/lib/cmake/llvm/
+    (upstream change)
+  * Add a symlink from usr/lib/llvm-3.9/share/llvm/cmake
+    pointing to usr/share/llvm-3.9/cmake
+  * Disable the run of lldb testsuite because of LLVM_LINK_LLVM_DYLIB=ON:
+    https://llvm.org/bugs/show_bug.cgi?id=28127
+  * Add -gsplit-dwarf to CXXFLAGS to workaround the memory allocation
+    issue on i386
+  * Ignore the lintian override about embedded-library for json.
+    Doesn't link otherwise
+  * Fix the soname of libclang and libLLVM. Might cause some breakage with
+    existing app but no choice...
+
+  [ Pablo Oliveira ]
+  * Add python-six as a dependency of python-lldb (Closes: #825371)
+    (thanks to Askar Safin)
+  * Fix lldb symlinks
+  * Fix missing _lldb.so import during lldb testsuite
+
+  [ Ed Schouten ]
+  * Preparation of the support of lld (not ready yet)
+
+  [ Kai Wasserbäch ]
+    * debian/rules:
+      - Ensure ld-gold is used. CMake invokes the linker through g++ most of the
+        time, therefore we need to set -Wl,-fuse-ld=gold.
+      - Remove unused variable "confargs".
+
+  [ Brad King ]
+  * Install cmake files in usr/share/llvm-@LLVM_VERSION@/cmake/ instead of
+    usr/share/llvm-@LLVM_VERSION@/cmake/
+  * Also install libLLVM-3.8.so.1 as a symlink
+  * debian/patches/fix-cmake-config-prefix.diff:
+    cover the CMake build system too
+  (Closes: #819072)
+
+  [ Alexis La Goutte ]
+  * Fix an issue with scan-view (Closes: #825101)
+
+  [ YunQiang Su ]
+  * Enable FPXX by default on mips/mipsel (Closes: #826749)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 02 Jul 2016 20:46:05 +0200
+
+llvm-toolchain-snapshot (1:3.9~svn260851-1) unstable; urgency=medium
+
+  * New snapshot
+  * Switch to 3.9 (remove lldb-3.9-dev as it was a transitionnal pkg)
+  * Update the clang description for something more accurate (C++-11, 14, etc)
+  * Cmake migration. Done by Andrew Wilkins. Many thanks to him
+    - Update patches to set SONAME in CMake build
+    - Create symlinks with ".links", don't install from build tree
+    - Remove LLVM-internal tools (lit, FileCheck, not, tblgen, etc.)
+    - Remove llvm-X.Y-tools package, because it contained only
+      internal tools that are not intended for distribution.
+    - Remove autotools-specific artifacts from packages.
+    - Remove "dummy" documentation artifacts from llvm-X.Y-docs
+      package. Not built/installed by CMake, not useful.
+    - Update control/rules to support CMake
+    - Patch LLDB SWIG interfaces to workaround a bug in SWIG
+      See https://llvm.org/bugs/show_bug.cgi?id=25468
+    - add missing files to clang-format
+    - Add patch to fix sanitizer lit invocation
+    - removed LLVM-internal tools (lit, FileCheck, not, *-tblgen, etc.);
+      not installed by CMake, not intended for distribution
+    - removed llvm-X.Y-tools (contained only internal tools)
+    - removed autotools-specific artifacts (configure, Makefile, etc.)
+    - removed dummy documentation files
+  * Sync against 3.8
+  * Disable "Sphinx warnings treated as errors"
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 08 Mar 2016 09:50:29 +0100
+
+llvm-toolchain-3.8 (1:3.8-1) unstable; urgency=medium
+
+  * New upstream release
+  * Install a missing library to unbreak lldb (Closes: #815809)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 03 Mar 2016 21:16:21 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc3-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Update the clang description for something more accurate (C++-11, 14, etc)
+  * Update debian/orig-tar.sh to remove autoconf/config.sub autoconf/config.guess
+    in polly
+
+  [ Matthias Klose ]
+  * clang-tidy-3.8: Remove Breaks/Replaces on clang-modernize-3.8.
+  * Disable lldb on s390x.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 25 Feb 2016 14:26:14 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc2-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Remove build-llvm/ after the install step to save space.
+    Most of the rc1 builds failed because of hd space.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 03 Feb 2016 08:59:32 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc1-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Cmake migration. Done by Andrew Wilkins. Many thanks to him
+    - Update patches to set SONAME in CMake build
+    - Create symlinks with ".links", don't install from build tree
+    - Remove LLVM-internal tools (lit, FileCheck, not, tblgen, etc.)
+    - Remove llvm-X.Y-tools package, because it contained only
+      internal tools that are not intended for distribution.
+    - Remove autotools-specific artifacts from packages.
+    - Remove "dummy" documentation artifacts from llvm-X.Y-docs
+      package. Not built/installed by CMake, not useful.
+    - Update control/rules to support CMake
+    - Patch LLDB SWIG interfaces to workaround a bug in SWIG
+      See https://llvm.org/bugs/show_bug.cgi?id=25468
+    - add missing files to clang-format
+    - Add patch to fix sanitizer lit invocation
+    - removed LLVM-internal tools (lit, FileCheck, not, *-tblgen, etc.);
+      not installed by CMake, not intended for distribution
+    - removed llvm-X.Y-tools (contained only internal tools)
+    - removed autotools-specific artifacts (configure, Makefile, etc.)
+    - removed dummy documentation files
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Jan 2016 16:09:01 +0100
+
+llvm-toolchain-3.8 (1:3.8.1-8) unstable; urgency=medium
+
+  * Disable the usage of ld gold on powerpc (Closes: #833583)
+  * Revert drop-avx512-from-skylake.diff, it is causing some regressions in the
+    testsuite
+  * Disable lldb on ppc64
+  * libfuzzer depends on the same version of clang (Closes: #833564)
+  * Use filter into of findstring in the gold usage. Thanks Doko for the
+    suggestion
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 07 Aug 2016 14:10:09 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-7) unstable; urgency=medium
+
+  * Fix the detection of gcc. This broke the build on the latest unstable
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 05 Aug 2016 09:55:15 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-6) unstable; urgency=medium
+
+  * Ship libFuzzer in its own package (libfuzzer-X.Y-dev) (Closes: #820159)
+  * Sync from Ubuntu. Many thanks to Matthias Klose
+    - drop-avx512-from-skylake.diff: Don't enable AVX512 on Skylake, as it's
+      a server cpu feature and breaks llvmpipe on workstations.
+    - Remove the build tree before calling dh_strip; at least the amd64 buildd
+      runs out of diskspace at this step.
+    - Add support for gcc's attribute abi_tag (needed for compatibility with
+      GCC 5's libstdc++); taken from the trunk (Closes: #797038)
+      (LP: #1510042, #1488254)
+      D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff
+      D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 28 Jul 2016 11:15:04 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-5) unstable; urgency=medium
+
+  [ Gianfranco Costamagna ]
+  * Try to fix mips64el build, by enabling the same
+    packages as the mips and mipsel versions
+  * Link mips* with latomic.
+
+  [ Sylvestre Ledru ]
+  * Disable lldb on sparc64 (Closes: #832371)
+  * Hopefully fix the FTBFS on armel
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 27 Jul 2016 22:49:09 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-4) unstable; urgency=medium
+
+  * Fix the FTBFS under mips/mipsel? (enable the link against atomic)
+    (Closes: #820537)
+  * Bring back llvm-3.8-tools to life
+  * ship clang-tblgen & yaml-bench as part of the libclang-common-X.Y-dev
+    package
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Jul 2016 10:20:46 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-3) unstable; urgency=medium
+
+  * Add -gsplit-dwarf to CXXFLAGS to workaround the memory allocation
+    issue on i386 (hopefully)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 02 Jul 2016 20:59:08 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-2) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * Add a symlink from usr/lib/llvm-3.8/share/llvm/cmake
+    pointing to usr/share/llvm-3.8/cmake
+
+  [ Gianfranco Costamagna ]
+  * Remove python-lldb-3.8 where liblldb-3.8-dev is not built
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 28 Jun 2016 14:44:48 +0200
+
+llvm-toolchain-3.8 (1:3.8.1-1) unstable; urgency=medium
+
+  * New maintenance release
+
+  [ Kai Wasserbäch ]
+  * debian/rules: Ensure ld-gold is used. CMake invokes the linker through
+    g++ most of the time, therefore we need to set -Wl,-fuse-ld=gold.
+
+  [ Brad King ]
+  * Followup to fix the cmake install (Closes: #819072)
+
+  [ YunQiang Su ]
+  * Enable FPXX by default on mips/mipsel (Closes: #826749)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 23 Jun 2016 08:49:29 +0200
+
+llvm-toolchain-3.8 (1:3.8.1~+rc1-1~exp1) experimental; urgency=medium
+
+  * New RC release
+  * Improve the cmake detection (used for llvm.org/apt)
+  * Standards-Version updated to 3.9.8
+  * Ignore outdated-autotools-helper-file
+
+  [ Brad King ]
+  * Install cmake files in usr/share/llvm-@LLVM_VERSION@/cmake/ instead of
+    usr/share/llvm-@LLVM_VERSION@/cmake/
+  * Also install libLLVM-3.8.so.1 as a symlink
+  * debian/patches/fix-cmake-config-prefix.diff:
+    cover the CMake build system too
+  (Closes: #819072)
+
+  [ Pablo Oliveira ]
+  * Fix python-lldb dependencies and make proper symlinks to libLLVM
+    and liblldb as suggested by Graham Inggs (Closes: #821022)
+  * Fix liblldb suffix in lldb/scripts/Python/finishSwigPythonLLDB.py
+    (Closes: #813798)
+  * Fix LLVM bug 26158 - clang packages don't provide man pages
+  * Add python-six as a dependency of python-lldb (thanks to Askar Safin).
+
+  [ Gianfranco Costamagna ]
+  * Make python-lldb-3.8 depend on lldb-3.8-dev, to pick all
+    the required dependencies
+  * Unbreak circular dependency by Suggesting the python binding from
+    liblldb-3.8-dev
+
+  [ Alexis La Goutte ]
+  * Fix an issue with scan-view (Closes: #825101)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 26 May 2016 17:30:00 +0200
+
+llvm-toolchain-3.8 (1:3.8-2) unstable; urgency=medium
+
+  * Team upload.
+  * Disable polly on s390x and fix polly check.
+  * Fix VCS fields.
+
+  [ Sylvestre Ledru ]
+  * Fix txt file installation issue, by putting a README.txt file
+    with some explanation.
+
+  [ Graham Inggs ]
+  * Tighten llvm dev dependency (Closes: #814142).
+
+ -- Gianfranco Costamagna <locutusofborg@debian.org>  Mon, 07 Mar 2016 10:56:05 +0100
+
+llvm-toolchain-3.8 (1:3.8-1) unstable; urgency=medium
+
+  * New upstream release
+  * Install a missing library to unbreak lldb (Closes: #815809)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 03 Mar 2016 21:16:21 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc3-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Update the clang description for something more accurate (C++-11, 14, etc)
+  * Update debian/orig-tar.sh to remove autoconf/config.sub autoconf/config.guess
+    in polly
+
+  [ Matthias Klose ]
+  * clang-tidy-3.8: Remove Breaks/Replaces on clang-modernize-3.8.
+  * Disable lldb on s390x.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 25 Feb 2016 14:26:14 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc2-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Remove build-llvm/ after the install step to save space.
+    Most of the rc1 builds failed because of hd space.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 03 Feb 2016 08:59:32 +0100
+
+llvm-toolchain-3.8 (1:3.8~+rc1-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Cmake migration. Done by Andrew Wilkins. Many thanks to him
+    - Update patches to set SONAME in CMake build
+    - Create symlinks with ".links", don't install from build tree
+    - Remove LLVM-internal tools (lit, FileCheck, not, tblgen, etc.)
+    - Remove llvm-X.Y-tools package, because it contained only
+      internal tools that are not intended for distribution.
+    - Remove autotools-specific artifacts from packages.
+    - Remove "dummy" documentation artifacts from llvm-X.Y-docs
+      package. Not built/installed by CMake, not useful.
+    - Update control/rules to support CMake
+    - Patch LLDB SWIG interfaces to workaround a bug in SWIG
+      See https://llvm.org/bugs/show_bug.cgi?id=25468
+    - add missing files to clang-format
+    - Add patch to fix sanitizer lit invocation
+    - removed LLVM-internal tools (lit, FileCheck, not, *-tblgen, etc.);
+      not installed by CMake, not intended for distribution
+    - removed llvm-X.Y-tools (contained only internal tools)
+    - removed autotools-specific artifacts (configure, Makefile, etc.)
+    - removed dummy documentation files
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Jan 2016 16:09:01 +0100
+
+llvm-toolchain-snapshot (1:3.8~svn255217-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Fix an install issue with clang-tidy
+  * clang-modernize has been removed. Long live to clang-tidy, its
+    replacement
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 10 Dec 2015 05:18:29 +0100
+
+llvm-toolchain-snapshot (1:3.8~svn254193-2) UNRELEASED; urgency=medium
+
+  * disable lldb and polly on powerpc, currently ftbfs.
+    setting the lldb archs in debian/control in just one
+    place would be appreciated.
+  * quoting fixes in debian/rules, when make macros
+    are empty
+    Thanks to Doko for the two previous changes (Closes: #806729)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 30 Nov 2015 15:34:12 +0100
+
+llvm-toolchain-snapshot (1:3.8~svn254193-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Remove some warnings in the manpages generation (Closes: #795310)
+  * Also ship sancov in clang-3.8
+  * Fix the links to scan-build-3.8 & scan-view-3.8
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 20 Oct 2015 14:07:06 +0200
+
+llvm-toolchain-snapshot (1:3.8~svn250696-1) unstable; urgency=medium
+
+  * Remove macho-dump from LLVM (removed by upstream r248302)
+  * Introduce clang-tidy-3.8 as a separate package. Replaces clang-modernize
+  * Ship run-clang-tidy.py & clang-tidy-diff.py in clang-tidy-3.8
+  * Remove cpp11-migrate-3.8 package. Has been replaced by clang-modernize
+    for a while (which will be replaced by clang-tidy)
+  * Add three new symbols in libclang1
+    - clang_CompileCommand_getFilename@Base
+    - clang_CompileCommand_getMappedSourceContent@Base 3.8
+    - clang_CompileCommand_getMappedSourcePath@Base 3.8
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 21 Sep 2015 13:16:35 +0200
+
+llvm-toolchain-snapshot (1:3.8~svn247576-1) unstable; urgency=medium
+
+  [ Sylvestre Ledru ]
+  * New snapshot release
+  * Remove CVE-2015-2305.patch. Already fixed upstream in a different
+    way
+  * remove patches merge upstream
+    - lit-lang.diff
+    - locale-issue-ld.diff
+  * Also generate liblldb-3.8-dbg
+  * Select LLVM OpenMP as the default backend
+
+  [ Gianfranco Costamagna ]
+  * d/control: Add more conflicting packages (python-clang and python-lldb)
+    (Closes: #796811, #796843)
+  * Remove an obsolete declaration about dragonegg
+    (cherry-pick from 3.7 branch)
+
+  [ James Price ]
+  * d/p/fix-cmake-config-prefix.diff: fix cmake path,
+    needs a change after upstream revision r241080
+    (Addresses: #794905)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 14 Sep 2015 18:29:09 +0200
+
+llvm-toolchain-snapshot (1:3.8~svn245286-1) unstable; urgency=medium
+
+  * New snapshot release (3.7 => 3.8)
+    No need to rename libllvm as 3.8 was not part of the debian archive
+
+  [ Gianfranco Costamagna ]
+  * Fix VCS fields.
+  * d/p/CVE-2015-2305.patch, fix security issue on regcomp.c
+  * Fix many lintian warning/errors
+    - copyright fixes
+    - control files
+    - disabled ocaml documentation
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 18 Aug 2015 14:28:36 +0200
+
+llvm-toolchain-snapshot (1:3.7~svn231060-1~exp2) UNRELEASED; urgency=medium
+
+  * Reflect upstream changes wrt vim package. Split the files into different
+    directories
+  * Disable the patch force-gcc-header-obj.diff. Seems to cause bug #23556
+  * Fix the CMake build. thanks to PaweÅ‚ Bylica for the fix.
+    Fix upstream bug #23352
+  * No longer building some clang help page, removing them
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 21 Apr 2015 09:41:41 +0200
+
+llvm-toolchain-snapshot (1:3.7~svn231060-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * Force the version of clang in the analyzer scripts
+    clang-analyzer-force-version.diff
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 03 Mar 2015 09:19:38 +0100
+
+llvm-toolchain-snapshot (1:3.7~svn230857-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Support of gcc 5.0 (Closes: #777988)
+  * compiler-rt-i586.diff: fix a build issue of compiler-rt under i386
+  * lldb-gdbserver & lldb-platform have been merged into lldb-server
+  * Bring back polly and remove libcloog-isl-dev & libisl-dev as build deps
+    (shipped in the polly source tree)
+  * Set the correct conflicts (Closes: #777580, #777581, #777582)
+  * lit-lang.diff: Force the call to ld to be in english
+    (was failing with a french locale)
+  * silent-MCJIIT-tests.diff: enable some tests and silents some other
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 28 Feb 2015 18:44:59 +0100
+
+llvm-toolchain-snapshot (1:3.7~svn227076-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Switch to version 3.7
+  * Standards-Version updated to 3.9.6
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 26 Jan 2015 09:23:41 +0100
+
+llvm-toolchain-snapshot (1:3.6~svn224810-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Update library filename declaration 3.5 => 3.6 (Closes: #772006)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 05 Dec 2014 17:46:56 -0800
+
+llvm-toolchain-snapshot (1:3.6~svn221998-1~exp1) experimental; urgency=medium
+
+  * Disable ocaml binding. Needs libctypes-ocaml 0.3.3 which is not available
+  * libllvm*.a is not longer built
+  * Update of the libclang symbols
+  * Improve the copyright file. Thanks to Dann Frazier (Closes: #766778)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 04 Nov 2014 14:43:28 +0100
+
+llvm-toolchain-snapshot (1:3.6~svn218612-1) unstable; urgency=medium
+
+  * Fix my screw up. Add .1 to the libclang soname to make
+    dpkg-shlibdeps happy
+  * Remove useless dependency on doxygen
+  * scan-build could not find clang binary (Closes: #758998)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 26 Sep 2014 17:05:26 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn218446-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Upload in unstable
+  * Disable the co-instability of lldb & python-lldb
+    (Python stuff conflicts)
+  * Fix bad dependencies on lldb 3.6
+  * Refresh of the list of symbol in libclang
+  * Try to workaround the FTBFS under ppc64el (create an empty directory)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 24 Sep 2014 14:20:49 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn216933-1~exp1) experimental; urgency=medium
+
+  * New snapshot release
+  * sync from 1:3.5~+rc4-2~exp1
+  * libclang-3.6.so should be used instead libclang.so. Update the soname
+    to match the new lib name (Closes: #759538)
+  * Rename liblldb.so to liblldb-3.6.so + update of the soname.
+  * python-clang-3.6 description updated
+  * liblldb-3.6 and python-lldb-3.6 added
+  * lldb-3.6-dev renamed to liblldb-3.6-dev to match the previous changes
+  * Manpages for llvm-ranlib, clang-apply-replacements, pp-trace and clang-tidy
+    added
+  * clang-3.6 should depends on binutils (for ld, at least)
+    (Closes: #751030)
+  * clang/www/analyzer/scripts/dbtree.js removed
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 30 Aug 2014 18:09:20 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn215195-3) unstable; urgency=medium
+
+  * Just like in 3.4 & 3.5, bring back lldb & lldb-dev under mips & mipsel
+  * Ship clang-rename/clang-rename-3.6
+  * Disable libstdc++-header-i386.diff & include-target.diff (merged upstream)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 18 Aug 2014 09:02:30 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn215195-2) unstable; urgency=medium
+
+  * try to build lldb-mi under kfreebsd (kfreebsd-lldb-mi.diff)
+  * kfreebsd-lldb-gdbserver.diff removed (applied upstream)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 11 Aug 2014 08:44:13 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn215195-1) unstable; urgency=medium
+
+  * Upload in unstable
+  * Enable compressed debug sections (Closes: #757002)
+  * Force scan-build to use the same version of clang
+  * Old JIT has been removed. 0050-powerpcspe-fp.diff is useless
+  * try to build lldb-gdbserver under kfreebsd (kfreebsd-lldb-gdbserver.diff)
+  * Second try to fix build under HURD (hurd-EIEIO-undef.diff)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 04 Aug 2014 13:36:15 +0200
+
+llvm-toolchain-3.4 (1:3.4.2-8) unstable; urgency=medium
+
+  * Try to bring back lldb-3.4-dev on mips & mipsel (Closes: #758314)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 16 Aug 2014 22:39:13 +0200
+
+llvm-toolchain-3.4 (1:3.4.2-7) unstable; urgency=medium
+
+  * Upload in unstable
+  * Try to bring back lldb on mips & mipsel
+  * Force scan-build to use the same version of clang
+  * Try to fix hurd (hurd-EIEIO-undef.diff)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 05 Aug 2014 14:40:05 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc4-1) unstable; urgency=medium
+
+  * New snapshot release
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 27 Aug 2014 23:09:59 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc3-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Cherry-pick to commit from upstream (revisions 214906 214907)
+    to improve the gcc compat
+  * Remove scan-build-clang-path.diff (applied upstream)
+  * Just like in 3.4, bring back lldb & lldb-dev under mips & mipsel
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Aug 2014 23:43:06 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc2-1) unstable; urgency=medium
+
+  * Fix the version
+  * try to build lldb-gdbserver under kfreebsd (kfreebsd-lldb-gdbserver.diff)
+  * Second try to fix build under HURD (hurd-EIEIO-undef.diff)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 08 Aug 2014 10:42:13 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc2-1~exp1) unstable; urgency=medium
+
+  * New snapshot release
+  * Enable compressed debug sections (Closes: #757002)
+  * Force scan-build to use the same version of clang
+  * Bring back scan-build-search-path.diff (Closes: #757219)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 04 Aug 2014 13:35:35 +0200
+
+llvm-toolchain-snapshot (1:3.6~svn214630-1~exp1) experimental; urgency=medium
+
+  * New snapshot release (3.5 => 3.6)
+  * Co installation of clang (Closes: #736057)
+    - scan-build => scan-build-3.6
+    - scan-view => scan-view-3.6
+    - asan_symbolize => asan_symbolize-3.6
+  * Refresh of the patches
+  * Install yaml2obj, obj2yaml & verify-uselistorder in llvm-3.6
+  * Remove of pollycc
+  * clang alternatives are managed by llvm-defaults
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 31 Jul 2014 18:12:59 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc1-2) unstable; urgency=medium
+
+  * Sync with 3.4 svn to retrieve some changes:
+  * Replace $(CURDIR)/debian/tmp by a variable
+  * Move the polly installation in the dh_auto_install rules instead
+    of using *.install files. In llvm.org/apt/, I have to sometime disable
+    polly
+  * hurd-EIEIO-undef.diff: try to undef an errno.h to fix the ftbfs
+  * clang-X suggests clang-X-doc (Closes: #755922)
+  * Manage all files using .in mechanism. It will simplify the upgrade of
+    version
+  * Disable lldb for ppc64el. Thanks to Dimitri John Ledkov (Closes: #756380)
+  * Fix the FTBFS under PowerPC. Thanks to Dimitri John Ledkov for the patch
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 24 Jul 2014 11:42:56 +0200
+
+llvm-toolchain-3.5 (1:3.5~+rc1-1) unstable; urgency=medium
+
+  * First RC release of the 3.5 llvm toolchain
+  * Apply lldb-kfreebsd.diff patch to fix FTBFS under KFreeBSD
+    Thanks to Ed Maste
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 23 Jul 2014 08:57:59 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn213451-1) unstable; urgency=medium
+
+  * New snapshot release
+  * If the version of gcc is too old, force the usage of gcc 4.8
+  * Clang will now show the full version. Example: 3.5.0-svn213052-1~exp1
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 19 Jul 2014 15:27:11 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn211669-2) unstable; urgency=medium
+
+  * Remove useless dependency on g++
+  * Use the option stable '-analyzer-config stable-report-filename=true'
+    to the llvm scan-build reports
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 29 Jun 2014 19:13:05 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn211669-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Fix CVE-2014-2893 (Closes: #744817)
+  * Merge with 3.4/debian
+  * Ship lldb-mi in lldb
+  * Remove scan-build-fix-clang-detection.diff (applied upstream)
+  * Ship the compiler-rt static libraries
+  * Running tests respect DEB_BUILD_OPTIONS=parallel=X
+   (Closes: #751943)
+  * Fix FTBFS on powerpc and powerpcspe (Closes: #733890)
+  * Broken library symlink fixed in lldb-3.5 (Closes: #715130)
+  * Fix --use-cc when no absolute path is provided (Closes: #748777)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 25 Jun 2014 07:58:03 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn209039-2) unstable; urgency=medium
+
+  * Provide a link as compatibility with previous lib name (Closes: #748569)
+  * Be less permissive when installing lldb. Remove duplication of the install
+    of liblldb.so.1
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 18 May 2014 20:01:40 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn209039-1) unstable; urgency=medium
+
+  * New snapshot release
+  * Fix the cmake install patch
+  * Disable profile_rt.diff for now
+  * Refresh of libclang1-3.5.symbols
+  * Fix path to /usr/lib/clang/3.5.0/ (Closes upstream #19088)
+  * Fix the wrong dependency declaration on llvm-3.5-tools
+  * Add gnustep & gnustep-devel as suggests of clang-3.5
+  * Add libc6-dev as an explicit dependency of clang-3.5
+  * Build with dh_install --fail-missing
+  * Start to use /usr/bin/foo-X.Y. First step to have several clang versions
+    installed together
+  * Add some missing files:
+    - lli-child-target         - llvm-3.5-runtime
+    - count                    - llvm-3.5-tools
+    - html.tar.gz              - llvm-3.5-doc
+    - ocamldoc.tar.gz          - llvm-3.5-doc
+    - BugpointPasses.so        - llvm-3.5-dev
+    - liblldb*                 - lldb-3.5-dev
+    - clang-apply-replacements - clang-3.5
+    - clang-tidy               - clang-3.5
+    - clang-query              - clang-3.5
+    - pp-trace                 - clang-3.5
+    - lldb-platform            - lldb-3.5
+    - lldb-gdbserver           - lldb-3.5
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 16 May 2014 23:23:50 +0200
+
+llvm-toolchain-3.4 (1:3.4.2-2) unstable; urgency=medium
+
+  * Improve the CVE-2014-2893 fix (Closes: #744817)
+  * Add a check to avoid an error on arch where compiler-rt is not available
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 16 Jun 2014 23:00:47 +0200
+
+llvm-toolchain-3.4 (1:3.4.2-1) unstable; urgency=medium
+
+  * New upstream release
+  * Add build conflict on libllvm-3.5-ocaml-dev
+  * Also disable lldb tests under armel (like armhf). Timeout
+  * Update of the repack script
+  * Use llvm-3.4-dev.links.in to manage the symlinks
+  * Fix the soname of liblldb.so to see it treated as a real library
+    (Closes: #750868)
+  * Switch to the default gcc/g++ compiler. Currently 4.9 (Closes: #751322)
+  * Fixes CVE-2014-2893 (Closes: #744817)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 06 Jun 2014 15:55:57 +0200
+
+llvm-toolchain-3.4 (1:3.4.1-4) unstable; urgency=medium
+
+  * Be less permissive when installing lldb. Remove duplication of the install
+    of liblldb.so.1
+  * Add symlinks lldb-3.4, lldb-platform-3.4 & lldb-gdbserver-3.4 without 3.4
+  * Clang was unusable with libstdc++ from gcc 4.9 (Closes: #744792)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 18 May 2014 20:18:19 +0200
+
+llvm-toolchain-3.4 (1:3.4.1-3) unstable; urgency=medium
+
+  * Fix path for arch without support of compiler-rt. Should fix most of the
+    FTBFS
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 16 May 2014 15:27:37 +0200
+
+llvm-toolchain-3.4 (1:3.4.1-2) unstable; urgency=medium
+
+  * Fix the soname. No changes in the ABI, so, no need to update the soname
+    (Closes: #747701)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 11 May 2014 17:29:22 +0200
+
+llvm-toolchain-3.4 (1:3.4.1-1) unstable; urgency=medium
+
+  * New upstream release. Note that only LLVM & Clang had a new release.
+    I just copied the 3.4 tarballs for clang-extra-tools, polly, lldb and
+    compiler-rt.
+  * 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
+  * Fix the version in the symbol list (libclang1-3.4.symbols)
+  * Update the path regarding upstream changed (3.4 => 3.4.1)
+    (Patch improved also by Martin Nowack)
+  * Remove generated file libllvm3.4.install
+  * Add gnustep & gnustep-devel as suggests of clang-3.4
+  * Add libc6-dev as an explicit dependency of clang-3.4
+  * Build with dh_install --fail-missing
+  * Start to use /usr/bin/foo-X.Y. First step to have several clang versions
+    installed together
+  * Add some missing files:
+    - lli-child-target         - llvm-3.4-runtime
+    - count                    - llvm-3.4-tools
+    - html.tar.gz              - llvm-3.4-doc
+    - ocamldoc.tar.gz          - llvm-3.4-doc
+    - BugpointPasses.so        - llvm-3.4-dev
+    - liblldb*                 - lldb-3.4-dev
+    - lldb-platform-3.4        - lldb-3.4
+    - clang-apply-replacements - clang-3.4
+    - clang-tidy               - clang-3.4
+    - pp-trace                 - clang-3.4
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 09 May 2014 19:57:33 +0200
+
+llvm-toolchain-snapshot (1:3.5~svn200375-1) unstable; urgency=medium
+
+  * New snapshot release
+  * polly unnopstream is now using the isl trunk. Disabling it for now.
+  * Only explicit the link against atomic when running mips & mipsel
+  * Fix the cindex.py declaration (3.3 => 3.5). Closes upstream bug #18365
+  * Bring back the dependency on gcc 4.8. It breaks the nightly snapshot
+    packages and it should be the norm now...
+
+  [ Martin Nowack ]
+  * Fixed build directory for llvm-config
+  * Add Unittests for running tests for llvm-based projects
+  * Install FileCheck and not for testing
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 29 Jan 2014 07:36:29 -0800
+
+llvm-toolchain-snapshot (1:3.5~svn199601-1) unstable; urgency=low
+
+  * New snapshot release
+  * Update clang-format declaration from 3.4 => 3.5. Closes upstream bug #18451
+  * Fix the cindex.py declaration (3.3 => 3.5). Closes upstream bug #18365
+  * Force gcc 4.8. LLVM & Co are now in C++ 11.
+  * Also make clang-3.5 breaks/replaces clang. Conflicts on
+    /usr/share/clang/scan-view/ScanView.py (Closes: #730266)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 15 Jan 2014 15:08:03 +0100
+
+llvm-toolchain-snapshot (1:3.5~svn197556-1) unstable; urgency=low
+
+  * New snapshot release
+  * Merge changes from 1:3.4~+rc3-1
+  * Disable much of the display of the lldb display
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 17 Dec 2013 12:02:52 +0100
+
+llvm-toolchain-snapshot (1:3.5~svn195337-1) unstable; urgency=low
+
+  * Sync from 3.4~+rc2-1
+  * Make lldb 3.5 also conflict with 3.4 (Closes: #730163)
+  * Make python-clang 3.5 also conflict with 3.4 (Closes: #730164)
+  * Fix a FTBFS with clang
+  * Refresh the /usr/include/clang mess
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 10 Dec 2013 09:57:15 +0100
+
+llvm-toolchain-snapshot (1:3.5~svn195337-1) unstable; urgency=low
+
+  * Switch from 3.4 to 3.5
+  * Remove patch 0046-Revert-Patch-to-set-is_stmt-a-little-better-for-prol.patch
+    Useless now and missleading
+  * Standards-Version updated to 3.9.5
+  * kfreebsd.diff remove (applied upstream)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Nov 2013 21:24:28 +0100
+
+llvm-toolchain-3.4 (1:3.4-2) unstable; urgency=medium
+
+  * Only explicit the link against atomic when running mips & mipsel
+  * Fix the cindex.py declaration (3.3 => 3.5). Closes upstream bug #18365
+  * Bring back the dependency on gcc 4.8. It breaks the nightly snapshot
+    packages and it should be the norm now...
+  * Introduce llvm-3.4-tools to contain the new files needed by Martin
+
+  [ Matthias Klose ]
+  * Disable the lldb build for AArch64.
+  * Don't run the lldb tests on armhf (time out on the buildd).
+
+  [ Martin Nowack ]
+  * Fixed build directory for llvm-config
+  * Add Unittests for running tests for llvm-based projects
+  * Install FileCheck and not for testing
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 11 Feb 2014 11:19:21 +0100
+
+llvm-toolchain-3.4 (1:3.4-1) unstable; urgency=medium
+
+  * New upstream release
+  * Remove explicit dep on gcc 4.8
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 20 Dec 2013 18:36:58 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc3-1ubuntu4) trusty; urgency=medium
+
+  * Rebuild for ocaml-4.01.
+
+ -- Matthias Klose <doko@ubuntu.com>  Mon, 23 Dec 2013 12:11:17 +0000
+
+llvm-toolchain-3.4 (1:3.4~+rc3-1ubuntu3) trusty; urgency=low
+
+  * Bring over Ubuntu changes from 3.3:
+    - Revert to using the static copy of libjsoncpp, since the shared
+      library lacks sane versioning, and this is only a few thousand
+      lines of cargo-culted code from a reasonably stagnant upstream.
+    - Drop lcov build-dep to avoid pulling it into main, due to its
+      being fundamentally incompatibe with our newer GCC versions.
+
+ -- Matthias Klose <doko@ubuntu.com>  Fri, 20 Dec 2013 12:59:01 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc3-1ubuntu2) trusty; urgency=low
+
+  * Don't run the lldb tests on armhf (time out on the buildd).
+
+ -- Matthias Klose <doko@ubuntu.com>  Wed, 18 Dec 2013 12:29:56 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc3-1ubuntu1) trusty; urgency=low
+
+  * Disable the lldb build for AArch64.
+  * Build-depend on gcc-multilib on amd64 and i386.
+
+ -- Matthias Klose <doko@ubuntu.com>  Tue, 17 Dec 2013 18:44:50 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc3-1) unstable; urgency=low
+
+  * New testing upstream release
+  * Relative call in the chroot without proc failed.
+    See: fix-an-issue-in-chroot-witout-proc.diff
+  * Bring back lldb-link-atomic.diff to make sure lldb builds under
+    powerpc
+  * Also limit the number of archs for liblldb-dev
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 17 Dec 2013 11:27:40 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc2-3) unstable; urgency=low
+
+  * Fix the bad declaration on the lldb desactivation
+  * Also disable lldb under powerpc
+  * Hopefully, fix lldb under Kfreebsd-* (thanks to Ed Maste if it works)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 04 Dec 2013 23:53:49 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc2-2) unstable; urgency=low
+
+  * Add the Ocaml ABI dependency (Closes: #731344)
+  * Disable LLDB also for ia64, mips & mipsel
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 04 Dec 2013 15:37:39 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc2-1) unstable; urgency=low
+
+  * New testing upstream release
+  * 0047-version-name.diff ocamldoc.diff removed (applied upstream)
+  * r600 is now compiled by default (remove the configure arg)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 03 Dec 2013 10:25:59 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc1-3) unstable; urgency=low
+
+  * Remove the usage of --with-c-include-dirs, --with-cxx-include-root,
+    --with-cxx-include-arch and --with-cxx-include-64bit-dir
+    It was blocking the automatic detection of the path of clang.
+    In particular in the context of the usage of -target.
+    However, it does not completely fix the detection of the i386 C++ path.
+    See the next item.
+    (Closes: #729933)
+  * Bring back the path to libstdc++ under i386. Still not fixed upstream
+    (Closes: #730857)
+  * Define also MAXPATHLEN in Path.inc for HURD.
+  * Silent the trillion of warnings in the LLDB Python wrapper (swig generated)
+    See silent-swig-warning.diff
+  * Silent some i386 tests failing (it is expected)
+    See silent-MCJIIT-tests.diff
+  * Make lldb 3.4 also conflict with 3.5 (Closes: #730163)
+  * Make python-clang 3.4 also conflict with 3.5 (Closes: #730164)
+  * Port LLVM to mips64el. Thanks to YunQiang Su. Initially done for
+    3.3 and ported on the 3.4 (Closes: #730808)
+  * If we get an unexpected pass, do not break the tests
+    do-not-fail-on-unexpected-pass.diff (I am disabling some tests)
+  * Fix the path detection of the objective h headers.
+  * Also add usr/lib/llvm-3.4/lib/clang/3.4/include =>
+    usr/lib/clang/3.4/include symlink to simplify the path detection
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 01 Dec 2013 17:49:46 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc1-2) unstable; urgency=low
+
+  * Force the build to gcc 4.8... gcc 4.6 used on some Debian archs does not
+    support some C++ features.
+  * Fail the build when llvm tests are failing under amd64 + i386. More to come.
+  * Fix a libclang.so.1 issue during the clang tests
+  * Improve the patch 23-strlcpy_strlcat_warning_removed.diff
+    (also remove the tests)
+  * Make lldb 3.4 also conflict with 3.5 (Closes: #730163)
+  * Make python-clang 3.4 also conflict with 3.5 (Closes: #730164)
+  * Remove usr/lib/llvm-3.4/build/autoconf/LICENSE.TXT
+  * silent warning "manpage-has-useless-whatis-entry" in lldb-3.4
+  * silent warning "package-name-doesnt-match-sonames libclang1"
+  * Refresh patch kfreebsd_v2.diff to, maybe, fix lldb build under kfreebsd.
+    Thanks to Ed Maste for the patch.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 26 Nov 2013 18:32:49 +0100
+
+llvm-toolchain-3.4 (1:3.4~+rc1-1) unstable; urgency=low
+
+  * New testing upstream release
+  * kfreebsd.diff removed. Applied upstream
+  * Remove patch 0046-Revert-Patch-to-set-is_stmt-a-little-better-for-prol.patch
+    Useless now and missleading
+  * Branch from llvm-toolchain-snapshot
+  * Standards-Version updated to 3.9.5
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 20 Nov 2013 21:24:28 +0100
+
+llvm-toolchain-snapshot (1:3.4~svn194079-1) unstable; urgency=low
+
+  * New snapshot release
+  * Also install clang 3.4 examples (clang-3.4-examples) (Closes: #728260)
+  * Move c-index-test* from llvm-3.4 => clang-3.4. It was triggering an
+    unnecessary dependency from llvm-3.4 to libclang
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 01 Nov 2013 05:19:55 +0100
+
+llvm-toolchain-snapshot (1:3.4~svn193628-1) unstable; urgency=low
+
+  * New snapshot release
+    - Fix the scan-build warning (Closes: #725332)
+  * Merge changes from the 3.3 branch (see 1:3.3-12)
+  * Add lldb-3.4-dev package
+  * Remove mipsel-ftbfs.diff (applied upstream)
+  * Add support of coverity checker (non-free and not packaged)
+  * libprofile_rt and runtime has been removed upstream (r191835)
+    Features are provided by compiler-rt
+  * Update the build dependency from tcl8.5 to tcl (Closes: #725954)
+  * clang-modernize-3.4 was not coinstallable with clang 3.4
+    (Closes: #724245)
+  * The package wasn't cleaned correctly (Closes: #722155)
+  * libtinfo-dev is now a dependency of llvm-3.4-dev (Closes: #727129)
+  * Install libclang.so in /usr/lib/*/libclang-3.4.so
+  * Install libclang.so.1 in /usr/lib/*/libclang-3.4.so.1
+  * Also ship the python clang binding (python-clang-3.4)
+  * Enable polly if the dependencies are OK (only Debian unstable for now)
+  * Bring back /usr/lib/llvm-3.4/lib/libclang.so (libclang-3.4-dev) and
+    /usr/lib/llvm-3.4/lib/libclang.so.1 (libclang1-3.4)
+  * Honor the option "nocheck"
+  * Disable the build of lldb under HURD
+  * Ship the lldb headers into lldb-X.Y-dev (Closes: #723743)
+    I might create a liblldb-X.Y library at some point but I think it is too
+    early.
+  * Update the build dependency from tcl8.5 to tcl (Closes: #725953)
+  * Update of the clang descriptions (Closes: #727684)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 29 Oct 2013 17:56:18 +0100
+
+llvm-toolchain-snapshot (1:3.4~svn190846-1) unstable; urgency=low
+
+  * New snapshot release
+  * Merge changes from the 3.3 branch (see 1:3.3-9)
+  * Remove ia64-fix.diff (applied upstream)
+  * cpp11-migrate renamed to clang-modernize
+  * lldb-3.4 is back to Architectures: any
+  * Patch lldb-hurd.diff removed (applied upstream)
+  * Directory www/ from tarballs polly & lldb removed
+  * Update of the description of LLVM packages
+    (LLVM no longer mean Low Level Virtual Machine)
+
+  [ Luca Falavigna ]
+  * debian/control:
+    - Add llvm-3.4-dev to lldb-3.4 Depends field.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 05 Sep 2013 12:04:35 +0200
+
+llvm-toolchain-3.3 (1:3.3-9) unstable; urgency=low
+
+  [ Luca Falavigna ]
+  * debian/control:
+    - Add llvm-3.3-dev to lldb-3.3 Depends field (Closes: #715129).
+
+  [ Sylvestre Ledru ]
+  * Only use -fuse-ld=gold on supported distribution. Simplify the
+    backports.
+  * Fix  'bits/c++config.h' file not found under i386
+    See libstdc++-header-i386.diff. (Closes: #714890)
+  * Add more fixes for the HURD port... (but still fails)
+
+  [ Robert Millan ]
+  * clang under KfFreeBSD was not exporting the correct defines
+    (Closes: #721880)
+
+  [ Jon Severinsson ]
+  * Merge from llvm-toolchain-3.2 branch up to 3.2repack-11.
+  * Drop auto-generated file debian/libllvm3.3.install.
+  * Automatically determine GCC_VERSION and dep:devlibs based on g++ package
+    version.
+  * Automatically determine if -fuse-ld=gold is supported based on binutils
+    package version.
+
+  [ Adam Conrad ]
+  * debian/patches/lldb-link-atomic.diff: Link lldb with -latomic to get
+    builtin GCC atomic helpers on arches (like powerpc) that need them.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 26 Aug 2013 14:48:42 +0200
+
+llvm-toolchain-3.3 (1:3.3-8) unstable; urgency=low
+
+  [ Sylvestre Ledru ]
+  * Fix another issues under HURD...
+
+  [ Luca Falavigna ]
+  * debian/patches/libprofile_rt_sparc.patch:
+    - Re-enable libprofile_rt on Sparc, fix FTBFS.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 23 Aug 2013 15:02:05 +0200
+
+llvm-toolchain-3.3 (1:3.3-7) unstable; urgency=low
+
+  * debhelper version 9.20130720 fails on the call to dh_auto_clean
+    Remove it. It was anyway useless.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 22 Aug 2013 14:28:25 +0200
+
+llvm-toolchain-3.3 (1:3.3-6) unstable; urgency=low
+
+  * Fix the FTBFS under hurd and KFreeBSD
+  * Do not remove all *.o in tests. Some of them are from upstream source
+    tarball. Thanks to Maarten Lankhorst for the fix.
+  * Fix the lintian error 'lldb-3.3: postinst-must-call-ldconfig'
+  * Add the manpages of clang-format-3.3
+  * Overrides the manpages warnings
+  * Also apply unwind-chain-inclusion.diff from the snapshot branch to make sure
+    we can build the package locally even if libclang-dev is installed
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 22 Aug 2013 09:01:04 +0200
+
+llvm-toolchain-3.3 (1:3.3-5) unstable; urgency=low
+
+  * Install llvm-c headers also in usr/include/llvm-3.3/llvm-c
+  * Fix the FTBFS under mips & mipsel
+  * Refresh of the kfreebsd i386 patch
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 07 Aug 2013 13:12:23 +0200
+
+llvm-toolchain-3.3 (1:3.3-4) unstable; urgency=low
+
+  * Use the static library libjsoncpp.a instead of the ship library in polly
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 11 Aug 2013 09:54:17 +0200
+
+llvm-toolchain-snapshot (1:3.4~svn185325-1) unstable; urgency=low
+
+  * binutils-gold no longer exists. Use -fuse-ld=gold instead.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 01 Aug 2013 14:06:38 +0200
+
+llvm-toolchain-snapshot (1:3.3-2) unstable; urgency=low
+
+  * Fix warning python-script-but-no-python-dep on clang-format-X.Y
+  * manpages are generated during build time (simplifies maintenance)
+  * Fix duplicate underscore.js and jquery.js
+  * Move libjs-jquery & libjs-underscore dependencies to llvm-X.Y-doc
+  * Add lldb-X.Y manpage
+  * Hopefully fix the ftbfs under mipsel (mipsel-ftbfs.diff)
+  * Disable the usage of binutils-gold under armel. It currently fails with:
+    "attempt to map 2752512 bytes at offset 2066666 exceeds size of file;
+    the file may be corrupt"
+
+  [ Léo Cavaillé ]
+  * Add patch to find correctly LLVMGold.so with -O4 (Closes: #712437)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 20 Jun 2013 15:39:11 +0200
+
+llvm-toolchain-snapshot (1:3.4~svn184294-1~exp1) experimental; urgency=low
+
+  * New snapshot release
+  * Improve some scripts and fix cpp11-migrate install from
+    clang-tools-extra.
+  * Fix "versionless" clang manpages install.
+  * Fix Toolchain patch from change of scope (add namespaces).
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 19 Jun 2013 14:20:12 +0200
+
+llvm-toolchain-snapshot (1:3.4~svn183914-1) unstable; urgency=low
+
+  * New snapshot release
+  * Upload to unstable (will be blocked by a RC bug)
+  * Sync changes from llvm-toolchain-3.3:
+    - Introduce cpp11-migrate-3.4 and clang-format-3.4
+    - Install the vim llvm script at the right place
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 13 Jun 2013 18:47:08 +0200
+
+llvm-toolchain-snapshot (1:3.4~svn182733-1~exp1) experimental; urgency=low
+
+   * New snapshot release (3.4 release)
+   * Add a symlink of libLLVM-3.4.so.1 to usr/lib/llvm-3.4/lib/libLLVM-3.4.so
+       to fix make the llvm-config-3.4 --libdir work (Closes: #708677)
+     * Various packages rename to allow co installations:
+       * libclang1 => libclang1-3.4
+       * libclang1-dbg => libclang1-3.4-dbg
+       * libclang-dev => libclang-3.4-dev
+       * libclang-common-dev => libclang-common-3.4-dev
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 27 May 2013 15:01:57 +0200
+
+llvm-toolchain-snapshot (1:3.3~svn179851-1~exp1) experimental; urgency=low
+
+  * Draft of a snapshot release (3.3)
+  * Enable r600 experimental backend
+  * Improve the dependencies:
+    * clang-3.3 depends on the exact same libllvm3.3 release
+    * idem for lldb-3.3
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 19 Apr 2013 09:31:38 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-11) unstable; urgency=low
+
+  * dh_auto_clean removed, just like in the 3.3
+  * Use the static library libjsoncpp.a instead of shipping library in polly
+    Backport of the modification of 3.3
+
+  [ Adam Conrad ]
+  * Revive deltas from the previous Ubuntu versions of llvm and clang:
+    - debian/patches/35-ubuntu-releases.diff: Add UbuntuSaucy to table.
+    - debian/patches/JITEmitter.patch: Fix a segfault in the exception
+      table of the JIT code emitter (See Launchpad bug #1160587)
+
+  [ Luca Falavigna ]
+  * debian/patches/libprofile_rt_sparc.patch:
+    - Re-enable libprofile_rt on Sparc, fix FTBFS.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Fri, 23 Aug 2013 11:49:09 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-10) unstable; urgency=low
+
+  * Fix the wrong package declaration on libstdc++-4.8-dev (Closes: #713944)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 24 Jun 2013 23:00:47 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-9) unstable; urgency=low
+
+  * Switch to libstdc++ 4.8 instead of 4.7 for the headers (Closes: #712520)
+  * Depends against libobjc-4.8-dev and libgcc-4.8-dev
+  * Disable the usage of binutils-gold under armel. It currently fails with:
+      "attempt to map 2752512 bytes at offset 2066666 exceeds size of file;
+      the file may be corrupt"
+  * Add DEBUGMAKE=1 to get information about compiler-rt compilation
+  * Fix "libclang-common-dev: missing-depends-line"
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 22 Jun 2013 07:38:41 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-8) unstable; urgency=low
+
+  * Fix the build under ia64. Thanks to Luca Falavigna for the patch
+    (ia64-fix.diff)
+  * Disable lldb-3.2:
+    - the quality is not good enough
+    - We have lldb-3.3 now in the archive
+    - Too many backported patches would be necessary for lldb-3.2 to work
+    - It blocks some important transitions (mesa)
+  * Add the detection of Ubuntu saucy
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 03 Jun 2013 11:32:29 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-7) unstable; urgency=low
+
+  * For now, enable only lldb for amd64 and i386 (blocks too many things)
+    (Bis) (Closes: #707866)
+  * Add a symlink of libLLVM-3.2.so.1 to usr/lib/llvm-3.2/lib/libLLVM-3.2.so
+    to fix make the llvm-config-3.2 --libdir work (Closes: #708677)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Mon, 27 May 2013 13:20:30 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-6) unstable; urgency=low
+
+  * Create the compiler-rt directory to make the install of compiler-rt works
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 18 May 2013 18:08:52 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-5) unstable; urgency=low
+
+  * For now, enable only lldb for amd64 and i386 (blocks too many things)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 18 May 2013 10:24:04 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-4) unstable; urgency=low
+
+  * Add several patches which, hopefully, will fix the build under ARM, S390,
+    S390X, etc (lldb-apple_only.diff, lldb-user-remove.diff & lldb-hurd.diff)
+  * Include sys/wait.h also under kfreebsd (kfreebsd-thread.diff)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 15 May 2013 12:04:24 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-3) unstable; urgency=low
+
+  * Before the configure, show which version of CC is being used.
+  * Add support of kfreebsd and hurd in lldb (kfreebsd-hurd-lldb.diff)
+  * Force the usage of gcc 4.7 for all archs. Should fix some FTBFS
+    (Closes: #707866)
+  * Fix the symlink on clang++.1.gz llvm-clang.1.gz (Closes: #707832)
+
+  [ Jon Severinsson ]
+  * Re-enable the r600 backend and update it to the mesa-9.1.1 tag.
+   (Closes: #708009)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 14 May 2013 12:10:07 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-2) unstable; urgency=low
+
+  * Do not depend on libobjc-4.7-dev & libgcc-4.7-dev.
+    They are still only in experimental
+  * Disable the usage of binutils-gold under [powerpc powerpcspe ppc64 sparc
+    sparc64] to fix FTBFS
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Tue, 07 May 2013 13:15:20 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-1) unstable; urgency=low
+
+  * Upload to unstable
+  * Standards-Version update to 3.9.4
+  * clang pure virtual function call crash with binaries built with C++11's
+    std::thread. Upstream commit 178816 (Closes: #705838)
+  * Introduce a symbols file for libclang1 (Closes: #705672)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 21 Apr 2013 14:06:23 +0200
+
+llvm-toolchain-3.2 (1:3.2repack-1~exp4) experimental; urgency=low
+
+  * Build using binutls-gold to improve the quality of the binaries.
+    See: http://allievi.sssup.it/techblog/?p=791
+  * Detect the vendor (Debian or Ubuntu) and update the configuration
+  * Port to powerpcspe. Thanks to Roland Stigge (Closes: #701587)
+    See: 31-powerpcspe.diff
+  * Fix the path detection of scan-build (Closes: #698352)
+    See: 32-scan-build-path.diff
+  * debian/patches/r600-snapshot.diff: Move backports into individual patches.
+  * debian/patches/r600-snapshot.diff: Update to mesa-9.1 git tag.
+    (Closes: #703671, #697356)
+  * Fix a typo in the detection of the vendor
+
+  [ Peter Michael Green ]
+  * Use binutils-gold only on architectures where it is actually available
+  * 33-armhf-defaults.diff Fix defaults to use correct CPU and FPU for
+    debian  armhf (Closes: #704111)
+  * 34-powerpc-no-altivec.diff disable altivec by default on powerpc because
+    debian powerpc does not require altivec (patch cherry picked from ubuntu)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Thu, 14 Mar 2013 17:47:12 +0100
+
+llvm-toolchain-3.2 (1:3.2repack-1~exp3) experimental; urgency=low
+
+  * Remove package "clang". It is now provided by llvm-defaults.
+  * Fix some issues relative to the epoch change
+  * Fix a wrong path in the _lldb.so Python symlink
+  * Install cmake files to build LLVM extensions (Closes: #701153)
+  * Remove the embedded copy of libjs-jquery (Closes: #701087)
+  * Fix the install of lli manpage (Closes: #697117)
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sun, 17 Feb 2013 12:05:15 +0100
+
+llvm-toolchain-3.2 (1:3.2repack-1~exp2) experimental; urgency=low
+
+  * Install the python files for lldb. Thanks to Daniel Malea for spotting this.
+  * Update of the clean target
+  * Introduce an epoch to match the changes in bug #699899
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Wed, 13 Feb 2013 12:22:30 +0100
+
+llvm-toolchain-3.2 (3.2repack-1~exp1) experimental; urgency=low
+
+  * Build the whole LLVM toolchain at once. This includes:
+    - LLVM
+    - Clang
+    - compiler-rt
+    - lldb
+    - polly
+  * Also install clang-check & clang-tblgen in the clang-3.2 package
+  * Fix the patch detection of clang from scan-build (Closes: #698352)
+  * debian/patches/0050-powerpcspe-fp.diff: Add, hopefully fix FTBFS on
+    powerpcspe, by disabling save / restore of floating point registers which
+    don't exist on powerpcspe. Thanks to Roland Stigge for the patch.
+    (Closes: #696474)
+  * libLLVM-3.2.so.1 is now shipped only once (Closes: #696913)
+  * Enable RTTI (Closes: #697754)
+  * Introduce lldb as a new package (Closes: #698601)
+  * Add a script pollycc which will call clang with the right arguments.
+  * Use __builtin___clear_cache on ARM to fix a clang bug.
+    Thanks to Matthias Klose.
+
+ -- Sylvestre Ledru <sylvestre@debian.org>  Sat, 09 Feb 2013 12:14:10 +0100
diff --git a/clang-X.Y-doc.docs.in b/clang-X.Y-doc.docs.in
new file mode 100644 (file)
index 0000000..b3cc6a0
--- /dev/null
@@ -0,0 +1,2 @@
+tools/clang/docs/_build/html/
+
diff --git a/clang-X.Y-examples.examples.in b/clang-X.Y-examples.examples.in
new file mode 100644 (file)
index 0000000..49cbc5f
--- /dev/null
@@ -0,0 +1 @@
+clang/examples/*
diff --git a/clang-X.Y.install.in b/clang-X.Y.install.in
new file mode 100644 (file)
index 0000000..5ed3ee9
--- /dev/null
@@ -0,0 +1,42 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/clang
+usr/lib/llvm-@LLVM_VERSION@/bin/clang++
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-check
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-apply-replacements
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-query
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-rename
+usr/lib/llvm-@LLVM_VERSION@/bin/scan-view
+usr/lib/llvm-@LLVM_VERSION@/bin/scan-build
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-cl
+usr/lib/llvm-@LLVM_VERSION@/bin/sancov
+usr/lib/llvm-@LLVM_VERSION@/share/scan-view/
+usr/lib/llvm-@LLVM_VERSION@/share/scan-build/
+usr/lib/llvm-@LLVM_VERSION@/share/man/man1/scan-build.1
+usr/lib/llvm-@LLVM_VERSION@/libexec/ccc-analyzer
+usr/lib/llvm-@LLVM_VERSION@/libexec/c++-analyzer
+usr/lib/llvm-@LLVM_VERSION@/bin/modularize
+usr/lib/llvm-@LLVM_VERSION@/bin/c-index-test
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-include-fixer
+usr/lib/llvm-@LLVM_VERSION@/bin/find-all-symbols
+
+tools/clang/tools/scan-build-@LLVM_VERSION@      usr/share/clang/
+tools/clang/tools/scan-build-py-@LLVM_VERSION@      usr/share/clang/
+tools/clang/tools/scan-view-@LLVM_VERSION@       usr/share/clang/
+#usr/share/man/man1/clang.1     usr/share/man/man1/
+usr/lib/llvm-@LLVM_VERSION@/lib/cmake/clang/*.cmake usr/share/llvm-@LLVM_VERSION@/cmake/
+usr/lib/llvm-@LLVM_VERSION@/share/clang/run-find-all-symbols.py
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-include-fixer.py
+
+usr/bin/clang-@LLVM_VERSION@
+usr/bin/clang++-@LLVM_VERSION@
+usr/bin/clang-check-@LLVM_VERSION@
+usr/bin/clang-apply-replacements-@LLVM_VERSION@
+usr/bin/clang-query-@LLVM_VERSION@
+usr/bin/clang-rename-@LLVM_VERSION@
+usr/bin/sancov-@LLVM_VERSION@
+usr/bin/clang-cl-@LLVM_VERSION@
+usr/bin/modularize-@LLVM_VERSION@
+usr/bin/scan-build-@LLVM_VERSION@
+usr/bin/scan-view-@LLVM_VERSION@
+usr/bin/c-index-test-@LLVM_VERSION@
+usr/bin/find-all-symbols-@LLVM_VERSION@
+usr/bin/clang-include-fixer-@LLVM_VERSION@
diff --git a/clang-X.Y.links.in b/clang-X.Y.links.in
new file mode 100644 (file)
index 0000000..8880fe6
--- /dev/null
@@ -0,0 +1,4 @@
+usr/share/clang/scan-build-@LLVM_VERSION@/bin/scan-build  usr/bin/scan-build-@LLVM_VERSION@
+usr/share/clang/scan-build-py-@LLVM_VERSION@/bin/scan-build  usr/bin/scan-build-py-@LLVM_VERSION@
+usr/share/clang/scan-view-@LLVM_VERSION@/bin/scan-view    usr/bin/scan-view-@LLVM_VERSION@
+
diff --git a/clang-X.Y.lintian-overrides.in b/clang-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..ab2dbae
--- /dev/null
@@ -0,0 +1,9 @@
+# I know but well...
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check.1.gz
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view.1.gz
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-apply-replacements-@LLVM_VERSION@.1.gz
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-check-@LLVM_VERSION@.1.gz
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-tblgen-@LLVM_VERSION@.1.gz
+clang-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/scan-view-@LLVM_VERSION@.1.gz
+# Does not link otherwise
+clang-@LLVM_VERSION@: embedded-library usr/lib/llvm-@LLVM_VERSION@/bin/clang: libjsoncpp
diff --git a/clang-X.Y.manpages.in b/clang-X.Y.manpages.in
new file mode 100644 (file)
index 0000000..5e6881f
--- /dev/null
@@ -0,0 +1,11 @@
+clang/docs/_build/man/clang-@LLVM_VERSION@.1
+clang/tools/scan-build/man/scan-build-@LLVM_VERSION@.1
+debian/man/clang-check-@LLVM_VERSION@.1
+debian/man/clang-rename-@LLVM_VERSION@.1
+debian/man/clang-query-@LLVM_VERSION@.1
+debian/man/clang-apply-replacements-@LLVM_VERSION@.1
+debian/man/sancov-@LLVM_VERSION@.1
+debian/man/scan-view-@LLVM_VERSION@.1
+debian/man/modularize-@LLVM_VERSION@.1
+debian/man/find-all-symbols-@LLVM_VERSION@.1
+debian/man/clang-include-fixer-@LLVM_VERSION@.1
diff --git a/clang-format-X.Y.install.in b/clang-format-X.Y.install.in
new file mode 100644 (file)
index 0000000..d3a18a5
--- /dev/null
@@ -0,0 +1,10 @@
+clang/tools/clang-format/clang-format-@LLVM_VERSION@.py usr/share/vim/addons/syntax/
+clang/tools/clang-format/clang-format-diff-@LLVM_VERSION@ /usr/bin/
+usr/bin/clang-format-@LLVM_VERSION@
+usr/bin/git-clang-format-@LLVM_VERSION@
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-format
+usr/lib/llvm-@LLVM_VERSION@/bin/git-clang-format
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-format-diff.py usr/share/clang/clang-format-@LLVM_VERSION@/
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-format.py usr/share/clang/clang-format-@LLVM_VERSION@/
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-format.el usr/share/emacs/site-lisp/clang-format-@LLVM_VERSION@/
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-format-sublime.py usr/share/clang/clang-format-@LLVM_VERSION@/
diff --git a/clang-format-X.Y.lintian-overrides.in b/clang-format-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..aa78679
--- /dev/null
@@ -0,0 +1,4 @@
+# I know but well...
+clang-format-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-format-diff-@LLVM_VERSION@.1.gz
+clang-format-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-format-@LLVM_VERSION@.1.gz
+
diff --git a/clang-format-X.Y.manpages.in b/clang-format-X.Y.manpages.in
new file mode 100644 (file)
index 0000000..db4dd8f
--- /dev/null
@@ -0,0 +1,3 @@
+debian/man/clang-format-diff-@LLVM_VERSION@.1
+debian/man/clang-format-@LLVM_VERSION@.1
+
diff --git a/clang-tidy-X.Y.install.in b/clang-tidy-X.Y.install.in
new file mode 100644 (file)
index 0000000..ef992c5
--- /dev/null
@@ -0,0 +1,5 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-tidy
+usr/lib/llvm-@LLVM_VERSION@/share/clang/run-clang-tidy.py
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-tidy-diff.py
+
+usr/bin/clang-tidy-@LLVM_VERSION@
diff --git a/clang-tidy-X.Y.links.in b/clang-tidy-X.Y.links.in
new file mode 100644 (file)
index 0000000..5d959f4
--- /dev/null
@@ -0,0 +1,3 @@
+usr/lib/llvm-@LLVM_VERSION@/share/clang/run-clang-tidy.py usr/bin/run-clang-tidy-@LLVM_VERSION@.py
+usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-tidy-diff.py usr/bin/clang-tidy-diff-@LLVM_VERSION@.py
+
diff --git a/clang-tidy-X.Y.lintian-overrides.in b/clang-tidy-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..c915da6
--- /dev/null
@@ -0,0 +1,3 @@
+# I know but well...
+clang-tidy-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/clang-tidy-@LLVM_VERSION@.1.gz
+
diff --git a/clang-tidy-X.Y.manpages.in b/clang-tidy-X.Y.manpages.in
new file mode 100644 (file)
index 0000000..fa4a814
--- /dev/null
@@ -0,0 +1 @@
+debian/man/clang-tidy-@LLVM_VERSION@.1
diff --git a/compat b/compat
new file mode 100644 (file)
index 0000000..ec63514
--- /dev/null
+++ b/compat
@@ -0,0 +1 @@
+9
diff --git a/control b/control
new file mode 100644 (file)
index 0000000..fd2578a
--- /dev/null
+++ b/control
@@ -0,0 +1,525 @@
+Source: llvm-toolchain-3.9
+Section: devel
+Priority: optional
+Maintainer: LLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
+Uploaders: Sylvestre Ledru <sylvestre@debian.org>
+Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect,
+    cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9),
+    lsb-release, patchutils, diffstat, xz-utils, python-dev,
+    libedit-dev, swig, python-six, python-sphinx, binutils-dev,
+    libjsoncpp-dev,
+    lcov, procps, help2man, zlib1g-dev,
+    ocaml-nox [amd64 arm64 armel armhf i386],
+    ocaml-findlib [amd64 arm64 armel armhf i386],
+    libctypes-ocaml-dev [amd64 arm64 armel armhf i386],
+    dh-ocaml [amd64 arm64 armel armhf i386],
+    g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32]
+Build-Conflicts: oprofile, ocaml, libllvm-3.4-ocaml-dev, libllvm-3.5-ocaml-dev,
+  libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev
+Standards-Version: 3.9.8
+Homepage: http://www.llvm.org/
+Vcs-Svn: svn://anonscm.debian.org/svn/pkg-llvm/llvm-toolchain/branches/3.9/
+Vcs-Browser: https://svn.debian.org/viewsvn/pkg-llvm/llvm-toolchain/branches/3.9/
+
+# ------------- clang -------------
+
+Package: clang-3.9
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs},
+ ${dep:devlibs-objc}, libclang-common-3.9-dev (= ${binary:Version}),
+ libclang1-3.9 (= ${binary:Version}), libc6-dev, binutils
+Provides: c-compiler, objc-compiler, c++-compiler
+Recommends: llvm-3.9-dev, python
+Suggests: gnustep, gnustep-devel, clang-3.9-doc
+Replaces: clang-3.1, clang-3.2, clang-3.3,
+ clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt,
+ clang-include-fixer-3.9
+Breaks: clang-3.1, clang-3.2, clang-3.3,
+ clang-3.4 (<< 1:3.4.2-7~exp1), clang-3.5 (<< 1:3.5~+rc1-3~exp1), compiler-rt,
+  clang-include-fixer-3.9
+Description: C, C++ and Objective-C compiler (LLVM based)
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+
+Package: clang-format-3.9
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python
+Replaces: clang-format-3.3
+Breaks: clang-format-3.3
+Description: Tool to format C/C++/Obj-C code
+ Clang-format is both a library and a stand-alone tool with the goal of
+ automatically reformatting C++ sources files according to configurable
+ style guides. To do so, clang-format uses Clang's Lexer to transform an
+ input file into a token stream and then changes all the whitespace around
+ those tokens. The goal is for clang-format to both serve both as a user
+ tool (ideally with powerful IDE integrations) and part of other
+ refactoring tools, e.g. to do a reformatting of all the lines changed
+ during a renaming.
+ .
+ This package also provides vim and emacs plugins.
+
+Package: clang-tidy-3.9
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python
+Replaces: clang-modernize-3.9, clang-3.9 (<< 1:3.9~svn250696-1)
+Breaks: clang-modernize-3.9, clang-3.9 (<< 1:3.9~svn250696-1)
+Description: clang-based C++ linter tool
+ Provide an extensible framework for diagnosing and fixing typical programming
+ errors, like style violations, interface misuse, or bugs that can be deduced
+ via static analysis. clang-tidy is modular and provides a convenient interface
+ for writing new checks.
+
+Package: clang-3.9-doc
+Architecture: all
+Section: doc
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: C, C++ and Objective-C compiler (LLVM based) - Documentation
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the documentation.
+
+Package: libclang1-3.9
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Description: C interface to the clang library
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the clang library.
+ .
+ The C Interface to Clang provides a relatively small API that exposes
+ facilities for parsing source code into an abstract syntax tree (AST),
+ loading already-parsed ASTs, traversing the AST, associating physical source
+ locations with elements within the AST, and other facilities that support
+ Clang-based development tools.
+
+Package: libclang1-3.9-dbg
+Architecture: any
+Multi-Arch: same
+Section: debug
+Priority: extra
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang1-3.9 (= ${binary:Version})
+Description: clang library
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the debugging symbols.
+
+Package: libclang-3.9-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs},
+ ${dep:devlibs-objc}, libclang1-3.9 (= ${binary:Version}),
+ libclang-common-3.9-dev (= ${binary:Version})
+Description: clang library - Development package
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the clang headers to develop extensions over
+ libclang1-3.9.
+
+Package: libclang-common-3.9-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version})
+Description: clang library - Common development package
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the clang generic headers and some libraries
+ (profiling, etc).
+
+
+Package: libfuzzer-3.9-dev
+Architecture: any
+Section: libdevel
+Depends: ${shlibs:Depends}, ${misc:Depends}, clang-3.9 (= ${binary:Version})
+Description: Library for coverage-guided fuzz testing
+ LibFuzzer is a library for in-process, coverage-guided, evolutionary fuzzing
+ of other libraries.
+ .
+ LibFuzzer is similar in concept to American Fuzzy Lop (AFL), but it performs
+ all of its fuzzing inside a single process. This in-process fuzzing can be
+ more restrictive and fragile, but is potentially much faster as there is no
+ overhead for process start-up.
+ .
+ The fuzzer is linked with the library under test, and feeds fuzzed inputs to
+ the library via a specific fuzzing entrypoint (aka 'target function'); the
+ fuzzer then tracks which areas of the code are reached, and generates mutations
+ on the corpus of input data in order to maximize the code coverage. The code
+ coverage information for libFuzzer is provided by LLVM's SanitizerCoverage
+ instrumentation.
+
+
+Package: python-clang-3.9
+Section: python
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python
+Replaces: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8
+Breaks: python-clang-3.3, python-clang-3.4, python-clang-3.5, python-clang-3.6, python-clang-3.7, python-clang-3.8
+Description: Clang Python Bindings
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This binding package provides access to the Clang compiler and libraries.
+
+
+Package: clang-3.9-examples
+Architecture: any
+Section: doc
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Clang examples
+ Clang project is a C, C++, Objective C and Objective C++ front-end
+ for the LLVM compiler. Its goal is to offer a replacement to the GNU Compiler
+ Collection (GCC).
+ .
+ Clang fully implements all published ISO C++ standards including C++11, as
+ well as the upcoming C++14 standard, and some parts of the fledgling C++1z
+ standard, and is considered a production-quality C++ compiler.
+ .
+ This package contains the clang examples.
+
+# ------------- LLVM -------------
+
+Package: libllvm3.9
+Architecture: any
+Section: libs
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Description: Modular compiler and toolchain technologies, runtime library
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ This package contains the LLVM runtime library.
+
+Package: libllvm3.9-dbg
+Architecture: any
+Section: debug
+Priority: extra
+Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version})
+Pre-Depends: ${misc:Pre-Depends}
+Multi-Arch: same
+Description: Modular compiler and toolchain technologies, debugging libraries
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ This package contains the LLVM runtime library debug symbols.
+
+Package: llvm-3.9
+Architecture: any
+Suggests: llvm-3.9-doc
+Depends: llvm-3.9-runtime (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
+Recommends: llvm-3.9-dev
+Description: Modular compiler and toolchain technologies
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ The strengths of the LLVM infrastructure are its extremely
+ simple design (which makes it easy to understand and use),
+ source-language independence, powerful mid-level optimizer, automated
+ compiler debugging support, extensibility, and its stability and
+ reliability. LLVM is currently being used to host a wide variety of
+ academic research projects and commercial projects. LLVM includes C
+ and C++ front-ends, a front-end for a Forth-like language (Stacker),
+ a young scheme front-end, and Java support is in development. LLVM can
+ generate code for X86, SparcV9, PowerPC or many other architectures.
+
+Package: llvm-3.9-runtime
+Architecture: any
+Depends: binfmt-support, ${shlibs:Depends}, ${misc:Depends}
+Conflicts: llvm (<< 2.7-1)
+Replaces: llvm (<< 2.7-1)
+Description: Modular compiler and toolchain technologies, IR interpreter
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the minimal required to execute programs in LLVM
+ format.
+
+Package: llvm-3.9-dev
+Architecture: any
+Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends},
+ llvm-3.9 (= ${binary:Version}), libllvm3.9 (= ${binary:Version}), libtinfo-dev
+Replaces: llvm (<< 2.2-3)
+Description: Modular compiler and toolchain technologies, libraries and headers
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the libraries and headers to develop applications
+ using llvm.
+
+Package: llvm-3.9-tools
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, python,
+ llvm-3.9-dev (= ${binary:Version})
+Description: Modular compiler and toolchain technologies, tools
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides tools for testing.
+
+Package: libllvm-3.9-ocaml-dev
+Section: ocaml
+Architecture: amd64 arm64 armel armhf i386
+Suggests: llvm-3.9-doc
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-3.9-dev (= ${binary:Version})
+Provides: ${ocaml:Provides}
+Description: Modular compiler and toolchain technologies, OCaml bindings
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package provides the OCaml bindings to develop applications using llvm.
+
+Package: llvm-3.9-doc
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, libjs-jquery, libjs-underscore
+Description: Modular compiler and toolchain technologies, documentation
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains all documentation (extensive).
+
+Package: llvm-3.9-examples
+Section: doc
+Architecture: all
+Depends: ${misc:Depends}, llvm-3.9-dev (>= ${source:Version}), llvm-3.9-dev (<< ${source:Version}+c~)
+Description: Modular compiler and toolchain technologies, examples
+ LLVM is a collection of libraries and tools that make it easy to build
+ compilers, optimizers, just-in-time code generators, and many other
+ compiler-related programs.
+ .
+ LLVM uses a single, language-independent virtual instruction set both
+ as an offline code representation (to communicate code between
+ compiler phases and to run-time systems) and as the compiler internal
+ representation (to analyze and transform programs). This persistent
+ code representation allows a common set of sophisticated compiler
+ techniques to be applied at compile-time, link-time, install-time,
+ run-time, or "idle-time" (between program runs).
+ .
+ This package contains examples for using LLVM, both in developing
+ extensions to LLVM and in using it to compile code.
+
+
+# ------------- lld -------------
+
+# Package: lld-3.9
+# Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
+# # ia64 mips mipsel hurd powerpc ppc64el have been removed
+# Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version}), llvm-3.9-dev
+# Pre-Depends: ${misc:Pre-Depends}
+# Description: LLVM-based linker
+#  LLD is a new, high-performance linker. It is built as a set of reusable
+#  components which highly leverage existing libraries in the larger LLVM
+#  Project.
+
+# Package: liblld-3.9
+# Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
+# # ia64 mips mipsel hurd powerpc ppc64el have been removed
+# Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version})
+# Pre-Depends: ${misc:Pre-Depends}
+# Section: libs
+# Description: LLVM-based linker, library
+#  LLD is a new, high-performance linker. It is built as a set of reusable
+#  components which highly leverage existing libraries in the larger LLVM
+#  Project.
+#  .
+#  This package contains the LLD runtime library.
+
+# Package: liblld-3.9-dbg
+# Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
+# # ia64 mips mipsel hurd ppc64el alpha s390x powerpc have been removed
+# Depends: ${shlibs:Depends}, ${misc:Depends}, liblld-3.9 (= ${binary:Version})
+# Pre-Depends: ${misc:Pre-Depends}
+# Section: debug
+# Priority: extra
+# Description: LLVM-based linker, debugging libraries
+#  LLD is a new, high-performance linker. It is built as a set of reusable
+#  components which highly leverage existing libraries in the larger LLVM
+#  Project.
+#  .
+#  This package contains the LLD runtime library debug symbols.
+
+
+# Package: liblld-3.9-dev
+# Section: libdevel
+# Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel
+# # ia64 mips mipsel hurd powerpc ppc64el have been removed
+# Depends: ${shlibs:Depends}, ${misc:Depends}, lld-3.9 (= ${binary:Version})
+# Pre-Depends: ${misc:Pre-Depends}
+# Description: LLVM-based linker, header files
+#  LLD is a new, high-performance linker. It is built as a set of reusable
+#  components which highly leverage existing libraries in the larger LLVM
+#  Project.
+#  .
+#  This package provides the header files to build extension over lld.
+
+
+# ------------- lldb -------------
+
+Package: lldb-3.9
+Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel arm64
+# ia64 mips mipsel hurd powerpc ppc64 ppc64el sparc64  s390x  have been removed
+Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version}), llvm-3.9-dev,
+ python-lldb-3.9
+Conflicts: lldb-3.4, lldb-3.5
+Pre-Depends: ${misc:Pre-Depends}
+Description: Next generation, high-performance debugger
+ LLDB is a next generation, high-performance debugger. It is built as a set of
+ reusable components which highly leverage existing libraries in the larger LLVM
+ Project, such as the Clang expression parser and LLVM disassembler.
+
+Package: liblldb-3.9
+Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel arm64
+# ia64 mips mipsel hurd powerpc ppc64  ppc64el sparc64 have been removed
+Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm3.9 (= ${binary:Version})
+Pre-Depends: ${misc:Pre-Depends}
+Section: libs
+Replaces: lldb-3.9 (<= 1:3.9~svn215195-2)
+Breaks: lldb-3.9 (<< 1:3.9~svn215195-2)
+Description: Next generation, high-performance debugger, library
+ LLDB is a next generation, high-performance debugger. It is built as a set of
+ reusable components which highly leverage existing libraries in the larger LLVM
+ Project, such as the Clang expression parser and LLVM disassembler.
+ .
+ This package contains the LLDB runtime library.
+
+Package: liblldb-3.9-dbg
+Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel arm64
+# ia64 mips mipsel hurd ppc64 ppc64el alpha s390x powerpc sparc64 have been removed
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-3.9 (= ${binary:Version})
+Pre-Depends: ${misc:Pre-Depends}
+Section: debug
+Priority: extra
+Description: Next generation, high-performance debugger, debugging libraries
+ LLDB is a next generation, high-performance debugger. It is built as a set of
+ reusable components which highly leverage existing libraries in the larger LLVM
+ Project, such as the Clang expression parser and LLVM disassembler.
+ .
+ This package contains the LLDB runtime library debug symbols.
+
+
+Package: python-lldb-3.9
+Section: python
+Architecture: amd64 armel armhf i386  kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel arm64
+# ia64 mips mipsel hurd ppc64 ppc64el alpha s390x powerpc sparc64 have been removed
+Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-3.9-dev, python, python-six
+Conflicts: python-lldb-3.4, python-lldb-3.5, python-lldb-3.6, python-lldb-3.7, python-lldb-3.8
+Pre-Depends: ${misc:Pre-Depends}
+Description: Next generation, high-performance debugger, python lib
+ LLDB is a next generation, high-performance debugger. It is built as a set of
+ reusable components which highly leverage existing libraries in the larger LLVM
+ Project, such as the Clang expression parser and LLVM disassembler.
+ .
+ This binding package provides access to lldb.
+
+
+Package: liblldb-3.9-dev
+Section: libdevel
+Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe sh4 x32 mips mipsel arm64
+# ia64 mips mipsel hurd powerpc ppc64  ppc64el sparc64 have been removed
+Depends: ${shlibs:Depends}, ${misc:Depends}, lldb-3.9 (= ${binary:Version})
+Replaces: lldb-3.9-dev (<= 1:3.9~svn215195-2)
+Breaks: lldb-3.9-dev (<< 1:3.9~svn215195-2)
+Pre-Depends: ${misc:Pre-Depends}
+Description: Next generation, high-performance debugger, header files
+ LLDB is a next generation, high-performance debugger. It is built as a set of
+ reusable components which highly leverage existing libraries in the larger LLVM
+ Project, such as the Clang expression parser and LLVM disassembler.
+ .
+ This package provides the header files to build extension over lldb.
diff --git a/copyright b/copyright
new file mode 100644 (file)
index 0000000..a50dd55
--- /dev/null
+++ b/copyright
@@ -0,0 +1,428 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: LLVM/Clang
+Source: http://llvm.org/releases/download.html
+
+Files: *
+Copyright: 2003-2007 University of Illinois at Urbana-Champaign.
+License: U-OF-I-BSD-LIKE
+
+Files: */install-sh
+Copyright: 1994 X Consortium
+License: LLVM
+ This script is licensed under the LLVM license, with the following
+ additional copyrights and restrictions:
+ .
+ Copyright 1991 by the Massachusetts Institute of Technology
+ .
+ Permission to use, copy, modify, distribute, and sell this software and its
+ documentation for any purpose is hereby granted without fee, provided that
+ the above copyright notice appear in all copies and that both that
+ copyright notice and this permission notice appear in supporting 
+ documentation, and that the name of M.I.T. not be used in advertising or
+ publicity pertaining to distribution of the software without specific,
+ written prior permission.  M.I.T. makes no representations about the
+ suitability of this software for any purpose.  It is provided "as is"
+ without express or implied warranty.
+ .
+ ==============================================================================
+ LLVM Release License
+ ==============================================================================
+ University of Illinois/NCSA
+ Open Source License
+ .
+ Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.
+ All rights reserved.
+ .
+ Developed by:
+ .
+     LLVM Team
+ .
+     University of Illinois at Urbana-Champaign
+ .
+     http://llvm.org
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+ .
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the names of the LLVM Team, University of Illinois at
+       Urbana-Champaign, nor the names of its contributors may be used to
+       endorse or promote products derived from this Software without specific
+       prior written permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+ SOFTWARE.
+
+Files: clang/lib/Headers/*
+Copyright: 2003-2007 University of Illinois at Urbana-Champaign
+License: Expat
+
+Files: clang/lib/Headers/iso646.h
+Copyright: 2008 Eli Friedman
+License: Expat
+
+Files: clang/lib/Headers/limits.h
+Copyright: 2009 Chris Lattner
+License: Expat
+
+Files: clang/lib/Headers/stdarg.h
+Copyright: 2008 Eli Friedman
+License: Expat
+
+Files: clang/lib/Headers/stdbool.h
+Copyright: 2008 Eli Friedman
+License: Expat
+
+Files: clang/lib/Headers/stddef.h
+Copyright: 2008 Eli Friedman
+License: Expat
+
+Files: clang/lib/Headers/stdint.h
+Copyright: 2009 Chris Lattner
+License: Expat
+
+Files: clang/lib/Headers/tgmath.h
+Copyright: 2009 Howard Hinnant
+License: Expat
+
+Files: compiler-rt/*
+Copyright: 2009-2013 Craig van Vliet
+           2009-2013 Edward O'Callaghan
+           2009-2013 Howard Hinnant
+License: U-OF-I-BSD-LIKE or MIT
+
+Files: compiler-rt/lib/BlocksRuntime/Block.h
+Copyright: 2008-2010 Apple, Inc.
+License: MIT
+
+Files: compiler-rt/lib/BlocksRuntime/Block_private.h
+Copyright: 2008-2010 Apple, Inc.
+License: MIT
+
+Files: compiler-rt/lib/BlocksRuntime/data.c
+Copyright: 2008-2010 Apple, Inc.
+License: MIT
+
+Files: compiler-rt/lib/BlocksRuntime/runtime.c
+Copyright: 2008-2010 Apple, Inc.
+License: MIT
+
+Files: include/llvm/Support/*
+Copyright: 2003-2013 University of Illinois at Urbana-Champaign.
+           Copyright (C) 2004 eXtensible Systems, Inc.
+License: U-OF-I-BSD-LIKE
+
+Files: lib/Support/reg*
+Copyright: 1992, 1993, 1994 Henry Spencer
+           1992, 1993, 1994 The Regents of the University of California
+License: BSD-3-clause
+
+Files: lib/Target/ARM/*
+Copyright: ARM Limited
+License: ARM
+ ARM Limited
+ .
+ Software Grant License Agreement ("Agreement")
+ .
+ Except for the license granted herein to you, ARM Limited ("ARM") reserves all
+ right, title, and interest in and to the Software (defined below).
+ .
+ Definition
+ .
+ "Software" means the code and documentation as well as any original work of
+ authorship, including any modifications or additions to an existing work, that
+ is intentionally submitted by ARM to llvm.org (http://llvm.org) ("LLVM") for
+ inclusion in, or documentation of, any of the products owned or managed by LLVM
+ (the "Work"). For the purposes of this definition, "submitted" means any form of
+ electronic, verbal, or written communication sent to LLVM or its
+ representatives, including but not limited to communication on electronic
+ mailing lists, source code control systems, and issue tracking systems that are
+ managed by, or on behalf of, LLVM for the purpose of discussing and improving
+ the Work, but excluding communication that is conspicuously marked otherwise.
+ .
+ 1. Grant of Copyright License. Subject to the terms and conditions of this
+    Agreement, ARM hereby grants to you and to recipients of the Software
+    distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
+    royalty-free, irrevocable copyright license to reproduce, prepare derivative
+    works of, publicly display, publicly perform, sublicense, and distribute the
+    Software and such derivative works.
+ .
+ 2. Grant of Patent License. Subject to the terms and conditions of this
+    Agreement, ARM hereby grants you and to recipients of the Software
+    distributed by LLVM a perpetual, worldwide, non-exclusive, no-charge,
+    royalty-free, irrevocable (except as stated in this section) patent license
+    to make, have made, use, offer to sell, sell, import, and otherwise transfer
+    the Work, where such license applies only to those patent claims licensable
+    by ARM that are necessarily infringed by ARM's Software alone or by
+    combination of the Software with the Work to which such Software was
+    submitted. If any entity institutes patent litigation against ARM or any
+    other entity (including a cross-claim or counterclaim in a lawsuit) alleging
+    that ARM's Software, or the Work to which ARM has contributed constitutes
+    direct or contributory patent infringement, then any patent licenses granted
+    to that entity under this Agreement for the Software or Work shall terminate
+    as of the date such litigation is filed.
+ .
+ Unless required by applicable law or agreed to in writing, the software is
+ provided on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ either express or implied, including, without limitation, any warranties or
+ conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE.
+
+Files: lldb/*
+Copyright: 2010, 2012 Apple Inc.
+License: NCSA
+ University of Illinois/NCSA
+ Open Source License
+ .
+ Copyright (c) 2010 Apple Inc.
+ All rights reserved.
+ .
+ Developed by:
+ .
+     LLDB Team
+ .
+     http://lldb.llvm.org/
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+ .
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the names of the LLDB Team, copyright holders, nor the names of 
+       its contributors may be used to endorse or promote products derived from 
+       this Software without specific prior written permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+ SOFTWARE.
+
+Files: lldb/test/pexpect-2.4/*
+Copyright: 2008 Noah Spurrier
+License: Expat
+
+License: Expat
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in all
+ copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+ USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Files: lldb/test/unittest2/*
+Copyright: 1999-2003 Steve Purcell
+           2003-2010 Python Software Foundation
+License: Python
+ This module is free software, and you may redistribute it and/or modify
+ it under the same terms as Python itself, so long as this copyright message
+ and disclaimer are retained in their original form.
+ .
+ IN NO EVENT SHALL THE AUTHOR BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT,
+ SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF
+ THIS CODE, EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+ DAMAGE.
+ .
+ THE AUTHOR SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE.  THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
+ AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
+ SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+Files: polly/*
+Copyright: 2009-2013 Polly Team
+License: Polly
+ ==============================================================================
+ Polly Release License
+ ==============================================================================
+ University of Illinois/NCSA
+ Open Source License
+ .
+ Copyright (c) 2009-2013 Polly Team
+ All rights reserved.
+ .
+ Developed by:
+ .
+     Polly Team
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+ .
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the names of the Polly Team, copyright holders, nor the names of
+       its contributors may be used to endorse or promote products derived from
+       this Software without specific prior written permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+ SOFTWARE.
+
+Files: polly/lib/JSON/*
+Copyright: Polly Team
+License: public-domain
+ **FIXME**
+ polly/lib/JSON/LICENSE.txt claims that these files are in the public domain, but
+ the machine-readable copyright spec requires additional clarification.
+
+Files: polly/tools/GPURuntime/*
+Copyright: Polly Team
+License: U-OF-I-BSD-LIKE or MIT
+
+Files: test/YAMLParser/*
+Copyright: 2006 Kirill Simonov
+License: MIT
+
+Files: lldb/tools/debugserver/source/MacOSX/stack_logging.h
+Copyright: 1999-2007 Apple Inc.
+License: Apple
+ This file contains Original Code and/or Modifications of Original Code
+ as defined in and that are subject to the Apple Public Source License
+ Version 2.0 (the 'License'). You may not use this file except in
+ compliance with the License. Please obtain a copy of the License at
+ http://www.opensource.apple.com/apsl/ and read it before using this
+ file.
+ .
+ The Original Code and all software distributed under the License are
+ distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
+ Please see the License for the specific language governing rights and
+ limitations under the License.
+
+Files: utils/unittest/googletest/*
+Copyright: 2006-2008, Google Inc.
+License: BSD-3-Clause
+
+License: BSD-3-Clause
+ This software is provided 'as-is', without any express or implied
+ warranty.  In no event will the authors be held liable for any damages
+ arising from the use of this software.
+ .
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+ .
+ 1. The origin of this software must not be misrepresented; you must not
+    claim that you wrote the original software. If you use this software
+    in a product, an acknowledgment in the product documentation would be
+    appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+    misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+License: U-OF-I-BSD-LIKE
+ ==============================================================================
+ LLVM Release License
+ ==============================================================================
+ University of Illinois/NCSA
+ Open Source License
+ .
+ Copyright (c) 2003-2013 University of Illinois at Urbana-Champaign.
+ All rights reserved.
+ .
+ Developed by:
+ .
+     LLVM Team
+ .
+     University of Illinois at Urbana-Champaign
+ .
+     http://llvm.org
+ .
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
+ this software and associated documentation files (the "Software"), to deal with
+ the Software without restriction, including without limitation the rights to
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+ of the Software, and to permit persons to whom the Software is furnished to do
+ so, subject to the following conditions:
+ .
+     * Redistributions of source code must retain the above copyright notice,
+       this list of conditions and the following disclaimers.
+ .
+     * Redistributions in binary form must reproduce the above copyright notice,
+       this list of conditions and the following disclaimers in the
+       documentation and/or other materials provided with the distribution.
+ .
+     * Neither the names of the LLVM Team, University of Illinois at
+       Urbana-Champaign, nor the names of its contributors may be used to
+       endorse or promote products derived from this Software without specific
+       prior written permission.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
+ SOFTWARE.
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
diff --git a/debian_path.h b/debian_path.h
new file mode 100644 (file)
index 0000000..539636f
--- /dev/null
@@ -0,0 +1,16 @@
+//===----------------------------------------------------------------------===//
+//
+// Debian paths declaration management
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef DEBIAN_PATH_H
+#define DEBIAN_PATH_H
+
+// Provides the debian revision
+#define DEB_PATCHSETVERSION  "@DEB_PATCHSETVERSION@"
+
+#endif
diff --git a/libclang-X.Y-dev.install.in b/libclang-X.Y-dev.install.in
new file mode 100644 (file)
index 0000000..79d9db7
--- /dev/null
@@ -0,0 +1,10 @@
+usr/lib/llvm-@LLVM_VERSION@/include/clang
+usr/lib/llvm-@LLVM_VERSION@/include/clang-c
+usr/lib/llvm-@LLVM_VERSION@/lib/libclang*a
+usr/lib/llvm-@LLVM_VERSION@/lib/libclang*so
+usr/lib/llvm-@LLVM_VERSION@/lib/libfindAllSymbols.a
+
+#usr/include/clang                  /usr/include/
+#usr/include/clang-c                /usr/include/
+#usr/lib/libclang.so                /usr/lib/
+#usr/lib/libclang*a                 /usr/lib/
diff --git a/libclang-X.Y-dev.links.in b/libclang-X.Y-dev.links.in
new file mode 100644 (file)
index 0000000..6f99d5b
--- /dev/null
@@ -0,0 +1,3 @@
+usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so
+usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so
+usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so
diff --git a/libclang-common-X.Y-dev.install.in b/libclang-common-X.Y-dev.install.in
new file mode 100644 (file)
index 0000000..3d9d13e
--- /dev/null
@@ -0,0 +1,14 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include
+
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/lib
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/*.txt
+
+#usr/lib/clang/@LLVM_VERSION_FULL@/lib             /usr/lib/clang/@LLVM_VERSION@/
+#usr/lib/clang/@LLVM_VERSION_FULL@/include/         /usr/include/clang/@LLVM_VERSION@/
+
+usr/lib/llvm-@LLVM_VERSION@/bin/clang-tblgen
+usr/lib/llvm-@LLVM_VERSION@/bin/yaml-bench
+
+usr/bin/clang-tblgen-@LLVM_VERSION@
+usr/bin/yaml-bench-@LLVM_VERSION@
+
diff --git a/libclang-common-X.Y-dev.links.in b/libclang-common-X.Y-dev.links.in
new file mode 100644 (file)
index 0000000..717c6b2
--- /dev/null
@@ -0,0 +1,7 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include usr/include/clang/@LLVM_VERSION@/include
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include usr/lib/clang/@LLVM_VERSION@/include
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/lib usr/lib/clang/@LLVM_VERSION@/lib
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include usr/include/clang/@LLVM_VERSION_FULL@/include
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/include usr/lib/clang/@LLVM_VERSION_FULL@/include
+usr/lib/llvm-@LLVM_VERSION@/lib/clang/@LLVM_VERSION_FULL@/lib usr/lib/clang/@LLVM_VERSION_FULL@/lib
+
diff --git a/libclang1-X.Y.install.in b/libclang1-X.Y.install.in
new file mode 100644 (file)
index 0000000..d44e84f
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/
+usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1
diff --git a/libclang1-X.Y.links.in b/libclang1-X.Y.links.in
new file mode 100644 (file)
index 0000000..3ea44c8
--- /dev/null
@@ -0,0 +1,3 @@
+# as upstream
+usr/lib/@DEB_HOST_MULTIARCH@/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1
+usr/lib/llvm-@LLVM_VERSION@/lib/libclang-@LLVM_VERSION@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/libclang.so.1
diff --git a/libclang1-X.Y.lintian-overrides.in b/libclang1-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..9fc47a7
--- /dev/null
@@ -0,0 +1,5 @@
+# I know and I am not planning to change that yet.
+libclang1-@LLVM_VERSION@: package-name-doesnt-match-sonames libclang1-@LLVM_VERSION@-1
+# Provided as transition
+libclang1-@LLVM_VERSION@: dev-pkg-without-shlib-symlink usr/lib/*/libclang-@LLVM_VERSION@.so.1 usr/lib/*/libclang.so
+libclang1-@LLVM_VERSION@: ldconfig-symlink-missing-for-shlib usr/lib/*/libclang-LLVM_VERSION@.so usr/lib/*/libclang-LLVM_VERSION@.so.1 libclang-LLVM_VERSION@.so
diff --git a/libclang1-X.Y.symbols.in b/libclang1-X.Y.symbols.in
new file mode 100644 (file)
index 0000000..7cdb0cb
--- /dev/null
@@ -0,0 +1,341 @@
+libclang-@LLVM_VERSION@.so.1 libclang1-@LLVM_VERSION@ #MINVER#
+ (optional)LLVM_@LLVM_VERSION@@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_BlockCommandComment_getArgText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_BlockCommandComment_getCommandName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_BlockCommandComment_getNumArgs@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_BlockCommandComment_getParagraph@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXCursorSet_contains@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXCursorSet_insert@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXIndex_getGlobalOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXIndex_setGlobalOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXConstructor_isConvertingConstructor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXConstructor_isCopyConstructor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXConstructor_isDefaultConstructor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXConstructor_isMoveConstructor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXField_isMutable@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXMethod_isConst@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXMethod_isDefaulted@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXMethod_isPureVirtual@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXMethod_isStatic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CXXMethod_isVirtual@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Comment_getChild@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Comment_getKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Comment_getNumChildren@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Comment_isWhitespace@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompilationDatabase_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompilationDatabase_fromDirectory@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompilationDatabase_getAllCompileCommands@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompilationDatabase_getCompileCommands@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getArg@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getDirectory@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getFilename@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getMappedSourceContent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getMappedSourcePath@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommand_getNumArgs@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommands_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommands_getCommand@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_CompileCommands_getSize@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_Evaluate@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getArgument@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getBriefCommentText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getCXXManglings@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getCommentRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getMangling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getModule@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getNumArguments@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getNumTemplateArguments@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getObjCDeclQualifiers@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getObjCPropertyAttributes@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getObjCSelectorIndex@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getOffsetOfField@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getParsedComment@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getRawCommentText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getReceiverType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getSpellingNameRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getStorageClass@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getTemplateArgumentKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getTemplateArgumentType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getTemplateArgumentUnsignedValue@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getTemplateArgumentValue@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_getTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_hasAttrs@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isAnonymous@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isBitField@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isDynamicCall@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isFunctionInlined@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isMacroBuiltin@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isMacroFunctionLike@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isNull@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isObjCOptional@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Cursor_isVariadic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_EvalResult_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_EvalResult_getAsDouble@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_EvalResult_getAsInt@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_EvalResult_getAsStr@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_EvalResult_getKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_File_isEqual@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_FullComment_getAsHTML@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_FullComment_getAsXML@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLStartTagComment_isSelfClosing@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLStartTag_getAttrName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLStartTag_getAttrValue@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLStartTag_getNumAttrs@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLTagComment_getAsString@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_HTMLTagComment_getTagName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_IndexAction_create@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_IndexAction_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_InlineCommandComment_getArgText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_InlineCommandComment_getCommandName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_InlineCommandComment_getNumArgs@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_InlineCommandComment_getRenderKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_InlineContentComment_hasTrailingNewline@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Location_isFromMainFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Location_isInSystemHeader@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ModuleMapDescriptor_create@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ModuleMapDescriptor_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ModuleMapDescriptor_setFrameworkModuleName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ModuleMapDescriptor_setUmbrellaHeader@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ModuleMapDescriptor_writeToBuffer@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getASTFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getFullName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getNumTopLevelHeaders@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getParent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_getTopLevelHeader@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Module_isSystem@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ParamCommandComment_getDirection@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ParamCommandComment_getParamIndex@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ParamCommandComment_getParamName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ParamCommandComment_isDirectionExplicit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_ParamCommandComment_isParamIndexValid@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Range_isNull@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_TParamCommandComment_getDepth@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_TParamCommandComment_getIndex@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_TParamCommandComment_getParamName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_TParamCommandComment_isParamPositionValid@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_TextComment_getText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getAlignOf@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getCXXRefQualifier@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getClassType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getNamedType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getNumTemplateArguments@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getObjCEncoding@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getOffsetOf@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getSizeOf@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_getTemplateArgumentAsType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_Type_visitFields@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VerbatimBlockLineComment_getText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VerbatimLineComment_getText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VirtualFileOverlay_addFileMapping@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VirtualFileOverlay_create@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VirtualFileOverlay_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VirtualFileOverlay_setCaseSensitivity@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_VirtualFileOverlay_writeToBuffer@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_annotateTokens@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteAt@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetContainerKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetContainerUSR@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetContexts@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetDiagnostic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetNumDiagnostics@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_codeCompleteGetObjCSelector@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCCategory@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCClass@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCIvar@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCMethod@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCProperty@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_constructUSR_ObjCProtocol@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_createCXCursorSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_createIndex@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_createTranslationUnit2@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_createTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_createTranslationUnitFromSourceFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_defaultCodeCompleteOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_defaultDiagnosticDisplayOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_defaultEditingTranslationUnitOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_defaultReparseOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_defaultSaveOptions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeCXCursorSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeCXPlatformAvailability@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeCXTUResourceUsage@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeCodeCompleteResults@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeDiagnostic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeDiagnosticSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeIndex@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeOverriddenCursors@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeSourceRangeList@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeString@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeStringSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeTokens@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_disposeTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_enableStackTraces@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_equalCursors@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_equalLocations@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_equalRanges@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_equalTypes@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_executeOnThread@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_findIncludesInFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_findIncludesInFileWithBlock@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_findReferencesInFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_findReferencesInFileWithBlock@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_formatDiagnostic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_free@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getArgType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getArrayElementType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getArraySize@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getBuildSessionTimestamp@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCString@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCXTUResourceUsage@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCXXAccessSpecifier@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCanonicalCursor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCanonicalType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getChildDiagnostics@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getClangVersion@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionAnnotation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionAvailability@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionBriefComment@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionChunkCompletionString@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionChunkKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionChunkText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionNumAnnotations@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionParent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCompletionPriority@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorAvailability@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorCompletionString@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorDefinition@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorDisplayName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorExtent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorKindSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorLanguage@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorLexicalParent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorLinkage@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorPlatformAvailability@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorReferenceNameRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorReferenced@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorResultType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorSemanticParent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorUSR@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getCursorVisibility@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDeclObjCTypeEncoding@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDefinitionSpellingAndExtent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnostic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticCategory@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticCategoryName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticCategoryText@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticFixIt@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticInSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticNumFixIts@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticNumRanges@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticOption@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticSetFromTU@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticSeverity@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getDiagnosticSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getElementType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getEnumConstantDeclUnsignedValue@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getEnumConstantDeclValue@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getEnumDeclIntegerType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getExpansionLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFieldDeclBitWidth@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFileLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFileName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFileTime@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFileUniqueID@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getFunctionTypeCallingConv@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getIBOutletCollectionType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getIncludedFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getInclusions@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getInstantiationLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getLocationForOffset@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getModuleForFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNullCursor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNullLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNullRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumArgTypes@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumCompletionChunks@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumDiagnostics@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumDiagnosticsInSet@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumElements@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getNumOverloadedDecls@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getOverloadedDecl@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getOverriddenCursors@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getPointeeType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getPresumedLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getRange@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getRangeEnd@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getRangeStart@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getRemappings@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getRemappingsFromFileList@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getResultType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getSkippedRanges@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getSpecializedCursorTemplate@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getSpellingLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTUResourceUsageName@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTemplateCursorKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTokenExtent@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTokenKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTokenLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTokenSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTranslationUnitCursor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTranslationUnitSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTypeDeclaration@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTypeKindSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTypeSpelling@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_getTypedefDeclUnderlyingType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_hashCursor@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_indexLoc_getCXSourceLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_indexLoc_getFileLocation@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_indexSourceFile@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_indexSourceFileFullArgv@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_indexTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getCXXClassDeclInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getClientContainer@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getClientEntity@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getIBOutletCollectionAttrInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getObjCCategoryDeclInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getObjCContainerDeclInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getObjCInterfaceDeclInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getObjCPropertyDeclInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_getObjCProtocolRefListInfo@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_isEntityObjCContainerKind@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_setClientContainer@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_index_setClientEntity@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isAttribute@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isConstQualifiedType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isCursorDefinition@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isDeclaration@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isExpression@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isFileMultipleIncludeGuarded@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isFunctionTypeVariadic@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isInvalid@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isPODType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isPreprocessing@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isReference@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isRestrictQualifiedType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isStatement@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isUnexposed@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isVirtualBase@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_isVolatileQualifiedType@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_loadDiagnostics@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_parseTranslationUnit2@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_parseTranslationUnit2FullArgv@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_parseTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_remap_dispose@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_remap_getFilenames@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_remap_getNumFiles@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_reparseTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_saveTranslationUnit@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_sortCodeCompletionResults@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_toggleCrashRecovery@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_tokenize@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_visitChildren@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
+ clang_visitChildrenWithBlock@LLVM_@LLVM_VERSION@ 1:3.9.1-6~
diff --git a/liblld-X.Y-dev.install.in b/liblld-X.Y-dev.install.in
new file mode 100644 (file)
index 0000000..bc72984
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/lib/llvm-@LLVM_VERSION@/include/lld
+/usr/lib/llvm-@LLVM_VERSION@/lib/liblld*a
+/usr/lib/llvm-@LLVM_VERSION@/lib/liblld*so
diff --git a/liblld-X.Y.install.in b/liblld-X.Y.install.in
new file mode 100644 (file)
index 0000000..aab1ecd
--- /dev/null
@@ -0,0 +1 @@
+#usr/lib/llvm-@LLVM_VERSION@/lib/liblld-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/
diff --git a/liblld-X.Y.links.in b/liblld-X.Y.links.in
new file mode 100644 (file)
index 0000000..b9b629f
--- /dev/null
@@ -0,0 +1,3 @@
+usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1       usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so
+usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so         usr/lib/python2.7/dist-packages/lld-@LLVM_VERSION@/_lld.so
+usr/lib/@DEB_HOST_MULTIARCH@/liblld-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/liblld.so.1
diff --git a/liblldb-X.Y-dev.install.in b/liblldb-X.Y-dev.install.in
new file mode 100644 (file)
index 0000000..d6dd2e1
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/lib/llvm-@LLVM_VERSION@/include/lldb
+/usr/lib/llvm-@LLVM_VERSION@/lib/liblldb*a
+/usr/lib/llvm-@LLVM_VERSION@/lib/liblldb*so
diff --git a/liblldb-X.Y-dev.links.in b/liblldb-X.Y-dev.links.in
new file mode 100644 (file)
index 0000000..18e13a5
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/liblldb.so
+
diff --git a/liblldb-X.Y.install.in b/liblldb-X.Y.install.in
new file mode 100644 (file)
index 0000000..8545597
--- /dev/null
@@ -0,0 +1,2 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/liblldb-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/
+usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/readline.so
diff --git a/liblldb-X.Y.links.in b/liblldb-X.Y.links.in
new file mode 100644 (file)
index 0000000..8705658
--- /dev/null
@@ -0,0 +1,4 @@
+usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1       usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so
+usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/liblldb.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/liblldb-@LLVM_VERSION@.so.1
+
diff --git a/liblldb-X.Y.lintian-overrides.in b/liblldb-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..180aec3
--- /dev/null
@@ -0,0 +1,5 @@
+# That is normal. The lib is not (yet?) shipped as a new package
+liblldb-@LLVM_VERSION@: package-name-doesnt-match-sonames liblldb-@LLVM_VERSION@-1
+# For now, override this warning. We might create a -dev at some point
+liblldb-@LLVM_VERSION@: non-dev-pkg-with-shlib-symlink usr/lib/*/liblldb.so.1 usr/lib/*/liblldb.so
+liblldb-@LLVM_VERSION@: non-dev-pkg-with-shlib-symlink usr/lib/*/liblldb-@LLVM_VERSION@.so.1 usr/lib/*/liblldb-@LLVM_VERSION@.so
diff --git a/libllvm-X.Y-ocaml-dev.META.in b/libllvm-X.Y-ocaml-dev.META.in
new file mode 100644 (file)
index 0000000..366820d
--- /dev/null
@@ -0,0 +1,63 @@
+description = "Low Level Virtual Machine bindings"
+version = "@LLVM_VERSION@"
+
+directory = "+llvm-@LLVM_VERSION@"
+
+archive(byte)   = "llvm.cma"
+archive(native) = "llvm.cmxa"
+linkopts = "-cclib -lstdc++ -cclib -lllvm"
+
+package "executionengine"
+(
+  requires = "llvm-@LLVM_VERSION@"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_executionengine.cmxa"
+  archive(byte)   = "llvm_executionengine.cma"
+  linkopts = "-cclib -lllvm_executionengine"
+)
+
+package "target"
+(
+  requires = "llvm-@LLVM_VERSION@"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_target.cmxa"
+  archive(byte)   = "llvm_target.cma"
+  linkopts = "-cclib -lllvm_target"
+)
+
+package "scalar_opts"
+(
+  requires = "llvm-@LLVM_VERSION@ llvm-@LLVM_VERSION@.target"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_scalar_opts.cmxa"
+  archive(byte)   = "llvm_scalar_opts.cma"
+  linkopts = "-cclib -lllvm_scalar_opts"
+)
+
+package "analysis"
+(
+  requires = "llvm-@LLVM_VERSION@"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_analysis.cmxa"
+  archive(byte)   = "llvm_analysis.cma"
+  linkopts = "-cclib -lllvm_analysis"
+)
+
+package "bitwriter"
+(
+  requires = "llvm-@LLVM_VERSION@"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_bitwriter.cmxa"
+  archive(byte)   = "llvm_bitwriter.cma"
+  linkopts = "-cclib -lllvm_bitwriter"
+)
+
+package "bitreader"
+(
+  requires = "llvm-@LLVM_VERSION@ llvm-@LLVM_VERSION@.bitwriter"
+  version = "@LLVM_VERSION@"
+  archive(native) = "llvm_bitreader.cmxa"
+  archive(byte)   = "llvm_bitreader.cma"
+  linkopts = "-cclib -lllvm_bitreader"
+)
+
diff --git a/libllvm-X.Y-ocaml-dev.dirs.in b/libllvm-X.Y-ocaml-dev.dirs.in
new file mode 100644 (file)
index 0000000..6c9c736
--- /dev/null
@@ -0,0 +1,2 @@
+@OCAML_STDLIB_DIR@/META/
+
diff --git a/libllvm-X.Y-ocaml-dev.install.in b/libllvm-X.Y-ocaml-dev.install.in
new file mode 100644 (file)
index 0000000..b1e302d
--- /dev/null
@@ -0,0 +1,2 @@
+@OCAML_STDLIB_DIR@/llvm-@LLVM_VERSION@ @OCAML_STDLIB_DIR@/
+usr/lib/llvm-@LLVM_VERSION@/docs/ocaml/html/html       usr/share/doc/libllvm-@LLVM_VERSION@-ocaml-dev/
diff --git a/libllvm-X.Y-ocaml-dev.lintian-overrides.in b/libllvm-X.Y-ocaml-dev.lintian-overrides.in
new file mode 100644 (file)
index 0000000..5d25d44
--- /dev/null
@@ -0,0 +1,2 @@
+# It is in the section ocaml which is fine.
+libllvm-@LLVM_VERSION@-ocaml-dev: wrong-section-according-to-package-name libllvm-@LLVM_VERSION@-ocaml-dev => libdevel
diff --git a/libllvmX.Y.install.in b/libllvmX.Y.install.in
new file mode 100644 (file)
index 0000000..f8d968f
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/
diff --git a/libllvmX.Y.links.in b/libllvmX.Y.links.in
new file mode 100644 (file)
index 0000000..067b088
--- /dev/null
@@ -0,0 +1,4 @@
+# Should be uncommented for @LLVM_VERSION@.1 and other
+# usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so.1 /usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1    /usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so
+
diff --git a/libllvmX.Y.lintian-overrides.in b/libllvmX.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..49f7ef2
--- /dev/null
@@ -0,0 +1,2 @@
+# That is normal. Upstream does not match the debian convention
+libllvm@LLVM_VERSION@: package-name-doesnt-match-sonames libLLVM-@LLVM_VERSION@-1
diff --git a/lld-X.Y.install.in b/lld-X.Y.install.in
new file mode 100644 (file)
index 0000000..cb3adaf
--- /dev/null
@@ -0,0 +1,6 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/ld.lld*
+usr/lib/llvm-@LLVM_VERSION@/bin/lld*
+
+usr/bin/lld-link-@LLVM_VERSION@
+usr/bin/ld.lld-@LLVM_VERSION@
+usr/bin/lld-@LLVM_VERSION@*
diff --git a/lldb-X.Y.install.in b/lldb-X.Y.install.in
new file mode 100644 (file)
index 0000000..0baf795
--- /dev/null
@@ -0,0 +1,9 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/lldb*
+usr/lib/llvm-@LLVM_VERSION@/bin/lldb-mi*
+usr/lib/llvm-@LLVM_VERSION@/bin/lldb-server*
+usr/lib/llvm-@LLVM_VERSION@/bin/lldb-argdumper
+
+usr/bin/lldb-@LLVM_VERSION@*
+usr/bin/lldb-server-@LLVM_VERSION@*
+usr/bin/lldb-mi-@LLVM_VERSION@*
+usr/bin/lldb-argdumper-@LLVM_VERSION@
diff --git a/lldb-X.Y.lintian-overrides.in b/lldb-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..a456a34
--- /dev/null
@@ -0,0 +1,3 @@
+lldb-@LLVM_VERSION@: non-dev-pkg-with-shlib-symlink usr/lib/*/liblldb.so.1 usr/lib/*/liblldb.so
+# Does not really matter
+lldb-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/lldb-@LLVM_VERSION@.1.gz
diff --git a/lldb-X.Y.manpages.in b/lldb-X.Y.manpages.in
new file mode 100644 (file)
index 0000000..36a62ae
--- /dev/null
@@ -0,0 +1,2 @@
+debian/man/lldb-@LLVM_VERSION@.1
+debian/man/lldb-mi-@LLVM_VERSION@.1
diff --git a/lldb-X.Y.postinst.in b/lldb-X.Y.postinst.in
new file mode 100644 (file)
index 0000000..a5a6071
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ]
+then
+        ldconfig
+fi
+
+#DEBHELPER#
diff --git a/llvm-X.Y-dev.dirs.in b/llvm-X.Y-dev.dirs.in
new file mode 100644 (file)
index 0000000..3b3b586
--- /dev/null
@@ -0,0 +1,5 @@
+/usr/lib/llvm-@LLVM_VERSION@/lib
+/usr/lib/llvm-@LLVM_VERSION@/build
+/usr/lib/llvm-@LLVM_VERSION@/include
+usr/share/doc/llvm-@LLVM_VERSION@-dev
+usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@
diff --git a/llvm-X.Y-dev.install.in b/llvm-X.Y-dev.install.in
new file mode 100644 (file)
index 0000000..13c9d4f
--- /dev/null
@@ -0,0 +1,31 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM*.a
+#usr/lib/llvm-@LLVM_VERSION@/lib/libllvm*.a
+usr/lib/llvm-@LLVM_VERSION@/lib/LLVM*.so
+usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM.so
+usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so
+usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION_FULL@.so
+usr/lib/llvm-@LLVM_VERSION@/lib/libLTO.*
+usr/lib/llvm-@LLVM_VERSION@/lib/BugpointPasses.so
+usr/lib/llvm-@LLVM_VERSION@/include/llvm/      usr/include/llvm-@LLVM_VERSION@/
+usr/lib/llvm-@LLVM_VERSION@/include/llvm-c/    usr/include/llvm-c-@LLVM_VERSION@/
+# Explicit debian/tmp since there are multiple declarations
+debian/tmp/usr/lib/llvm-@LLVM_VERSION@/lib/cmake/llvm/*.cmake
+
+utils/vim/indent/llvm-@LLVM_VERSION@.vim                       usr/share/vim/addons/indent/
+
+utils/vim/syntax/llvm-@LLVM_VERSION@.vim                       usr/share/vim/addons/syntax/
+utils/vim/syntax/tablegen-@LLVM_VERSION@.vim               usr/share/vim/addons/syntax/
+
+utils/vim/ftdetect/llvm-@LLVM_VERSION@.vim                     usr/share/vim/addons/ftdetect/
+utils/vim/ftdetect/tablegen-@LLVM_VERSION@.vim             usr/share/vim/addons/ftdetect/
+
+utils/vim/ftplugin/llvm-@LLVM_VERSION@.vim                     usr/share/vim/addons/ftplugin/
+utils/vim/ftplugin/tablegen-@LLVM_VERSION@.vim             usr/share/vim/addons/ftplugin/
+
+utils/vim/llvm-@LLVM_VERSION@-vimrc                        usr/share/vim/addons
+
+
+utils/emacs/emacs.el               usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
+utils/emacs/llvm-mode.el           usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
+utils/emacs/tablegen-mode.el   usr/share/emacs/site-lisp/llvm-@LLVM_VERSION@/
+
diff --git a/llvm-X.Y-dev.links.in b/llvm-X.Y-dev.links.in
new file mode 100644 (file)
index 0000000..b3a2a2a
--- /dev/null
@@ -0,0 +1,19 @@
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION@.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION_FULL@.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1       usr/lib/llvm-@LLVM_VERSION@/lib/libLLVM-@LLVM_VERSION_FULL@.so
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION@.so.1       usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1
+
+usr/include/llvm-c-@LLVM_VERSION@/llvm-c usr/lib/llvm-@LLVM_VERSION@/include/llvm-c
+usr/include/llvm-@LLVM_VERSION@/llvm usr/lib/llvm-@LLVM_VERSION@/include/llvm
+usr/include/llvm-c-@LLVM_VERSION@/llvm-c usr/lib/llvm-@LLVM_VERSION@/build/include/llvm-c
+usr/include/llvm-@LLVM_VERSION@/llvm usr/lib/llvm-@LLVM_VERSION@/build/include/llvm
+
+usr/lib/llvm-@LLVM_VERSION@/include/ usr/lib/llvm-@LLVM_VERSION@/build/include
+usr/lib/llvm-@LLVM_VERSION@/lib/     usr/lib/llvm-@LLVM_VERSION@/build/lib
+usr/lib/llvm-@LLVM_VERSION@/share/   usr/lib/llvm-@LLVM_VERSION@/build/share
+usr/lib/llvm-@LLVM_VERSION@/ usr/lib/llvm-@LLVM_VERSION@/build/Release
+usr/lib/llvm-@LLVM_VERSION@/ usr/lib/llvm-@LLVM_VERSION@/build/Debug+Asserts
+
+usr/lib/llvm-@LLVM_VERSION@/lib/cmake/llvm usr/lib/llvm-@LLVM_VERSION@/cmake
+usr/lib/llvm-@LLVM_VERSION@/lib/cmake/llvm usr/lib/llvm-@LLVM_VERSION@/share/llvm/cmake
diff --git a/llvm-X.Y-doc.dirs.in b/llvm-X.Y-doc.dirs.in
new file mode 100644 (file)
index 0000000..5379e8e
--- /dev/null
@@ -0,0 +1 @@
+usr/share/doc/llvm-@LLVM_VERSION@-doc
diff --git a/llvm-X.Y-doc.install.in b/llvm-X.Y-doc.install.in
new file mode 100644 (file)
index 0000000..6ac115a
--- /dev/null
@@ -0,0 +1,6 @@
+docs/_build/html usr/share/doc/llvm-@LLVM_VERSION@-doc/
+#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html.tar.gz
+#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/ocamldoc.tar.gz
+#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html/Dummy.html
+#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html/doxygen.css
+#usr/lib/llvm-@LLVM_VERSION@/docs/llvm/html/LibASTMatchersReference.html
diff --git a/llvm-X.Y-examples.dirs.in b/llvm-X.Y-examples.dirs.in
new file mode 100644 (file)
index 0000000..a8b75c6
--- /dev/null
@@ -0,0 +1 @@
+usr/share/doc/llvm-@LLVM_VERSION@-examples
diff --git a/llvm-X.Y-examples.examples.in b/llvm-X.Y-examples.examples.in
new file mode 100644 (file)
index 0000000..e39721e
--- /dev/null
@@ -0,0 +1 @@
+examples/*
diff --git a/llvm-X.Y-examples.links.in b/llvm-X.Y-examples.links.in
new file mode 100644 (file)
index 0000000..a8d74aa
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/lib/llvm-@LLVM_VERSION@/build/Makefile.common     usr/share/doc/llvm-@LLVM_VERSION@-examples/Makefile.common
+/usr/lib/llvm-@LLVM_VERSION@/build/Makefile.config     usr/share/doc/llvm-@LLVM_VERSION@-examples/Makefile.config
+/usr/lib/llvm-@LLVM_VERSION@/build/Makefile.rules      usr/share/doc/llvm-@LLVM_VERSION@-examples/Makefile.rules
diff --git a/llvm-X.Y-runtime.binfmt.in b/llvm-X.Y-runtime.binfmt.in
new file mode 100644 (file)
index 0000000..6bb1df7
--- /dev/null
@@ -0,0 +1,3 @@
+package llvm-@LLVM_VERSION@-runtime
+interpreter /usr/bin/lli-@LLVM_VERSION@
+magic BC
diff --git a/llvm-X.Y-runtime.install.in b/llvm-X.Y-runtime.install.in
new file mode 100644 (file)
index 0000000..d8e16a7
--- /dev/null
@@ -0,0 +1,8 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/lli
+usr/lib/llvm-@LLVM_VERSION@/bin/lli-child-target
+
+usr/bin/lli-@LLVM_VERSION@
+usr/bin/lli-child-target-@LLVM_VERSION@
+
+debian/llvm-@LLVM_VERSION@-runtime.binfmt                  usr/share/binfmts/
+
diff --git a/llvm-X.Y-runtime.lintian-overrides.in b/llvm-X.Y-runtime.lintian-overrides.in
new file mode 100644 (file)
index 0000000..e94e713
--- /dev/null
@@ -0,0 +1 @@
+llvm-@LLVM_VERSION@-runtime: binary-without-manpage usr/bin/lli-child-target-@LLVM_VERSION@
diff --git a/llvm-X.Y-runtime.manpages.in b/llvm-X.Y-runtime.manpages.in
new file mode 100644 (file)
index 0000000..839952d
--- /dev/null
@@ -0,0 +1 @@
+debian/man/lli*
diff --git a/llvm-X.Y-runtime.postinst.in b/llvm-X.Y-runtime.postinst.in
new file mode 100644 (file)
index 0000000..987b3ea
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "configure"; then
+    if test -x /usr/sbin/update-binfmts; then
+        update-binfmts --import llvm-@LLVM_VERSION@-runtime.binfmt || true
+    fi
+fi
+
+#DEBHELPER#
diff --git a/llvm-X.Y-runtime.prerm.in b/llvm-X.Y-runtime.prerm.in
new file mode 100644 (file)
index 0000000..3f16015
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+if test "$1" = "remove"; then
+    if test -x /usr/sbin/update-binfmts; then
+        update-binfmts --package llvm-@LLVM_VERSION@-runtime \
+            --remove llvm-@LLVM_VERSION@-runtime.binfmt /usr/bin/lli-@LLVM_VERSION@ || true
+        if test -f /var/lib/binfmts/llvm-@LLVM_VERSION@.binfmt; then
+            # Purge old file
+            update-binfmts --package llvm-@LLVM_VERSION@-runtime \
+                --remove llvm-@LLVM_VERSION@.binfmt /usr/bin/lli-@LLVM_VERSION@ || true
+        fi
+    fi
+fi
+
+#DEBHELPER#
+
diff --git a/llvm-X.Y-tools.dirs.in b/llvm-X.Y-tools.dirs.in
new file mode 100644 (file)
index 0000000..401df06
--- /dev/null
@@ -0,0 +1,2 @@
+/usr/lib/llvm-@LLVM_VERSION@/build/unittests
+/usr/lib/llvm-@LLVM_VERSION@/build/utils/lit/
diff --git a/llvm-X.Y-tools.install.in b/llvm-X.Y-tools.install.in
new file mode 100644 (file)
index 0000000..db5574f
--- /dev/null
@@ -0,0 +1,9 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/count
+usr/lib/llvm-@LLVM_VERSION@/bin/FileCheck
+usr/lib/llvm-@LLVM_VERSION@/bin/not
+
+utils/lit/*             /usr/lib/llvm-@LLVM_VERSION@/build/utils/lit/
+
+usr/bin/count-@LLVM_VERSION@
+usr/bin/FileCheck-@LLVM_VERSION@
+usr/bin/not-@LLVM_VERSION@
diff --git a/llvm-X.Y.dirs.in b/llvm-X.Y.dirs.in
new file mode 100644 (file)
index 0000000..56a9655
--- /dev/null
@@ -0,0 +1,3 @@
+/usr/lib/llvm-@LLVM_VERSION@/bin
+usr/share/man/man1
+usr/share/doc/llvm-@LLVM_VERSION@
diff --git a/llvm-X.Y.install.in b/llvm-X.Y.install.in
new file mode 100644 (file)
index 0000000..8893448
--- /dev/null
@@ -0,0 +1,16 @@
+usr/lib/llvm-@LLVM_VERSION@/bin/llvm-*
+usr/lib/llvm-@LLVM_VERSION@/bin/opt*
+usr/lib/llvm-@LLVM_VERSION@/bin/bugpoint*
+usr/lib/llvm-@LLVM_VERSION@/bin/llc*
+usr/lib/llvm-@LLVM_VERSION@/bin/obj2yaml
+usr/lib/llvm-@LLVM_VERSION@/bin/yaml2obj
+usr/lib/llvm-@LLVM_VERSION@/bin/verify-uselistorder
+usr/lib/llvm-@LLVM_VERSION@/bin/sanstats
+usr/bin/llvm-*
+usr/bin/opt*
+usr/bin/bugpoint*
+usr/bin/llc*
+usr/bin/obj2yaml-*
+usr/bin/yaml2obj-*
+usr/bin/verify-uselistorder-*
+usr/bin/sanstats-*
diff --git a/llvm-X.Y.lintian-overrides.in b/llvm-X.Y.lintian-overrides.in
new file mode 100644 (file)
index 0000000..35c8694
--- /dev/null
@@ -0,0 +1,12 @@
+# I know but well...
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-dwarfdump-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-mc-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-mcmarkup-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-objdump-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-rtdyld-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-size-@LLVM_VERSION@.1.gz
+llvm-@LLVM_VERSION@: manpage-has-useless-whatis-entry usr/share/man/man1/llvm-ranlib-@LLVM_VERSION@.1.gz
+# Does not link otherwise
+llvm-@LLVM_VERSION@: embedded-library usr/lib/llvm-@LLVM_VERSION@/bin/bugpoint: libjsoncpp
+llvm-@LLVM_VERSION@: embedded-library usr/lib/llvm-@LLVM_VERSION@/bin/opt: libjsoncpp
+
diff --git a/llvm-X.Y.manpages.in b/llvm-X.Y.manpages.in
new file mode 100644 (file)
index 0000000..98f095f
--- /dev/null
@@ -0,0 +1,8 @@
+docs/_build/man/*
+debian/man/llvm-dwarfdump-@LLVM_VERSION@.1
+debian/man/llvm-mc-@LLVM_VERSION@.1
+debian/man/llvm-mcmarkup-@LLVM_VERSION@.1
+debian/man/llvm-objdump-@LLVM_VERSION@.1
+debian/man/llvm-rtdyld-@LLVM_VERSION@.1
+debian/man/llvm-size-@LLVM_VERSION@.1
+debian/man/llvm-ranlib-@LLVM_VERSION@.1
diff --git a/llvm-priv-dev.dirs b/llvm-priv-dev.dirs
new file mode 100644 (file)
index 0000000..dab8663
--- /dev/null
@@ -0,0 +1 @@
+/usr/lib/llvm-3.1/build
diff --git a/orig-tar.sh b/orig-tar.sh
new file mode 100755 (executable)
index 0000000..d298757
--- /dev/null
@@ -0,0 +1,193 @@
+#!/bin/sh
+# This script will create the following tarballs:
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-clang.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-clang-extra.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-compiler-rt.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-lld.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-lldb.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig-polly.tar.bz2
+# llvm-toolchain-snapshot-3.2_3.2repack.orig.tar.bz2
+set -e
+
+# TODO rest of the options
+
+# To create an rc1 release:
+# sh 3.4/debian/orig-tar.sh RELEASE_34 rc1
+
+SVN_BASE_URL=http://llvm.org/svn/llvm-project/
+MAJOR_VERSION=3.9
+CURRENT_VERSION=3.9.1 # Should be changed to 3.5.1 later
+
+if test -n "$1"; then
+# http://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/branches/google/stable/
+# For example: sh 3.4/debian/orig-tar.sh release_34
+    BRANCH=$1
+fi
+
+if test -n "$1" -a -n "$2"; then
+# http://llvm.org/svn/llvm-project/{cfe,llvm,compiler-rt,...}/tags/RELEASE_34/rc1/
+# For example: sh 3.4/debian/orig-tar.sh RELEASE_34 rc2
+    BRANCH=$1
+    TAG=$2
+    RCRELEASE="true"
+fi
+
+get_svn_url() {
+    MODULE=$1
+    BRANCH=$2
+    TAG=$3
+    if test -n "$TAG"; then
+            SVN_URL="$SVN_BASE_URL/$MODULE/tags/$BRANCH/$TAG"
+    else
+        if test -n "$BRANCH"; then
+            SVN_URL="$SVN_BASE_URL/$MODULE/branches/$BRANCH"
+        else
+            SVN_URL="$SVN_BASE_URL/$MODULE/trunk/"
+        fi
+    fi
+    echo $SVN_URL
+}
+
+get_higher_revision() {
+    PROJECTS="llvm cfe compiler-rt polly lld lldb clang-tools-extra"
+    REVISION_MAX=0
+    for f in $PROJECTS; do
+        REVISION=$(LANG=C svn info $(get_svn_url $f $BRANCH $TAG)|grep "^Last Changed Rev:"|awk '{print $4}')
+        if test $REVISION -gt $REVISION_MAX; then
+            REVISION_MAX=$REVISION
+        fi
+    done
+    echo $REVISION_MAX
+}
+
+SVN_ARCHIVES=svn-archives
+
+checkout_sources() {
+    PROJECT=$1
+    URL=$2
+    TARGET=$3
+    BRANCH=$4
+    if test -n "$BRANCH"; then
+        REVISION=$5
+    fi
+    echo "$PROJECT / $URL / $BRANCH / $TARGET / $REVISION"
+
+    cd $SVN_ARCHIVES/
+    DEST=$PROJECT-$BRANCH
+    if test -d $DEST; then
+        cd $DEST
+        if test -n "$BRANCH"; then
+            svn up
+        else
+            svn up -r $REVISION
+        fi
+        cd ..
+    else
+        if test -n "$BRANCH"; then
+            svn co $URL $DEST
+        else
+            svn co -r $REVISION $URL $DEST
+        fi
+    fi
+    rm -rf ../$TARGET
+    rsync -r --exclude=.svn $DEST/ ../$TARGET
+    cd ..
+}
+
+if test -n "$BRANCH"; then
+    REVISION=$(get_higher_revision)
+    # Do not use the revision when exporting branch. We consider that all the
+    # branch are sync
+    SVN_CMD="svn export"
+else
+    REVISION=$(LANG=C svn info $(get_svn_url llvm)|grep "^Revision:"|awk '{print $2}')
+    SVN_CMD="svn export -r $REVISION"
+fi
+
+if test -n "$RCRELEASE"; then
+#    VERSION=$MAJOR_VERSION"+"$REVISION # WAS TAG
+    if test "$TAG" = "final"; then
+       VERSION=$CURRENT_VERSION
+    else
+        VERSION=$CURRENT_VERSION"~+"$TAG
+    fi
+    FULL_VERSION="llvm-toolchain-"$MAJOR_VERSION"_"$VERSION
+else
+    VERSION=$CURRENT_VERSION"~svn"$REVISION
+    if echo $BRANCH|grep -q release_; then
+       FULL_VERSION="llvm-toolchain-"$MAJOR_VERSION"_"$VERSION
+    else
+       FULL_VERSION="llvm-toolchain-snapshot_"$VERSION
+    fi
+fi
+
+mkdir -p $SVN_ARCHIVES
+
+# LLVM
+LLVM_TARGET=$FULL_VERSION
+checkout_sources llvm $(get_svn_url llvm $BRANCH $TAG) $LLVM_TARGET "$BRANCH" $REVISION
+tar jcf $FULL_VERSION.orig.tar.bz2 $LLVM_TARGET
+rm -rf $LLVM_TARGET
+
+
+# Clang
+CLANG_TARGET=clang_$VERSION
+checkout_sources clang $(get_svn_url cfe $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION
+tar jcf $FULL_VERSION.orig-clang.tar.bz2 $CLANG_TARGET
+rm -rf $CLANG_TARGET
+
+
+# Clang extra
+CLANG_TARGET=clang-tools-extra_$VERSION
+checkout_sources clang-tools-extra $(get_svn_url clang-tools-extra $BRANCH $TAG) $CLANG_TARGET "$BRANCH" $REVISION
+tar jcf $FULL_VERSION.orig-clang-tools-extra.tar.bz2 $CLANG_TARGET
+rm -rf $CLANG_TARGET
+
+# Compiler-rt
+COMPILER_RT_TARGET=compiler-rt_$VERSION
+checkout_sources compiler-rt $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET "$BRANCH" $REVISION
+#$SVN_CMD $(get_svn_url compiler-rt $BRANCH $TAG) $COMPILER_RT_TARGET
+tar jcf $FULL_VERSION.orig-compiler-rt.tar.bz2 $COMPILER_RT_TARGET
+rm -rf $COMPILER_RT_TARGET
+
+# Polly
+POLLY_TARGET=polly_$VERSION
+checkout_sources polly $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET "$BRANCH" $REVISION
+#$SVN_CMD $(get_svn_url polly $BRANCH $TAG) $POLLY_TARGET
+rm -rf $POLLY_TARGET/www $POLLY_TARGET/autoconf/config.sub $POLLY_TARGET/autoconf/config.guess
+tar jcf $FULL_VERSION.orig-polly.tar.bz2 $POLLY_TARGET
+rm -rf $POLLY_TARGET
+
+# LLD
+LLD_TARGET=lld_$VERSION
+checkout_sources lld $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET "$BRANCH" $REVISION
+#$SVN_CMD $(get_svn_url lld $BRANCH $TAG) $LLD_TARGET
+rm -rf $LLD_TARGET/www/
+tar jcf $FULL_VERSION.orig-lld.tar.bz2 $LLD_TARGET
+rm -rf $LLD_TARGET
+
+# LLDB
+LLDB_TARGET=lldb_$VERSION
+checkout_sources lldb $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET "$BRANCH" $REVISION
+#$SVN_CMD $(get_svn_url lldb $BRANCH $TAG) $LLDB_TARGET
+rm -rf $LLDB_TARGET/www/
+tar jcf $FULL_VERSION.orig-lldb.tar.bz2 $LLDB_TARGET
+rm -rf $LLDB_TARGET
+
+PATH_DEBIAN="$(pwd)/$(dirname $0)/../"
+echo "going into $PATH_DEBIAN"
+export DEBFULLNAME="Sylvestre Ledru"
+export DEBEMAIL="sylvestre@debian.org"
+cd $PATH_DEBIAN
+
+if test -z "$DISTRIBUTION"; then
+    DISTRIBUTION="experimental"
+fi
+
+if test -n "$RCRELEASE" -o -n "$BRANCH"; then
+    EXTRA_DCH_FLAGS="--force-bad-version --allow-lower-version"
+fi
+
+dch $EXTRA_DCH_FLAGS --distribution $DISTRIBUTION --newversion 1:$VERSION-1~exp1 "New snapshot release"
+
+exit 0
diff --git a/patches/0003-Debian-version-info-and-bugreport.patch b/patches/0003-Debian-version-info-and-bugreport.patch
new file mode 100644 (file)
index 0000000..6d28f02
--- /dev/null
@@ -0,0 +1,15 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/lib/Support/CommandLine.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/lib/Support/CommandLine.cpp
++++ llvm-toolchain-snapshot_3.7~svn241915/lib/Support/CommandLine.cpp
+@@ -1747,6 +1747,10 @@ public:
+     OS << " " << LLVM_VERSION_INFO;
+ #endif
+     OS << "\n  ";
++#ifdef LLVM_DEBIAN_INFO
++    OS << LLVM_DEBIAN_INFO;
++#endif
++    OS << "\n  ";
+ #ifndef __OPTIMIZE__
+     OS << "DEBUG build";
+ #else
diff --git a/patches/0021-shared-lib-debian.patch b/patches/0021-shared-lib-debian.patch
new file mode 100644 (file)
index 0000000..b6291fb
--- /dev/null
@@ -0,0 +1,26 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/tools/llvm-shlib/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/tools/llvm-shlib/Makefile
++++ llvm-toolchain-snapshot_3.7~svn241915/tools/llvm-shlib/Makefile
+@@ -41,6 +41,12 @@ LLVMLibsOptions := $(IncludeInLibLlvm:$(
+ LLVMLibsPaths   := $(IncludeInLibLlvm)
+ $(LibName.SO): $(LLVMLibsPaths)
++      $(Echo) Linking $(BuildMode) $(SharedLibKindMessage) \
++        $(LIBRARYNAME)$(SHLIBEXT)
++      $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) \
++        $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS)
++      mv $(LibName.SO) $(LibName.SO).1
++      ln -s $(notdir $(LibName.SO)).1 $(LibName.SO)
+ ifeq ($(HOST_OS),Darwin)
+     # set dylib internal version number to llvmCore submission number
+@@ -61,7 +67,7 @@ endif
+ ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD GNU))
+     # Add soname to the library.
+-    LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
++    LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) -Wl,-Bsymbolic-functions
+ endif
+ ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux GNU GNU/kFreeBSD))
diff --git a/patches/0023-link-libopagent.patch b/patches/0023-link-libopagent.patch
new file mode 100644 (file)
index 0000000..7a4ac52
--- /dev/null
@@ -0,0 +1,33 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/configure
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/configure
++++ llvm-toolchain-snapshot_3.7~svn241915/configure
+@@ -10115,7 +10115,7 @@ if test "${with_oprofile+set}" = set; th
+       case $llvm_cv_os_type in
+         Linux)
+           if test -n "$llvm_cv_oppath" ; then
+-            LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}"
++            #LIBS="$LIBS -lopagent -L${llvm_cv_oppath} -Wl,-rpath,${llvm_cv_oppath}"
+                                                             { echo "$as_me:$LINENO: checking for library containing bfd_init" >&5
+ echo $ECHO_N "checking for library containing bfd_init... $ECHO_C" >&6; }
+ if test "${ac_cv_search_bfd_init+set}" = set; then
+@@ -10211,7 +10211,7 @@ fi
+ echo "${ECHO_T}$ac_cv_search_bfd_init" >&6; }
+ ac_res=$ac_cv_search_bfd_init
+ if test "$ac_res" != no; then
+-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
++  test "$ac_res" = "none required" || true
+ fi
+@@ -10247,8 +10247,8 @@ for ac_lib in '' opagent; do
+   if test -z "$ac_lib"; then
+     ac_res="none required"
+   else
+-    ac_res=-l$ac_lib
+-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
++    ac_res="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed"
++    LIBS="-Wl,--as-needed -l$ac_lib -Wl,--no-as-needed $ac_func_search_save_LIBS"
+   fi
+   rm -f conftest.$ac_objext conftest$ac_exeext
+ if { (ac_try="$ac_link"
diff --git a/patches/0044-soname.diff b/patches/0044-soname.diff
new file mode 100644 (file)
index 0000000..31f7a0f
--- /dev/null
@@ -0,0 +1,25 @@
+Index: llvm-toolchain-snapshot_3.9~svn274438/tools/llvm-shlib/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn274438.orig/tools/llvm-shlib/CMakeLists.txt
++++ llvm-toolchain-snapshot_3.9~svn274438/tools/llvm-shlib/CMakeLists.txt
+@@ -37,6 +37,7 @@ if(LLVM_DYLIB_EXPORTED_SYMBOL_FILE)
+ endif()
+ add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES})
++set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
+ list(REMOVE_DUPLICATES LIB_NAMES)
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
+Index: llvm-toolchain-snapshot_3.9~svn274438/clang/tools/libclang/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn274438.orig/clang/tools/libclang/CMakeLists.txt
++++ llvm-toolchain-snapshot_3.9~svn274438/clang/tools/libclang/CMakeLists.txt
+@@ -83,7 +83,7 @@ else()
+   set(output_name "clang")
+ endif()
+-add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC}
++add_clang_library(libclang ${ENABLE_SHARED} ${ENABLE_STATIC} SONAME
+   OUTPUT_NAME ${output_name}
+   ${SOURCES}
+   DEPENDS clang-headers
diff --git a/patches/19-clang_debian_version.patch b/patches/19-clang_debian_version.patch
new file mode 100644 (file)
index 0000000..c530e14
--- /dev/null
@@ -0,0 +1,21 @@
+Index: llvm-toolchain-snapshot_3.5~svn210337/clang/lib/Basic/Version.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn210337.orig/clang/lib/Basic/Version.cpp
++++ llvm-toolchain-snapshot_3.5~svn210337/clang/lib/Basic/Version.cpp
+@@ -15,6 +15,7 @@
+ #include "clang/Basic/LLVM.h"
+ #include "clang/Config/config.h"
+ #include "llvm/Support/raw_ostream.h"
++#include "clang/Debian/debian_path.h"
+ #include <cstdlib>
+ #include <cstring>
+@@ -125,7 +126,7 @@ std::string getClangToolFullVersion(Stri
+ #ifdef CLANG_VENDOR
+   OS << CLANG_VENDOR;
+ #endif
+-  OS << ToolName << " version " CLANG_VERSION_STRING " "
++  OS << ToolName << " version " CLANG_VERSION_STRING "-" DEB_PATCHSETVERSION " "
+      << getClangFullRepositoryVersion();
+   // If vendor supplied, include the base LLVM version as well.
diff --git a/patches/23-strlcpy_strlcat_warning_removed.diff b/patches/23-strlcpy_strlcat_warning_removed.diff
new file mode 100644 (file)
index 0000000..a4130f0
--- /dev/null
@@ -0,0 +1,198 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/include/clang/Basic/Builtins.def
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/include/clang/Basic/Builtins.def
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/include/clang/Basic/Builtins.def
+@@ -475,8 +475,8 @@ BUILTIN(__builtin___memset_chk, "v*v*izz
+ BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF")
+ BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF")
+ BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF")
+-BUILTIN(__builtin___strlcat_chk, "zc*cC*zz", "nF")
+-BUILTIN(__builtin___strlcpy_chk, "zc*cC*zz", "nF")
++//BUILTIN(__builtin___strlcat_chk, "zc*cC*zz", "nF")
++//BUILTIN(__builtin___strlcpy_chk, "zc*cC*zz", "nF")
+ BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF")
+ BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF")
+ BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF")
+@@ -805,8 +805,8 @@ LIBBUILTIN(getcontext, "iK*",     "fj",
+ LIBBUILTIN(_longjmp, "vJi",       "fr",    "setjmp.h", ALL_GNU_LANGUAGES)
+ LIBBUILTIN(siglongjmp, "vSJi",    "fr",    "setjmp.h", ALL_GNU_LANGUAGES)
+ // non-standard but very common
+-LIBBUILTIN(strlcpy, "zc*cC*z",    "f",     "string.h", ALL_GNU_LANGUAGES)
+-LIBBUILTIN(strlcat, "zc*cC*z",    "f",     "string.h", ALL_GNU_LANGUAGES)
++//LIBBUILTIN(strlcpy, "zc*cC*z",    "f",     "string.h", ALL_GNU_LANGUAGES)
++//LIBBUILTIN(strlcat, "zc*cC*z",    "f",     "string.h", ALL_GNU_LANGUAGES)
+ //   id objc_msgSend(id, SEL, ...)
+ LIBBUILTIN(objc_msgSend, "GGH.",   "f",     "objc/message.h", OBJC_LANG)
+ // long double objc_msgSend_fpret(id self, SEL op, ...) 
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/lib/Sema/SemaChecking.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/lib/Sema/SemaChecking.cpp
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/lib/Sema/SemaChecking.cpp
+@@ -473,8 +473,8 @@ Sema::CheckBuiltinFunctionCall(FunctionD
+   case Builtin::BI__builtin___memcpy_chk:
+   case Builtin::BI__builtin___memmove_chk:
+   case Builtin::BI__builtin___memset_chk:
+-  case Builtin::BI__builtin___strlcat_chk:
+-  case Builtin::BI__builtin___strlcpy_chk:
++//  case Builtin::BI__builtin___strlcat_chk:
++//  case Builtin::BI__builtin___strlcpy_chk:
+   case Builtin::BI__builtin___strncat_chk:
+   case Builtin::BI__builtin___strncpy_chk:
+   case Builtin::BI__builtin___stpncpy_chk:
+@@ -1402,9 +1402,10 @@ bool Sema::CheckFunctionCall(FunctionDec
+     return false;
+   // Handle memory setting and copying functions.
+-  if (CMId == Builtin::BIstrlcpy || CMId == Builtin::BIstrlcat)
+-    CheckStrlcpycatArguments(TheCall, FnInfo);
+-  else if (CMId == Builtin::BIstrncat)
++//  if (CMId == Builtin::BIstrlcpy || CMId == Builtin::BIstrlcat)
++//    CheckStrlcpycatArguments(TheCall, FnInfo);
++//  else
++  if (CMId == Builtin::BIstrncat)
+     CheckStrncatArguments(TheCall, FnInfo);
+   else
+     CheckMemaccessArguments(TheCall, CMId, FnInfo);
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/lib/AST/Decl.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/lib/AST/Decl.cpp
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/lib/AST/Decl.cpp
+@@ -3242,13 +3242,13 @@ unsigned FunctionDecl::getMemoryFunction
+   case Builtin::BImemmove:
+     return Builtin::BImemmove;
+-  case Builtin::BIstrlcpy:
+-  case Builtin::BI__builtin___strlcpy_chk:
+-    return Builtin::BIstrlcpy;
++//  case Builtin::BIstrlcpy:
++//  case Builtin::BI__builtin___strlcpy_chk:
++//    return Builtin::BIstrlcpy;
+-  case Builtin::BIstrlcat:
+-  case Builtin::BI__builtin___strlcat_chk:
+-    return Builtin::BIstrlcat;
++//  case Builtin::BIstrlcat:
++//  case Builtin::BI__builtin___strlcat_chk:
++//    return Builtin::BIstrlcat;
+   case Builtin::BI__builtin_memcmp:
+   case Builtin::BImemcmp:
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/lib/StaticAnalyzer/Checkers/GenericTaintChecker.cpp
+@@ -237,9 +237,9 @@ GenericTaintChecker::TaintPropagationRul
+     case Builtin::BIstrncpy:
+     case Builtin::BIstrncat:
+       return TaintPropagationRule(1, 2, 0, true);
+-    case Builtin::BIstrlcpy:
+-    case Builtin::BIstrlcat:
+-      return TaintPropagationRule(1, 2, 0, false);
++//    case Builtin::BIstrlcpy:
++//    case Builtin::BIstrlcat:
++//      return TaintPropagationRule(1, 2, 0, false);
+     case Builtin::BIstrndup:
+       return TaintPropagationRule(0, 1, ReturnValueIndex);
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/test/Sema/warn-strlcpycat-size.c
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/test/Sema/warn-strlcpycat-size.c
++++ /dev/null
+@@ -1,55 +0,0 @@
+-// RUN: %clang_cc1 -Wstrlcpy-strlcat-size -verify -fsyntax-only %s
+-
+-typedef __SIZE_TYPE__ size_t;
+-size_t strlcpy (char * restrict dst, const char * restrict src, size_t size);
+-size_t strlcat (char * restrict dst, const char * restrict src, size_t size);
+-size_t strlen (const char *s);
+-
+-char s1[100];
+-char s2[200];
+-char * s3;
+-
+-struct {
+-  char f1[100];
+-  char f2[100][3];
+-} s4, **s5;
+-
+-int x;
+-
+-void f(void)
+-{
+-  strlcpy(s1, s2, sizeof(s1)); // no warning
+-  strlcpy(s1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-  strlcpy(s1, s3, strlen(s3)+1); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-  strlcat(s2, s3, sizeof(s3)); // expected-warning {{size argument in 'strlcat' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-  strlcpy(s4.f1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-  strlcpy((*s5)->f2[x], s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-  strlcpy(s1+3, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}}
+-}
+-
+-// Don't issue FIXIT for flexible arrays.
+-struct S {
+-  int y; 
+-  char x[];
+-};
+-
+-void flexible_arrays(struct S *s) {
+-  char str[] = "hi";
+-  strlcpy(s->x, str, sizeof(str));  // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}}
+-}
+-
+-// Don't issue FIXIT for destinations of size 1.
+-void size_1() {
+-  char z[1];
+-  char str[] = "hi";
+-
+-  strlcpy(z, str, sizeof(str));  // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}}
+-}
+-
+-// Support VLAs.
+-void vlas(int size) {
+-  char z[size];
+-  char str[] = "hi";
+-
+-  strlcpy(z, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} expected-note {{change size argument to be the size of the destination}}
+-}
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/test/Sema/builtins.c
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/test/Sema/builtins.c
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/test/Sema/builtins.c
+@@ -190,11 +190,11 @@ void test18() {
+   ptr = __builtin___memccpy_chk(dst, src, '\037', sizeof(src), sizeof(dst));
+   result = __builtin___strlcpy_chk(dst, src, sizeof(dst), sizeof(dst));
+-  result = __builtin___strlcat_chk(dst, src, sizeof(dst), sizeof(dst));
++//  result = __builtin___strlcat_chk(dst, src, sizeof(dst), sizeof(dst));
+   ptr = __builtin___memccpy_chk(dst, src, '\037', sizeof(src));      // expected-error {{too few arguments to function call}}
+   ptr = __builtin___strlcpy_chk(dst, src, sizeof(dst), sizeof(dst)); // expected-warning {{incompatible integer to pointer conversion}}
+-  ptr = __builtin___strlcat_chk(dst, src, sizeof(dst), sizeof(dst)); // expected-warning {{incompatible integer to pointer conversion}}
++//  ptr = __builtin___strlcat_chk(dst, src, sizeof(dst), sizeof(dst)); // expected-warning {{incompatible integer to pointer conversion}}
+ }
+ void no_ms_builtins() {
+@@ -209,12 +209,12 @@ void unavailable() {
+ }
+ // rdar://18259539
+-size_t strlcpy(char * restrict dst, const char * restrict src, size_t size);
+-size_t strlcat(char * restrict dst, const char * restrict src, size_t size);
++//size_t strlcpy(char * restrict dst, const char * restrict src, size_t size);
++//size_t strlcat(char * restrict dst, const char * restrict src, size_t size);
+ void Test19(void)
+ {
+-        static char b[40];
++/*        static char b[40];
+         static char buf[20];
+         strlcpy(buf, b, sizeof(b)); // expected-warning {{size argument in 'strlcpy' call appears to be size of the source; expected the size of the destination}} \\
+@@ -229,6 +229,7 @@ void Test19(void)
+         __builtin___strlcat_chk(buf, b, sizeof(b), __builtin_object_size(buf, 0)); // expected-warning {{size argument in '__builtin___strlcat_chk' call appears to be size of the source; expected the size of the destination}} \
+                                                                                    // expected-note {{change size argument to be the size of the destination}} \
+                                                                                  // expected-warning {{'__builtin___strlcat_chk' will always overflow destination buffer}}
++                                                                   */
+ }
+ // rdar://11076881
diff --git a/patches/26-set-correct-float-abi.diff b/patches/26-set-correct-float-abi.diff
new file mode 100644 (file)
index 0000000..eb1756e
--- /dev/null
@@ -0,0 +1,33 @@
+Description: set correct float abi settings for armel and armhf
+ debian armel supports systems that don't have a fpu so should use a "float abi"
+ setting of soft by default.
+ Debian armhf needs a float abi setting of "hard"
+Author: Peter Michael Green <plugwash@debian.org>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+Index: llvm-toolchain-snapshot_3.9~svn273780/clang/lib/Driver/Tools.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn273780.orig/clang/lib/Driver/Tools.cpp
++++ llvm-toolchain-snapshot_3.9~svn273780/clang/lib/Driver/Tools.cpp
+@@ -811,7 +811,7 @@ arm::FloatABI arm::getARMFloatABI(const
+       case llvm::Triple::MuslEABI:
+       case llvm::Triple::EABI:
+         // EABI is always AAPCS, and if it was not marked 'hard', it's softfp
+-        ABI = FloatABI::SoftFP;
++        ABI = FloatABI::Soft;
+         break;
+       case llvm::Triple::Android:
+         ABI = (SubArch == 7) ? FloatABI::SoftFP : FloatABI::Soft;
diff --git a/patches/27-fix_clang_stdint.diff b/patches/27-fix_clang_stdint.diff
new file mode 100644 (file)
index 0000000..6cb6780
--- /dev/null
@@ -0,0 +1,29 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/clang/lib/Headers/stdint.h
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/clang/lib/Headers/stdint.h
++++ llvm-toolchain-snapshot_3.7~svn241915/clang/lib/Headers/stdint.h
+@@ -22,8 +22,6 @@
+  *
+ \*===----------------------------------------------------------------------===*/
+-#ifndef __CLANG_STDINT_H
+-#define __CLANG_STDINT_H
+ /* If we're hosted, fall back to the system's stdint.h, which might have
+  * additional definitions.
+@@ -72,6 +70,8 @@
+ # endif
+ #else
++#ifndef __CLANG_STDINT_H
++#define __CLANG_STDINT_H
+ /* C99 7.18.1.1 Exact-width integer types.
+  * C99 7.18.1.2 Minimum-width integer types.
+@@ -703,5 +703,5 @@ typedef __UINTMAX_TYPE__ uintmax_t;
+ #define INTMAX_C(v)   __INTN_C(__INTMAX_WIDTH__, v)
+ #define UINTMAX_C(v) __UINTN_C(__INTMAX_WIDTH__, v)
+-#endif /* __STDC_HOSTED__ */
+ #endif /* __CLANG_STDINT_H */
++#endif /* __STDC_HOSTED__ */
diff --git a/patches/31-powerpcspe.diff b/patches/31-powerpcspe.diff
new file mode 100644 (file)
index 0000000..8eacce7
--- /dev/null
@@ -0,0 +1,15 @@
+Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Lex/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/Lex/Makefile  2013-08-22 09:07:43.368608381 +0200
++++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Lex/Makefile       2013-08-22 09:07:43.368608381 +0200
+@@ -17,8 +17,10 @@
+ LIBRARYNAME := clangLex
+ ifeq ($(ARCH),PowerPC)
++ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),powerpcspe)
+ CXX.Flags += -maltivec
+ endif
++endif
+ include $(CLANG_LEVEL)/Makefile
diff --git a/patches/34-powerpc-no-altivec.diff b/patches/34-powerpc-no-altivec.diff
new file mode 100644 (file)
index 0000000..5f05828
--- /dev/null
@@ -0,0 +1,24 @@
+Description: Make sure PowerPC doesn't default to altivec on
+Author: Adam Conrad <adconrad@ubuntu.com>
+Author: Peter Michael Green <plugwash@debian.org>
+Forwarded: no
+Reviewed-By: Colin Watson <cjwatson@ubuntu.com>
+
+Last-Update: 2013-04-01
+
+Index: llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Lex/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.4~svn188990.orig/clang/lib/Lex/Makefile  2013-08-22 09:11:26.616602695 +0200
++++ llvm-toolchain-snapshot_3.4~svn188990/clang/lib/Lex/Makefile       2013-08-22 09:11:26.616602695 +0200
+@@ -16,11 +16,5 @@
+ LIBRARYNAME := clangLex
+-ifeq ($(ARCH),PowerPC)
+-ifneq ($(shell dpkg-architecture -qDEB_HOST_ARCH),powerpcspe)
+-CXX.Flags += -maltivec
+-endif
+-endif
+-
+ include $(CLANG_LEVEL)/Makefile
diff --git a/patches/857623-allow-opencl-pointer-to-bool.diff b/patches/857623-allow-opencl-pointer-to-bool.diff
new file mode 100644 (file)
index 0000000..d3c9371
--- /dev/null
@@ -0,0 +1,20 @@
+Description: Allow "if (!pointer)" in OpenCL 1.1
+
+Used by e.g. Blender on mesa-opencl-icd
+
+Author: Anastasia Stulova
+Origin: upstream https://reviews.llvm.org/rL294313
+Bug: https://bugs.llvm.org/show_bug.cgi?id=30217
+Bug-Debian: https://bugs.debian.org/857623
+
+--- llvm-toolchain-3.9-3.9.1.orig/clang/lib/Sema/SemaExpr.cpp
++++ llvm-toolchain-3.9-3.9.1/clang/lib/Sema/SemaExpr.cpp
+@@ -11424,7 +11424,7 @@ ExprResult Sema::CreateBuiltinUnaryOp(So
+                  Context.getLangOpts().OpenCLVersion < 120) {
+         // OpenCL v1.1 6.3.h: The logical operator not (!) does not
+         // operate on scalar float types.
+-        if (!resultType->isIntegerType())
++        if (!resultType->isIntegerType() && !resultType->isPointerType())
+           return ExprError(Diag(OpLoc, diag::err_typecheck_unary_expr)
+                            << resultType << Input.get()->getSourceRange());
+       }
diff --git a/patches/D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff b/patches/D17567-PR23529-Sema-part-of-attrbute-abi_tag-support.diff
new file mode 100644 (file)
index 0000000..44b7fb7
--- /dev/null
@@ -0,0 +1,322 @@
+Index: b/clang/docs/ItaniumMangleAbiTags.rst
+===================================================================
+--- /dev/null
++++ b/clang/docs/ItaniumMangleAbiTags.rst
+@@ -0,0 +1,101 @@
++========
++ABI tags
++========
++
++Introduction
++============
++
++This text tries to describe gcc semantic for mangling "abi_tag" attributes
++described in https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html
++
++There is no guarantee the following rules are correct, complete or make sense
++in any way as they were determined empirically by experiments with gcc5.
++
++Declaration
++===========
++
++ABI tags are declared in an abi_tag attribute and can be applied to a
++function, variable, class or inline namespace declaration. The attribute takes
++one or more strings (called tags); the order does not matter.
++
++See https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html for
++details.
++
++Tags on an inline namespace are called "implicit tags", all other tags are
++"explicit tags".
++
++Mangling
++========
++
++All tags that are "active" on an <unqualified-name> are emitted after the
++<unqualified-name>, before <template-args> or <discriminator>, and are part of
++the same <substitution> the <unqualified-name> is.
++
++They are mangled as:
++
++    <abi-tags> ::= <abi-tag>*   # sort by name
++    <abi-tag> ::= B <tag source-name>
++
++Example:
++
++    __attribute__((abi_tag("test")))
++    void Func();
++
++    gets mangled as: _Z4FuncB4testv (prettified as `Func[abi:test]()`)
++
++Active tags
++===========
++
++A namespace does not have any active tags. For types (class / struct / union /
++enum), the explicit tags are the active tags.
++
++For variables and functions, the active tags are the explicit tags plus any
++"required tags" which are not in the "available tags" set:
++
++    derived-tags := (required-tags - available-tags)
++    active-tags := explicit-tags + derived-tags
++
++Required tags for a function
++============================
++
++If a function is used as a local scope for another name, and is part of
++another function as local scope, it doesn't have any required tags.
++
++If a function is used as a local scope for a guard variable name, it doesn't
++have any required tags.
++
++Otherwise the function requires any implicit or explicit tag used in the name
++for the return type.
++
++Example:
++    namespace A {
++      inline namespace B __attribute__((abi_tag)) {
++        struct C { int x; };
++      }
++    }
++
++    A::C foo();
++
++    gets mangled as: _Z3fooB1Bv (prettified as `foo[abi:B]()`)
++
++Required tags for a variable
++============================
++
++A variable requires any implicit or explicit tag used in its type.
++
++Available tags
++==============
++
++All tags used in the prefix and in the template arguments for a name are
++available. Also, for functions, all tags from the <bare-function-type>
++(which might include the return type for template functions) are available.
++
++For <local-name>s all active tags used in the local part (<function-
++encoding>) are available, but not implicit tags which were not active.
++
++Implicit and explicit tags used in the <unqualified-name> for a function (as
++in the type of a cast operator) are NOT available.
++
++Example: a cast operator to std::string (which is
++std::__cxx11::basic_string<...>) will use 'cxx11' as an active tag, as it is
++required from the return type `std::string` but not available.
+Index: b/clang/include/clang/Basic/Attr.td
+===================================================================
+--- a/clang/include/clang/Basic/Attr.td
++++ b/clang/include/clang/Basic/Attr.td
+@@ -349,6 +349,14 @@ class IgnoredAttr : Attr {
+ // Attributes begin here
+ //
++def AbiTag : Attr {
++  let Spellings = [GCC<"abi_tag">];
++  let Args = [VariadicStringArgument<"Tags">];
++  let Subjects = SubjectList<[Struct, Var, Function, Namespace], ErrorDiag,
++      "ExpectedStructClassVariableFunctionOrInlineNamespace">;
++  let Documentation = [AbiTagsDocs];
++}
++
+ def AddressSpace : TypeAttr {
+   let Spellings = [GNU<"address_space">];
+   let Args = [IntArgument<"AddressSpace">];
+Index: b/clang/include/clang/Basic/AttrDocs.td
+===================================================================
+--- a/clang/include/clang/Basic/AttrDocs.td
++++ b/clang/include/clang/Basic/AttrDocs.td
+@@ -1859,3 +1859,16 @@ Marking virtual functions as ``disable_t
+   }];
+ }
++
++def AbiTagsDocs : Documentation {
++  let Content = [{
++The ``abi_tag`` attribute can be applied to a function, variable, class or
++inline namespace declaration to modify the mangled name of the entity. It gives
++the ability to distinguish between different versions of the same entity but
++with different ABI versions supported. For example, a newer version of a class
++could have a different set of data members and thus have a different size. Using
++the ``abi_tag`` attribute, it is possible to have different mangled names for
++a global variable of the class type. Therefor, the old code could keep using
++the old manged name and the new code will use the new mangled name with tags.
++  }];
++}
+Index: b/clang/include/clang/Basic/DiagnosticSemaKinds.td
+===================================================================
+--- a/clang/include/clang/Basic/DiagnosticSemaKinds.td
++++ b/clang/include/clang/Basic/DiagnosticSemaKinds.td
+@@ -2434,7 +2434,8 @@ def warn_attribute_wrong_decl_type : War
+   "Objective-C instance methods|init methods of interface or class extension declarations|"
+   "variables, functions and classes|Objective-C protocols|"
+   "functions and global variables|structs, unions, and typedefs|structs and typedefs|"
+-  "interface or protocol declarations|kernel functions|non-K&R-style functions}1">,
++  "interface or protocol declarations|kernel functions|non-K&R-style functions|"
++  "structs, classes, variables, functions, and inline namespaces}1">,
+   InGroup<IgnoredAttributes>;
+ def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>;
+ def warn_type_attribute_wrong_type : Warning<
+@@ -4144,6 +4145,13 @@ def err_definition_of_explicitly_default
+ def err_redefinition_extern_inline : Error<
+   "redefinition of a 'extern inline' function %0 is not supported in "
+   "%select{C99 mode|C++}1">;
++def warn_attr_abi_tag_namespace : Warning<
++  "'abi_tag' attribute on %select{non-inline|anonymous}0 namespace ignored">,
++  InGroup<IgnoredAttributes>;
++def err_abi_tag_on_redeclaration : Error<
++  "cannot add 'abi_tag' attribute in a redeclaration">;
++def err_new_abi_tag_on_redeclaration : Error<
++  "'abi_tag' %0 missing in original declaration">;
+ def note_deleted_dtor_no_operator_delete : Note<
+   "virtual destructor requires an unambiguous, accessible 'operator delete'">;
+Index: b/clang/include/clang/Sema/AttributeList.h
+===================================================================
+--- a/clang/include/clang/Sema/AttributeList.h
++++ b/clang/include/clang/Sema/AttributeList.h
+@@ -855,7 +855,8 @@ enum AttributeDeclKind {
+   ExpectedStructOrTypedef,
+   ExpectedObjectiveCInterfaceOrProtocol,
+   ExpectedKernelFunction,
+-  ExpectedFunctionWithProtoType
++  ExpectedFunctionWithProtoType,
++  ExpectedStructClassVariableFunctionOrInlineNamespace
+ };
+ }  // end namespace clang
+Index: b/clang/lib/Sema/SemaDecl.cpp
+===================================================================
+--- a/clang/lib/Sema/SemaDecl.cpp
++++ b/clang/lib/Sema/SemaDecl.cpp
+@@ -2396,6 +2396,24 @@ void Sema::mergeDeclAttributes(NamedDecl
+     }
+   }
++  // Re-declaration cannot add abi_tag's.
++  if (const auto *NewAbiTagAttr = New->getAttr<AbiTagAttr>()) {
++    if (const auto *OldAbiTagAttr = Old->getAttr<AbiTagAttr>()) {
++      for (const auto &NewTag : NewAbiTagAttr->tags()) {
++        if (std::find(OldAbiTagAttr->tags_begin(), OldAbiTagAttr->tags_end(),
++                      NewTag) == OldAbiTagAttr->tags_end()) {
++          Diag(NewAbiTagAttr->getLocation(),
++               diag::err_new_abi_tag_on_redeclaration)
++              << NewTag;
++          Diag(OldAbiTagAttr->getLocation(), diag::note_previous_declaration);
++        }
++      }
++    } else {
++      Diag(NewAbiTagAttr->getLocation(), diag::err_abi_tag_on_redeclaration);
++      Diag(Old->getLocation(), diag::note_previous_declaration);
++    }
++  }
++
+   if (!Old->hasAttrs())
+     return;
+Index: b/clang/lib/Sema/SemaDeclAttr.cpp
+===================================================================
+--- a/clang/lib/Sema/SemaDeclAttr.cpp
++++ b/clang/lib/Sema/SemaDeclAttr.cpp
+@@ -4446,6 +4446,42 @@ static void handleDeclspecThreadAttr(Sem
+       Attr.getRange(), S.Context, Attr.getAttributeSpellingListIndex()));
+ }
++static void handleAbiTagAttr(Sema &S, Decl *D, const AttributeList &Attr) {
++  SmallVector<std::string, 4> Tags;
++  for (unsigned I = 0, E = Attr.getNumArgs(); I != E; ++I) {
++    StringRef Tag;
++    if (!S.checkStringLiteralArgumentAttr(Attr, I, Tag))
++      return;
++    Tags.push_back(Tag);
++  }
++
++  if (const auto *NS = dyn_cast<NamespaceDecl>(D)) {
++    if (!NS->isInline()) {
++      S.Diag(Attr.getLoc(), diag::warn_attr_abi_tag_namespace) << 0;
++      return;
++    }
++    if (NS->isAnonymousNamespace()) {
++      S.Diag(Attr.getLoc(), diag::warn_attr_abi_tag_namespace) << 1;
++      return;
++    }
++    if (Attr.getNumArgs() == 0)
++      Tags.push_back(NS->getName());
++  } else if (!checkAttributeAtLeastNumArgs(S, Attr, 1))
++    return;
++
++  // Store tags sorted and without duplicates.
++  std::sort(Tags.begin(), Tags.end());
++  Tags.erase(std::unique(Tags.begin(), Tags.end()), Tags.end());
++
++  D->addAttr(::new (S.Context)
++             AbiTagAttr(Attr.getRange(), S.Context, Tags.data(), Tags.size(),
++                        Attr.getAttributeSpellingListIndex()));
++
++  // FIXME: remove this warning as soon as mangled part is ready.
++  S.Diag(Attr.getRange().getBegin(), diag::warn_attribute_ignored)
++        << Attr.getName();
++}
++
+ static void handleARMInterruptAttr(Sema &S, Decl *D,
+                                    const AttributeList &Attr) {
+   // Check the attribute arguments.
+@@ -5360,6 +5396,9 @@ static void ProcessDeclAttribute(Sema &S
+   case AttributeList::AT_Thread:
+     handleDeclspecThreadAttr(S, D, Attr);
+     break;
++  case AttributeList::AT_AbiTag:
++    handleAbiTagAttr(S, D, Attr);
++    break;
+   // Thread safety attributes:
+   case AttributeList::AT_AssertExclusiveLock:
+Index: b/clang/test/SemaCXX/attr-abi-tag-syntax.cpp
+===================================================================
+--- /dev/null
++++ b/clang/test/SemaCXX/attr-abi-tag-syntax.cpp
+@@ -0,0 +1,43 @@
++// RUN: %clang_cc1 -std=c++11 -fsyntax-only -verify %s
++
++namespace N1 {
++
++namespace __attribute__((__abi_tag__)) {}
++// expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
++
++namespace N __attribute__((__abi_tag__)) {}
++// expected-warning@-1 {{'abi_tag' attribute on non-inline namespace ignored}}
++
++} // namespace N1
++
++namespace N2 {
++
++inline namespace __attribute__((__abi_tag__)) {}
++// expected-warning@-1 {{'abi_tag' attribute on anonymous namespace ignored}}
++
++inline namespace N __attribute__((__abi_tag__)) {}
++// FIXME: remove this warning as soon as attribute fully supported.
++// expected-warning@-2 {{'__abi_tag__' attribute ignored}}
++
++} // namespcace N2
++
++__attribute__((abi_tag("B", "A"))) extern int a1;
++// FIXME: remove this warning as soon as attribute fully supported.
++// expected-warning@-2 {{'abi_tag' attribute ignored}}
++
++__attribute__((abi_tag("A", "B"))) extern int a1;
++// expected-note@-1 {{previous declaration is here}}
++// FIXME: remove this warning as soon as attribute fully supported.
++// expected-warning@-3 {{'abi_tag' attribute ignored}}
++
++__attribute__((abi_tag("A", "C"))) extern int a1;
++// expected-error@-1 {{'abi_tag' C missing in original declaration}}
++// FIXME: remove this warning as soon as attribute fully supported.
++// expected-warning@-3 {{'abi_tag' attribute ignored}}
++
++extern int a2;
++// expected-note@-1 {{previous declaration is here}}
++__attribute__((abi_tag("A")))extern int a2;
++// expected-error@-1 {{cannot add 'abi_tag' attribute in a redeclaration}}
++// FIXME: remove this warning as soon as attribute fully supported.
++// expected-warning@-3 {{'abi_tag' attribute ignored}}
diff --git a/patches/D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff b/patches/D18035-PR23529-Mangler-part-of-attrbute-abi_tag-support.diff
new file mode 100644 (file)
index 0000000..3f01aa4
--- /dev/null
@@ -0,0 +1,1234 @@
+Index: b/clang/lib/AST/ItaniumMangle.cpp
+===================================================================
+--- a/clang/lib/AST/ItaniumMangle.cpp
++++ b/clang/lib/AST/ItaniumMangle.cpp
+@@ -212,6 +212,12 @@ public:
+ class CXXNameMangler {
+   ItaniumMangleContextImpl &Context;
+   raw_ostream &Out;
++  bool NullOut = false;
++  /// In the "DisableDerivedAbiTags" mode derived ABI tags are not calculated.
++  /// This mode is used when mangler creates another mangler recursively to
++  /// calculate ABI tags for the function return value or the variable type.
++  /// Also it is required to avoid infinite recursion in some cases.
++  bool DisableDerivedAbiTags = false;
+   /// The "structor" is the top-level declaration being mangled, if
+   /// that's not a template specialization; otherwise it's the pattern
+@@ -261,15 +267,131 @@ class CXXNameMangler {
+   } FunctionTypeDepth;
++  // abi_tag is a gcc attribute, taking one or more strings called "tags".
++  // The goal is to annotate against which version of a library an object was
++  // built and to be able to provide backwards compatibility ("dual abi").
++  // For more information see docs/ItaniumMangleAbiTags.rst.
++  typedef SmallVector<StringRef, 4> AbiTagList;
++  typedef llvm::SmallSetVector<StringRef, 4> AbiTagSet;
++
++  // State to gather all implicit and explicit tags used in a mangled name.
++  // Must always have an instance of this while emitting any name to keep
++  // track.
++  class AbiTagState final {
++    //! All abi tags used implicitly or explicitly
++    AbiTagSet UsedAbiTags;
++    //! All explicit abi tags (i.e. not from namespace)
++    AbiTagSet EmittedAbiTags;
++
++    AbiTagState *&LinkHead;
++    AbiTagState *Parent = nullptr;
++
++    bool LinkActive = false;
++
++  public:
++    explicit AbiTagState(AbiTagState *&Head) : LinkHead(Head) {
++      Parent = LinkHead;
++      LinkHead = this;
++      LinkActive = true;
++    }
++
++    // no copy, no move
++    AbiTagState(const AbiTagState &) = delete;
++    AbiTagState &operator=(const AbiTagState &) = delete;
++
++    ~AbiTagState() { pop(); }
++
++    void pop() {
++      if (!LinkActive)
++        return;
++
++      assert(LinkHead == this &&
++             "abi tag link head must point to us on destruction");
++      LinkActive = false;
++      if (Parent) {
++        Parent->UsedAbiTags.insert(UsedAbiTags.begin(), UsedAbiTags.end());
++        Parent->EmittedAbiTags.insert(EmittedAbiTags.begin(),
++                                      EmittedAbiTags.end());
++      }
++      LinkHead = Parent;
++    }
++
++    void write(raw_ostream &Out, const NamedDecl *ND,
++               const AbiTagList *AdditionalAbiTags) {
++      ND = cast<NamedDecl>(ND->getCanonicalDecl());
++
++      if (!isa<FunctionDecl>(ND) && !isa<VarDecl>(ND)) {
++        assert(
++            !AdditionalAbiTags &&
++            "only function and variables need a list of additional abi tags");
++        if (const auto *NS = dyn_cast<NamespaceDecl>(ND)) {
++          if (const auto *AbiTag = NS->getAttr<AbiTagAttr>()) {
++            for (const auto &Tag : AbiTag->tags()) {
++              UsedAbiTags.insert(Tag);
++            }
++          }
++          // Don't emit abi tags for namespaces.
++          return;
++        }
++      }
++
++      AbiTagList TagList;
++      if (const auto *AbiTag = ND->getAttr<AbiTagAttr>()) {
++        for (const auto &Tag : AbiTag->tags()) {
++          UsedAbiTags.insert(Tag);
++          // AbiTag->tags() is sorted and has no duplicates
++          TagList.push_back(Tag);
++        }
++      }
++
++      if (AdditionalAbiTags) {
++        for (const auto &Tag : *AdditionalAbiTags) {
++          UsedAbiTags.insert(Tag);
++          if (std::find(TagList.begin(), TagList.end(), Tag) == TagList.end()) {
++            // don't insert duplicates
++            TagList.push_back(Tag);
++          }
++        }
++        // AbiTag->tags() are already sorted; only add if we had additional tags
++        std::sort(TagList.begin(), TagList.end());
++      }
++
++      writeSortedUniqueAbiTags(Out, TagList);
++    }
++
++    const AbiTagSet &getUsedAbiTags() const { return UsedAbiTags; }
++    void setUsedAbiTags(const AbiTagSet &AbiTags) {
++      UsedAbiTags = AbiTags;
++    }
++
++    const AbiTagSet &getEmittedAbiTags() const {
++      return EmittedAbiTags;
++    }
++
++  private:
++    template <typename TagList>
++    void writeSortedUniqueAbiTags(raw_ostream &Out, TagList const &AbiTags) {
++      for (const auto &Tag : AbiTags) {
++        EmittedAbiTags.insert(Tag);
++        Out << "B";
++        Out << Tag.size();
++        Out << Tag;
++      }
++    }
++  };
++
++  AbiTagState *AbiTags = nullptr;
++  AbiTagState AbiTagsRoot;
++
+   llvm::DenseMap<uintptr_t, unsigned> Substitutions;
+   ASTContext &getASTContext() const { return Context.getASTContext(); }
+ public:
+   CXXNameMangler(ItaniumMangleContextImpl &C, raw_ostream &Out_,
+-                 const NamedDecl *D = nullptr)
+-    : Context(C), Out(Out_), Structor(getStructor(D)), StructorType(0),
+-      SeqID(0) {
++                 const NamedDecl *D = nullptr, bool NullOut_ = false)
++    : Context(C), Out(Out_), NullOut(NullOut_),  Structor(getStructor(D)),
++      StructorType(0), SeqID(0), AbiTagsRoot(AbiTags) {
+     // These can't be mangled without a ctor type or dtor type.
+     assert(!D || (!isa<CXXDestructorDecl>(D) &&
+                   !isa<CXXConstructorDecl>(D)));
+@@ -277,11 +399,16 @@ public:
+   CXXNameMangler(ItaniumMangleContextImpl &C, raw_ostream &Out_,
+                  const CXXConstructorDecl *D, CXXCtorType Type)
+     : Context(C), Out(Out_), Structor(getStructor(D)), StructorType(Type),
+-      SeqID(0) { }
++      SeqID(0), AbiTagsRoot(AbiTags) { }
+   CXXNameMangler(ItaniumMangleContextImpl &C, raw_ostream &Out_,
+                  const CXXDestructorDecl *D, CXXDtorType Type)
+     : Context(C), Out(Out_), Structor(getStructor(D)), StructorType(Type),
+-      SeqID(0) { }
++      SeqID(0), AbiTagsRoot(AbiTags) { }
++
++  CXXNameMangler(CXXNameMangler &Outer, llvm::raw_null_ostream &Out_)
++      : Context(Outer.Context), Out(Out_), NullOut(true),
++        Structor(Outer.Structor), StructorType(Outer.StructorType),
++        SeqID(Outer.SeqID), AbiTagsRoot(AbiTags) {}
+ #if MANGLE_CHECKER
+   ~CXXNameMangler() {
+@@ -296,14 +423,18 @@ public:
+ #endif
+   raw_ostream &getStream() { return Out; }
++  void disableDerivedAbiTags() { DisableDerivedAbiTags = true; }
++  static bool shouldHaveAbiTags(ItaniumMangleContextImpl &C, const VarDecl *VD);
++
+   void mangle(const NamedDecl *D);
+   void mangleCallOffset(int64_t NonVirtual, int64_t Virtual);
+   void mangleNumber(const llvm::APSInt &I);
+   void mangleNumber(int64_t Number);
+   void mangleFloat(const llvm::APFloat &F);
+-  void mangleFunctionEncoding(const FunctionDecl *FD);
++  void mangleFunctionEncoding(const FunctionDecl *FD,
++                              bool ExcludeUnqualifiedName = false);
+   void mangleSeqID(unsigned SeqID);
+-  void mangleName(const NamedDecl *ND);
++  void mangleName(const NamedDecl *ND, bool ExcludeUnqualifiedName = false);
+   void mangleType(QualType T);
+   void mangleNameOrStandardSubstitution(const NamedDecl *ND);
+   
+@@ -334,31 +465,53 @@ private:
+                             DeclarationName name,
+                             unsigned KnownArity = UnknownArity);
+-  void mangleName(const TemplateDecl *TD,
+-                  const TemplateArgument *TemplateArgs,
+-                  unsigned NumTemplateArgs);
+-  void mangleUnqualifiedName(const NamedDecl *ND) {
+-    mangleUnqualifiedName(ND, ND->getDeclName(), UnknownArity);
++  void mangleFunctionEncodingBareType(const FunctionDecl *FD);
++
++  void mangleNameWithAbiTags(const NamedDecl *ND,
++                             const AbiTagList *AdditionalAbiTags,
++                             bool ExcludeUnqualifiedName);
++  void mangleTemplateName(const TemplateDecl *TD,
++                          const AbiTagList *AdditionalAbiTags,
++                          bool ExcludeUnqualifiedName,
++                          const TemplateArgument *TemplateArgs,
++                          unsigned NumTemplateArgs);
++  void mangleUnqualifiedName(const NamedDecl *ND,
++                             const AbiTagList *AdditionalAbiTags) {
++    mangleUnqualifiedName(ND, ND->getDeclName(), UnknownArity,
++                          AdditionalAbiTags);
+   }
+   void mangleUnqualifiedName(const NamedDecl *ND, DeclarationName Name,
+-                             unsigned KnownArity);
+-  void mangleUnscopedName(const NamedDecl *ND);
+-  void mangleUnscopedTemplateName(const TemplateDecl *ND);
+-  void mangleUnscopedTemplateName(TemplateName);
++                             unsigned KnownArity,
++                             const AbiTagList *AdditionalAbiTags);
++  void mangleUnscopedName(const NamedDecl *ND,
++                          const AbiTagList *AdditionalAbiTags);
++  void mangleUnscopedTemplateName(const TemplateDecl *ND,
++                                  const AbiTagList *AdditionalAbiTags);
++  void mangleUnscopedTemplateName(TemplateName,
++                                  const AbiTagList *AdditionalAbiTags);
+   void mangleSourceName(const IdentifierInfo *II);
+-  void mangleLocalName(const Decl *D);
++  void mangleLocalName(const Decl *D,
++                       const AbiTagList *AdditionalAbiTags,
++                       bool ExcludeUnqualifiedName);
+   void mangleBlockForPrefix(const BlockDecl *Block);
+   void mangleUnqualifiedBlock(const BlockDecl *Block);
+   void mangleLambda(const CXXRecordDecl *Lambda);
+   void mangleNestedName(const NamedDecl *ND, const DeclContext *DC,
+-                        bool NoFunction=false);
++                        const AbiTagList *AdditionalAbiTags,
++                        bool NoFunction,
++                        bool ExcludeUnqualifiedName);
+   void mangleNestedName(const TemplateDecl *TD,
++                        const AbiTagList *AdditionalAbiTags,
++                        bool ExcludeUnqualifiedName,
+                         const TemplateArgument *TemplateArgs,
+                         unsigned NumTemplateArgs);
+   void manglePrefix(NestedNameSpecifier *qualifier);
+   void manglePrefix(const DeclContext *DC, bool NoFunction=false);
+   void manglePrefix(QualType type);
+-  void mangleTemplatePrefix(const TemplateDecl *ND, bool NoFunction=false);
++  void mangleTemplatePrefix(const TemplateDecl *ND,
++                            const AbiTagList *AdditionalAbiTags,
++                            bool NoFunction = false,
++                            bool ExcludeUnqualifiedName = false);
+   void mangleTemplatePrefix(TemplateName Template);
+   bool mangleUnresolvedTypeOrSimpleId(QualType DestroyedType,
+                                       StringRef Prefix = "");
+@@ -405,6 +558,13 @@ private:
+   void mangleTemplateParameter(unsigned Index);
+   void mangleFunctionParam(const ParmVarDecl *parm);
++
++  void writeAbiTags(const NamedDecl *ND,
++                    const AbiTagList *AdditionalAbiTags = nullptr);
++
++  AbiTagSet getTagsFromPrefixAndTemplateArguments(const NamedDecl *ND);
++  AbiTagList makeAdditionalTagsForFunction(const FunctionDecl *FD);
++  AbiTagList makeAdditionalTagsForVariable(const VarDecl *VD);
+ };
+ }
+@@ -448,6 +608,7 @@ bool ItaniumMangleContextImpl::shouldMan
+       while (!DC->isNamespace() && !DC->isTranslationUnit())
+         DC = getEffectiveParentContext(DC);
+     if (DC->isTranslationUnit() && D->getFormalLinkage() != InternalLinkage &&
++        !CXXNameMangler::shouldHaveAbiTags(*this, VD) &&
+         !isa<VarTemplateSpecializationDecl>(D))
+       return false;
+   }
+@@ -455,6 +616,12 @@ bool ItaniumMangleContextImpl::shouldMan
+   return true;
+ }
++void CXXNameMangler::writeAbiTags(const NamedDecl *ND,
++                                  const AbiTagList *AdditionalAbiTags) {
++  assert(AbiTags && "require AbiTagState");
++  AbiTags->write(Out, ND, DisableDerivedAbiTags ? nullptr : AdditionalAbiTags);
++}
++
+ void CXXNameMangler::mangle(const NamedDecl *D) {
+   // <mangled-name> ::= _Z <encoding>
+   //            ::= <data name>
+@@ -470,14 +637,31 @@ void CXXNameMangler::mangle(const NamedD
+     mangleName(cast<FieldDecl>(D));
+ }
+-void CXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD) {
+-  // <encoding> ::= <function name> <bare-function-type>
+-  mangleName(FD);
+-
++void CXXNameMangler::mangleFunctionEncoding(const FunctionDecl *FD,
++                                            bool ExcludeUnqualifiedName) {
+   // Don't mangle in the type if this isn't a decl we should typically mangle.
+-  if (!Context.shouldMangleDeclName(FD))
++  if (!Context.shouldMangleDeclName(FD)) {
++    mangleNameWithAbiTags(FD, /* AdditionalAbiTags */ nullptr,
++                          ExcludeUnqualifiedName);
+     return;
++  }
++
++  // <encoding> ::= <function name> <bare-function-type>
++
++  if (ExcludeUnqualifiedName) {
++    // running makeAdditionalTagsForFunction would loop, don't need it here
++    // anyway
++    mangleNameWithAbiTags(FD, /* AdditionalAbiTags */ nullptr,
++                          ExcludeUnqualifiedName);
++  } else {
++    AbiTagList AdditionalAbiTags = makeAdditionalTagsForFunction(FD);
++    mangleNameWithAbiTags(FD, &AdditionalAbiTags, ExcludeUnqualifiedName);
++  }
++  mangleFunctionEncodingBareType(FD);
++}
++
++void CXXNameMangler::mangleFunctionEncodingBareType(const FunctionDecl *FD) {
+   if (FD->hasAttr<EnableIfAttr>()) {
+     FunctionTypeDepthState Saved = FunctionTypeDepth.push();
+     Out << "Ua9enable_ifI";
+@@ -581,7 +765,24 @@ isTemplate(const NamedDecl *ND, const Te
+   return nullptr;
+ }
+-void CXXNameMangler::mangleName(const NamedDecl *ND) {
++// Must not be run from mangleLocalName for the <entity name> as it would loop
++// otherwise.
++void CXXNameMangler::mangleName(const NamedDecl *ND,
++                                bool ExcludeUnqualifiedName) {
++  if (!ExcludeUnqualifiedName) {
++    if (const auto *VD = dyn_cast<VarDecl>(ND)) {
++      AbiTagList VariableAdditionalAbiTags = makeAdditionalTagsForVariable(VD);
++      mangleNameWithAbiTags(VD, &VariableAdditionalAbiTags,
++                            ExcludeUnqualifiedName);
++      return;
++    }
++  }
++  mangleNameWithAbiTags(ND, nullptr, ExcludeUnqualifiedName);
++}
++
++void CXXNameMangler::mangleNameWithAbiTags(const NamedDecl *ND,
++                                           const AbiTagList *AdditionalAbiTags,
++                                           bool ExcludeUnqualifiedName) {
+   //  <name> ::= <nested-name>
+   //         ::= <unscoped-name>
+   //         ::= <unscoped-template-name> <template-args>
+@@ -597,7 +798,7 @@ void CXXNameMangler::mangleName(const Na
+     while (!DC->isNamespace() && !DC->isTranslationUnit())
+       DC = getEffectiveParentContext(DC);
+   else if (GetLocalClassDecl(ND)) {
+-    mangleLocalName(ND);
++    mangleLocalName(ND, AdditionalAbiTags, ExcludeUnqualifiedName);
+     return;
+   }
+@@ -607,76 +808,93 @@ void CXXNameMangler::mangleName(const Na
+     // Check if we have a template.
+     const TemplateArgumentList *TemplateArgs = nullptr;
+     if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
+-      mangleUnscopedTemplateName(TD);
++      if (!ExcludeUnqualifiedName)
++        mangleUnscopedTemplateName(TD, AdditionalAbiTags);
+       mangleTemplateArgs(*TemplateArgs);
+       return;
+     }
+-    mangleUnscopedName(ND);
++    if (!ExcludeUnqualifiedName)
++      mangleUnscopedName(ND, AdditionalAbiTags);
+     return;
+   }
+   if (isLocalContainerContext(DC)) {
+-    mangleLocalName(ND);
++    mangleLocalName(ND, AdditionalAbiTags, ExcludeUnqualifiedName);
+     return;
+   }
+-  mangleNestedName(ND, DC);
++  mangleNestedName(ND, DC, AdditionalAbiTags, /* NoFunction */ false,
++                   ExcludeUnqualifiedName);
+ }
+-void CXXNameMangler::mangleName(const TemplateDecl *TD,
+-                                const TemplateArgument *TemplateArgs,
+-                                unsigned NumTemplateArgs) {
++
++void CXXNameMangler::mangleTemplateName(const TemplateDecl *TD,
++                                        const AbiTagList *AdditionalAbiTags,
++                                        bool ExcludeUnqualifiedName,
++                                        const TemplateArgument *TemplateArgs,
++                                        unsigned NumTemplateArgs) {
+   const DeclContext *DC = IgnoreLinkageSpecDecls(getEffectiveDeclContext(TD));
+   if (DC->isTranslationUnit() || isStdNamespace(DC)) {
+-    mangleUnscopedTemplateName(TD);
++    if (!ExcludeUnqualifiedName)
++      mangleUnscopedTemplateName(TD, AdditionalAbiTags);
+     mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
+   } else {
+-    mangleNestedName(TD, TemplateArgs, NumTemplateArgs);
++    mangleNestedName(TD, AdditionalAbiTags, ExcludeUnqualifiedName,
++                     TemplateArgs, NumTemplateArgs);
+   }
+ }
+-void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND) {
++void CXXNameMangler::mangleUnscopedName(const NamedDecl *ND,
++                                        const AbiTagList *AdditionalAbiTags) {
+   //  <unscoped-name> ::= <unqualified-name>
+   //                  ::= St <unqualified-name>   # ::std::
+   if (isStdNamespace(IgnoreLinkageSpecDecls(getEffectiveDeclContext(ND))))
+     Out << "St";
+-  mangleUnqualifiedName(ND);
++  mangleUnqualifiedName(ND, AdditionalAbiTags);
+ }
+-void CXXNameMangler::mangleUnscopedTemplateName(const TemplateDecl *ND) {
++void CXXNameMangler::mangleUnscopedTemplateName(
++    const TemplateDecl *ND, const AbiTagList *AdditionalAbiTags) {
+   //     <unscoped-template-name> ::= <unscoped-name>
+   //                              ::= <substitution>
+   if (mangleSubstitution(ND))
+     return;
+   // <template-template-param> ::= <template-param>
+-  if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND))
++  if (const auto *TTP = dyn_cast<TemplateTemplateParmDecl>(ND)) {
++    assert(!AdditionalAbiTags &&
++           "template template param cannot have abi tags");
+     mangleTemplateParameter(TTP->getIndex());
+-  else
+-    mangleUnscopedName(ND->getTemplatedDecl());
++  } else {
++    mangleUnscopedName(ND->getTemplatedDecl(), AdditionalAbiTags);
++  }
+   addSubstitution(ND);
+ }
+-void CXXNameMangler::mangleUnscopedTemplateName(TemplateName Template) {
++void CXXNameMangler::mangleUnscopedTemplateName(
++    TemplateName Template, const AbiTagList *AdditionalAbiTags) {
+   //     <unscoped-template-name> ::= <unscoped-name>
+   //                              ::= <substitution>
+   if (TemplateDecl *TD = Template.getAsTemplateDecl())
+-    return mangleUnscopedTemplateName(TD);
++    return mangleUnscopedTemplateName(TD, AdditionalAbiTags);
+   
+   if (mangleSubstitution(Template))
+     return;
++  assert(!AdditionalAbiTags &&
++         "dependent template name cannot have abi tags");
++
+   DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
+   assert(Dependent && "Not a dependent template name?");
+   if (const IdentifierInfo *Id = Dependent->getIdentifier())
+     mangleSourceName(Id);
+   else
+     mangleOperatorName(Dependent->getOperator(), UnknownArity);
+-  
++
+   addSubstitution(Template);
+ }
+@@ -835,6 +1053,7 @@ void CXXNameMangler::mangleUnresolvedPre
+     else
+       Out << "sr";
+     mangleSourceName(qualifier->getAsNamespace()->getIdentifier());
++    writeAbiTags(qualifier->getAsNamespace());
+     break;
+   case NestedNameSpecifier::NamespaceAlias:
+     if (qualifier->getPrefix())
+@@ -843,6 +1062,7 @@ void CXXNameMangler::mangleUnresolvedPre
+     else
+       Out << "sr";
+     mangleSourceName(qualifier->getAsNamespaceAlias()->getIdentifier());
++    writeAbiTags(qualifier->getAsNamespaceAlias());
+     break;
+   case NestedNameSpecifier::TypeSpec:
+@@ -877,6 +1097,7 @@ void CXXNameMangler::mangleUnresolvedPre
+       Out << "sr";
+     mangleSourceName(qualifier->getAsIdentifier());
++    // an Identifier has no type information, so we can't emit abi tags for it
+     break;
+   }
+@@ -922,7 +1143,8 @@ void CXXNameMangler::mangleUnresolvedNam
+ void CXXNameMangler::mangleUnqualifiedName(const NamedDecl *ND,
+                                            DeclarationName Name,
+-                                           unsigned KnownArity) {
++                                           unsigned KnownArity,
++                                           const AbiTagList *AdditionalAbiTags) {
+   unsigned Arity = KnownArity;
+   //  <unqualified-name> ::= <operator-name>
+   //                     ::= <ctor-dtor-name>
+@@ -941,6 +1163,7 @@ void CXXNameMangler::mangleUnqualifiedNa
+         Out << 'L';
+       mangleSourceName(II);
++      writeAbiTags(ND, AdditionalAbiTags);
+       break;
+     }
+@@ -980,6 +1203,7 @@ void CXXNameMangler::mangleUnqualifiedNa
+       assert(FD->getIdentifier() && "Data member name isn't an identifier!");
+       mangleSourceName(FD->getIdentifier());
++      // Not emitting abi tags: internal name anyway
+       break;
+     }
+@@ -1000,6 +1224,10 @@ void CXXNameMangler::mangleUnqualifiedNa
+       assert(D->getDeclName().getAsIdentifierInfo() &&
+              "Typedef was not named!");
+       mangleSourceName(D->getDeclName().getAsIdentifierInfo());
++      assert(!AdditionalAbiTags && "Type cannot have additional abi tags");
++      // explicit abi tags are still possible; take from underlying type, not
++      // from typedef.
++      writeAbiTags(TD, nullptr);
+       break;
+     }
+@@ -1009,6 +1237,8 @@ void CXXNameMangler::mangleUnqualifiedNa
+     // <lambda-sig> ::= <parameter-type>+   # Parameter types or 'v' for 'void'.
+     if (const CXXRecordDecl *Record = dyn_cast<CXXRecordDecl>(TD)) {
+       if (Record->isLambda() && Record->getLambdaManglingNumber()) {
++        assert(!AdditionalAbiTags &&
++               "Lambda type cannot have additional abi tags");
+         mangleLambda(Record);
+         break;
+       }
+@@ -1020,11 +1250,13 @@ void CXXNameMangler::mangleUnqualifiedNa
+       if (UnnamedMangle > 1)
+         Out << UnnamedMangle - 2;
+       Out << '_';
++      writeAbiTags(TD, AdditionalAbiTags);
+       break;
+     }
+-    // Get a unique id for the anonymous struct.
+-    unsigned AnonStructId = Context.getAnonymousStructId(TD);
++    // Get a unique id for the anonymous struct. If it is not a real output
++    // ID doesn't matter so use fake one.
++    unsigned AnonStructId = NullOut ? 0 : Context.getAnonymousStructId(TD);
+     // Mangle it as a source name in the form
+     // [n] $_<id>
+@@ -1052,6 +1284,7 @@ void CXXNameMangler::mangleUnqualifiedNa
+       // Otherwise, use the complete constructor name. This is relevant if a
+       // class with a constructor is declared within a constructor.
+       mangleCXXCtorType(Ctor_Complete);
++    writeAbiTags(ND, AdditionalAbiTags);
+     break;
+   case DeclarationName::CXXDestructorName:
+@@ -1063,6 +1296,7 @@ void CXXNameMangler::mangleUnqualifiedNa
+       // Otherwise, use the complete destructor name. This is relevant if a
+       // class with a destructor is declared within a destructor.
+       mangleCXXDtorType(Dtor_Complete);
++    writeAbiTags(ND, AdditionalAbiTags);
+     break;
+   case DeclarationName::CXXOperatorName:
+@@ -1078,6 +1312,7 @@ void CXXNameMangler::mangleUnqualifiedNa
+   case DeclarationName::CXXConversionFunctionName:
+   case DeclarationName::CXXLiteralOperatorName:
+     mangleOperatorName(Name, Arity);
++    writeAbiTags(ND, AdditionalAbiTags);
+     break;
+   case DeclarationName::CXXUsingDirective:
+@@ -1094,7 +1329,9 @@ void CXXNameMangler::mangleSourceName(co
+ void CXXNameMangler::mangleNestedName(const NamedDecl *ND,
+                                       const DeclContext *DC,
+-                                      bool NoFunction) {
++                                      const AbiTagList *AdditionalAbiTags,
++                                      bool NoFunction,
++                                      bool ExcludeUnqualifiedName) {
+   // <nested-name> 
+   //   ::= N [<CV-qualifiers>] [<ref-qualifier>] <prefix> <unqualified-name> E
+   //   ::= N [<CV-qualifiers>] [<ref-qualifier>] <template-prefix> 
+@@ -1114,30 +1351,36 @@ void CXXNameMangler::mangleNestedName(co
+   // Check if we have a template.
+   const TemplateArgumentList *TemplateArgs = nullptr;
+   if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
+-    mangleTemplatePrefix(TD, NoFunction);
++    mangleTemplatePrefix(TD, AdditionalAbiTags, NoFunction,
++                         ExcludeUnqualifiedName);
+     mangleTemplateArgs(*TemplateArgs);
+   }
+   else {
+     manglePrefix(DC, NoFunction);
+-    mangleUnqualifiedName(ND);
++    if (!ExcludeUnqualifiedName)
++      mangleUnqualifiedName(ND, AdditionalAbiTags);
+   }
+   Out << 'E';
+ }
+ void CXXNameMangler::mangleNestedName(const TemplateDecl *TD,
++                                      const AbiTagList *AdditionalAbiTags,
++                                      bool ExcludeUnqualifiedName,
+                                       const TemplateArgument *TemplateArgs,
+                                       unsigned NumTemplateArgs) {
+   // <nested-name> ::= N [<CV-qualifiers>] <template-prefix> <template-args> E
+   Out << 'N';
+-  mangleTemplatePrefix(TD);
++  mangleTemplatePrefix(TD, AdditionalAbiTags, ExcludeUnqualifiedName);
+   mangleTemplateArgs(TemplateArgs, NumTemplateArgs);
+   Out << 'E';
+ }
+-void CXXNameMangler::mangleLocalName(const Decl *D) {
++void CXXNameMangler::mangleLocalName(const Decl *D,
++                                     const AbiTagList *AdditionalAbiTags,
++                                     bool ExcludeUnqualifiedName) {
+   // <local-name> := Z <function encoding> E <entity name> [<discriminator>]
+   //              := Z <function encoding> E s [<discriminator>]
+   // <local-name> := Z <function encoding> E d [ <parameter number> ] 
+@@ -1149,15 +1392,26 @@ void CXXNameMangler::mangleLocalName(con
+   Out << 'Z';
+-  if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(DC))
+-    mangleObjCMethodName(MD);
+-  else if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC))
+-    mangleBlockForPrefix(BD);
+-  else
+-    mangleFunctionEncoding(cast<FunctionDecl>(DC));
++  {
++    AbiTagState LocalAbiTags(AbiTags);
++
++    if (const ObjCMethodDecl *MD = dyn_cast<ObjCMethodDecl>(DC))
++      mangleObjCMethodName(MD);
++    else if (const BlockDecl *BD = dyn_cast<BlockDecl>(DC))
++      mangleBlockForPrefix(BD);
++    else
++      mangleFunctionEncoding(cast<FunctionDecl>(DC));
++
++    // Implicit ABI tags (from namespace) are not available in the following
++    // entity; reset to actually emitted tags, which are available.
++    LocalAbiTags.setUsedAbiTags(LocalAbiTags.getEmittedAbiTags());
++  }
+   Out << 'E';
++  // GCC 5.3.0 doesn't emit derived ABI tags for local names but that seems to
++  // be a bug that is fixed in trunk.
++
+   if (RD) {
+     // The parameter number is omitted for the last parameter, 0 for the 
+     // second-to-last parameter, 1 for the third-to-last parameter, etc. The 
+@@ -1182,13 +1436,17 @@ void CXXNameMangler::mangleLocalName(con
+     // Mangle the name relative to the closest enclosing function.
+     // equality ok because RD derived from ND above
+     if (D == RD)  {
+-      mangleUnqualifiedName(RD);
++      if (!ExcludeUnqualifiedName)
++        mangleUnqualifiedName(RD, AdditionalAbiTags);
+     } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
+       manglePrefix(getEffectiveDeclContext(BD), true /*NoFunction*/);
+-      mangleUnqualifiedBlock(BD);
++      assert(!AdditionalAbiTags && "Block cannot have additional abi tags");
++      if (!ExcludeUnqualifiedName)
++        mangleUnqualifiedBlock(BD);
+     } else {
+       const NamedDecl *ND = cast<NamedDecl>(D);
+-      mangleNestedName(ND, getEffectiveDeclContext(ND), true /*NoFunction*/);
++      mangleNestedName(ND, getEffectiveDeclContext(ND), AdditionalAbiTags,
++                       true /*NoFunction*/, ExcludeUnqualifiedName);
+     }
+   } else if (const BlockDecl *BD = dyn_cast<BlockDecl>(D)) {
+     // Mangle a block in a default parameter; see above explanation for
+@@ -1205,30 +1463,37 @@ void CXXNameMangler::mangleLocalName(con
+       }
+     }
+-    mangleUnqualifiedBlock(BD);
++    assert(!AdditionalAbiTags && "Block cannot have additional abi tags");
++    if (!ExcludeUnqualifiedName)
++      mangleUnqualifiedBlock(BD);
+   } else {
+-    mangleUnqualifiedName(cast<NamedDecl>(D));
++    if (!ExcludeUnqualifiedName)
++      mangleUnqualifiedName(cast<NamedDecl>(D), AdditionalAbiTags);
+   }
+-  if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
+-    unsigned disc;
+-    if (Context.getNextDiscriminator(ND, disc)) {
+-      if (disc < 10)
+-        Out << '_' << disc;
+-      else
+-        Out << "__" << disc << '_';
++  if (!ExcludeUnqualifiedName) {
++    if (const NamedDecl *ND = dyn_cast<NamedDecl>(RD ? RD : D)) {
++      unsigned disc;
++      if (Context.getNextDiscriminator(ND, disc)) {
++        if (disc < 10)
++          Out << '_' << disc;
++        else
++          Out << "__" << disc << '_';
++      }
+     }
+   }
+ }
+ void CXXNameMangler::mangleBlockForPrefix(const BlockDecl *Block) {
+   if (GetLocalClassDecl(Block)) {
+-    mangleLocalName(Block);
++    mangleLocalName(Block, /* AdditionalAbiTags */ nullptr,
++                    /* ExcludeUnqualifiedName */ false);
+     return;
+   }
+   const DeclContext *DC = getEffectiveDeclContext(Block);
+   if (isLocalContainerContext(DC)) {
+-    mangleLocalName(Block);
++    mangleLocalName(Block, /* AdditionalAbiTags */ nullptr,
++                    /* ExcludeUnqualifiedName */ false);
+     return;
+   }
+   manglePrefix(getEffectiveDeclContext(Block));
+@@ -1239,10 +1504,11 @@ void CXXNameMangler::mangleUnqualifiedBl
+   if (Decl *Context = Block->getBlockManglingContextDecl()) {
+     if ((isa<VarDecl>(Context) || isa<FieldDecl>(Context)) &&
+         Context->getDeclContext()->isRecord()) {
+-      if (const IdentifierInfo *Name
+-            = cast<NamedDecl>(Context)->getIdentifier()) {
++      const auto *ND = cast<NamedDecl>(Context);
++      if (const IdentifierInfo *Name = ND->getIdentifier()) {
+         mangleSourceName(Name);
+-        Out << 'M';            
++        writeAbiTags(ND, /* AdditionalAbiTags */ nullptr);
++        Out << 'M';
+       }
+     }
+   }
+@@ -1275,7 +1541,7 @@ void CXXNameMangler::mangleLambda(const
+       if (const IdentifierInfo *Name
+             = cast<NamedDecl>(Context)->getIdentifier()) {
+         mangleSourceName(Name);
+-        Out << 'M';            
++        Out << 'M';
+       }
+     }
+   }
+@@ -1358,11 +1624,11 @@ void CXXNameMangler::manglePrefix(const
+   // Check if we have a template.
+   const TemplateArgumentList *TemplateArgs = nullptr;
+   if (const TemplateDecl *TD = isTemplate(ND, TemplateArgs)) {
+-    mangleTemplatePrefix(TD);
++    mangleTemplatePrefix(TD, /* AdditionalAbiTags */ nullptr);
+     mangleTemplateArgs(*TemplateArgs);
+   } else {
+     manglePrefix(getEffectiveDeclContext(ND), NoFunction);
+-    mangleUnqualifiedName(ND);
++    mangleUnqualifiedName(ND, /* AdditionalAbiTags */ nullptr);
+   }
+   addSubstitution(ND);
+@@ -1373,27 +1639,30 @@ void CXXNameMangler::mangleTemplatePrefi
+   //                   ::= <template-param>
+   //                   ::= <substitution>
+   if (TemplateDecl *TD = Template.getAsTemplateDecl())
+-    return mangleTemplatePrefix(TD);
++    return mangleTemplatePrefix(TD, /* AdditionalAbiTags */ nullptr);
+   if (QualifiedTemplateName *Qualified = Template.getAsQualifiedTemplateName())
+     manglePrefix(Qualified->getQualifier());
+-  
++
+   if (OverloadedTemplateStorage *Overloaded
+                                       = Template.getAsOverloadedTemplate()) {
+     mangleUnqualifiedName(nullptr, (*Overloaded->begin())->getDeclName(),
+-                          UnknownArity);
++                          UnknownArity,
++                          /* AdditionalAbiTags */ nullptr);
+     return;
+   }
+-   
++
+   DependentTemplateName *Dependent = Template.getAsDependentTemplateName();
+   assert(Dependent && "Unknown template name kind?");
+   if (NestedNameSpecifier *Qualifier = Dependent->getQualifier())
+     manglePrefix(Qualifier);
+-  mangleUnscopedTemplateName(Template);
++  mangleUnscopedTemplateName(Template, /* AdditionalAbiTags */ nullptr);
+ }
+ void CXXNameMangler::mangleTemplatePrefix(const TemplateDecl *ND,
+-                                          bool NoFunction) {
++                                          const AbiTagList *AdditionalAbiTags,
++                                          bool NoFunction,
++                                          bool ExcludeUnqualifiedName) {
+   // <template-prefix> ::= <prefix> <template unqualified-name>
+   //                   ::= <template-param>
+   //                   ::= <substitution>
+@@ -1408,7 +1677,8 @@ void CXXNameMangler::mangleTemplatePrefi
+     mangleTemplateParameter(TTP->getIndex());
+   } else {
+     manglePrefix(getEffectiveDeclContext(ND), NoFunction);
+-    mangleUnqualifiedName(ND->getTemplatedDecl());
++    if (!ExcludeUnqualifiedName)
++      mangleUnqualifiedName(ND->getTemplatedDecl(), AdditionalAbiTags);
+   }
+   addSubstitution(ND);
+@@ -1452,6 +1722,7 @@ void CXXNameMangler::mangleType(Template
+     // <name> ::= <nested-name>
+     mangleUnresolvedPrefix(Dependent->getQualifier());
+     mangleSourceName(Dependent->getIdentifier());
++     // writeAbiTags(Dependent);
+     break;
+   }
+@@ -1544,16 +1815,19 @@ bool CXXNameMangler::mangleUnresolvedTyp
+   case Type::Typedef:
+     mangleSourceName(cast<TypedefType>(Ty)->getDecl()->getIdentifier());
++    writeAbiTags(cast<TypedefType>(Ty)->getDecl());
+     break;
+   case Type::UnresolvedUsing:
+     mangleSourceName(
+         cast<UnresolvedUsingType>(Ty)->getDecl()->getIdentifier());
++    writeAbiTags(cast<UnresolvedUsingType>(Ty)->getDecl());
+     break;
+   case Type::Enum:
+   case Type::Record:
+     mangleSourceName(cast<TagType>(Ty)->getDecl()->getIdentifier());
++    writeAbiTags(cast<TagType>(Ty)->getDecl());
+     break;
+   case Type::TemplateSpecialization: {
+@@ -1572,6 +1846,7 @@ bool CXXNameMangler::mangleUnresolvedTyp
+         goto unresolvedType;
+       mangleSourceName(TD->getIdentifier());
++      writeAbiTags(TD);
+       break;
+     }
+@@ -1603,16 +1878,19 @@ bool CXXNameMangler::mangleUnresolvedTyp
+   case Type::InjectedClassName:
+     mangleSourceName(
+         cast<InjectedClassNameType>(Ty)->getDecl()->getIdentifier());
++    writeAbiTags(cast<InjectedClassNameType>(Ty)->getDecl());
+     break;
+   case Type::DependentName:
+     mangleSourceName(cast<DependentNameType>(Ty)->getIdentifier());
++    // writeAbiTags(cast<DependentNameType>(Ty));
+     break;
+   case Type::DependentTemplateSpecialization: {
+     const DependentTemplateSpecializationType *DTST =
+         cast<DependentTemplateSpecializationType>(Ty);
+     mangleSourceName(DTST->getIdentifier());
++    // writeAbiTags(DTST);
+     mangleTemplateArgs(DTST->getArgs(), DTST->getNumArgs());
+     break;
+   }
+@@ -2070,7 +2348,9 @@ void CXXNameMangler::mangleType(const Bu
+   case BuiltinType::Id:
+ #include "clang/AST/BuiltinTypes.def"
+   case BuiltinType::Dependent:
+-    llvm_unreachable("mangling a placeholder type");
++    if (!NullOut)
++      llvm_unreachable("mangling a placeholder type");
++    break;
+   case BuiltinType::ObjCId:
+     Out << "11objc_object";
+     break;
+@@ -2546,7 +2826,11 @@ void CXXNameMangler::mangleType(const In
+ void CXXNameMangler::mangleType(const TemplateSpecializationType *T) {
+   if (TemplateDecl *TD = T->getTemplateName().getAsTemplateDecl()) {
+-    mangleName(TD, T->getArgs(), T->getNumArgs());
++    // types only have explicit abi tags, no addition tags
++    mangleTemplateName(TD,
++                       /* AdditionalAbiTags */ nullptr,
++                       /* ExcludeUnqualifiedName */ false,
++                       T->getArgs(), T->getNumArgs());
+   } else {
+     if (mangleSubstitution(QualType(T, 0)))
+       return;
+@@ -2872,12 +3156,14 @@ recurse:
+   case Expr::PseudoObjectExprClass:
+   case Expr::AtomicExprClass:
+   {
+-    // As bad as this diagnostic is, it's better than crashing.
+-    DiagnosticsEngine &Diags = Context.getDiags();
+-    unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
+-                                     "cannot yet mangle expression type %0");
+-    Diags.Report(E->getExprLoc(), DiagID)
+-      << E->getStmtClassName() << E->getSourceRange();
++    if (!NullOut) {
++      // As bad as this diagnostic is, it's better than crashing.
++      DiagnosticsEngine &Diags = Context.getDiags();
++      unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error,
++                                       "cannot yet mangle expression type %0");
++      Diags.Report(E->getExprLoc(), DiagID)
++        << E->getStmtClassName() << E->getSourceRange();
++    }
+     break;
+   }
+@@ -4020,6 +4306,97 @@ void CXXNameMangler::addSubstitution(uin
+   Substitutions[Ptr] = SeqID++;
+ }
++CXXNameMangler::AbiTagSet
++CXXNameMangler::getTagsFromPrefixAndTemplateArguments(const NamedDecl *ND) {
++  llvm::raw_null_ostream NullOutStream;
++  CXXNameMangler TrackPrefixAndTemplateArguments(*this, NullOutStream);
++
++  if (const FunctionDecl *FD = dyn_cast<FunctionDecl>(ND)) {
++    TrackPrefixAndTemplateArguments.mangleFunctionEncoding(
++        FD, /* ExcludeUnqualifiedName */ true);
++  } else {
++    TrackPrefixAndTemplateArguments.mangleName(
++        ND, /* ExcludeUnqualifiedName */ true);
++  }
++
++  return std::move(
++      TrackPrefixAndTemplateArguments.AbiTagsRoot.getUsedAbiTags());
++}
++
++CXXNameMangler::AbiTagList
++CXXNameMangler::makeAdditionalTagsForFunction(const FunctionDecl *FD) {
++  // when derived abi tags are disabled there is no need to make any list
++  if (DisableDerivedAbiTags)
++    return AbiTagList();
++
++  AbiTagSet ImplicitlyAvailableTags =
++      getTagsFromPrefixAndTemplateArguments(FD);
++  AbiTagSet ReturnTypeTags;
++
++  {
++    llvm::raw_null_ostream NullOutStream;
++    CXXNameMangler TrackReturnTypeTags(*this, NullOutStream);
++    TrackReturnTypeTags.disableDerivedAbiTags();
++
++    const FunctionProtoType *Proto =
++        cast<FunctionProtoType>(FD->getType()->getAs<FunctionType>());
++    TrackReturnTypeTags.FunctionTypeDepth.enterResultType();
++    TrackReturnTypeTags.mangleType(Proto->getReturnType());
++    TrackReturnTypeTags.FunctionTypeDepth.leaveResultType();
++
++    ReturnTypeTags =
++        std::move(TrackReturnTypeTags.AbiTagsRoot.getUsedAbiTags());
++  }
++
++  AbiTagList AdditionalAbiTags;
++
++  for (const auto &Tag : ReturnTypeTags) {
++    if (ImplicitlyAvailableTags.count(Tag) == 0)
++      AdditionalAbiTags.push_back(Tag);
++  }
++
++  return AdditionalAbiTags;
++}
++
++CXXNameMangler::AbiTagList
++CXXNameMangler::makeAdditionalTagsForVariable(const VarDecl *VD) {
++  // when derived abi tags are disabled there is no need to make any list
++  if (DisableDerivedAbiTags)
++    return AbiTagList();
++
++  AbiTagSet ImplicitlyAvailableTags =
++      getTagsFromPrefixAndTemplateArguments(VD);
++  AbiTagSet VariableTypeTags;
++
++  {
++    llvm::raw_null_ostream NullOutStream;
++    CXXNameMangler TrackVariableType(*this, NullOutStream);
++    TrackVariableType.disableDerivedAbiTags();
++
++    TrackVariableType.mangleType(VD->getType());
++
++    VariableTypeTags =
++        std::move(TrackVariableType.AbiTagsRoot.getUsedAbiTags());
++  }
++
++  AbiTagList AdditionalAbiTags;
++
++  for (const auto &Tag : VariableTypeTags) {
++    if (ImplicitlyAvailableTags.count(Tag) == 0)
++      AdditionalAbiTags.push_back(Tag);
++  }
++
++  return AdditionalAbiTags;
++}
++
++bool CXXNameMangler::shouldHaveAbiTags(ItaniumMangleContextImpl &C,
++                                       const VarDecl *VD) {
++  llvm::raw_null_ostream NullOutStream;
++  CXXNameMangler TrackAbiTags(C, NullOutStream, nullptr, true);
++  TrackAbiTags.mangle(VD);
++  return TrackAbiTags.AbiTagsRoot.getUsedAbiTags().size();
++}
++
+ //
+ /// Mangles the name of the declaration D and emits that name to the given
+@@ -4121,6 +4498,8 @@ void ItaniumMangleContextImpl::mangleSta
+   //  <special-name> ::= GV <object name>       # Guard variable for one-time
+   //                                            # initialization
+   CXXNameMangler Mangler(*this, Out);
++  // GCC 5.3.0 doesn't emit derived ABI tags for local names but that seems to
++  // be a bug that is fixed in trunk.
+   Mangler.getStream() << "_ZGV";
+   Mangler.mangleName(D);
+ }
+Index: b/clang/lib/Sema/SemaDeclAttr.cpp
+===================================================================
+--- a/clang/lib/Sema/SemaDeclAttr.cpp
++++ b/clang/lib/Sema/SemaDeclAttr.cpp
+@@ -4476,10 +4476,6 @@ static void handleAbiTagAttr(Sema &S, De
+   D->addAttr(::new (S.Context)
+              AbiTagAttr(Attr.getRange(), S.Context, Tags.data(), Tags.size(),
+                         Attr.getAttributeSpellingListIndex()));
+-
+-  // FIXME: remove this warning as soon as mangled part is ready.
+-  S.Diag(Attr.getRange().getBegin(), diag::warn_attribute_ignored)
+-        << Attr.getName();
+ }
+ static void handleARMInterruptAttr(Sema &S, Decl *D,
+Index: b/clang/test/CodeGenCXX/mangle-abi-tag.cpp
+===================================================================
+--- /dev/null
++++ b/clang/test/CodeGenCXX/mangle-abi-tag.cpp
+@@ -0,0 +1,146 @@
++// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -std=c++11 -o - | FileCheck %s
++// RUN: %clang_cc1 %s -emit-llvm -triple i686-linux-gnu -std=c++11 -o - | FileCheck %s
++// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - | FileCheck %s
++
++struct __attribute__((abi_tag("A", "B"))) A { };
++
++struct B: A { };
++
++template<class T>
++
++struct C {
++};
++
++struct D { A* p; };
++
++template<class T>
++struct __attribute__((abi_tag("C", "D"))) E {
++};
++
++struct __attribute__((abi_tag("A", "B"))) F { };
++
++A a1;
++// CHECK: @_Z2a1B1AB1B =
++
++__attribute__((abi_tag("C", "D")))
++A a2;
++// CHECK: @_Z2a2B1AB1BB1CB1D =
++
++B a3;
++// CHECK: @a3 =
++
++C<A> a4;
++// CHECK: @_Z2a4B1AB1B =
++
++D a5;
++// CHECK: @a5 =
++
++E<int> a6;
++// CHECK: @_Z2a6B1CB1D =
++
++E<A> a7;
++// CHECK: @_Z2a7B1AB1BB1CB1D =
++
++template<>
++struct E<float> {
++  static float a8;
++};
++float E<float>::a8;
++// CHECK: @_ZN1EB1CB1DIfE2a8E =
++
++template<>
++struct E<F> {
++  static bool a9;
++};
++bool E<F>::a9;
++// CHECK: @_ZN1EB1CB1DI1FB1AB1BE2a9E =
++
++struct __attribute__((abi_tag("A", "B"))) A10 {
++  virtual ~A10() {}
++} a10;
++// vtable
++// CHECK: @_ZTV3A10B1AB1B =
++// typeinfo
++// CHECK: @_ZTI3A10B1AB1B =
++
++// Local variables from f13.
++// f13()::L::foo[abi:C][abi:D]()::a[abi:A][abi:B]
++// CHECK-DAG: @_ZZZ3f13vEN1L3fooB1CB1DEvE1aB1AB1B =
++// guard variable for f13()::L::foo[abi:C][abi:D]()::a[abi:A][abi:B]
++// CHECK-DAG: @_ZGVZZ3f13vEN1L3fooB1CB1DEvE1aB1AB1B =
++
++__attribute__ ((abi_tag("C", "D")))
++void* f1() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f1B1CB1Dv(
++
++__attribute__ ((abi_tag("C", "D")))
++A* f2() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f2B1AB1BB1CB1Dv(
++
++B* f3() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f3v(
++
++C<A>* f4() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f4B1AB1Bv(
++
++D* f5() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f5v(
++
++E<char>* f6() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f6B1CB1Dv(
++
++E<A>* f7() {
++  return 0;
++}
++// CHECK: define {{.*}} @_Z2f7B1AB1BB1CB1Dv(
++
++void f8(E<A>*) {
++}
++// CHECK: define {{.*}} @_Z2f8P1EB1CB1DI1AB1AB1BE(
++
++inline namespace Names1 __attribute__((__abi_tag__)) {
++    class C1 {};
++}
++C1 f9() { return C1(); }
++// CHECK: @_Z2f9B6Names1v(
++
++inline namespace Names2 __attribute__((__abi_tag__("Tag1", "Tag2"))) {
++    class C2 {};
++}
++C2 f10() { return C2(); }
++// CHECK: @_Z3f10B4Tag1B4Tag2v(
++
++void __attribute__((abi_tag("A"))) f11(A) {}
++// f11[abi:A](A[abi:A][abi:B])
++// CHECK: define {{.*}} @_Z3f11B1A1AB1AB1B(
++
++A f12(A) { return A(); }
++// f12(A[abi:A][abi:B])
++// CHECK: define {{.*}} @_Z3f121AB1AB1B(
++
++inline void f13() {
++  struct L {
++    static E<int>* foo() {
++      static A10 a;
++      return 0;
++    }
++  };
++  L::foo();
++}
++void f11_test() {
++  f13();
++}
++// f13()::L::foo[abi:C][abi:D]()
++// CHECK: define linkonce_odr %struct.E* @_ZZ3f13vEN1L3fooB1CB1DEv(
+Index: b/clang/test/SemaCXX/attr-abi-tag-syntax.cpp
+===================================================================
+--- a/clang/test/SemaCXX/attr-abi-tag-syntax.cpp
++++ b/clang/test/SemaCXX/attr-abi-tag-syntax.cpp
+@@ -16,28 +16,18 @@ inline namespace __attribute__((__abi_ta
+ // expected-warning@-1 {{'abi_tag' attribute on anonymous namespace ignored}}
+ inline namespace N __attribute__((__abi_tag__)) {}
+-// FIXME: remove this warning as soon as attribute fully supported.
+-// expected-warning@-2 {{'__abi_tag__' attribute ignored}}
+ } // namespcace N2
+ __attribute__((abi_tag("B", "A"))) extern int a1;
+-// FIXME: remove this warning as soon as attribute fully supported.
+-// expected-warning@-2 {{'abi_tag' attribute ignored}}
+ __attribute__((abi_tag("A", "B"))) extern int a1;
+ // expected-note@-1 {{previous declaration is here}}
+-// FIXME: remove this warning as soon as attribute fully supported.
+-// expected-warning@-3 {{'abi_tag' attribute ignored}}
+ __attribute__((abi_tag("A", "C"))) extern int a1;
+ // expected-error@-1 {{'abi_tag' C missing in original declaration}}
+-// FIXME: remove this warning as soon as attribute fully supported.
+-// expected-warning@-3 {{'abi_tag' attribute ignored}}
+ extern int a2;
+ // expected-note@-1 {{previous declaration is here}}
+ __attribute__((abi_tag("A")))extern int a2;
+ // expected-error@-1 {{cannot add 'abi_tag' attribute in a redeclaration}}
+-// FIXME: remove this warning as soon as attribute fully supported.
+-// expected-warning@-3 {{'abi_tag' attribute ignored}}
diff --git a/patches/add_symbols_versioning.patch b/patches/add_symbols_versioning.patch
new file mode 100644 (file)
index 0000000..29be9c7
--- /dev/null
@@ -0,0 +1,41 @@
+Description: add a simple linker script to version LLVM symbols
+
+This patch adds a very simple linker script to version the lib's symbols
+and thus trying to avoid crashes if an application loads two different
+LLVM versions (as long as they do not share data between them).
+
+Note that we deliberately *don't* make LLVM_3.9 depend on LLVM_3.8:
+they're incompatible and the whole point of this patch is
+to tell the linker that.
+
+Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
+Author: Lisandro Damían Nicanor Pérez Meyer <lisandro@debian.org>
+Bug-Debian: https://bugs.debian.org/848368
+
+--- llvm-toolchain-3.9-3.9.1.orig/tools/llvm-shlib/CMakeLists.txt
++++ llvm-toolchain-3.9-3.9.1/tools/llvm-shlib/CMakeLists.txt
+@@ -42,7 +42,7 @@ set_property(TARGET LLVM PROPERTY VERSIO
+ list(REMOVE_DUPLICATES LIB_NAMES)
+ if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf"
+   # GNU ld doesn't resolve symbols in the version script.
+-  set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
++  set(LIB_NAMES -Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+   set(LIB_NAMES -Wl,-all_load ${LIB_NAMES})
+ endif()
+--- /dev/null
++++ llvm-toolchain-3.9-3.9.1/tools/llvm-shlib/simple_version_script.map
+@@ -0,0 +1 @@
++LLVM_3.9 { global: *; };
+--- llvm-toolchain-3.9-3.9.1.orig/cmake/modules/AddLLVM.cmake
++++ llvm-toolchain-3.9-3.9.1/cmake/modules/AddLLVM.cmake
+@@ -74,7 +74,7 @@ function(add_llvm_symbol_exports target_
+     set(native_export_file "${target_name}.exports")
+     # FIXME: Don't write the "local:" line on OpenBSD.
+     add_custom_command(OUTPUT ${native_export_file}
+-      COMMAND echo "{" > ${native_export_file}
++      COMMAND echo "LLVM_3.9 {" > ${native_export_file}
+       COMMAND grep -q "[[:alnum:]]" ${export_file} && echo "  global:" >> ${native_export_file} || :
+       COMMAND sed -e "s/$/;/" -e "s/^/    /" < ${export_file} >> ${native_export_file}
+       COMMAND echo "  local: *;" >> ${native_export_file}
+
diff --git a/patches/amdgpu-regression.diff b/patches/amdgpu-regression.diff
new file mode 100644 (file)
index 0000000..fd8081c
--- /dev/null
@@ -0,0 +1,104 @@
+Index: llvm-toolchain-3.9-3.9.1/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lib/Target/AMDGPU/SIWholeQuadMode.cpp
++++ llvm-toolchain-3.9-3.9.1/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+@@ -219,6 +219,13 @@ char SIWholeQuadMode::scanInstructions(M
+       markInstruction(MI, Flags, Worklist);
+       GlobalFlags |= Flags;
+     }
++
++    if (WQMOutputs && MBB.succ_empty()) {
++      // This is a prolog shader. Make sure we go back to exact mode at the end.
++      Blocks[&MBB].OutNeeds = StateExact;
++      Worklist.push_back(&MBB);
++      GlobalFlags |= StateExact;
++    }
+   }
+   return GlobalFlags;
+Index: llvm-toolchain-3.9-3.9.1/lib/Target/AMDGPU/SIInstructions.td
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lib/Target/AMDGPU/SIInstructions.td
++++ llvm-toolchain-3.9-3.9.1/lib/Target/AMDGPU/SIInstructions.td
+@@ -2029,7 +2029,6 @@ def SI_RETURN : PseudoInstSI <
+   let hasSideEffects = 1;
+   let SALU = 1;
+   let hasNoSchedulingInfo = 1;
+-  let DisableWQM = 1;
+ }
+ let Uses = [EXEC], Defs = [EXEC, VCC, M0],
+Index: llvm-toolchain-3.9-3.9.1/test/CodeGen/AMDGPU/wqm.ll
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/test/CodeGen/AMDGPU/wqm.ll
++++ llvm-toolchain-3.9-3.9.1/test/CodeGen/AMDGPU/wqm.ll
+@@ -17,18 +17,17 @@ main_body:
+ ;CHECK-LABEL: {{^}}test2:
+ ;CHECK-NEXT: ; %main_body
+ ;CHECK-NEXT: s_wqm_b64 exec, exec
++;CHECK: image_sample
+ ;CHECK-NOT: exec
+-define amdgpu_ps void @test2(<8 x i32> inreg %rsrc, <4 x i32> inreg %sampler, float addrspace(1)* inreg %ptr, <4 x i32> %c) {
++;CHECK: _load_dword v0,
++define amdgpu_ps float @test2(<8 x i32> inreg %rsrc, <4 x i32> inreg %sampler, float addrspace(1)* inreg %ptr, <4 x i32> %c) {
+ main_body:
+   %c.1 = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %c, <8 x i32> %rsrc, <4 x i32> %sampler, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+   %c.2 = bitcast <4 x float> %c.1 to <4 x i32>
+   %c.3 = extractelement <4 x i32> %c.2, i32 0
+   %gep = getelementptr float, float addrspace(1)* %ptr, i32 %c.3
+   %data = load float, float addrspace(1)* %gep
+-
+-  call void @llvm.SI.export(i32 15, i32 1, i32 1, i32 0, i32 1, float %data, float undef, float undef, float undef)
+-
+-  ret void
++  ret float %data
+ }
+ ; ... but disabled for stores (and, in this simple case, not re-enabled).
+@@ -415,46 +414,6 @@ entry:
+   ret void
+ }
+-; Must return to exact at the end of a non-void returning shader,
+-; otherwise the EXEC mask exported by the epilog will be wrong. This is true
+-; even if the shader has no kills, because a kill could have happened in a
+-; previous shader fragment.
+-;
+-; CHECK-LABEL: {{^}}test_nonvoid_return:
+-; CHECK: s_mov_b64 [[LIVE:s\[[0-9]+:[0-9]+\]]], exec
+-; CHECK: s_wqm_b64 exec, exec
+-;
+-; CHECK: s_and_b64 exec, exec, [[LIVE]]
+-; CHECK-NOT: exec
+-define amdgpu_ps <4 x float> @test_nonvoid_return() nounwind {
+-  %tex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> undef, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+-  %tex.i = bitcast <4 x float> %tex to <4 x i32>
+-  %dtex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %tex.i, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+-  ret <4 x float> %dtex
+-}
+-
+-; CHECK-LABEL: {{^}}test_nonvoid_return_unreachable:
+-; CHECK: s_mov_b64 [[LIVE:s\[[0-9]+:[0-9]+\]]], exec
+-; CHECK: s_wqm_b64 exec, exec
+-;
+-; CHECK: s_and_b64 exec, exec, [[LIVE]]
+-; CHECK-NOT: exec
+-define amdgpu_ps <4 x float> @test_nonvoid_return_unreachable(i32 inreg %c) nounwind {
+-entry:
+-  %tex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> undef, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+-  %tex.i = bitcast <4 x float> %tex to <4 x i32>
+-  %dtex = call <4 x float> @llvm.SI.image.sample.v4i32(<4 x i32> %tex.i, <8 x i32> undef, <4 x i32> undef, i32 15, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0)
+-
+-  %cc = icmp sgt i32 %c, 0
+-  br i1 %cc, label %if, label %else
+-
+-if:
+-  store volatile <4 x float> %dtex, <4 x float>* undef
+-  unreachable
+-
+-else:
+-  ret <4 x float> %dtex
+-}
+ declare void @llvm.amdgcn.image.store.v4i32(<4 x float>, <4 x i32>, <8 x i32>, i32, i1, i1, i1, i1) #1
+ declare void @llvm.amdgcn.buffer.store.f32(float, <4 x i32>, i32, i32, i1, i1) #1
diff --git a/patches/atomic_library_1.diff b/patches/atomic_library_1.diff
new file mode 100644 (file)
index 0000000..708c506
--- /dev/null
@@ -0,0 +1,45 @@
+Index: llvm-toolchain-snapshot_3.9~svn265903/clang/lib/Basic/Targets.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265903.orig/clang/lib/Basic/Targets.cpp
++++ llvm-toolchain-snapshot_3.9~svn265903/clang/lib/Basic/Targets.cpp
+@@ -4041,6 +4041,20 @@ protected:
+     Builder.defineMacro("__ELF__");
+   }
++  static bool shouldUseInlineAtomic(const llvm::Triple &T) {
++    // On linux, binaries targeting old cpus call functions in libgcc to
++    // perform atomic operations. The implementation in libgcc then calls into
++    // the kernel which on armv6 and newer uses ldrex and strex. The net result
++    // is that if we assume the kernel is at least as recent as the hardware,
++    // it is safe to use atomic instructions on armv6 and newer.
++    if (T.getOS() != llvm::Triple::Linux)
++     return false;
++    StringRef ArchName = T.getArchName();
++    if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
++      return true;
++    return false;
++  }
++
+ public:
+   RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
+       : OSTargetInfo<Target>(Triple, Opts) {
+Index: llvm-toolchain-snapshot_3.9~svn265903/clang/test/CodeGen/linux-arm-atomic.c
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265903.orig/clang/test/CodeGen/linux-arm-atomic.c
++++ llvm-toolchain-snapshot_3.9~svn265903/clang/test/CodeGen/linux-arm-atomic.c
+@@ -1,5 +1,15 @@
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
++
++typedef int _Atomic_word;
++_Atomic_word exchange_and_add(volatile _Atomic_word *__mem, int __val) {
++  return __atomic_fetch_add(__mem, __val, __ATOMIC_ACQ_REL);
++}
++
++// CHECK: define {{.*}} @exchange_and_add
++// CHECK: atomicrmw {{.*}} add
++// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
++// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-freebsd | FileCheck %s
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-bitrig | FileCheck %s
diff --git a/patches/atomic_library_2.diff b/patches/atomic_library_2.diff
new file mode 100644 (file)
index 0000000..01548c6
--- /dev/null
@@ -0,0 +1,42 @@
+Index: llvm-toolchain-snapshot_3.5~svn201651/clang/test/CodeGen/linux-arm-atomic.c
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn201651.orig/clang/test/CodeGen/linux-arm-atomic.c   2014-02-19 09:46:27.872584164 +0100
++++ llvm-toolchain-snapshot_3.5~svn201651/clang/test/CodeGen/linux-arm-atomic.c        2014-02-19 09:46:29.748703000 +0100
+@@ -1,5 +1,6 @@
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-linux | FileCheck %s
+ // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv6-unknown-linux | FileCheck %s
++// RUN: %clang_cc1 %s -emit-llvm -o - -triple=thumbv7-unknown-linux | FileCheck %s
+ typedef int _Atomic_word;
+ _Atomic_word exchange_and_add(volatile _Atomic_word *__mem, int __val) {
+Index: llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Basic/Targets.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn201651.orig/clang/lib/Basic/Targets.cpp     2014-02-19 09:46:27.872584164 +0100
++++ llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Basic/Targets.cpp  2014-02-19 09:46:29.748703000 +0100
+@@ -3774,9 +3774,23 @@
+     if (T.getOS() != llvm::Triple::Linux)
+      return false;
+     StringRef ArchName = T.getArchName();
+-    if (ArchName.startswith("armv6") || ArchName.startswith("armv7"))
+-      return true;
+-    return false;
++    if (T.getArch() == llvm::Triple::arm) {
++      if (!ArchName.startswith("armv"))
++        return false;
++      StringRef VersionStr = ArchName.substr(4);
++      unsigned Version;
++      if (VersionStr.getAsInteger(10, Version))
++        return false;
++      return Version >= 6;
++    }
++    assert(T.getArch() == llvm::Triple::thumb);
++    if (!ArchName.startswith("thumbv"))
++      return false;
++    StringRef VersionStr = ArchName.substr(6);
++    unsigned Version;
++    if (VersionStr.getAsInteger(10, Version))
++      return false;
++    return Version >= 7;
+   }
+ public:
diff --git a/patches/clang-analyzer-force-version.diff b/patches/clang-analyzer-force-version.diff
new file mode 100644 (file)
index 0000000..f929c0b
--- /dev/null
@@ -0,0 +1,25 @@
+# Force the version of clang in the analyzer
+# This was causing the static analyzer to fail silently if the clang & clang++ are
+# not installed
+Index: llvm-toolchain-snapshot_3.9~svn253.96/clang/tools/scan-build/libexec/ccc-analyzer
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn253.96.orig/clang/tools/scan-build/libexec/ccc-analyzer
++++ llvm-toolchain-snapshot_3.9~svn253.96/clang/tools/scan-build/libexec/ccc-analyzer
+@@ -91,7 +91,7 @@ if ($FindBin::Script =~ /c\+\+-analyzer/
+   if (!defined $Compiler || (! -x $Compiler && ! SearchInPath($Compiler))) { $Compiler = $DefaultCXXCompiler; }
+   $Clang = $ENV{'CLANG_CXX'};
+-  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++'; }
++  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang++-3.9'; }
+   $IsCXX = 1
+ }
+@@ -100,7 +100,7 @@ else {
+   if (!defined $Compiler || (! -x $Compiler && ! SearchInPath($Compiler))) { $Compiler = $DefaultCCompiler; }
+   $Clang = $ENV{'CLANG'};
+-  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang'; }
++  if (!defined $Clang || ! -x $Clang) { $Clang = 'clang-3.9'; }
+   $IsCXX = 0
+ }
diff --git a/patches/clang-apply-replacements.diff b/patches/clang-apply-replacements.diff
new file mode 100644 (file)
index 0000000..38490b5
--- /dev/null
@@ -0,0 +1,35 @@
+Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
+===================================================================
+--- llvm-toolchain-3.7-3.7.orig/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
++++ llvm-toolchain-3.7-3.7/clang-tools-extra/clang-modernize/Core/ReplacementHandling.cpp
+@@ -26,7 +26,7 @@ using namespace clang::tooling;
+ bool ReplacementHandling::findClangApplyReplacements(const char *Argv0) {
+   ErrorOr<std::string> CARPathOrErr =
+-      findProgramByName("clang-apply-replacements");
++      findProgramByName("clang-apply-replacements-3.8");
+   if (!CARPathOrErr)
+     return true;
+@@ -34,7 +34,7 @@ bool ReplacementHandling::findClangApply
+   static int StaticSymbol;
+   std::string ClangModernizePath = fs::getMainExecutable(Argv0, &StaticSymbol);
+   SmallString<128> TestPath = path::parent_path(ClangModernizePath);
+-  path::append(TestPath, "clang-apply-replacements");
++  path::append(TestPath, "clang-apply-replacements-3.8");
+   if (fs::can_execute(Twine(TestPath)))
+     CARPath = TestPath.str();
+Index: llvm-toolchain-3.7-3.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+===================================================================
+--- llvm-toolchain-3.7-3.7.orig/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
++++ llvm-toolchain-3.7-3.7/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+@@ -111,7 +111,7 @@ def main():
+                       default='clang-tidy',
+                       help='path to clang-tidy binary')
+   parser.add_argument('-clang-apply-replacements-binary', metavar='PATH',
+-                      default='clang-apply-replacements',
++                      default='clang-apply-replacements-3.8',
+                       help='path to clang-apply-replacements binary')
+   parser.add_argument('-checks', default=None,
+                       help='checks filter, when not specified, use clang-tidy '
diff --git a/patches/clang-arm-default-vfp3-on-armv7a.patch b/patches/clang-arm-default-vfp3-on-armv7a.patch
new file mode 100644 (file)
index 0000000..3be02ce
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-3.9-3.9/include/llvm/Support/ARMTargetParser.def
+===================================================================
+--- llvm-toolchain-3.9-3.9.orig/include/llvm/Support/ARMTargetParser.def
++++ llvm-toolchain-3.9-3.9/include/llvm/Support/ARMTargetParser.def
+@@ -75,7 +75,7 @@ ARM_ARCH("armv6kz", AK_ARMV6KZ, "6KZ", "
+ ARM_ARCH("armv6-m", AK_ARMV6M, "6-M", "v6m", ARMBuildAttrs::CPUArch::v6_M,
+           FK_NONE, ARM::AEK_NONE)
+ ARM_ARCH("armv7-a", AK_ARMV7A, "7-A", "v7", ARMBuildAttrs::CPUArch::v7,
+-          FK_NEON, ARM::AEK_DSP)
++          FK_VFPV3 /* Hard float */, ARM::AEK_DSP)
+ ARM_ARCH("armv7-r", AK_ARMV7R, "7-R", "v7r", ARMBuildAttrs::CPUArch::v7,
+           FK_NONE, (ARM::AEK_HWDIV | ARM::AEK_DSP))
+ ARM_ARCH("armv7-m", AK_ARMV7M, "7-M", "v7m", ARMBuildAttrs::CPUArch::v7,
diff --git a/patches/clang-default-to-i686-on-32bit-x86-targets.patch b/patches/clang-default-to-i686-on-32bit-x86-targets.patch
new file mode 100644 (file)
index 0000000..5df4296
--- /dev/null
@@ -0,0 +1,15 @@
+Set i386 default target CPU to be i686 (same as gcc)
+
+Closes: #812803
+Index: llvm-toolchain-3.9-3.9/clang/lib/Driver/Tools.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.orig/clang/lib/Driver/Tools.cpp
++++ llvm-toolchain-3.9-3.9/clang/lib/Driver/Tools.cpp
+@@ -1898,6 +1898,7 @@ static const char *getX86TargetCPU(const
+   case llvm::Triple::Haiku:
+     return "i586";
+   case llvm::Triple::Bitrig:
++  case llvm::Triple::Linux:
+     return "i686";
+   default:
+     // Fallback to p4.
diff --git a/patches/clang-fix-cmpxchg8-detection-on-i386.patch b/patches/clang-fix-cmpxchg8-detection-on-i386.patch
new file mode 100644 (file)
index 0000000..961afcc
--- /dev/null
@@ -0,0 +1,67 @@
+libcxx atomic tests for old i386 fail with wrong Atomic inline width.
+cmpxchg8b instruction is required for 8 byte atomics that clang was
+assuming.
+
+Too bad _GCC_ATOMIC_LLONG_LOCK_FREE 2 isn't supported even with this change
+because llvm doesn't support unaligned atomic compare and exchange operation.
+Fallback calls to libatomic.so should handle long long lock free but clang
+can't tell program if libatomic is always lock free.
+
+Related bug: https://llvm.org/bugs/show_bug.cgi?id=19355
+
+Index: llvm-toolchain-3.9-3.9/clang/lib/Basic/Targets.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.orig/clang/lib/Basic/Targets.cpp
++++ llvm-toolchain-3.9-3.9/clang/lib/Basic/Targets.cpp
+@@ -2609,7 +2609,10 @@ class X86TargetInfo : public TargetInfo
+     FP_SSE,
+     FP_387
+   } FPMath = FP_Default;
+-
++protected:
++  bool isCmpXChg8Supported() const {
++    return CPU >= CK_i586;
++  }
+ public:
+   X86TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
+       : TargetInfo(Triple) {
+@@ -2701,6 +2704,8 @@ public:
+     // acceptable.
+     // FIXME: This results in terrible diagnostics. Clang just says the CPU is
+     // invalid without explaining *why*.
++    if (!isCmpXChg8Supported())
++        MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 32;
+     switch (CPU) {
+     case CK_Generic:
+       // No processor selected!
+@@ -3730,7 +3735,7 @@ void X86TargetInfo::getTargetDefines(con
+     Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2");
+     Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
+   }
+-  if (CPU >= CK_i586)
++  if (isCmpXChg8Supported())
+     Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
+ }
+@@ -4009,8 +4014,6 @@ public:
+                              (1 << TargetInfo::LongDouble));
+     // x86-32 has atomics up to 8 bytes
+-    // FIXME: Check that we actually have cmpxchg8b before setting
+-    // MaxAtomicInlineWidth. (cmpxchg8b is an i586 instruction.)
+     MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
+   }
+   BuiltinVaListKind getBuiltinVaListKind() const override {
+Index: llvm-toolchain-3.9-3.9/clang/test/Sema/atomic-ops.c
+===================================================================
+--- llvm-toolchain-3.9-3.9.orig/clang/test/Sema/atomic-ops.c
++++ llvm-toolchain-3.9-3.9/clang/test/Sema/atomic-ops.c
+@@ -14,7 +14,7 @@ _Static_assert(__GCC_ATOMIC_WCHAR_T_LOCK
+ _Static_assert(__GCC_ATOMIC_SHORT_LOCK_FREE == 2, "");
+ _Static_assert(__GCC_ATOMIC_INT_LOCK_FREE == 2, "");
+ _Static_assert(__GCC_ATOMIC_LONG_LOCK_FREE == 2, "");
+-#ifdef __i386__
++#if defined(__i386__)
+ _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 1, "");
+ #else
+ _Static_assert(__GCC_ATOMIC_LLONG_LOCK_FREE == 2, "");
diff --git a/patches/clang-format-version.diff b/patches/clang-format-version.diff
new file mode 100644 (file)
index 0000000..3d137c8
--- /dev/null
@@ -0,0 +1,39 @@
+Index: llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format.py
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn260089.orig/clang/tools/clang-format/clang-format.py
++++ llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format.py
+@@ -34,7 +34,7 @@ import vim
+ # set g:clang_format_path to the path to clang-format if it is not on the path
+ # Change this to the full path if clang-format is not on the path.
+-binary = 'clang-format'
++binary = 'clang-format-3.9'
+ if vim.eval('exists("g:clang_format_path")') == "1":
+   binary = vim.eval('g:clang_format_path')
+Index: llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format-diff.py
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn260089.orig/clang/tools/clang-format/clang-format-diff.py
++++ llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format-diff.py
+@@ -55,7 +55,7 @@ def main():
+   parser.add_argument('-style',
+                       help='formatting style to apply (LLVM, Google, Chromium, '
+                       'Mozilla, WebKit)')
+-  parser.add_argument('-binary', default='clang-format',
++  parser.add_argument('-binary', default='clang-format-3.9',
+                       help='location of binary to use for clang-format')
+   args = parser.parse_args()
+Index: llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format.el
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn260089.orig/clang/tools/clang-format/clang-format.el
++++ llvm-toolchain-snapshot_3.9~svn260089/clang/tools/clang-format/clang-format.el
+@@ -36,7 +36,7 @@
+   :group 'tools)
+ (defcustom clang-format-executable
+-  (or (executable-find "clang-format")
++  (or (executable-find "clang-format-3.9")
+       "clang-format")
+   "Location of the clang-format executable.
diff --git a/patches/clang-tidy-run-bin.diff b/patches/clang-tidy-run-bin.diff
new file mode 100644 (file)
index 0000000..9a07d90
--- /dev/null
@@ -0,0 +1,17 @@
+Index: llvm-toolchain-3.8-3.8.1/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+===================================================================
+--- llvm-toolchain-3.8-3.8.1.orig/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
++++ llvm-toolchain-3.8-3.8.1/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py
+@@ -108,10 +108,10 @@ def main():
+                                    'clang-tidy and clang-apply-replacements in '
+                                    '$PATH.')
+   parser.add_argument('-clang-tidy-binary', metavar='PATH',
+-                      default='clang-tidy',
++                      default='clang-tidy-3.9',
+                       help='path to clang-tidy binary')
+   parser.add_argument('-clang-apply-replacements-binary', metavar='PATH',
+-                      default='clang-apply-replacements',
++                      default='clang-apply-replacements-3.9',
+                       help='path to clang-apply-replacements binary')
+   parser.add_argument('-checks', default=None,
+                       help='checks filter, when not specified, use clang-tidy '
diff --git a/patches/compiler-rt-i586.diff b/patches/compiler-rt-i586.diff
new file mode 100644 (file)
index 0000000..d2c754a
--- /dev/null
@@ -0,0 +1,34 @@
+Index: llvm-toolchain-snapshot-3.8~svn249990/compiler-rt/make/platform/clang_linux.mk
+===================================================================
+--- llvm-toolchain-snapshot-3.8~svn249990.orig/compiler-rt/make/platform/clang_linux.mk
++++ llvm-toolchain-snapshot-3.8~svn249990/compiler-rt/make/platform/clang_linux.mk
+@@ -21,7 +21,7 @@ ifneq ($(findstring -linux-,$(CompilerTa
+ # Define configs only if arch in triple is i386 or x86_64
+ CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple)))
+-ifeq ($(call contains,i386 x86_64,$(CompilerTargetArch)),true)
++ifeq ($(call contains,i386 x86_64 i586 i686,$(CompilerTargetArch)),true)
+ # TryCompile compiler source flags
+ # Returns exit code of running a compiler invocation.
+@@ -35,7 +35,7 @@ TryCompile = \
+     echo $$?)
+ test_source = $(ProjSrcRoot)/make/platform/clang_linux_test_input.c
+-ifeq ($(CompilerTargetArch),i386)
++ifneq (,$(filter $(CompilerTargetArch),i386 i586 i686))
+   SupportedArches := i386
+   ifeq ($(call TryCompile,$(CC),$(test_source),-m64),0)
+     SupportedArches += x86_64
+Index: llvm-toolchain-snapshot-3.8~svn249990/clang/runtime/compiler-rt/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.8~svn249990.orig/clang/runtime/compiler-rt/Makefile
++++ llvm-toolchain-snapshot-3.8~svn249990/clang/runtime/compiler-rt/Makefile
+@@ -161,6 +161,7 @@ BuildRuntimeLibraries:
+         ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
+         ProjObjRoot=$(PROJ_OBJ_DIR) \
+         CC="$(ToolDir)/clang" \
++        LD_LIBRARY_PATH=../build-llvm/Release/lib \
+         VERBOSE=$(VERBOSE) \
+         $(RuntimeDirs:%=clang_%)
+ .PHONY: BuildRuntimeLibraries
diff --git a/patches/compiler-rt-path.diff b/patches/compiler-rt-path.diff
new file mode 100644 (file)
index 0000000..e24268f
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot-3.5~svn208979/compiler-rt/make/platform/clang_linux.mk
+===================================================================
+--- llvm-toolchain-snapshot-3.5~svn208979.orig/compiler-rt/make/platform/clang_linux.mk        2014-05-16 19:13:05.702922367 +0200
++++ llvm-toolchain-snapshot-3.5~svn208979/compiler-rt/make/platform/clang_linux.mk     2014-05-16 19:13:27.551329647 +0200
+@@ -11,7 +11,7 @@
+ # cross compilers). For now, we just find the target architecture of the
+ # compiler and only define configurations we know that compiler can generate.
+ CompilerTargetTriple := $(shell \
+-      LANG=C $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
++      LD_LIBRARY_PATH=../build-llvm/Release/lib  LANG=C $(CC) -v 2>&1 | grep 'Target:' | cut -d' ' -f2)
+ ifeq ($(CompilerTargetTriple),)
+ $(error "unable to infer compiler target triple for $(CC)")
+ endif
diff --git a/patches/declare_clear_cache.diff b/patches/declare_clear_cache.diff
new file mode 100644 (file)
index 0000000..6b55296
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/lib/Support/Unix/Memory.inc
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/lib/Support/Unix/Memory.inc
++++ llvm-toolchain-snapshot_3.7~svn241915/lib/Support/Unix/Memory.inc
+@@ -338,7 +338,7 @@ void Memory::InvalidateInstructionCache(
+   // FIXME: Can we safely always call this for __GNUC__ everywhere?
+   const char *Start = static_cast<const char *>(Addr);
+   const char *End = Start + Len;
+-  __clear_cache(const_cast<char *>(Start), const_cast<char *>(End));
++  __builtin___clear_cache(const_cast<char *>(Start), const_cast<char *>(End));
+ #  endif
+ #endif  // end apple
diff --git a/patches/disable-display-PASS-UNSUPPORTED-XFAIL.diff b/patches/disable-display-PASS-UNSUPPORTED-XFAIL.diff
new file mode 100644 (file)
index 0000000..cb6a2fe
--- /dev/null
@@ -0,0 +1,17 @@
+Index: llvm-toolchain-snapshot_3.8~svn255217/lldb/third_party/Python/module/unittest2/unittest2/runner.py
+===================================================================
+--- llvm-toolchain-snapshot_3.8~svn255217.orig/lldb/third_party/Python/module/unittest2/unittest2/runner.py
++++ llvm-toolchain-snapshot_3.8~svn255217/lldb/third_party/Python/module/unittest2/unittest2/runner.py
+@@ -171,9 +171,9 @@ class TextTestRunner(unittest.TextTestRu
+         if hasattr(result, 'separator2'):
+             self.stream.writeln(result.separator2)
+         run = result.testsRun
+-        self.stream.writeln("Ran %d test%s in %.3fs" %
+-                            (run, run != 1 and "s" or "", timeTaken))
+-        self.stream.writeln()
++#        self.stream.writeln("Ran %d test%s in %.3fs" %
++#                            (run, run != 1 and "s" or "", timeTaken))
++#        self.stream.writeln()
+         
+         expectedFails = unexpectedSuccesses = skipped = passed = failed = errored = 0
+         try:
diff --git a/patches/disable-execinfo-usage.diff b/patches/disable-execinfo-usage.diff
new file mode 100644 (file)
index 0000000..e9d5bec
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.8~svn253186.orig/lldb/lib/Makefile
++++ llvm-toolchain-snapshot_3.8~svn253186/lldb/lib/Makefile
+@@ -201,7 +201,7 @@ ifeq ($(HOST_OS),FreeBSD)
+     # Allow unresolved symbols.
+     LLVMLibsOptions += -Wl,--allow-shlib-undefined
+     # Link in python
+-    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -L/usr/local/lib -lexecinfo \
++    LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt \
+                        -ledit -lncurses -lpanel -lpthread
+ endif
diff --git a/patches/disable-llvm-symbolizer-test.diff b/patches/disable-llvm-symbolizer-test.diff
new file mode 100644 (file)
index 0000000..607141c
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-3.9-3.9~+rc1/test/tools/llvm-symbolizer/print_context.c
+===================================================================
+--- llvm-toolchain-3.9-3.9~+rc1.orig/test/tools/llvm-symbolizer/print_context.c
++++ llvm-toolchain-3.9-3.9~+rc1/test/tools/llvm-symbolizer/print_context.c
+@@ -1,7 +1,7 @@
+ // REQUIRES: x86_64-linux
+ // RUN: %host_cc -O0 -g %s -o %t 2>&1
+ // RUN: %t 2>&1 | llvm-symbolizer -print-source-context-lines=5 -obj=%t | FileCheck %s
+-
++// XFAIL: *
+ #include <stdio.h>
+ int inc(int a) {
diff --git a/patches/disable-test-failing-sparc-i386.diff b/patches/disable-test-failing-sparc-i386.diff
new file mode 100644 (file)
index 0000000..208606e
--- /dev/null
@@ -0,0 +1,10 @@
+Index: llvm-toolchain-snapshot_3.9~svn275597/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn275597.orig/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
++++ llvm-toolchain-snapshot_3.9~svn275597/test/CodeGen/SPARC/LeonInsertNOPsDoublePrecision.ll
+@@ -1,4 +1,5 @@
+ ; RUN: llc %s -O0 -march=sparc -mcpu=at697f -o - | FileCheck %s
++; XFAIL: *
+ ; CHECK:        ldd
+ ; CHECK:        ldd
diff --git a/patches/do-not-fail-on-unexpected-pass.diff b/patches/do-not-fail-on-unexpected-pass.diff
new file mode 100644 (file)
index 0000000..f9b8fab
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.9~svn268880/utils/lit/lit/Test.py
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn268880.orig/utils/lit/lit/Test.py
++++ llvm-toolchain-snapshot_3.9~svn268880/utils/lit/lit/Test.py
+@@ -30,7 +30,7 @@ PASS        = ResultCode('PASS', False)
+ FLAKYPASS   = ResultCode('FLAKYPASS', False)
+ XFAIL       = ResultCode('XFAIL', False)
+ FAIL        = ResultCode('FAIL', True)
+-XPASS       = ResultCode('XPASS', True)
++XPASS       = ResultCode('XPASS', False)
+ UNRESOLVED  = ResultCode('UNRESOLVED', True)
+ UNSUPPORTED = ResultCode('UNSUPPORTED', False)
+ TIMEOUT     = ResultCode('TIMEOUT', True)
diff --git a/patches/drop-wrong-hack-arm64.patch b/patches/drop-wrong-hack-arm64.patch
new file mode 100644 (file)
index 0000000..0fc046f
--- /dev/null
@@ -0,0 +1,25 @@
+Description: This hack was needed on 14.04, and for some reason
+ breaks finding pythonlibs in cmake (seen in arm64 and mips64el)
+
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+
+--- llvm-toolchain-3.9-3.9.orig/lldb/cmake/modules/LLDBConfig.cmake
++++ llvm-toolchain-3.9-3.9/lldb/cmake/modules/LLDBConfig.cmake
+@@ -167,12 +167,12 @@ function(find_python_libs_windows)
+ endfunction(find_python_libs_windows)
+ if (NOT LLDB_DISABLE_PYTHON)
+-  if(UNIX)
++  #if(UNIX)
+     # This is necessary for crosscompile on Ubuntu 14.04 64bit. Need a proper fix.
+-    if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+-      set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
+-    endif()
+-  endif()
++    #if(CMAKE_SIZEOF_VOID_P EQUAL 8)
++    #  set(CMAKE_LIBRARY_ARCHITECTURE "x86_64-linux-gnu")
++    #endif()
++  #endif()
+   if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
+     find_python_libs_windows()
diff --git a/patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot.diff b/patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot.diff
new file mode 100644 (file)
index 0000000..9e00be4
--- /dev/null
@@ -0,0 +1,103 @@
+From 2dca6dc37a0c7a7f2232677f0d8bc175f7e0aa1d Mon Sep 17 00:00:00 2001
+From: Qin Zhao <zhaoqin@google.com>
+Date: Mon, 3 Oct 2016 20:03:10 +0000
+Subject: [PATCH] [esan] Fix ESan test failure on Debian Sid bot
+
+Summary:
+Handles early allocation from dlsym by allocating memory from a local
+static buffer.
+
+Reviewers: bruening
+
+Subscribers: kubabrecka
+
+Differential Revision: https://reviews.llvm.org/D25193
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283139 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/esan/esan_interceptors.cpp | 42 ++++++++++++++++++++++++++++--------------
+ 1 file changed, 28 insertions(+), 14 deletions(-)
+
+Index: llvm-toolchain-3.9-3.9.1/compiler-rt/lib/esan/esan_interceptors.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/compiler-rt/lib/esan/esan_interceptors.cpp
++++ llvm-toolchain-3.9-3.9.1/compiler-rt/lib/esan/esan_interceptors.cpp
+@@ -461,28 +461,35 @@ INTERCEPTOR(int, pthread_sigmask, int ho
+ // Malloc interceptors
+ //===----------------------------------------------------------------------===//
+-static char early_alloc_buf[128];
+-static bool used_early_alloc_buf;
++static const uptr early_alloc_buf_size = 1024;
++static uptr allocated_bytes;
++static char early_alloc_buf[early_alloc_buf_size];
++
++static bool isInEarlyAllocBuf(const void *ptr) {
++  return ((uptr)ptr >= (uptr)early_alloc_buf &&
++          ((uptr)ptr - (uptr)early_alloc_buf) < sizeof(early_alloc_buf));
++}
+ static void *handleEarlyAlloc(uptr size) {
+   // If esan is initialized during an interceptor (which happens with some
+   // tcmalloc implementations that call pthread_mutex_lock), the call from
+-  // dlsym to calloc will deadlock.  There is only one such calloc (dlsym
+-  // allocates a single pthread key), so we work around it by using a
+-  // static buffer for the calloc request.  The loader currently needs
+-  // 32 bytes but we size at 128 to allow for future changes.
++  // dlsym to calloc will deadlock.
++  // dlsym may also call malloc before REAL(malloc) is retrieved from dlsym.
++  // We work around it by using a static buffer for the early malloc/calloc
++  // requests.
+   // This solution will also allow us to deliberately intercept malloc & family
+   // in the future (to perform tool actions on each allocation, without
+   // replacing the allocator), as it also solves the problem of intercepting
+   // calloc when it will itself be called before its REAL pointer is
+   // initialized.
+-  CHECK(!used_early_alloc_buf && size < sizeof(early_alloc_buf));
+   // We do not handle multiple threads here.  This only happens at process init
+   // time, and while it's possible for a shared library to create early threads
+   // that race here, we consider that to be a corner case extreme enough that
+   // it's not worth the effort to handle.
+-  used_early_alloc_buf = true;
+-  return (void *)early_alloc_buf;
++  void *mem = (void *)&early_alloc_buf[allocated_bytes];
++  allocated_bytes += size;
++  CHECK_LT(allocated_bytes, early_alloc_buf_size);
++  return mem;
+ }
+ INTERCEPTOR(void*, calloc, uptr size, uptr n) {
+@@ -496,14 +503,20 @@ INTERCEPTOR(void*, calloc, uptr size, up
+   return res;
+ }
++INTERCEPTOR(void*, malloc, uptr size) {
++  if (EsanDuringInit && REAL(malloc) == nullptr)
++    return handleEarlyAlloc(size);
++  void *ctx;
++  COMMON_INTERCEPTOR_ENTER(ctx, malloc, size);
++  return REAL(malloc)(size);
++}
++
+ INTERCEPTOR(void, free, void *p) {
+   void *ctx;
+-  COMMON_INTERCEPTOR_ENTER(ctx, free, p);
+-  if (p == (void *)early_alloc_buf) {
+-    // We expect just a singleton use but we clear this for cleanliness.
+-    used_early_alloc_buf = false;
++  // There are only a few early allocation requests, so we simply skip the free.
++  if (isInEarlyAllocBuf(p))
+     return;
+-  }
++  COMMON_INTERCEPTOR_ENTER(ctx, free, p);
+   REAL(free)(p);
+ }
+@@ -534,6 +547,7 @@ void initializeInterceptors() {
+   ESAN_MAYBE_INTERCEPT_PTHREAD_SIGMASK;
+   INTERCEPT_FUNCTION(calloc);
++  INTERCEPT_FUNCTION(malloc);
+   INTERCEPT_FUNCTION(free);
+   // TODO(bruening): intercept routines that other sanitizers intercept that
diff --git a/patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot2.diff b/patches/esan-Fix-ESan-test-failure-on-Debian-Sid-bot2.diff
new file mode 100644 (file)
index 0000000..79b9d56
--- /dev/null
@@ -0,0 +1,31 @@
+From 9b149609c0dc08dc75537c44d43038c0e34b1321 Mon Sep 17 00:00:00 2001
+From: Qin Zhao <zhaoqin@google.com>
+Date: Fri, 7 Oct 2016 20:53:35 +0000
+Subject: [PATCH] [esan] Fix ESan test failure on Debian Sid bot
+
+Summary: Increase early allocation buffer size.
+
+Reviewers: bruening
+
+Subscribers: kubabrecka
+
+Differential Revision: https://reviews.llvm.org/D25380
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@283598 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/esan/esan_interceptors.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: llvm-toolchain-3.9-3.9.1/compiler-rt/lib/esan/esan_interceptors.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/compiler-rt/lib/esan/esan_interceptors.cpp
++++ llvm-toolchain-3.9-3.9.1/compiler-rt/lib/esan/esan_interceptors.cpp
+@@ -461,7 +461,7 @@ INTERCEPTOR(int, pthread_sigmask, int ho
+ // Malloc interceptors
+ //===----------------------------------------------------------------------===//
+-static const uptr early_alloc_buf_size = 1024;
++static const uptr early_alloc_buf_size = 4096;
+ static uptr allocated_bytes;
+ static char early_alloc_buf[early_alloc_buf_size];
diff --git a/patches/fix-R_AARCH64_MOVW_UABS_G3-relocation.patch b/patches/fix-R_AARCH64_MOVW_UABS_G3-relocation.patch
new file mode 100644 (file)
index 0000000..10c92a3
--- /dev/null
@@ -0,0 +1,16 @@
+Description: Fix R_AARCH64_MOVW_UABS_G3 relocation
+Origin: upstream, https://reviews.llvm.org/D27609?id=80860
+Bug-Debian: https://bugs.debian.org/862360
+Author: Yichao Yu <yyc1992@gmail.com>
+Last-Update: 2016-12-15
+--- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
++++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp
+@@ -357,7 +357,7 @@
+     // bits affected by the relocation on entry is garbage.
+     *TargetPtr &= 0xffe0001fU;
+     // Immediate goes in bits 20:5 of MOVZ/MOVK instruction
+-    *TargetPtr |= Result >> (48 - 5);
++    *TargetPtr |= (Result & 0xffff000000000000ULL) >> (48 - 5);
+     // Shift must be "lsl #48", in bits 22:21
+     assert((*TargetPtr >> 21 & 0x3) == 3 && "invalid shift for relocation");
+     break;
diff --git a/patches/fix-clang-path-and-build.diff b/patches/fix-clang-path-and-build.diff
new file mode 100644 (file)
index 0000000..aa9d0ba
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn201651.orig/clang/lib/Driver/ToolChains.cpp 2014-02-19 09:46:23.400300812 +0100
++++ llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp      2014-02-19 09:46:35.377059510 +0100
+@@ -2326,6 +2326,8 @@
+       DriverArgs.hasArg(options::OPT_nostdincxx))
+     return;
++  addSystemInclude(DriverArgs, CC1Args, "/usr/include/clang/" + std::string(CLANG_VERSION_STRING) + "/include/");
++
+   switch (GetCXXStdlibType(DriverArgs)) {
+   case ToolChain::CST_Libcxx:
+     addSystemInclude(DriverArgs, CC1Args,
diff --git a/patches/fix-cmake-config-prefix.diff b/patches/fix-cmake-config-prefix.diff
new file mode 100644 (file)
index 0000000..c53b372
--- /dev/null
@@ -0,0 +1,24 @@
+## Description: add some description
+## Origin/Author: add some origin or author
+## Bug: bug URL
+--- a/cmake/modules/CMakeLists.txt
++++ b/cmake/modules/CMakeLists.txt
+@@ -47,16 +47,7 @@ file(COPY .
+   )
+ # Generate LLVMConfig.cmake for the install tree.
+-set(LLVM_CONFIG_CODE "
+-# Compute the installation prefix from this LLVMConfig.cmake file location.
+-get_filename_component(LLVM_INSTALL_PREFIX \"\${CMAKE_CURRENT_LIST_FILE}\" PATH)")
+-# Construct the proper number of get_filename_component(... PATH)
+-# calls to compute the installation prefix.
+-string(REGEX REPLACE "/" ";" _count "${LLVM_INSTALL_PACKAGE_DIR}")
+-foreach(p ${_count})
+-  set(LLVM_CONFIG_CODE "${LLVM_CONFIG_CODE}
+-get_filename_component(LLVM_INSTALL_PREFIX \"\${LLVM_INSTALL_PREFIX}\" PATH)")
+-endforeach(p)
++set(LLVM_CONFIG_CODE "set(LLVM_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")")
+ set(LLVM_CONFIG_INCLUDE_DIRS "\${LLVM_INSTALL_PREFIX}/include")
+ set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
+ set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
+
diff --git a/patches/fix-llvm-config-obj-src-root.patch b/patches/fix-llvm-config-obj-src-root.patch
new file mode 100644 (file)
index 0000000..3c15cea
--- /dev/null
@@ -0,0 +1,19 @@
+Index: llvm-toolchain-snapshot_3.9~svn260089/tools/llvm-config/llvm-config.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn260089.orig/tools/llvm-config/llvm-config.cpp
++++ llvm-toolchain-snapshot_3.9~svn260089/tools/llvm-config/llvm-config.cpp
+@@ -533,9 +533,9 @@ int main(int argc, char **argv) {
+       } else if (Arg == "--shared-mode") {
+         PrintSharedMode = true;
+       } else if (Arg == "--obj-root") {
+-        OS << ActivePrefix << '\n';
++        OS << ActivePrefix << "/build/" << '\n';
+       } else if (Arg == "--src-root") {
+-        OS << LLVM_SRC_ROOT << '\n';
++        OS << ActivePrefix << "/build/" << '\n';
+       } else if (Arg == "--link-shared") {
+         LinkMode = LinkModeShared;
+       } else if (Arg == "--link-static") {
+       } else {
+         usage();
+       }
diff --git a/patches/fix-scan-view-path.diff b/patches/fix-scan-view-path.diff
new file mode 100644 (file)
index 0000000..d9fa6c8
--- /dev/null
@@ -0,0 +1,21 @@
+Index: llvm-toolchain-3.9-3.9/clang/tools/scan-view/bin/scan-view
+===================================================================
+--- llvm-toolchain-3.9-3.9.orig/clang/tools/scan-view/bin/scan-view
++++ llvm-toolchain-3.9-3.9/clang/tools/scan-view/bin/scan-view
+@@ -23,6 +23,7 @@ kDefaultPort = 8181
+ kMaxPortsToTry = 100
+ ###
++BASE_DIR = '/usr/share/clang/scan-view-3.9'
+ def url_is_up(url):
+@@ -61,7 +62,7 @@ def start_browser(port, options):
+ def run(port, options, root):
+     # Prefer to look relative to the installed binary
+-    share = os.path.dirname(__file__) + "/../share/"
++    share = os.path.join(BASE_DIR, 'share')
+     if not os.path.isdir(share):
+         # Otherwise look relative to the source
+         share = os.path.dirname(__file__) + "/../../scan-view/share"
diff --git a/patches/follow-parallel-var.diff b/patches/follow-parallel-var.diff
new file mode 100644 (file)
index 0000000..45af781
--- /dev/null
@@ -0,0 +1,16 @@
+Index: llvm-toolchain-3.4-3.4.2/test/Makefile
+===================================================================
+--- llvm-toolchain-3.4-3.4.2.orig/test/Makefile
++++ llvm-toolchain-3.4-3.4.2/test/Makefile
+@@ -29,6 +29,11 @@ else
+ LIT_ARGS := -s -v
+ endif
++# NJOBS allows an override of the number of threads
++ifneq ($(NJOBS),)
++LIT_ARGS += $(NJOBS)
++endif
++
+ ifdef TESTSUITE
+ LIT_TESTSUITE := $(TESTSUITE)
+ else
diff --git a/patches/force-gcc-header-obj.diff b/patches/force-gcc-header-obj.diff
new file mode 100644 (file)
index 0000000..bcd2cbd
--- /dev/null
@@ -0,0 +1,16 @@
+Index: llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn201651.orig/clang/lib/Driver/ToolChains.cpp 2014-02-19 09:46:43.433569829 +0100
++++ llvm-toolchain-snapshot_3.5~svn201651/clang/lib/Driver/ToolChains.cpp      2014-02-19 09:46:45.621708435 +0100
+@@ -3078,6 +3078,11 @@
+     return;
+   }
++  // Force the inclusion of the gcc headers (objc/objc.h)
++  addExternCSystemIncludeIfExists(
++     DriverArgs, CC1Args, GCCInstallation.getInstallPath() + "/include");
++
++
+   // Lacking those, try to detect the correct set of system includes for the
+   // target triple.
diff --git a/patches/force-link-pass.o.diff b/patches/force-link-pass.o.diff
new file mode 100644 (file)
index 0000000..f913491
--- /dev/null
@@ -0,0 +1,28 @@
+Index: llvm-toolchain-snapshot_3.7~svn231588/tools/bugpoint/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn231588.orig/tools/bugpoint/Makefile
++++ llvm-toolchain-snapshot_3.7~svn231588/tools/bugpoint/Makefile
+@@ -12,6 +12,9 @@ TOOLNAME := bugpoint
+ LINK_COMPONENTS := asmparser instrumentation scalaropts ipo linker bitreader \
+                    bitwriter irreader vectorize objcarcopts codegen
++# Crappy workaround to make sure it links correctly.
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
++
+ # Support plugins.
+ NO_DEAD_STRIP := 1
+Index: llvm-toolchain-snapshot_3.7~svn231588/tools/opt/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn231588.orig/tools/opt/Makefile
++++ llvm-toolchain-snapshot_3.7~svn231588/tools/opt/Makefile
+@@ -11,6 +11,9 @@ LEVEL := ../..
+ TOOLNAME := opt
+ LINK_COMPONENTS := bitreader bitwriter asmparser irreader instrumentation scalaropts objcarcopts ipo vectorize all-targets codegen passes
++# Crappy workaround to make sure it links correctly.
++LLVMLibsOptions := ../../lib/IR/Release*/Pass.o
++
+ # Support plugins.
+ NO_DEAD_STRIP := 1
diff --git a/patches/hurd-EIEIO-undef.diff b/patches/hurd-EIEIO-undef.diff
new file mode 100644 (file)
index 0000000..3b98ad9
--- /dev/null
@@ -0,0 +1,14 @@
+Index: llvm-toolchain-snapshot_3.9~svn268880/utils/TableGen/CodeEmitterGen.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn268880.orig/utils/TableGen/CodeEmitterGen.cpp
++++ llvm-toolchain-snapshot_3.9~svn268880/utils/TableGen/CodeEmitterGen.cpp
+@@ -229,6 +229,9 @@ void CodeEmitterGen::run(raw_ostream &o)
+   ArrayRef<const CodeGenInstruction*> NumberedInstructions =
+     Target.getInstructionsByEnumValue();
++  o << "// Undef for HURD\n";
++  o << "#ifdef EIEIO\n#undef EIEIO\n#endif\n";
++
+   // Emit function declaration
+   o << "uint64_t " << Target.getName();
+   o << "MCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,\n"
diff --git a/patches/hurd-pathmax.diff b/patches/hurd-pathmax.diff
new file mode 100644 (file)
index 0000000..146844e
--- /dev/null
@@ -0,0 +1,59 @@
+Index: llvm-toolchain-snapshot_3.9~svn265113/clang/lib/Basic/FileManager.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265113.orig/clang/lib/Basic/FileManager.cpp
++++ llvm-toolchain-snapshot_3.9~svn265113/clang/lib/Basic/FileManager.cpp
+@@ -494,6 +494,10 @@ void FileManager::invalidateCache(const
+   UniqueRealFiles.erase(Entry->getUniqueID());
+ }
++// For GNU Hurd
++#if defined(__GNU__) && !defined(PATH_MAX)
++# define PATH_MAX 4096
++#endif
+ void FileManager::GetUniqueIDMapping(
+                    SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
+Index: llvm-toolchain-snapshot_3.9~svn265113/lldb/include/lldb/lldb-defines.h
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265113.orig/lldb/include/lldb/lldb-defines.h
++++ llvm-toolchain-snapshot_3.9~svn265113/lldb/include/lldb/lldb-defines.h
+@@ -28,6 +28,11 @@
+     #define INT32_MAX 2147483647
+ #endif
++// For GNU Hurd
++#if defined(__GNU__) && !defined(PATH_MAX)
++# define PATH_MAX 4096
++#endif
++
+ #if !defined(UINT32_MAX)
+     #define UINT32_MAX 4294967295U
+ #endif
+Index: llvm-toolchain-snapshot_3.9~svn265113/lib/Support/Unix/Path.inc
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265113.orig/lib/Support/Unix/Path.inc
++++ llvm-toolchain-snapshot_3.9~svn265113/lib/Support/Unix/Path.inc
+@@ -58,6 +58,7 @@
+ // For GNU Hurd
+ #if defined(__GNU__) && !defined(PATH_MAX)
+ # define PATH_MAX 4096
++# define MAXPATHLEN 4096
+ #endif
+ #include <sys/types.h>
+Index: llvm-toolchain-snapshot_3.9~svn265113/tools/dsymutil/DwarfLinker.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265113.orig/tools/dsymutil/DwarfLinker.cpp
++++ llvm-toolchain-snapshot_3.9~svn265113/tools/dsymutil/DwarfLinker.cpp
+@@ -41,6 +41,11 @@
+ #include <string>
+ #include <tuple>
++// For GNU Hurd
++#if defined(__GNU__) && !defined(PATH_MAX)
++# define PATH_MAX 4096
++#endif
++
+ namespace llvm {
+ namespace dsymutil {
diff --git a/patches/install-scan-build-py.diff b/patches/install-scan-build-py.diff
new file mode 100644 (file)
index 0000000..e7813a2
--- /dev/null
@@ -0,0 +1,12 @@
+Index: llvm-toolchain-snapshot_3.9~svn269409/clang/tools/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn269409.orig/clang/tools/CMakeLists.txt
++++ llvm-toolchain-snapshot_3.9~svn269409/clang/tools/CMakeLists.txt
+@@ -16,6 +16,7 @@ endif()
+ if(CLANG_ENABLE_STATIC_ANALYZER)
+   add_clang_subdirectory(clang-check)
+   add_clang_subdirectory(scan-build)
++  add_clang_subdirectory(scan-build-py)
+   add_clang_subdirectory(scan-view)
+ endif()
diff --git a/patches/kfreebsd-support.diff b/patches/kfreebsd-support.diff
new file mode 100644 (file)
index 0000000..3218d79
--- /dev/null
@@ -0,0 +1,84 @@
+Index: llvm-toolchain-3.9_3.9~+rc3/compiler-rt/cmake/config-ix.cmake
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc3.orig/compiler-rt/cmake/config-ix.cmake
++++ llvm-toolchain-3.9_3.9~+rc3/compiler-rt/cmake/config-ix.cmake
+@@ -397,7 +397,8 @@ endif()
+ if (SANITIZER_COMMON_SUPPORTED_ARCH AND NOT LLVM_USE_SANITIZER AND
+     (OS_NAME MATCHES "Android|Darwin|Linux|FreeBSD" OR
+-    (OS_NAME MATCHES "Windows" AND MSVC)))
++    (OS_NAME MATCHES "Windows" AND MSVC))
++    AND NOT (OS_NAME STREQUAL "kFreeBSD"))
+   set(COMPILER_RT_HAS_SANITIZER_COMMON TRUE)
+ else()
+   set(COMPILER_RT_HAS_SANITIZER_COMMON FALSE)
+Index: llvm-toolchain-3.9_3.9~+rc3/tools/llvm-shlib/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc3.orig/tools/llvm-shlib/CMakeLists.txt
++++ llvm-toolchain-3.9_3.9~+rc3/tools/llvm-shlib/CMakeLists.txt
+@@ -40,7 +40,7 @@ add_llvm_library(LLVM SHARED DISABLE_LLV
+ set_property(TARGET LLVM PROPERTY VERSION "1") # Append .1 to SONAME
+ list(REMOVE_DUPLICATES LIB_NAMES)
+-if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") # FIXME: It should be "GNU ld for elf"
++if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "GNU" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "kFreeBSD") # FIXME: It should be "GNU ld for elf"
+   # GNU ld doesn't resolve symbols in the version script.
+   set(LIB_NAMES -Wl,--whole-archive ${LIB_NAMES} -Wl,--no-whole-archive)
+ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
+Index: llvm-toolchain-3.9_3.9~+rc3/lldb/cmake/LLDBDependencies.cmake
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc3.orig/lldb/cmake/LLDBDependencies.cmake
++++ llvm-toolchain-3.9_3.9~+rc3/lldb/cmake/LLDBDependencies.cmake
+@@ -163,7 +163,7 @@ if (NOT HAVE_CXX_ATOMICS64_WITHOUT_LIB )
+ endif()
+ # On FreeBSD/NetBSD backtrace() is provided by libexecinfo, not libc.
+-if (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD")
++if ((CMAKE_SYSTEM_NAME MATCHES "FreeBSD" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD") AND NOT CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD")
+   list(APPEND LLDB_SYSTEM_LIBS execinfo)
+ endif()
+Index: llvm-toolchain-3.9_3.9~+rc3/lldb/scripts/utilsOsType.py
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc3.orig/lldb/scripts/utilsOsType.py
++++ llvm-toolchain-3.9_3.9~+rc3/lldb/scripts/utilsOsType.py
+@@ -35,6 +35,7 @@ if sys.version_info.major >= 3:
+         Linux = 3
+         NetBSD = 4
+         Windows = 5
++        kFreeBSD = 6
+ else:
+     class EnumOsType(object):
+         values = ["Unknown",
+@@ -42,7 +43,8 @@ else:
+                   "FreeBSD",
+                   "Linux",
+                   "NetBSD",
+-                  "Windows"]
++                  "Windows",
++                  "kFreeBSD"]
+         class __metaclass__(type):
+ #++---------------------------------------------------------------------------
+ # Details:  Fn acts as an enumeration.
+@@ -86,5 +88,7 @@ def determine_os_type():
+         eOSType = EnumOsType.NetBSD
+     elif strOS == "win32":
+         eOSType = EnumOsType.Windows
++    elif strOS.startswith("gnukfreebsd"):
++        eOSType = EnumOsType.kFreeBSD
+     return eOSType
+Index: llvm-toolchain-3.9_3.9~+rc3/lldb/scripts/Python/modules/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc3.orig/lldb/scripts/Python/modules/CMakeLists.txt
++++ llvm-toolchain-3.9_3.9~+rc3/lldb/scripts/Python/modules/CMakeLists.txt
+@@ -5,7 +5,7 @@ if (CXX_SUPPORTS_NO_MACRO_REDEFINED)
+   set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-macro-redefined")
+ endif ()
+-# build the Python readline suppression module only on Linux
+-if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT __ANDROID_NDK__)
++# build the Python readline suppression module only on Linux or GNU systems
++if ((CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "GNU" OR CMAKE_SYSTEM_NAME STREQUAL "kFreeBSD") AND NOT __ANDROID_NDK__)
+    add_subdirectory(readline)
+ endif()
diff --git a/patches/lit-force-lang.diff b/patches/lit-force-lang.diff
new file mode 100644 (file)
index 0000000..84e6558
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-3.9-3.9~svn275918/compiler-rt/test/lit.common.cfg
+===================================================================
+--- llvm-toolchain-3.9-3.9~svn275918.orig/compiler-rt/test/lit.common.cfg
++++ llvm-toolchain-3.9-3.9~svn275918/compiler-rt/test/lit.common.cfg
+@@ -148,7 +148,7 @@ def is_linux_lto_supported():
+   if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold.so')):
+     return False
+-  ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE)
++  ld_cmd = subprocess.Popen([config.gold_executable, '--help'], stdout = subprocess.PIPE, env={'LANG': 'C'})
+   ld_out = ld_cmd.stdout.read().decode()
+   ld_cmd.wait()
diff --git a/patches/lldb-addversion-suffix-to-llvm-server-exec.patch b/patches/lldb-addversion-suffix-to-llvm-server-exec.patch
new file mode 100644 (file)
index 0000000..83852b0
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-3.9-3.9.1/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
++++ llvm-toolchain-3.9-3.9.1/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+@@ -40,7 +40,7 @@
+ #if defined(__APPLE__)
+ # define DEBUGSERVER_BASENAME    "debugserver"
+ #else
+-# define DEBUGSERVER_BASENAME    "lldb-server"
++# define DEBUGSERVER_BASENAME    "lldb-server-3.9"
+ #endif
+ #if defined (HAVE_LIBCOMPRESSION)
diff --git a/patches/lldb-libname.diff b/patches/lldb-libname.diff
new file mode 100644 (file)
index 0000000..196399b
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/lldb/scripts/Python/finishSwigPythonLLDB.py
++++ b/lldb/scripts/Python/finishSwigPythonLLDB.py
+@@ -379,7 +379,7 @@
+             if eOSType == utilsOsType.EnumOsType.Darwin:
+                 strLibFileExtn = ".dylib"
+             else:
+-                strLibFileExtn = ".so"
++                strLibFileExtn = "-3.9.so"
+             strSrc = os.path.join(vstrLldbLibDir, "liblldb" + strLibFileExtn)
+     bOk, strErrMsg = make_symlink(vDictArgs, vstrFrameworkPythonDir, strSrc, strTarget)
diff --git a/patches/lldb-link-atomic-cmake.patch b/patches/lldb-link-atomic-cmake.patch
new file mode 100644 (file)
index 0000000..dc63e6e
--- /dev/null
@@ -0,0 +1,21 @@
+Description: Link with -latomic when mips* processor is detected
+Author: Gianfranco Costamagna <locutusofborg@debian.org>
+Last-Update: 2016-07-27
+
+Index: llvm-toolchain-3.9_3.9~+rc1/lldb/cmake/LLDBDependencies.cmake
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc1.orig/lldb/cmake/LLDBDependencies.cmake
++++ llvm-toolchain-3.9_3.9~+rc1/lldb/cmake/LLDBDependencies.cmake
+@@ -182,6 +182,12 @@ if (LLVM_BUILD_STATIC)
+   endif()
+ endif()
++if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips" OR
++   CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mipsel" OR
++   CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "mips64el")
++  list(APPEND LLDB_SYSTEM_LIBS atomic)
++endif()
++
+ set(LLVM_LINK_COMPONENTS
+   ${LLVM_TARGETS_TO_BUILD}
+   interpreter
diff --git a/patches/lldb-link-atomic.diff b/patches/lldb-link-atomic.diff
new file mode 100644 (file)
index 0000000..3097612
--- /dev/null
@@ -0,0 +1,15 @@
+Index: llvm-toolchain-snapshot_3.7~svn241915/lldb/lib/Makefile
+===================================================================
+--- llvm-toolchain-snapshot_3.7~svn241915.orig/lldb/lib/Makefile
++++ llvm-toolchain-snapshot_3.7~svn241915/lldb/lib/Makefile
+@@ -191,6 +191,10 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), L
+     # Link in python
+     LLVMLibsOptions += $(PYTHON_BUILD_FLAGS) -lrt -ledit -lncurses -lpanel -lpthread
+     LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT)
++    ifneq (,$(filter $(shell dpkg-architecture -qDEB_HOST_ARCH), mips mipsel powerpc powerpcspe))
++     # Link GCC atomic helper library
++     LLVMLibsOptions += -latomic
++    endif
+ endif
+ ifeq ($(HOST_OS),FreeBSD)
diff --git a/patches/lldb-server-link.diff b/patches/lldb-server-link.diff
new file mode 100644 (file)
index 0000000..dbf2164
--- /dev/null
@@ -0,0 +1,36 @@
+Index: llvm-toolchain-3.9-3.9.1/lldb/cmake/LLDBDependencies.cmake
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lldb/cmake/LLDBDependencies.cmake
++++ llvm-toolchain-3.9-3.9.1/lldb/cmake/LLDBDependencies.cmake
+@@ -207,6 +207,7 @@ set(LLVM_LINK_COMPONENTS
+   option
+   support
+   coverage
++  DebugInfoPDB
+   )
+ if ( NOT LLDB_DISABLE_PYTHON )
+Index: llvm-toolchain-3.9-3.9.1/lldb/cmake/modules/AddLLDB.cmake
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lldb/cmake/modules/AddLLDB.cmake
++++ llvm-toolchain-3.9-3.9.1/lldb/cmake/modules/AddLLDB.cmake
+@@ -93,7 +93,7 @@ macro(add_lldb_library name)
+ endmacro(add_lldb_library)
+ macro(add_lldb_executable name)
+-  add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN})
++  add_llvm_executable(${name} ${ARGN})
+   set_target_properties(${name} PROPERTIES FOLDER "lldb executables")
+ endmacro(add_lldb_executable)
+Index: llvm-toolchain-3.9-3.9.1/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-3.9-3.9.1.orig/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
++++ llvm-toolchain-3.9-3.9.1/lldb/source/Plugins/SymbolFile/PDB/CMakeLists.txt
+@@ -1,6 +1,3 @@
+-set(LLVM_PRIVATE_LINK_COMPONENTS
+-    DebugInfoPDB)
+-
+ add_lldb_library(lldbPluginSymbolFilePDB
+   PDBASTParser.cpp
+   SymbolFilePDB.cpp
diff --git a/patches/lldb-soname.diff b/patches/lldb-soname.diff
new file mode 100644 (file)
index 0000000..e96a4c0
--- /dev/null
@@ -0,0 +1,37 @@
+--- a/lldb/source/API/CMakeLists.txt
++++ b/lldb/source/API/CMakeLists.txt
+@@ -6,7 +6,12 @@
+ # for liblldb to link against
+ include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
+-add_lldb_library(liblldb SHARED
++set(output_name lldb)
++if (CMAKE_SYSTEM_NAME MATCHES "Windows")
++  set(output_name liblldb)
++endif()
++
++add_lldb_library(liblldb SHARED OUTPUT_NAME ${output_name} SONAME
+   SBAddress.cpp
+   SBAttachInfo.cpp
+   SBBlock.cpp
+@@ -78,7 +83,7 @@
+ set_target_properties(liblldb
+   PROPERTIES
+-  VERSION ${LLDB_VERSION}
++  VERSION 1
+   )
+ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
+@@ -105,11 +110,6 @@
+   if (MSVC AND NOT LLDB_DISABLE_PYTHON)
+     target_link_libraries(liblldb PRIVATE ${PYTHON_LIBRARY})
+   endif()
+-else()
+-  set_target_properties(liblldb
+-    PROPERTIES
+-    OUTPUT_NAME lldb
+-    )
+ endif()
+ if (LLDB_WRAP_PYTHON)
diff --git a/patches/llvm26003-sanitizer-check-env.diff b/patches/llvm26003-sanitizer-check-env.diff
new file mode 100644 (file)
index 0000000..9a121e3
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/compiler-rt/cmake/Modules/SanitizerUtils.cmake
++++ b/compiler-rt/cmake/Modules/SanitizerUtils.cmake
+@@ -86,7 +86,7 @@
+ # Add target to check code style for sanitizer runtimes.
+ if(UNIX)
+   add_custom_target(SanitizerLintCheck
+-    COMMAND LLVM_CHECKOUT=${LLVM_MAIN_SRC_DIR} SILENT=1 TMPDIR=
++    COMMAND env LLVM_CHECKOUT=${LLVM_MAIN_SRC_DIR} SILENT=1 TMPDIR=
+       PYTHON_EXECUTABLE=${PYTHON_EXECUTABLE}
+       COMPILER_RT=${COMPILER_RT_SOURCE_DIR}
+       ${SANITIZER_LINT_SCRIPT}
diff --git a/patches/mips-fpxx-enable.diff b/patches/mips-fpxx-enable.diff
new file mode 100644 (file)
index 0000000..ce591a4
--- /dev/null
@@ -0,0 +1,16 @@
+Index: llvm-toolchain-snapshot_3.9~svn275793/clang/lib/Driver/Tools.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn275793.orig/clang/lib/Driver/Tools.cpp
++++ llvm-toolchain-snapshot_3.9~svn275793/clang/lib/Driver/Tools.cpp
+@@ -7321,11 +7321,6 @@ bool mips::isFP64ADefault(const llvm::Tr
+ bool mips::isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName,
+                          StringRef ABIName, mips::FloatABI FloatABI) {
+-  if (Triple.getVendor() != llvm::Triple::ImaginationTechnologies &&
+-      Triple.getVendor() != llvm::Triple::MipsTechnologies &&
+-      !Triple.isAndroid())
+-    return false;
+-
+   if (ABIName != "32")
+     return false;
diff --git a/patches/python-clangpath.diff b/patches/python-clangpath.diff
new file mode 100644 (file)
index 0000000..e91c5ca
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.5~svn199197/clang/bindings/python/clang/cindex.py
+===================================================================
+--- llvm-toolchain-snapshot_3.5~svn199197.orig/clang/bindings/python/clang/cindex.py   2014-01-14 11:31:18.444868130 +0100
++++ llvm-toolchain-snapshot_3.5~svn199197/clang/bindings/python/clang/cindex.py        2014-01-14 11:31:18.440868130 +0100
+@@ -3371,7 +3371,7 @@
+         elif name == 'Windows':
+             file = 'libclang.dll'
+         else:
+-            file = 'libclang.so'
++            file = 'libclang-3.9.so'
+         if Config.library_path:
+             file = Config.library_path + '/' + file
diff --git a/patches/removeduplicatedeclaration.diff b/patches/removeduplicatedeclaration.diff
new file mode 100644 (file)
index 0000000..ec3ec04
--- /dev/null
@@ -0,0 +1,38 @@
+Index: llvm-toolchain-snapshot_3.9~svn265903/clang/lib/Basic/Targets.cpp
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn265903.orig/clang/lib/Basic/Targets.cpp
++++ llvm-toolchain-snapshot_3.9~svn265903/clang/lib/Basic/Targets.cpp
+@@ -4041,33 +4041,6 @@ protected:
+     Builder.defineMacro("__ELF__");
+   }
+-  static bool shouldUseInlineAtomic(const llvm::Triple &T) {
+-    // On linux, binaries targeting old cpus call functions in libgcc to
+-    // perform atomic operations. The implementation in libgcc then calls into
+-    // the kernel which on armv6 and newer uses ldrex and strex. The net result
+-    // is that if we assume the kernel is at least as recent as the hardware,
+-    // it is safe to use atomic instructions on armv6 and newer.
+-    if (T.getOS() != llvm::Triple::Linux)
+-     return false;
+-    StringRef ArchName = T.getArchName();
+-    if (T.getArch() == llvm::Triple::arm) {
+-      if (!ArchName.startswith("armv"))
+-        return false;
+-      StringRef VersionStr = ArchName.substr(4);
+-      unsigned Version;
+-      if (VersionStr.getAsInteger(10, Version))
+-        return false;
+-      return Version >= 6;
+-    }
+-    assert(T.getArch() == llvm::Triple::thumb);
+-    if (!ArchName.startswith("thumbv"))
+-      return false;
+-    StringRef VersionStr = ArchName.substr(6);
+-    unsigned Version;
+-    if (VersionStr.getAsInteger(10, Version))
+-      return false;
+-    return Version >= 7;
+-  }
+ public:
+   RTEMSTargetInfo(const llvm::Triple &Triple, const TargetOptions &Opts)
diff --git a/patches/scan-build-clang-path.diff b/patches/scan-build-clang-path.diff
new file mode 100644 (file)
index 0000000..fc44f45
--- /dev/null
@@ -0,0 +1,13 @@
+Index: llvm-toolchain-snapshot_3.9~svn253.96/clang/tools/scan-build/bin/scan-build
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn253.96.orig/clang/tools/scan-build/bin/scan-build
++++ llvm-toolchain-snapshot_3.9~svn253.96/clang/tools/scan-build/bin/scan-build
+@@ -1407,7 +1407,7 @@ sub FindClang {
+   if (!defined $Options{AnalyzerDiscoveryMethod}) {
+     $Clang = Cwd::realpath("$RealBin/bin/clang") if (-f "$RealBin/bin/clang");
+     if (!defined $Clang || ! -x $Clang) {
+-      $Clang = Cwd::realpath("$RealBin/clang") if (-f "$RealBin/clang");
++      $Clang = Cwd::realpath("/usr/lib/llvm-3.9/bin/clang");
+     }
+     if (!defined $Clang || ! -x $Clang) {
+       return "error: Cannot find an executable 'clang' relative to" .
diff --git a/patches/scan-build-py-default.diff b/patches/scan-build-py-default.diff
new file mode 100644 (file)
index 0000000..431bffb
--- /dev/null
@@ -0,0 +1,518 @@
+Index: llvm-toolchain-snapshot_3.9-svn269220/home/sylvestre/dev/debian/pkg-llvm/llvm-toolchain-branches/llvm-toolchain-snapshot_3.9-svn269220/clang/tools/scan-build-py/libscanbuild/analyze.py
+===================================================================
+--- llvm-toolchain-snapshot_3.9-svn269220.orig/home/sylvestre/dev/debian/pkg-llvm/llvm-toolchain-branches/llvm-toolchain-snapshot_3.9-svn269220/clang/tools/scan-build-py/libscanbuild/analyze.py
++++ /dev/null
+@@ -1,513 +0,0 @@
+-# -*- coding: utf-8 -*-
+-#                     The LLVM Compiler Infrastructure
+-#
+-# This file is distributed under the University of Illinois Open Source
+-# License. See LICENSE.TXT for details.
+-""" This module implements the 'scan-build' command API.
+-
+-To run the static analyzer against a build is done in multiple steps:
+-
+- -- Intercept: capture the compilation command during the build,
+- -- Analyze:   run the analyzer against the captured commands,
+- -- Report:    create a cover report from the analyzer outputs.  """
+-
+-import sys
+-import re
+-import os
+-import os.path
+-import json
+-import argparse
+-import logging
+-import subprocess
+-import multiprocessing
+-from libscanbuild import initialize_logging, tempdir, command_entry_point
+-from libscanbuild.runner import run
+-from libscanbuild.intercept import capture
+-from libscanbuild.report import report_directory, document
+-from libscanbuild.clang import get_checkers
+-from libscanbuild.compilation import split_command
+-
+-__all__ = ['analyze_build_main', 'analyze_build_wrapper']
+-
+-COMPILER_WRAPPER_CC = 'analyze-cc'
+-COMPILER_WRAPPER_CXX = 'analyze-c++'
+-
+-
+-@command_entry_point
+-def analyze_build_main(bin_dir, from_build_command):
+-    """ Entry point for 'analyze-build' and 'scan-build'. """
+-
+-    parser = create_parser(from_build_command)
+-    args = parser.parse_args()
+-    validate(parser, args, from_build_command)
+-
+-    # setup logging
+-    initialize_logging(args.verbose)
+-    logging.debug('Parsed arguments: %s', args)
+-
+-    with report_directory(args.output, args.keep_empty) as target_dir:
+-        if not from_build_command:
+-            # run analyzer only and generate cover report
+-            run_analyzer(args, target_dir)
+-            number_of_bugs = document(args, target_dir, True)
+-            return number_of_bugs if args.status_bugs else 0
+-        elif args.intercept_first:
+-            # run build command and capture compiler executions
+-            exit_code = capture(args, bin_dir)
+-            # next step to run the analyzer against the captured commands
+-            if need_analyzer(args.build):
+-                run_analyzer(args, target_dir)
+-                # cover report generation and bug counting
+-                number_of_bugs = document(args, target_dir, True)
+-                # remove the compilation database when it was not requested
+-                if os.path.exists(args.cdb):
+-                    os.unlink(args.cdb)
+-                # set exit status as it was requested
+-                return number_of_bugs if args.status_bugs else exit_code
+-            else:
+-                return exit_code
+-        else:
+-            # run the build command with compiler wrappers which
+-            # execute the analyzer too. (interposition)
+-            environment = setup_environment(args, target_dir, bin_dir)
+-            logging.debug('run build in environment: %s', environment)
+-            exit_code = subprocess.call(args.build, env=environment)
+-            logging.debug('build finished with exit code: %d', exit_code)
+-            # cover report generation and bug counting
+-            number_of_bugs = document(args, target_dir, False)
+-            # set exit status as it was requested
+-            return number_of_bugs if args.status_bugs else exit_code
+-
+-
+-def need_analyzer(args):
+-    """ Check the intent of the build command.
+-
+-    When static analyzer run against project configure step, it should be
+-    silent and no need to run the analyzer or generate report.
+-
+-    To run `scan-build` against the configure step might be neccessary,
+-    when compiler wrappers are used. That's the moment when build setup
+-    check the compiler and capture the location for the build process. """
+-
+-    return len(args) and not re.search('configure|autogen', args[0])
+-
+-
+-def run_analyzer(args, output_dir):
+-    """ Runs the analyzer against the given compilation database. """
+-
+-    def exclude(filename):
+-        """ Return true when any excluded directory prefix the filename. """
+-        return any(re.match(r'^' + directory, filename)
+-                   for directory in args.excludes)
+-
+-    consts = {
+-        'clang': args.clang,
+-        'output_dir': output_dir,
+-        'output_format': args.output_format,
+-        'output_failures': args.output_failures,
+-        'direct_args': analyzer_params(args),
+-        'force_debug': args.force_debug
+-    }
+-
+-    logging.debug('run analyzer against compilation database')
+-    with open(args.cdb, 'r') as handle:
+-        generator = (dict(cmd, **consts)
+-                     for cmd in json.load(handle) if not exclude(cmd['file']))
+-        # when verbose output requested execute sequentially
+-        pool = multiprocessing.Pool(1 if args.verbose > 2 else None)
+-        for current in pool.imap_unordered(run, generator):
+-            if current is not None:
+-                # display error message from the static analyzer
+-                for line in current['error_output']:
+-                    logging.info(line.rstrip())
+-        pool.close()
+-        pool.join()
+-
+-
+-def setup_environment(args, destination, bin_dir):
+-    """ Set up environment for build command to interpose compiler wrapper. """
+-
+-    environment = dict(os.environ)
+-    environment.update({
+-        'CC': os.path.join(bin_dir, COMPILER_WRAPPER_CC),
+-        'CXX': os.path.join(bin_dir, COMPILER_WRAPPER_CXX),
+-        'ANALYZE_BUILD_CC': args.cc,
+-        'ANALYZE_BUILD_CXX': args.cxx,
+-        'ANALYZE_BUILD_CLANG': args.clang if need_analyzer(args.build) else '',
+-        'ANALYZE_BUILD_VERBOSE': 'DEBUG',
+-        'ANALYZE_BUILD_REPORT_DIR': destination,
+-        'ANALYZE_BUILD_REPORT_FORMAT': args.output_format,
+-        'ANALYZE_BUILD_REPORT_FAILURES': 'yes' if args.output_failures else '',
+-        'ANALYZE_BUILD_PARAMETERS': ' '.join(analyzer_params(args)),
+-        'ANALYZE_BUILD_FORCE_DEBUG': 'yes' if args.force_debug else ''
+-    })
+-    return environment
+-
+-
+-def analyze_build_wrapper(cplusplus):
+-    """ Entry point for `analyze-cc` and `analyze-c++` compiler wrappers. """
+-
+-    # initialize wrapper logging
+-    logging.basicConfig(format='analyze: %(levelname)s: %(message)s',
+-                        level=os.getenv('ANALYZE_BUILD_VERBOSE', 'INFO'))
+-    # execute with real compiler
+-    compiler = os.getenv('ANALYZE_BUILD_CXX', 'c++') if cplusplus \
+-        else os.getenv('ANALYZE_BUILD_CC', 'cc')
+-    compilation = [compiler] + sys.argv[1:]
+-    logging.info('execute compiler: %s', compilation)
+-    result = subprocess.call(compilation)
+-    # exit when it fails, ...
+-    if result or not os.getenv('ANALYZE_BUILD_CLANG'):
+-        return result
+-    # ... and run the analyzer if all went well.
+-    try:
+-        # check is it a compilation
+-        compilation = split_command(sys.argv)
+-        if compilation is None:
+-            return result
+-        # collect the needed parameters from environment, crash when missing
+-        parameters = {
+-            'clang': os.getenv('ANALYZE_BUILD_CLANG'),
+-            'output_dir': os.getenv('ANALYZE_BUILD_REPORT_DIR'),
+-            'output_format': os.getenv('ANALYZE_BUILD_REPORT_FORMAT'),
+-            'output_failures': os.getenv('ANALYZE_BUILD_REPORT_FAILURES'),
+-            'direct_args': os.getenv('ANALYZE_BUILD_PARAMETERS',
+-                                     '').split(' '),
+-            'force_debug': os.getenv('ANALYZE_BUILD_FORCE_DEBUG'),
+-            'directory': os.getcwd(),
+-            'command': [sys.argv[0], '-c'] + compilation.flags
+-        }
+-        # call static analyzer against the compilation
+-        for source in compilation.files:
+-            parameters.update({'file': source})
+-            logging.debug('analyzer parameters %s', parameters)
+-            current = run(parameters)
+-            # display error message from the static analyzer
+-            if current is not None:
+-                for line in current['error_output']:
+-                    logging.info(line.rstrip())
+-    except Exception:
+-        logging.exception("run analyzer inside compiler wrapper failed.")
+-    return result
+-
+-
+-def analyzer_params(args):
+-    """ A group of command line arguments can mapped to command
+-    line arguments of the analyzer. This method generates those. """
+-
+-    def prefix_with(constant, pieces):
+-        """ From a sequence create another sequence where every second element
+-        is from the original sequence and the odd elements are the prefix.
+-
+-        eg.: prefix_with(0, [1,2,3]) creates [0, 1, 0, 2, 0, 3] """
+-
+-        return [elem for piece in pieces for elem in [constant, piece]]
+-
+-    result = []
+-
+-    if args.store_model:
+-        result.append('-analyzer-store={0}'.format(args.store_model))
+-    if args.constraints_model:
+-        result.append('-analyzer-constraints={0}'.format(
+-            args.constraints_model))
+-    if args.internal_stats:
+-        result.append('-analyzer-stats')
+-    if args.analyze_headers:
+-        result.append('-analyzer-opt-analyze-headers')
+-    if args.stats:
+-        result.append('-analyzer-checker=debug.Stats')
+-    if args.maxloop:
+-        result.extend(['-analyzer-max-loop', str(args.maxloop)])
+-    if args.output_format:
+-        result.append('-analyzer-output={0}'.format(args.output_format))
+-    if args.analyzer_config:
+-        result.append(args.analyzer_config)
+-    if args.verbose >= 4:
+-        result.append('-analyzer-display-progress')
+-    if args.plugins:
+-        result.extend(prefix_with('-load', args.plugins))
+-    if args.enable_checker:
+-        checkers = ','.join(args.enable_checker)
+-        result.extend(['-analyzer-checker', checkers])
+-    if args.disable_checker:
+-        checkers = ','.join(args.disable_checker)
+-        result.extend(['-analyzer-disable-checker', checkers])
+-    if os.getenv('UBIVIZ'):
+-        result.append('-analyzer-viz-egraph-ubigraph')
+-
+-    return prefix_with('-Xclang', result)
+-
+-
+-def print_active_checkers(checkers):
+-    """ Print active checkers to stdout. """
+-
+-    for name in sorted(name for name, (_, active) in checkers.items()
+-                       if active):
+-        print(name)
+-
+-
+-def print_checkers(checkers):
+-    """ Print verbose checker help to stdout. """
+-
+-    print('')
+-    print('available checkers:')
+-    print('')
+-    for name in sorted(checkers.keys()):
+-        description, active = checkers[name]
+-        prefix = '+' if active else ' '
+-        if len(name) > 30:
+-            print(' {0} {1}'.format(prefix, name))
+-            print(' ' * 35 + description)
+-        else:
+-            print(' {0} {1: <30}  {2}'.format(prefix, name, description))
+-    print('')
+-    print('NOTE: "+" indicates that an analysis is enabled by default.')
+-    print('')
+-
+-
+-def validate(parser, args, from_build_command):
+-    """ Validation done by the parser itself, but semantic check still
+-    needs to be done. This method is doing that. """
+-
+-    if args.help_checkers_verbose:
+-        print_checkers(get_checkers(args.clang, args.plugins))
+-        parser.exit()
+-    elif args.help_checkers:
+-        print_active_checkers(get_checkers(args.clang, args.plugins))
+-        parser.exit()
+-
+-    if from_build_command and not args.build:
+-        parser.error('missing build command')
+-
+-
+-def create_parser(from_build_command):
+-    """ Command line argument parser factory method. """
+-
+-    parser = argparse.ArgumentParser(
+-        formatter_class=argparse.ArgumentDefaultsHelpFormatter)
+-
+-    parser.add_argument(
+-        '--verbose', '-v',
+-        action='count',
+-        default=0,
+-        help="""Enable verbose output from '%(prog)s'. A second and third
+-                flag increases verbosity.""")
+-    parser.add_argument(
+-        '--override-compiler',
+-        action='store_true',
+-        help="""Always resort to the compiler wrapper even when better
+-                interposition methods are available.""")
+-    parser.add_argument(
+-        '--intercept-first',
+-        action='store_true',
+-        help="""Run the build commands only, build a compilation database,
+-                then run the static analyzer afterwards.
+-                Generally speaking it has better coverage on build commands.
+-                With '--override-compiler' it use compiler wrapper, but does
+-                not run the analyzer till the build is finished. """)
+-    parser.add_argument(
+-        '--cdb',
+-        metavar='<file>',
+-        default="compile_commands.json",
+-        help="""The JSON compilation database.""")
+-
+-    parser.add_argument(
+-        '--output', '-o',
+-        metavar='<path>',
+-        default=tempdir(),
+-        help="""Specifies the output directory for analyzer reports.
+-                Subdirectory will be created if default directory is targeted.
+-                """)
+-    parser.add_argument(
+-        '--status-bugs',
+-        action='store_true',
+-        help="""By default, the exit status of '%(prog)s' is the same as the
+-                executed build command. Specifying this option causes the exit
+-                status of '%(prog)s' to be non zero if it found potential bugs
+-                and zero otherwise.""")
+-    parser.add_argument(
+-        '--html-title',
+-        metavar='<title>',
+-        help="""Specify the title used on generated HTML pages.
+-                If not specified, a default title will be used.""")
+-    parser.add_argument(
+-        '--analyze-headers',
+-        action='store_true',
+-        help="""Also analyze functions in #included files. By default, such
+-                functions are skipped unless they are called by functions
+-                within the main source file.""")
+-    format_group = parser.add_mutually_exclusive_group()
+-    format_group.add_argument(
+-        '--plist', '-plist',
+-        dest='output_format',
+-        const='plist',
+-        default='html',
+-        action='store_const',
+-        help="""This option outputs the results as a set of .plist files.""")
+-    format_group.add_argument(
+-        '--plist-html', '-plist-html',
+-        dest='output_format',
+-        const='plist-html',
+-        default='html',
+-        action='store_const',
+-        help="""This option outputs the results as a set of .html and .plist
+-                files.""")
+-    # TODO: implement '-view '
+-
+-    advanced = parser.add_argument_group('advanced options')
+-    advanced.add_argument(
+-        '--keep-empty',
+-        action='store_true',
+-        help="""Don't remove the build results directory even if no issues
+-                were reported.""")
+-    advanced.add_argument(
+-        '--no-failure-reports', '-no-failure-reports',
+-        dest='output_failures',
+-        action='store_false',
+-        help="""Do not create a 'failures' subdirectory that includes analyzer
+-                crash reports and preprocessed source files.""")
+-    advanced.add_argument(
+-        '--stats', '-stats',
+-        action='store_true',
+-        help="""Generates visitation statistics for the project being analyzed.
+-                """)
+-    advanced.add_argument(
+-        '--internal-stats',
+-        action='store_true',
+-        help="""Generate internal analyzer statistics.""")
+-    advanced.add_argument(
+-        '--maxloop', '-maxloop',
+-        metavar='<loop count>',
+-        type=int,
+-        help="""Specifiy the number of times a block can be visited before
+-                giving up. Increase for more comprehensive coverage at a cost
+-                of speed.""")
+-    advanced.add_argument(
+-        '--store', '-store',
+-        metavar='<model>',
+-        dest='store_model',
+-        choices=['region', 'basic'],
+-        help="""Specify the store model used by the analyzer.
+-                'region' specifies a field- sensitive store model.
+-                'basic' which is far less precise but can more quickly
+-                analyze code. 'basic' was the default store model for
+-                checker-0.221 and earlier.""")
+-    advanced.add_argument(
+-        '--constraints', '-constraints',
+-        metavar='<model>',
+-        dest='constraints_model',
+-        choices=['range', 'basic'],
+-        help="""Specify the contraint engine used by the analyzer. Specifying
+-                'basic' uses a simpler, less powerful constraint model used by
+-                checker-0.160 and earlier.""")
+-    advanced.add_argument(
+-        '--use-analyzer',
+-        metavar='<path>',
+-        dest='clang',
+-        default='clang',
+-        help="""'%(prog)s' uses the 'clang' executable relative to itself for
+-                static analysis. One can override this behavior with this
+-                option by using the 'clang' packaged with Xcode (on OS X) or
+-                from the PATH.""")
+-    advanced.add_argument(
+-        '--use-cc',
+-        metavar='<path>',
+-        dest='cc',
+-        default='cc',
+-        help="""When '%(prog)s' analyzes a project by interposing a "fake
+-                compiler", which executes a real compiler for compilation and
+-                do other tasks (to run the static analyzer or just record the
+-                compiler invocation). Because of this interposing, '%(prog)s'
+-                does not know what compiler your project normally uses.
+-                Instead, it simply overrides the CC environment variable, and
+-                guesses your default compiler.
+-
+-                If you need '%(prog)s' to use a specific compiler for
+-                *compilation* then you can use this option to specify a path
+-                to that compiler.""")
+-    advanced.add_argument(
+-        '--use-c++',
+-        metavar='<path>',
+-        dest='cxx',
+-        default='c++',
+-        help="""This is the same as "--use-cc" but for C++ code.""")
+-    advanced.add_argument(
+-        '--analyzer-config', '-analyzer-config',
+-        metavar='<options>',
+-        help="""Provide options to pass through to the analyzer's
+-                -analyzer-config flag. Several options are separated with
+-                comma: 'key1=val1,key2=val2'
+-
+-                Available options:
+-                    stable-report-filename=true or false (default)
+-
+-                Switch the page naming to:
+-                report-<filename>-<function/method name>-<id>.html
+-                instead of report-XXXXXX.html""")
+-    advanced.add_argument(
+-        '--exclude',
+-        metavar='<directory>',
+-        dest='excludes',
+-        action='append',
+-        default=[],
+-        help="""Do not run static analyzer against files found in this
+-                directory. (You can specify this option multiple times.)
+-                Could be usefull when project contains 3rd party libraries.
+-                The directory path shall be absolute path as file names in
+-                the compilation database.""")
+-    advanced.add_argument(
+-        '--force-analyze-debug-code',
+-        dest='force_debug',
+-        action='store_true',
+-        help="""Tells analyzer to enable assertions in code even if they were
+-                disabled during compilation, enabling more precise results.""")
+-
+-    plugins = parser.add_argument_group('checker options')
+-    plugins.add_argument(
+-        '--load-plugin', '-load-plugin',
+-        metavar='<plugin library>',
+-        dest='plugins',
+-        action='append',
+-        help="""Loading external checkers using the clang plugin interface.""")
+-    plugins.add_argument(
+-        '--enable-checker', '-enable-checker',
+-        metavar='<checker name>',
+-        action=AppendCommaSeparated,
+-        help="""Enable specific checker.""")
+-    plugins.add_argument(
+-        '--disable-checker', '-disable-checker',
+-        metavar='<checker name>',
+-        action=AppendCommaSeparated,
+-        help="""Disable specific checker.""")
+-    plugins.add_argument(
+-        '--help-checkers',
+-        action='store_true',
+-        help="""A default group of checkers is run unless explicitly disabled.
+-                Exactly which checkers constitute the default group is a
+-                function of the operating system in use. These can be printed
+-                with this flag.""")
+-    plugins.add_argument(
+-        '--help-checkers-verbose',
+-        action='store_true',
+-        help="""Print all available checkers and mark the enabled ones.""")
+-
+-    if from_build_command:
+-        parser.add_argument(
+-            dest='build',
+-            nargs=argparse.REMAINDER,
+-            help="""Command to run.""")
+-
+-    return parser
+-
+-
+-class AppendCommaSeparated(argparse.Action):
+-    """ argparse Action class to support multiple comma separated lists. """
+-
+-    def __call__(self, __parser, namespace, values, __option_string):
+-        # getattr(obj, attr, default) does not really returns default but none
+-        if getattr(namespace, self.dest, None) is None:
+-            setattr(namespace, self.dest, [])
+-        # once it's fixed we can use as expected
+-        actual = getattr(namespace, self.dest)
+-        actual.extend(values.split(','))
+-        setattr(namespace, self.dest, actual)
diff --git a/patches/scan-view-fix-path.diff b/patches/scan-view-fix-path.diff
new file mode 100644 (file)
index 0000000..0db8033
--- /dev/null
@@ -0,0 +1,11 @@
+--- llvm-toolchain-snapshot_3.8~svn253186.orig/clang/tools/scan-view/bin/scan-view.old    2016-05-23 15:27:03.278422015 +0200
++++ llvm-toolchain-snapshot_3.8~svn253186/clang/tools/scan-view/bin/scan-view        2016-05-23 15:34:30.517953399 +0200
+@@ -61,7 +61,7 @@
+
+ def run(port, options, root):
+     # Prefer to look relative to the installed binary
+-    share = os.path.dirname(__file__) + "/../share/scan-view"
++    share = os.path.dirname(__file__) + "/../share/"
+     if not os.path.isdir(share):
+         # Otherwise look relative to the source
+         share = os.path.dirname(__file__) + "/../../scan-view/share"
diff --git a/patches/series b/patches/series
new file mode 100644 (file)
index 0000000..59117b0
--- /dev/null
@@ -0,0 +1,52 @@
+19-clang_debian_version.patch
+23-strlcpy_strlcat_warning_removed.diff
+27-fix_clang_stdint.diff
+26-set-correct-float-abi.diff
+0003-Debian-version-info-and-bugreport.patch
+scan-build-clang-path.diff
+declare_clear_cache.diff
+clang-format-version.diff
+unwind-chain-inclusion.diff
+hurd-pathmax.diff
+use-deb-json.diff
+atomic_library_1.diff
+atomic_library_2.diff
+python-clangpath.diff
+removeduplicatedeclaration.diff
+fix-clang-path-and-build.diff
+#force-gcc-header-obj.diff
+do-not-fail-on-unexpected-pass.diff
+silent-more-tests.diff
+disable-display-PASS-UNSUPPORTED-XFAIL.diff
+fix-llvm-config-obj-src-root.patch
+compiler-rt-path.diff
+0044-soname.diff
+lldb-soname.diff
+lldb-libname.diff
+hurd-EIEIO-undef.diff
+silent-MCJIIT-tests.diff
+clang-analyzer-force-version.diff
+install-scan-build-py.diff
+scan-view-fix-path.diff
+mips-fpxx-enable.diff
+disable-test-failing-sparc-i386.diff
+fix-cmake-config-prefix.diff
+lldb-link-atomic-cmake.patch
+disable-llvm-symbolizer-test.diff
+kfreebsd-support.diff
+clang-tidy-run-bin.diff
+drop-wrong-hack-arm64.patch
+fix-scan-view-path.diff
+clang-fix-cmpxchg8-detection-on-i386.patch
+upstream-msan-prevent-initialization-failure.diff
+upstream-asan-msan-fix-reallocation-logic.diff
+lit-force-lang.diff
+clang-arm-default-vfp3-on-armv7a.patch
+lldb-addversion-suffix-to-llvm-server-exec.patch
+lldb-server-link.diff
+amdgpu-regression.diff
+esan-Fix-ESan-test-failure-on-Debian-Sid-bot.diff
+esan-Fix-ESan-test-failure-on-Debian-Sid-bot2.diff
+857623-allow-opencl-pointer-to-bool.diff
+add_symbols_versioning.patch
+fix-R_AARCH64_MOVW_UABS_G3-relocation.patch
diff --git a/patches/silent-MCJIIT-tests.diff b/patches/silent-MCJIIT-tests.diff
new file mode 100644 (file)
index 0000000..61c91fe
--- /dev/null
@@ -0,0 +1,226 @@
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -extra-module=%p/Inputs/cross-module-b.ll -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, i686, i386
++; XFAIL: *
+ declare i32 @FB()
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/eh-lg-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -relocation-model=pic -code-model=large %s
+-; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
++; XFAIL: *
+ declare i8* @__cxa_allocate_exception(i64)
+ declare void @__cxa_throw(i8*, i8*, i8*)
+ declare i32 @__gxx_personality_v0(...)
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/eh-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -relocation-model=pic -code-model=small %s
+-; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, darwin, aarch64, arm
++; XFAIL: *
+ declare i8* @__cxa_allocate_exception(i64)
+ declare void @__cxa_throw(i8*, i8*, i8*)
+ declare i32 @__gxx_personality_v0(...)
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, i686, i386
++; XFAIL: *
+ declare i32 @FB()
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -disable-lazy-compilation=false -relocation-model=pic -code-model=small %s
+-; XFAIL: mips-, mipsel-, i686, i386, aarch64, arm
++; XFAIL: *
+ define i32 @main() nounwind {
+ entry:
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
++; XFAIL: *
+ @count = global i32 1, align 4
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -O0 -relocation-model=pic -code-model=small %s
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
++; XFAIL: *
+ @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+ @ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/crash-narrowfunctiontest.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/BugPoint/crash-narrowfunctiontest.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/crash-narrowfunctiontest.ll
+@@ -2,7 +2,6 @@
+ ;
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
+ ; REQUIRES: loadable_module
+-; XFAIL: *
+ define i32 @foo() { ret i32 1 }
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/metadata.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/BugPoint/metadata.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/metadata.ll
+@@ -1,7 +1,6 @@
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove > /dev/null
+ ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
+ ; REQUIRES: loadable_module
+-; XFAIL: *
+ ; Bugpoint should keep the call's metadata attached to the call.
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/remove_arguments_test.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/BugPoint/remove_arguments_test.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/BugPoint/remove_arguments_test.ll
+@@ -1,7 +1,6 @@
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
+ ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
+ ; REQUIRES: loadable_module
+-; XFAIL: *
+ ; Test to make sure that arguments are removed from the function if they are
+ ; unnecessary. And clean up any types that frees up too.
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/Feature/load_module.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/Feature/load_module.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/Feature/load_module.ll
+@@ -3,7 +3,6 @@
+ ; RUN:   -disable-output 2>&1 | grep Hello
+ ; REQUIRES: loadable_module
+ ; FIXME: On Cygming, it might fail without building LLVMHello manually.
+-; XFAIL: *
+ @junk = global i32 0
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/cross-module-sm-pic-a.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/cross-module-b.ll -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, i686, i386
++; XFAIL: *
+ declare i32 @FB()
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/eh-lg-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=large %s
+-; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, aarch64, arm
++; XFAIL: *
+ declare i8* @__cxa_allocate_exception(i64)
+ declare void @__cxa_throw(i8*, i8*, i8*)
+ declare i32 @__gxx_personality_v0(...)
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/eh-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=small %s
+-; XFAIL: cygwin, win32, mingw, mips-, mipsel-, i686, i386, darwin, aarch64, arm
++; XFAIL: *
+ declare i8* @__cxa_allocate_exception(i64)
+ declare void @__cxa_throw(i8*, i8*, i8*)
+ declare i32 @__gxx_personality_v0(...)
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/multi-module-sm-pic-a.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -extra-module=%p/Inputs/multi-module-b.ll -extra-module=%p/Inputs/multi-module-c.ll -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, i686, i386
++; XFAIL: *
+ declare i32 @FB()
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/remote/test-global-init-nonzero-sm-pic.ll
+@@ -1,6 +1,6 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
+ ; RUN:   -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
++; XFAIL: *
+ ; UNSUPPORTED: powerpc64-unknown-linux-gnu
+ ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/remote/test-ptr-reloc-sm-pic.ll
+@@ -1,6 +1,6 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -remote-mcjit -mcjit-remote-process=lli-child-target%exeext \
+ ; RUN:   -O0 -relocation-model=pic -code-model=small %s
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386, mingw32, win32
++; XFAIL: *
+ ; UNSUPPORTED: powerpc64-unknown-linux-gnu
+ ; Remove UNSUPPORTED for powerpc64-unknown-linux-gnu if problem caused by r266663 is fixed
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/stubs-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -disable-lazy-compilation=false -relocation-model=pic -code-model=small %s
+-; XFAIL: mips-, mipsel-, i686, i386, aarch64, arm
++; XFAIL: *
+ define i32 @main() nounwind {
+ entry:
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/test-global-init-nonzero-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -relocation-model=pic -code-model=small %s > /dev/null
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
++; XFAIL: *
+ @count = global i32 1, align 4
+Index: llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
+===================================================================
+--- llvm-toolchain-snapshot_3.9~svn267686.orig/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
++++ llvm-toolchain-snapshot_3.9~svn267686/test/ExecutionEngine/OrcMCJIT/test-ptr-reloc-sm-pic.ll
+@@ -1,5 +1,5 @@
+ ; RUN: %lli -jit-kind=orc-mcjit -O0 -relocation-model=pic -code-model=small %s
+-; XFAIL: mips-, mipsel-, aarch64, arm, i686, i386
++; XFAIL: *
+ @.str = private unnamed_addr constant [6 x i8] c"data1\00", align 1
+ @ptr = global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), align 4
diff --git a/patches/silent-more-tests.diff b/patches/silent-more-tests.diff
new file mode 100644 (file)
index 0000000..d759877
--- /dev/null
@@ -0,0 +1,51 @@
+# Comment the tests for the code coverage (fails otherwise)
+
+
+Index: llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/crash-narrowfunctiontest.ll
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc1.orig/test/BugPoint/crash-narrowfunctiontest.ll
++++ llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/crash-narrowfunctiontest.ll
+@@ -2,6 +2,7 @@
+ ;
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
+ ; REQUIRES: loadable_module
++; XFAIL: *
+ define i32 @foo() { ret i32 1 }
+Index: llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/metadata.ll
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc1.orig/test/BugPoint/metadata.ll
++++ llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/metadata.ll
+@@ -1,6 +1,7 @@
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove > /dev/null
+ ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
+ ; REQUIRES: loadable_module
++; XFAIL: *
+ ; Bugpoint should keep the call's metadata attached to the call.
+Index: llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/remove_arguments_test.ll
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc1.orig/test/BugPoint/remove_arguments_test.ll
++++ llvm-toolchain-3.9_3.9~+rc1/test/BugPoint/remove_arguments_test.ll
+@@ -1,6 +1,7 @@
+ ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
+ ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
+ ; REQUIRES: loadable_module
++; XFAIL: *
+ ; Test to make sure that arguments are removed from the function if they are
+ ; unnecessary. And clean up any types that frees up too.
+Index: llvm-toolchain-3.9_3.9~+rc1/test/Feature/load_module.ll
+===================================================================
+--- llvm-toolchain-3.9_3.9~+rc1.orig/test/Feature/load_module.ll
++++ llvm-toolchain-3.9_3.9~+rc1/test/Feature/load_module.ll
+@@ -3,6 +3,7 @@
+ ; RUN:   -disable-output 2>&1 | grep Hello
+ ; REQUIRES: loadable_module
+ ; FIXME: On Cygming, it might fail without building LLVMHello manually.
++; XFAIL: *
+ @junk = global i32 0
diff --git a/patches/strip-svn.diff b/patches/strip-svn.diff
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/patches/ubuntu-precise-compiler-rt.diff b/patches/ubuntu-precise-compiler-rt.diff
new file mode 100644 (file)
index 0000000..86523bb
--- /dev/null
@@ -0,0 +1,23 @@
+Index: llvm-toolchain-3.7-3.7/compiler-rt/make/platform/clang_linux.mk
+===================================================================
+--- llvm-toolchain-3.7-3.7.orig/compiler-rt/make/platform/clang_linux.mk
++++ llvm-toolchain-3.7-3.7/compiler-rt/make/platform/clang_linux.mk
+@@ -21,7 +21,7 @@ ifneq ($(findstring -linux-,$(CompilerTa
+ # Define configs only if arch in triple is i386 or x86_64
+ CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple)))
+-ifeq ($(call contains,i386 x86_64 i586,$(CompilerTargetArch)),true)
++ifeq ($(call contains,i386 x86_64 i586 i686,$(CompilerTargetArch)),true)
+ # TryCompile compiler source flags
+ # Returns exit code of running a compiler invocation.
+@@ -35,7 +35,7 @@
+     echo $$?)
+ test_source = $(ProjSrcRoot)/make/platform/clang_linux_test_input.c
+-ifneq (,$(filter $(CompilerTargetArch),i386 i586))
++ifneq (,$(filter $(CompilerTargetArch),i386 i586 i686))
+   SupportedArches := i386
+   ifeq ($(call TryCompile,$(CC),$(test_source),-m64),0)
+     SupportedArches += x86_64
+
diff --git a/patches/unwind-chain-inclusion.diff b/patches/unwind-chain-inclusion.diff
new file mode 100644 (file)
index 0000000..0506b35
--- /dev/null
@@ -0,0 +1,39 @@
+# Without this patch, the first local include of unwind.h might, with the 
+# __has_include_next, try to include the one from the system.
+# It might be /usr/include/clang/3.4/include/unwind.h
+# Because of the #ifndef __CLANG_UNWIND_H, it might never include any declaration
+# from the system. 
+
+Index: llvm-toolchain-snapshot_3.6~svn224989/clang/lib/Headers/unwind.h
+===================================================================
+--- llvm-toolchain-snapshot_3.6~svn224989.orig/clang/lib/Headers/unwind.h
++++ llvm-toolchain-snapshot_3.6~svn224989/clang/lib/Headers/unwind.h
+@@ -23,9 +23,6 @@
+ /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
+-#ifndef __CLANG_UNWIND_H
+-#define __CLANG_UNWIND_H
+-
+ #if defined(__APPLE__) && __has_include_next(<unwind.h>)
+ /* Darwin (from 11.x on) provide an unwind.h. If that's available,
+  * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
+@@ -53,6 +50,9 @@
+ # endif
+ #else
++#ifndef __CLANG_UNWIND_H
++#define __CLANG_UNWIND_H
++
+ #include <stdint.h>
+ #ifdef __cplusplus
+@@ -277,6 +277,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struc
+ }
+ #endif
++#endif /* __CLANG_UNWIND_H */
++
+ #endif
+-#endif /* __CLANG_UNWIND_H */
diff --git a/patches/upstream-asan-msan-fix-reallocation-logic.diff b/patches/upstream-asan-msan-fix-reallocation-logic.diff
new file mode 100644 (file)
index 0000000..70c352d
--- /dev/null
@@ -0,0 +1,54 @@
+From c8a185bc3169b0a6d2cd8beedc77033461830037 Mon Sep 17 00:00:00 2001
+From: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+Date: Mon, 26 Sep 2016 08:11:21 +0000
+Subject: [PATCH] [asan, msan] Fix reallocation logic when
+ IsInDlsymAllocPool(ptr) is true.
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282389 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/asan/asan_malloc_linux.cc | 8 +++++---
+ lib/msan/msan_interceptors.cc | 8 +++++++-
+ 2 files changed, 12 insertions(+), 4 deletions(-)
+
+diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cc b/compiler-rt/lib/asan/asan_malloc_linux.cc
+index d7a22d6..a78767c 100644
+--- a/compiler-rt/lib/asan/asan_malloc_linux.cc
++++ b/compiler-rt/lib/asan/asan_malloc_linux.cc
+@@ -79,10 +79,12 @@ INTERCEPTOR(void*, realloc, void *ptr, uptr size) {
+     uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
+     uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
+     void *new_ptr;
+-    if (UNLIKELY(!asan_inited))
++    if (UNLIKELY(!asan_inited)) {
+       new_ptr = AllocateFromLocalPool(size);
+-    else
+-      new_ptr = asan_malloc(size, &stack);
++    } else {
++      copy_size = size;
++      new_ptr = asan_malloc(copy_size, &stack);
++    }
+     internal_memcpy(new_ptr, ptr, copy_size);
+     return new_ptr;
+   }
+diff --git a/compiler-rt/lib/msan/msan_interceptors.cc b/compiler-rt/lib/msan/msan_interceptors.cc
+index 2aeaef4..93b93ae 100644
+--- a/compiler-rt/lib/msan/msan_interceptors.cc
++++ b/compiler-rt/lib/msan/msan_interceptors.cc
+@@ -935,7 +935,13 @@ INTERCEPTOR(void *, realloc, void *ptr, SIZE_T size) {
+   if (UNLIKELY(IsInDlsymAllocPool(ptr))) {
+     uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
+     uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
+-    void *new_ptr = AllocateFromLocalPool(size);
++    void *new_ptr;
++    if (UNLIKELY(!msan_inited)) {
++      new_ptr = AllocateFromLocalPool(copy_size);
++    } else {
++      copy_size = size;
++      new_ptr = MsanReallocate(&stack, ptr, copy_size, sizeof(u64), false);
++    }
+     internal_memcpy(new_ptr, ptr, copy_size);
+     return new_ptr;
+   }
+-- 
+2.10.2
+
diff --git a/patches/upstream-fix-asan-initialization.diff b/patches/upstream-fix-asan-initialization.diff
new file mode 100644 (file)
index 0000000..d9e7117
--- /dev/null
@@ -0,0 +1,102 @@
+From 570ee9dd7a6f90b0370a86535cbde6738d0ccf67 Mon Sep 17 00:00:00 2001
+From: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+Date: Mon, 16 May 2016 07:20:53 +0000
+Subject: [PATCH] [asan] Fix asan initialization failure with newer (2.23+)
+ glibc in use.
+
+This patch tries to fix https://llvm.org/bugs/show_bug.cgi?id=27310 by using the same hack for malloc as we use for calloc: allocate corresponding memory from internal buffer when ASan is not initialized.
+This way we could avoid nasty '==6987==AddressSanitizer CHECK failed: ../../../../libsanitizer/asan/asan_rtl.cc:556 "((!asan_init_is_running && "ASan init calls itself!")) != (0)" (0x0, 0x0)' errors in
+environments with glibc 2.23+ in use, where _dl_signal_error, called from dlsym for undefined symbols calls malloc in order to get a buffer for error message.
+
+Differential Revision: http://reviews.llvm.org/D20235
+
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@269633 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/asan/asan_malloc_linux.cc | 42 ++++++++++++++++++++++++------------------
+ 1 file changed, 24 insertions(+), 18 deletions(-)
+
+diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cc b/compiler-rt/lib/asan/asan_malloc_linux.cc
+index a81f19f..162abd2 100644
+--- a/compiler-rt/lib/asan/asan_malloc_linux.cc
++++ b/compiler-rt/lib/asan/asan_malloc_linux.cc
+@@ -26,52 +26,58 @@
+ // ---------------------- Replacement functions ---------------- {{{1
+ using namespace __asan;  // NOLINT
+-static const uptr kCallocPoolSize = 1024;
+-static uptr calloc_memory_for_dlsym[kCallocPoolSize];
++static uptr allocated_for_dlsym;
++static const uptr kDlsymAllocPoolSize = 1024;
++static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize];
+-static bool IsInCallocPool(const void *ptr) {
+-  sptr off = (sptr)ptr - (sptr)calloc_memory_for_dlsym;
+-  return 0 <= off && off < (sptr)kCallocPoolSize;
++static bool IsInDlsymAllocPool(const void *ptr) {
++  uptr off = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
++  return off < sizeof(alloc_memory_for_dlsym);
++}
++
++static void *AllocateFromLocalPool(uptr size_in_bytes) {
++  uptr size_in_words = RoundUpTo(size_in_bytes, kWordSize) / kWordSize;
++  void *mem = (void*)&alloc_memory_for_dlsym[allocated_for_dlsym];
++  allocated_for_dlsym += size_in_words;
++  CHECK_LT(allocated_for_dlsym, kDlsymAllocPoolSize);
++  return mem;
+ }
+ INTERCEPTOR(void, free, void *ptr) {
+   GET_STACK_TRACE_FREE;
+-  if (UNLIKELY(IsInCallocPool(ptr)))
++  if (UNLIKELY(IsInDlsymAllocPool(ptr)))
+     return;
+   asan_free(ptr, &stack, FROM_MALLOC);
+ }
+ INTERCEPTOR(void, cfree, void *ptr) {
+   GET_STACK_TRACE_FREE;
+-  if (UNLIKELY(IsInCallocPool(ptr)))
++  if (UNLIKELY(IsInDlsymAllocPool(ptr)))
+     return;
+   asan_free(ptr, &stack, FROM_MALLOC);
+ }
+ INTERCEPTOR(void*, malloc, uptr size) {
++  if (UNLIKELY(!asan_inited))
++    // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym.
++    return AllocateFromLocalPool(size);
+   GET_STACK_TRACE_MALLOC;
+   return asan_malloc(size, &stack);
+ }
+ INTERCEPTOR(void*, calloc, uptr nmemb, uptr size) {
+-  if (UNLIKELY(!asan_inited)) {
++  if (UNLIKELY(!asan_inited))
+     // Hack: dlsym calls calloc before REAL(calloc) is retrieved from dlsym.
+-    static uptr allocated;
+-    uptr size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize;
+-    void *mem = (void*)&calloc_memory_for_dlsym[allocated];
+-    allocated += size_in_words;
+-    CHECK(allocated < kCallocPoolSize);
+-    return mem;
+-  }
++    return AllocateFromLocalPool(nmemb * size);
+   GET_STACK_TRACE_MALLOC;
+   return asan_calloc(nmemb, size, &stack);
+ }
+ INTERCEPTOR(void*, realloc, void *ptr, uptr size) {
+   GET_STACK_TRACE_MALLOC;
+-  if (UNLIKELY(IsInCallocPool(ptr))) {
+-    uptr offset = (uptr)ptr - (uptr)calloc_memory_for_dlsym;
+-    uptr copy_size = Min(size, kCallocPoolSize - offset);
++  if (UNLIKELY(IsInDlsymAllocPool(ptr))) {
++    uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
++    uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
+     void *new_ptr = asan_malloc(size, &stack);
+     internal_memcpy(new_ptr, ptr, copy_size);
+     return new_ptr;
+-- 
+2.10.2
+
diff --git a/patches/upstream-msan-prevent-initialization-failure.diff b/patches/upstream-msan-prevent-initialization-failure.diff
new file mode 100644 (file)
index 0000000..ba52b59
--- /dev/null
@@ -0,0 +1,124 @@
+From 827ea206c1078fc7c7da287984a7ba4563390589 Mon Sep 17 00:00:00 2001
+From: Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+Date: Fri, 23 Sep 2016 07:40:55 +0000
+Subject: [PATCH] [msan] Prevent initialization failure with newer (2.23+)
+ glibc in use.
+
+This patch is pretty the same as http://reviews.llvm.org/D20235 that we used
+for ASan. Using the same hack for MSan fixes its initialization with newer
+Glibc in use.
+
+Differential Revision: https://reviews.llvm.org/D24736
+
+
+git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282232 91177308-0d34-0410-b5e6-96231b3b80d8
+---
+ lib/asan/asan_malloc_linux.cc |  6 +++++-
+ lib/msan/msan_interceptors.cc | 43 +++++++++++++++++++++++++++++++------------
+ 2 files changed, 36 insertions(+), 13 deletions(-)
+
+diff --git a/compiler-rt/lib/asan/asan_malloc_linux.cc b/compiler-rt/lib/asan/asan_malloc_linux.cc
+index 162abd2..d7a22d6 100644
+--- a/compiler-rt/lib/asan/asan_malloc_linux.cc
++++ b/compiler-rt/lib/asan/asan_malloc_linux.cc
+@@ -78,7 +78,11 @@ INTERCEPTOR(void*, realloc, void *ptr, uptr size) {
+   if (UNLIKELY(IsInDlsymAllocPool(ptr))) {
+     uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
+     uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
+-    void *new_ptr = asan_malloc(size, &stack);
++    void *new_ptr;
++    if (UNLIKELY(!asan_inited))
++      new_ptr = AllocateFromLocalPool(size);
++    else
++      new_ptr = asan_malloc(size, &stack);
+     internal_memcpy(new_ptr, ptr, copy_size);
+     return new_ptr;
+   }
+diff --git a/compiler-rt/lib/msan/msan_interceptors.cc b/compiler-rt/lib/msan/msan_interceptors.cc
+index f23d3ee..2aeaef4 100644
+--- a/compiler-rt/lib/msan/msan_interceptors.cc
++++ b/compiler-rt/lib/msan/msan_interceptors.cc
+@@ -64,6 +64,23 @@ bool IsInInterceptorScope() {
+   return in_interceptor_scope;
+ }
++static uptr allocated_for_dlsym;
++static const uptr kDlsymAllocPoolSize = 1024;
++static uptr alloc_memory_for_dlsym[kDlsymAllocPoolSize];
++
++static bool IsInDlsymAllocPool(const void *ptr) {
++  uptr off = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
++  return off < sizeof(alloc_memory_for_dlsym);
++}
++
++static void *AllocateFromLocalPool(uptr size_in_bytes) {
++  uptr size_in_words = RoundUpTo(size_in_bytes, kWordSize) / kWordSize;
++  void *mem = (void *)&alloc_memory_for_dlsym[allocated_for_dlsym];
++  allocated_for_dlsym += size_in_words;
++  CHECK_LT(allocated_for_dlsym, kDlsymAllocPoolSize);
++  return mem;
++}
++
+ #define ENSURE_MSAN_INITED() do { \
+   CHECK(!msan_init_is_running); \
+   if (!msan_inited) { \
+@@ -227,14 +244,14 @@ INTERCEPTOR(void *, pvalloc, SIZE_T size) {
+ INTERCEPTOR(void, free, void *ptr) {
+   GET_MALLOC_STACK_TRACE;
+-  if (!ptr) return;
++  if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return;
+   MsanDeallocate(&stack, ptr);
+ }
+ #if !SANITIZER_FREEBSD
+ INTERCEPTOR(void, cfree, void *ptr) {
+   GET_MALLOC_STACK_TRACE;
+-  if (!ptr) return;
++  if (!ptr || UNLIKELY(IsInDlsymAllocPool(ptr))) return;
+   MsanDeallocate(&stack, ptr);
+ }
+ #define MSAN_MAYBE_INTERCEPT_CFREE INTERCEPT_FUNCTION(cfree)
+@@ -907,27 +924,29 @@ INTERCEPTOR(int, epoll_pwait, int epfd, void *events, int maxevents,
+ INTERCEPTOR(void *, calloc, SIZE_T nmemb, SIZE_T size) {
+   GET_MALLOC_STACK_TRACE;
+-  if (UNLIKELY(!msan_inited)) {
++  if (UNLIKELY(!msan_inited))
+     // Hack: dlsym calls calloc before REAL(calloc) is retrieved from dlsym.
+-    const SIZE_T kCallocPoolSize = 1024;
+-    static uptr calloc_memory_for_dlsym[kCallocPoolSize];
+-    static SIZE_T allocated;
+-    SIZE_T size_in_words = ((nmemb * size) + kWordSize - 1) / kWordSize;
+-    void *mem = (void*)&calloc_memory_for_dlsym[allocated];
+-    allocated += size_in_words;
+-    CHECK(allocated < kCallocPoolSize);
+-    return mem;
+-  }
++    return AllocateFromLocalPool(nmemb * size);
+   return MsanCalloc(&stack, nmemb, size);
+ }
+ INTERCEPTOR(void *, realloc, void *ptr, SIZE_T size) {
+   GET_MALLOC_STACK_TRACE;
++  if (UNLIKELY(IsInDlsymAllocPool(ptr))) {
++    uptr offset = (uptr)ptr - (uptr)alloc_memory_for_dlsym;
++    uptr copy_size = Min(size, kDlsymAllocPoolSize - offset);
++    void *new_ptr = AllocateFromLocalPool(size);
++    internal_memcpy(new_ptr, ptr, copy_size);
++    return new_ptr;
++  }
+   return MsanReallocate(&stack, ptr, size, sizeof(u64), false);
+ }
+ INTERCEPTOR(void *, malloc, SIZE_T size) {
+   GET_MALLOC_STACK_TRACE;
++  if (UNLIKELY(!msan_inited))
++    // Hack: dlsym calls malloc before REAL(malloc) is retrieved from dlsym.
++    return AllocateFromLocalPool(size);
+   return MsanReallocate(&stack, nullptr, size, sizeof(u64), false);
+ }
+-- 
+2.10.2
+
diff --git a/patches/use-deb-json.diff b/patches/use-deb-json.diff
new file mode 100644 (file)
index 0000000..c7b8161
--- /dev/null
@@ -0,0 +1,57 @@
+Index: llvm-toolchain-snapshot_4.0~svn279916/polly/lib/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_4.0~svn279916.orig/polly/lib/CMakeLists.txt
++++ llvm-toolchain-snapshot_4.0~svn279916/polly/lib/CMakeLists.txt
+@@ -1,10 +1,10 @@
+ set(LLVM_NO_RTTI 1)
+-set(POLLY_JSON_FILES
+-    JSON/json_reader.cpp
+-    JSON/json_value.cpp
+-    JSON/json_writer.cpp
+-)
++# set(POLLY_JSON_FILES
++#     JSON/json_reader.cpp
++#     JSON/json_value.cpp
++#     JSON/json_writer.cpp
++# )
+ set(ISL_CODEGEN_FILES
+     CodeGen/IslAst.cpp
+@@ -50,7 +50,7 @@ add_polly_library(Polly
+   Support/RegisterPasses.cpp
+   Support/ScopHelper.cpp
+   Support/ScopLocation.cpp
+-  ${POLLY_JSON_FILES}
++#  ${POLLY_JSON_FILES}
+   Transform/Canonicalization.cpp
+   Transform/CodePreparation.cpp
+   Transform/DeadCodeElimination.cpp
+@@ -62,7 +62,7 @@ if (GPU_CODEGEN)
+   target_link_libraries(Polly PollyPPCG)
+ endif (GPU_CODEGEN)
+-target_link_libraries(Polly PollyISL)
++target_link_libraries(Polly PollyISL jsoncpp)
+ if (BUILD_SHARED_LIBS)
+   target_link_libraries(Polly
+Index: llvm-toolchain-snapshot_4.0~svn279916/polly/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-snapshot_4.0~svn279916.orig/polly/CMakeLists.txt
++++ llvm-toolchain-snapshot_4.0~svn279916/polly/CMakeLists.txt
+@@ -147,10 +147,13 @@ if (CUDALIB_FOUND)
+   INCLUDE_DIRECTORIES( ${CUDALIB_INCLUDE_DIR} )
+ endif(CUDALIB_FOUND)
++find_path(JSONCPP_INCLUDE_PATH json/json.h PATH_SUFFIXES jsoncpp)
++
+ include_directories(
+   BEFORE
+   ${CMAKE_CURRENT_SOURCE_DIR}/include
+-  ${CMAKE_CURRENT_SOURCE_DIR}/lib/JSON/include
++#  ${CMAKE_CURRENT_SOURCE_DIR}/lib/JSON/include
++  ${JSONCPP_INCLUDE_PATH}
+   ${CMAKE_CURRENT_BINARY_DIR}/lib/External/isl/include
+   ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/isl/include
+   ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/pet/include
diff --git a/pollycc.in b/pollycc.in
new file mode 100755 (executable)
index 0000000..f063818
--- /dev/null
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+clang -Xclang -load -Xclang /usr/lib/llvm-@LLVM_VERSION@/lib/LLVMPolly.so $@
diff --git a/prepare-new-release.sh b/prepare-new-release.sh
new file mode 100644 (file)
index 0000000..f2337b1
--- /dev/null
@@ -0,0 +1,17 @@
+#!/bin/sh
+ORIG_VERSION=3.8
+TARGET_VERSION=3.9
+ORIG_VERSION_2=3_8
+TARGET_VERSION_2=3_9
+
+LIST=`ls debian/*$ORIG_VERSION*`
+for F in $LIST; do
+    TARGET=`echo $F|sed -e "s|$ORIG_VERSION|$TARGET_VERSION|g"`
+    svn mv $F $TARGET
+done
+LIST=`ls debian/*$TARGET_VERSION* debian/control debian/*.install debian/*.links debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff`
+for F in $LIST; do
+    sed -i -e "s|$ORIG_VERSION_2|$TARGET_VERSION_2|g" $F
+    sed -i -e "s|$ORIG_VERSION|$TARGET_VERSION|g" $F
+done
+
diff --git a/python-clang-X.Y.install.in b/python-clang-X.Y.install.in
new file mode 100644 (file)
index 0000000..b549421
--- /dev/null
@@ -0,0 +1 @@
+tools/clang/bindings/python/clang/ /usr/lib/python2.7/dist-packages/
diff --git a/python-lldb-X.Y.install.in b/python-lldb-X.Y.install.in
new file mode 100644 (file)
index 0000000..3e2c69e
--- /dev/null
@@ -0,0 +1 @@
+usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/
diff --git a/python-lldb-X.Y.links.in b/python-lldb-X.Y.links.in
new file mode 100644 (file)
index 0000000..bce077f
--- /dev/null
@@ -0,0 +1,6 @@
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/libLLVM-@LLVM_VERSION_FULL@.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/libLLVM-@LLVM_VERSION_FULL@.so.1 usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/libLLVM-@LLVM_VERSION@.so.1
+usr/lib/@DEB_HOST_MULTIARCH@/liblldb-@LLVM_VERSION@.so.1      usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/_lldb.so
+usr/lib/llvm-@LLVM_VERSION@/lib/python2.7/site-packages/lldb/ usr/lib/python2.7/dist-packages/lldb
+
+
diff --git a/rules b/rules
new file mode 100755 (executable)
index 0000000..26b9399
--- /dev/null
+++ b/rules
@@ -0,0 +1,552 @@
+#!/usr/bin/make -f
+
+TARGET_BUILD   := build-llvm
+DEB_INST               := $(CURDIR)/debian/tmp/
+#GCC_VERSION     := 4.8
+# The 5|6| in the regexp is a crappy workaround. g++ 5.2 in Debian is not providing a g++-5.2 binary (only g++-5)
+# accomodate that by hardcoding the 5 detection
+GCC_VERSION     := $(shell dpkg-query -W -f '$${Version}' g++ | sed -rne 's,^([0-9]+:)?(5|6|[0-9]+\.[0-9]+|[0-9]+).*$$,\2,p')
+LLVM_VERSION   := 3.9
+LLVM_VERSION_FULL := $(LLVM_VERSION).1
+SONAME_EXT      := 1
+# Manage the case when the version is 1:3.5~svn213052-1~exp1 or 1:3.4.2-1
+DEBIAN_REVISION := $(shell dpkg-parsechangelog |  sed -rne "s,^Version: 1:([0-9.]+)(~|-)(.*),\3,p")
+ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+endif
+
+VENDOR=$(shell lsb_release -is)
+
+DEB_HOST_MULTIARCH  = $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+DEB_HOST_GNU_TYPE   = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_ARCH_BITS  = $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
+DEB_HOST_ARCH       = $(shell dpkg-architecture -qDEB_HOST_ARCH)
+
+LDFLAGS_EXTRA =
+CXXFLAGS_EXTRA = -std=c++0x
+CONFIGURE_EXTRA =
+CMAKE_EXTRA =
+
+ifneq (,$(filter $(DEB_HOST_ARCH),powerpc powerpcspe))
+LDFLAGS_EXTRA += -latomic
+endif
+
+ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.22.52.0.4 ; echo $$?),0)
+# when using -gsplit-dwarf, it will requires extract-dwo which doesn't exist on precise:
+# More: https://llvm.org/bugs/show_bug.cgi?id=28841
+CXXFLAGS_EXTRA += -gsplit-dwarf
+endif
+
+ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 4.7.2-10~ ; echo $$?),0)
+# Too old version of gcc. Force 4.9
+       GCC_VERSION := 4.9
+endif
+
+export CC=gcc-$(GCC_VERSION)
+export CXX=g++-$(GCC_VERSION)
+
+opt_flags = -g -O2
+ifneq (,$(findstring $(DEB_HOST_ARCH),armel))
+  opt_flags += -marm
+  # 3.8 fails to build, disable the compiler_rt builtins
+  # See http://lists.llvm.org/pipermail/llvm-dev/2016-May/099761.html
+  CMAKE_EXTRA += -DCOMPILER_RT_BUILD_BUILTINS=OFF
+endif
+
+ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.8-20121128-1~ ; echo $$?),0)
+       control_vars = '-Vdep:devlibs=libstdc++-$(GCC_VERSION)-dev, libgcc-$(GCC_VERSION)-dev' \
+               '-Vdep:devlibs-objc=libobjc-$(GCC_VERSION)-dev'
+else ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 4.7.2-10~ ; echo $$?),0)
+       control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev, libgcc-$(GCC_VERSION)-dev' \
+               '-Vdep:devlibs-objc=libobjc-$(GCC_VERSION)-dev'
+else
+       control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev'
+endif
+
+BINUTILS_GOLD_ARCHS := amd64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32
+ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.23.1-1~exp3 ; echo $$?),0)
+ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS)))
+# -fused-ld=gold enables the gold linker (but is not supported by all archs / distro)
+       LDFLAGS_EXTRA += -fuse-ld=gold
+       CXXFLAGS_EXTRA += -Wl,-fuse-ld=gold
+       CMAKE_EXTRA += -DLLVM_BINUTILS_INCDIR=/usr/include/
+endif
+endif
+
+# Enable polly (or not)
+POLLY_ENABLE=yes
+ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc s390x))
+  POLLY_ENABLE=no
+endif
+
+ifneq (,$(filter codecoverage,$(DEB_BUILD_OPTIONS)))
+# enable the code coverage
+       CODECOVERAGE=yes
+# for -fvisibility-inlines-hidden see http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130729/183016.html
+       CXXFLAGS_EXTRA += -fprofile-arcs -ftest-coverage
+       LDFLAGS_EXTRA += -coverage -lgcov
+endif
+
+ifneq (,$(filter scan-build,$(DEB_BUILD_OPTIONS)))
+# enable the build using scan-build
+# The package are installed through the variable declarations:
+# OTHERMIRROR="deb http://llvm.org/apt/unstable/ llvm-toolchain main"
+# EXTRAPACKAGES="clang-3.5"
+       PRE_PROCESS=scan-build-$(LLVM_VERSION) -analyzer-config stable-report-filename=true -enable-checker optin.performance.Padding
+       PRE_PROCESS_CONF=scan-build-$(LLVM_VERSION)
+# no need to run tests in this case
+       DEB_BUILD_OPTIONS+=" nocheck"
+       CONFIGURE_EXTRA += --enable-assertions
+       CMAKE_EXTRA += -DLLVM_ENABLE_ASSERTIONS=ON
+endif
+
+ifneq (,$(filter coverity,$(DEB_BUILD_OPTIONS)))
+# enable the build using coverity
+# pbuilder contains BINDMOUNTS="/opt/cov-analysis/"
+# And we have some pbuilder hooks to configure and pack the result
+# Where the binaries are installed on the jenkins instance
+       PRE_PROCESS=PATH=$$PATH:/opt/cov-analysis/bin/ cov-build --dir cov-int
+# We don't want to check the temporary files produced by the configure
+       PRE_PROCESS_CONF=
+       COVERITY_ENABLE=1
+       CONFIGURE_EXTRA += --enable-assertions
+       CMAKE_EXTRA += -DLLVM_ENABLE_ASSERTIONS=ON
+# no need to run tests in this case
+       DEB_BUILD_OPTIONS+=" nocheck"
+else
+       COVERITY_ENABLE=0
+endif
+
+LLDB_ENABLE=yes
+LLDB_DISABLE_ARCHS := hurd-i386 ia64 ppc64el powerpc s390x sparc64 mips64el ppc64
+# hurd has threading issues
+ifeq (,$(filter-out $(LLDB_DISABLE_ARCHS), $(DEB_HOST_ARCH)))
+# Disable LLDB for this arch.
+       LLDB_ENABLE=no
+else
+# See https://llvm.org/bugs/show_bug.cgi?id=28898
+       CMAKE_EXTRA += -DLLDB_DISABLE_LIBEDIT=ON
+endif
+
+LLD_ENABLE=NO
+
+DH_OPTIONS=
+OCAML_ENABLE= no
+OCAML_ARCHS := amd64 arm64 armel armhf i386
+ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS)))
+# Enable OCAML for this arch.
+       OCAML_ENABLE=yes
+       OCAML_STDLIB_DIR    ?= $(shell ocamlc -where)
+       DH_OPTIONS=--with ocaml
+endif
+
+
+%:
+       dh $@ $(DH_OPTIONS)
+
+
+preconfigure:
+       for f in debian/*.in; do \
+               f2=$$(echo $$f | sed 's/\.in$$//;s/X\.Y/$(LLVM_VERSION)/'); \
+               echo "$$f => $$f2"; \
+               sed -e 's|@DEB_HOST_MULTIARCH@|$(DEB_HOST_MULTIARCH)|g' \
+                       -e "s|@OCAML_STDLIB_DIR@|$(OCAML_STDLIB_DIR)|g" \
+                       -e "s|@LLVM_VERSION_FULL@|$(LLVM_VERSION_FULL)|g" \
+                       -e "s|@LLVM_VERSION@|$(LLVM_VERSION)|g" $$f > $$f2; \
+       done
+
+# Override this two targets. They are trying to manage the .in conversion for me
+override_dh_ocamlinit:
+override_dh_ocamlclean:
+
+override_dh_auto_configure: preconfigure
+       echo "Using gcc: "
+       $(CC) -v
+       mkdir -p $(TARGET_BUILD)
+       mkdir -p clang/include/clang/Debian
+       sed -e "s|@DEB_PATCHSETVERSION@|$(DEBIAN_REVISION)|" \
+               debian/debian_path.h > clang/include/clang/Debian/debian_path.h
+
+# Remove some old symlinks
+       cd tools/ && \
+               if test -h clang; then \
+                       rm clang; \
+               fi; \
+               ln -s ../clang .; \
+       readlink clang
+
+       if test "$(POLLY_ENABLE)" = yes; then \
+               cd tools/ && \
+               if test -h polly; then \
+                       rm polly; \
+               fi; \
+               ln -s ../polly .; \
+       fi
+
+       if test "$(LLD_ENABLE)" = yes; then \
+       cd tools/ && \
+               if test -h lld; then \
+                       rm lld; \
+               fi; \
+               ln -s ../lld .; \
+       readlink lld; \
+       fi
+
+       if test "$(LLDB_ENABLE)" = yes; then \
+               cd tools/ && \
+               if test -h lldb; then \
+                  rm lldb; \
+               fi; \
+               ln -s ../lldb .; \
+       fi
+
+       cd projects/ && \
+       if test -h compiler-rt; then \
+               rm compiler-rt; \
+       fi; \
+       ln -s ../compiler-rt .; \
+       readlink compiler-rt
+
+       # Configure coverity (we need the compilers)
+       -(if test $(COVERITY_ENABLE) -eq 1; then \
+               export PATH=$$PATH:/opt/cov-analysis/bin/; \
+               cov-configure --compiler clang --comptype clang; \
+               cov-configure --compiler gcc-4.8 --comptype gcc; \
+               cov-configure --compiler g++-4.8 --comptype gcc; \
+               cov-configure --compiler gcc-4.9 --comptype gcc; \
+               cov-configure --compiler g++-4.9 --comptype gcc; \
+               cov-configure --compiler gcc-5 --comptype gcc; \
+               cov-configure --compiler g++-5 --comptype gcc; \
+       fi)
+
+       # Due to bug upstream, no symlink here
+       rm -fr tools/clang/tools/extra
+       cp -R -H clang-tools-extra tools/clang/tools/extra
+
+       # if cmake is installed in /tmp/cmake/ uses it
+       # Used to build llvm on old ubuntu (precise) on the llvm.org/apt/ ci
+       CMAKE_BIN=cmake; \
+       if test -f /tmp/cmake/bin/cmake; then \
+               CMAKE_BIN=/tmp/cmake/bin/cmake; \
+       fi; \
+       echo "Using cmake: $$CMAKE_BIN"; \
+       cd $(TARGET_BUILD) && \
+       $(PRE_PROCESS_CONF) $$CMAKE_BIN ../ \
+       -DCMAKE_INSTALL_PREFIX=/usr/lib/llvm-$(LLVM_VERSION) \
+       -DCMAKE_VERBOSE_MAKEFILE=ON \
+       -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+       -DCMAKE_CXX_FLAGS='$(CXXFLAGS_EXTRA)' \
+       -DLLVM_LINK_LLVM_DYLIB=ON \
+       -DLLVM_INSTALL_UTILS=ON \
+       -DLLVM_VERSION_SUFFIX= \
+       -DLLVM_ENABLE_SPHINX=ON \
+       -DSPHINX_WARNINGS_AS_ERRORS=OFF \
+       -DLLVM_BUILD_LLVM_DYLIB=ON \
+       -DLLVM_ENABLE_RTTI=ON \
+       -DLLVM_ENABLE_FFI=ON \
+       $(CMAKE_EXTRA) \
+       -DLIBCLANG_LIBRARY_VERSION=$(SONAME_EXT)
+
+override_dh_auto_build:
+       $(PRE_PROCESS) $(MAKE) $(NJOBS) -C $(TARGET_BUILD) VERBOSE=1 CLANG_VENDOR=$(VENDOR) CXXFLAGS="$(CXXFLAGS_EXTRA)"  LDFLAGS="$(LDFLAGS_EXTRA)" REQUIRES_RTTI=1 DEBUGMAKE=1
+       cd $(TARGET_BUILD) \
+       CFLAGS=`dpkg-buildflags --get CFLAGS`; \
+       CFLAGS="$$CFLAGS `dpkg-buildflags --get CPPFLAGS`"; \
+       echo $$CFLAGS; \
+       bin/clang++ -c $$CFLAGS -std=c++11 ../lib/Fuzzer/*.cpp -IFuzzer; \
+       ar ruv libFuzzer.a Fuzzer*.o
+
+override_dh_prep: build_doc
+       dh_prep
+
+build_doc:
+       cd $(CURDIR)/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
+       cd $(CURDIR)/clang/docs && make -f Makefile.sphinx && make -f Makefile.sphinx man
+       if test "$(OCAML_ENABLE)" = yes; then \
+       $(PRE_PROCESS) $(MAKE) $(NJOBS) -C "$(TARGET_BUILD)/docs" ocaml_doc; \
+       fi
+
+# Continue if failing, Ubuntu precise cannot generate manpages as sphinx is too old
+       -(cd $(TARGET_BUILD) && make $(NJOBS) docs-llvm-html docs-clang-html docs-clang-tools-html docs-polly-html docs-polly-man docs-clang-tools-man docs-clang-man docs-llvm-man)
+
+# Rename manpages
+       d=$(CURDIR)/docs/_build/man/; \
+       if test -d $$d; then \
+               cd $$d; \
+               for f in *.1; do \
+                       echo "$$f"|grep $(LLVM_VERSION) || mv $$f `echo $$f|sed "s|\.1|-$(LLVM_VERSION).1|"`; \
+               done; \
+       else \
+               echo "could not find $$d"; \
+       fi
+# the clang doc generation only generates clang manpage
+# When it will do more, we should move that in the loop above
+       cd $(CURDIR)/clang/docs/_build/man/; mv clang.1 clang-$(LLVM_VERSION).1
+
+# Remove the copy of jquery. See bug #701087
+       for d in $(TARGET_BUILD)/docs/html/_static/ $(TARGET_BUILD)/tools/clang/docs/html/_static/ $(TARGET_BUILD)/tools/clang/tools/extra/docs/html/_static/; do \
+               cd $$d && rm -f jquery.js && ln -s /usr/share/javascript/jquery/jquery.js && cd -; \
+               cd $$d && rm -f underscore.js && ln -s /usr/share/javascript/underscore/underscore.js && cd -; \
+       done
+
+       help2man --version-string=$(LLVM_VERSION) --no-info --no-discard-stderr clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1
+       help2man --version-string=$(LLVM_VERSION) --no-info --no-discard-stderr clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1
+
+       CMDS="llvm-dwarfdump llvm-mc llvm-mcmarkup llvm-objdump llvm-rtdyld llvm-size llvm-ranlib lldb lldb-mi clang-format clang clang-tblgen clang-check clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols"; \
+       for f in $$CMDS; do \
+               echo "Generating manpage of $$f"; \
+               LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --no-info --version-string=$(LLVM_VERSION) --no-discard-stderr $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \
+       done
+
+override_dh_auto_install:
+       # Clean up temporary files to make sure the install works
+       rm -rf $(find $(TARGET_BUILD) -wholename '*CMakeFiles*' -not -name CMakeLists.txt -a -name "*.dir" -type d)
+       # install/fast enables a make install without recompiling temporary files
+       $(MAKE) -C $(TARGET_BUILD) VERBOSE=1 install/fast DESTDIR=$(DEB_INST)/
+       # Not used on Linux.
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/argdumper
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/share/clang/clang-format-bbedit.applescript
+
+       cp $(TARGET_BUILD)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin
+
+       # Only run on executable, not script
+       chrpath -d `find $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/ -type f -executable -exec file -i '{}' \; | grep 'x-executable; charset=binary'|cut -d: -f1`
+
+       cd debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/ && rm -f libclang.so.$(SONAME_EXT) libclang-$(LLVM_VERSION).so; \
+       ln -s libclang-$(LLVM_VERSION).so.$(SONAME_EXT) libclang.so.$(SONAME_EXT)
+
+# Remove artefact (where compiler-rt is built)
+#      if test -d $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/clang_linux; then \
+#      cd $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/clang_linux && rm -rf $$(find . -mindepth 2 -maxdepth 2 -type d) && rm -rf $$(find -empty) && rm -rf */.dir; \
+#      fi
+
+       mkdir -p $(CURDIR)/debian/clang-$(LLVM_VERSION)/usr/bin/
+       cp compiler-rt/lib/asan/scripts/asan_symbolize.py $(CURDIR)/debian/clang-$(LLVM_VERSION)/usr/bin/asan_symbolize-$(LLVM_VERSION)
+
+       mkdir -p $(CURDIR)/debian/libfuzzer-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/
+       cp -v $(TARGET_BUILD)/libFuzzer.a $(CURDIR)/debian/libfuzzer-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/
+
+# Create this fake directory to make the install libclang-common-dev happy
+# under the unsupported archs of compiler-rt
+       mkdir -p $(DEB_INST)/usr/lib/clang/$(LLVM_VERSION)/lib
+       mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/lib/
+       mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION)/lib/clang_linux/
+       mkdir -p $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/clang_linux/
+       mkdir -p $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/clang_linux/
+# On some archs, the sanatizers are not built. As we explicitly includes some txt files, create
+# a fake txt to make sure it doesn't fail
+       echo "The *.txt files, if available, contain helper to override some of the errors messages." > $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/README.txt
+       echo "Please visit https://github.com/google/sanitizers/wiki/AddressSanitizer for help" >> $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/README.txt
+
+# idem for the lldb python binding
+       mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python2.7/site-packages/lldb/
+
+# Remove things that CMake  install but which aren't packaged yet,
+# or are packaged from the source or build tree.
+       mv $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/clang-$(LLVM_VERSION) \
+          $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/clang
+
+# Don't think it is used
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libPolly*a
+# Probably useless
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python2.7/site-packages/six.py
+
+# Rename binaries
+       mkdir -p $(DEB_INST)/usr/bin/
+       cd $(DEB_INST)/usr/bin/; \
+       rm -f *; \
+       for f in ../lib/llvm-$(LLVM_VERSION)/bin/*; do \
+               ln -s $$f `basename $$f`-$(LLVM_VERSION); \
+               echo "Link $$f to `basename $$f`-$(LLVM_VERSION)"; \
+       done
+
+# Rename some stuff with the version name
+       cp $(CURDIR)/clang/tools/scan-build/man/scan-build.1 $(CURDIR)/clang/tools/scan-build/man/scan-build-$(LLVM_VERSION).1
+
+       # copy the vim files (except that tablegen does not exist for indent
+       VIM_DIRS="ftdetect ftplugin syntax indent"; \
+       for dir in $$VIM_DIRS; do \
+               cp -f $(CURDIR)/utils/vim/$$dir/llvm.vim $(CURDIR)/utils/vim/$$dir/llvm-$(LLVM_VERSION).vim; \
+               if test -f $(CURDIR)/utils/vim/$$dir/tablegen.vim; then \
+                       cp -f $(CURDIR)/utils/vim/$$dir/tablegen.vim $(CURDIR)/utils/vim/$$dir/tablegen-$(LLVM_VERSION).vim; \
+               fi; \
+       done
+       cp -f $(CURDIR)/utils/vim/vimrc $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION)-vimrc
+
+       cp -f $(CURDIR)/clang/tools/clang-format/clang-format-diff.py $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION)
+
+       cp -f $(CURDIR)/clang/tools/clang-format/clang-format.py clang/tools/clang-format/clang-format-$(LLVM_VERSION).py
+
+       rm -rf clang/tools/scan-build-$(LLVM_VERSION)
+       cp -fR $(CURDIR)/clang/tools/scan-build clang/tools/scan-build-$(LLVM_VERSION)
+
+       rm -rf clang/tools/scan-build-py-$(LLVM_VERSION)
+       cp -fR $(CURDIR)/clang/tools/scan-build-py clang/tools/scan-build-py-$(LLVM_VERSION)
+       chmod +x clang/tools/scan-build-py-$(LLVM_VERSION)/bin/*
+
+       rm -rf clang/tools/scan-view-$(LLVM_VERSION)
+       cp -fR $(CURDIR)/clang/tools/scan-view clang/tools/scan-view-$(LLVM_VERSION)
+
+# Remove some license files
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/include/llvm/Support/LICENSE.TXT
+
+# Change CMake module dir
+       sed -i 's|LLVM_CMAKE_DIR "/usr/lib/llvm-$(LLVM_VERSION)/share/llvm/cmake"|LLVM_CMAKE_DIR "/usr/share/llvm-$(LLVM_VERSION)/cmake"|' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMConfig.cmake
+
+# Disable CMake's package validation checks for target files that we may remove.
+       sed -i '/_IMPORT_CHECK_TARGETS \(Polly\|sancov\)/ {s|^|#|}' $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/cmake/llvm/LLVMExports-*.cmake
+
+# Managed in python-lldb-X.Y.links.in
+       rm -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/_lldb.so
+
+# Manage the polly files. Sometimes, we build them. Sometimes not.
+       if test "$(POLLY_ENABLE)" = yes; then \
+               mkdir -p $(CURDIR)/debian/libclang-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/ $(CURDIR)/debian/libclang-common-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/include/polly/; \
+               mv -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libpolly* \
+               $(CURDIR)/debian/libclang-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/lib/; \
+               rm -rf $(CURDIR)/debian/libclang-common-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/include/polly; \
+               mv -f $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/include/polly/ \
+               $(CURDIR)/debian/libclang-common-$(LLVM_VERSION)-dev/usr/lib/llvm-$(LLVM_VERSION)/include/; \
+       fi
+
+       mkdir -p $(CURDIR)/debian/usr/share/doc/llvm-$(LLVM_VERSION)-doc/ $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/
+       cp -R $(TARGET_BUILD)/docs/html $(CURDIR)/debian/usr/share/doc/llvm-$(LLVM_VERSION)-doc/
+       cp -R $(TARGET_BUILD)/tools/clang/docs/html $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/
+       cp -R $(TARGET_BUILD)/tools/clang/tools/extra/docs/html $(CURDIR)/debian/usr/share/doc/clang-$(LLVM_VERSION)-doc/clang-extra
+
+# Rename OCaml bindings
+       if test "$(OCAML_ENABLE)" = yes; then \
+               if test -d "$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml"; then \
+                       mkdir -p "$(DEB_INST)$(OCAML_STDLIB_DIR)"; \
+                       mv -f "$(DEB_INST)usr/lib/llvm-$(LLVM_VERSION)/lib/ocaml" \
+                       "$(DEB_INST)$(OCAML_STDLIB_DIR)/llvm-$(LLVM_VERSION)"; \
+               fi; \
+       fi
+
+# Delete the target build directory to save some space on the build systems
+# All the files have been installed in $(CURDIR)/debian/tmp/ already
+       rm -rf $(TARGET_BUILD)
+
+
+override_dh_makeshlibs:
+       dh_makeshlibs -plibclang$(SONAME_EXT)-$(LLVM_VERSION) -V"libclang$(SONAME_EXT)-$(LLVM_VERSION) (>= 1:3.9.1-6~)"
+       dh_makeshlibs -pliblldb-$(LLVM_VERSION) -V"liblldb-$(LLVM_VERSION) (>= 1:3.9.1-6~)"
+       dh_makeshlibs -plibllvm$(LLVM_VERSION) -V"libllvm$(LLVM_VERSION) (>= 1:3.9.1-6~)"
+       dh_makeshlibs --remaining-packages
+
+override_dh_shlibdeps:
+# Ignore asan libraries. They would trigger dependencies to multiarch libraries
+       dh_shlibdeps -l$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ -Xlibclang_rt.asan -Xlibclang_rt.asan
+
+override_dh_installman:
+       dh_installman
+# Make sure that lli manpage is only in llvm-3.2-runtime (See #697117)
+       rm -f $(CURDIR)/debian/llvm-$(LLVM_VERSION)/usr/share/man/man1/lli*
+
+
+override_dh_strip:
+       : # running out of diskspace on the buildds
+       find $(TARGET_BUILD) -name '*.o' -o -name '*.a' | xargs -r rm -f
+       dh_strip -p libclang$(SONAME_EXT)-$(LLVM_VERSION) --dbg-package=libclang$(SONAME_EXT)-$(LLVM_VERSION)-dbg
+       dh_strip -p libllvm$(LLVM_VERSION) --dbg-package=libllvm$(LLVM_VERSION)-dbg
+       dh_strip -p liblldb-$(LLVM_VERSION) --dbg-package=liblldb-$(LLVM_VERSION)-dbg
+ifeq (${LLD_ENABLE},yes)
+       dh_strip -p liblld-$(LLVM_VERSION) --dbg-package=liblld-$(LLVM_VERSION)-dbg
+endif
+       dh_strip -a
+
+
+override_dh_install:
+#      cp $(TARGET_BUILD)/lib/libLLVM-$(LLVM_VERSION).so $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/libLLVM-$(LLVM_VERSION).so.$(SONAME_EXT)
+       dh_install --fail-missing
+
+override_dh_installdeb:
+# Managed by the package
+       dh_installdeb -a
+
+       rm -f $(CURDIR)/debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/__init__.pyc $(CURDIR)/debian/python-lldb-$(LLVM_VERSION)/usr/lib/llvm-$(LLVM_VERSION)/lib/python*/site-packages/lldb/__init__.pyc
+       rm -f $(CURDIR)/debian/clang-$(LLVM_VERSION)-examples/usr/share/doc/clang-$(LLVM_VERSION)-examples/examples/*Make*
+
+# Remove auto generated python pyc
+       find $(CURDIR)/debian/llvm-$(LLVM_VERSION)-tools/usr/lib/llvm-$(LLVM_VERSION)/ -name '*.pyc' | xargs -r rm -f
+
+
+ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
+# List of the archs we know we have 100 % tests working
+ARCH_LLVM_TEST_OK := i386 amd64
+
+override_dh_auto_test:
+
+# LLVM tests (CMake)
+ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK)))
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm
+else
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm || true
+endif
+
+# Clang tests (CMake)
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-clang || true
+
+# LLD tests (CMake)
+ifeq (${LLD_ENABLE},yes)
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-lld || true
+endif
+
+# Sanitizer
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-sanitizer || true
+
+# LLDB tests (CMake)
+ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel))
+ifneq (,$(filter codecoverageDISABLED,$(DEB_BUILD_OPTIONS)))
+       LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(CURDIR)/$(TARGET_BUILD)/lib/ $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-lldb || true
+endif
+endif
+
+# Polly tests (CMake)
+ifeq (${POLLY_ENABLE},yes)
+       $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-polly || true
+endif
+
+# Managed by debian build system
+       rm -f $(CURDIR)/$(TARGET_BUILD)/lib/python*/site-packages/lldb/_lldb.so
+
+# polly tests
+       if test "$(POLLY_ENABLE)" = yes; then \
+               cd $(TARGET_BUILD)/ && LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/ $(MAKE) -C tools/polly/test/ check-polly || true; \
+    fi
+
+# The compression of the code coverage report is done in the
+# hook B21GetCoverageResults on the server
+       if test "$(CODECOVERAGE)" = "yes"; then \
+               REPORT=reports/llvm-toolchain.info; \
+               mkdir -p reports/; \
+               lcov --directory $(TARGET_BUILD)/ --capture --ignore-errors source --output-file $$REPORT; \
+               lcov --remove $$REPORT "/usr*" -o $$REPORT; \
+               genhtml -o reports/coverage --show-details --highlight --legend $$REPORT; \
+       fi
+override_dh_auto_test:
+endif
+
+
+override_dh_gencontrol:
+       dh_gencontrol -- $(control_vars)
+
+
+override_dh_auto_clean:
+       rm -rf $(TARGET_BUILD) tools/clang/include/clang/Debian/debian_path.h docs/_build/ clang/docs/_build tools/clang/docs/_html/
+# QA tools
+       rm -rf cov-int/ reports/
+       rm -f `ls debian/*.in|sed -e "s|.in$$||g"`
+       find utils -name '*.pyc' | xargs -r rm -f
+       # Use -I because a test has a space in its name
+       find lldb/test -iname '*.pyc' | xargs -I{} -r rm -f {}
+       find test -name '*.pyc' -o -name '*.cm[ix]' | xargs -r rm -f
+       find test/Bindings -name '*.o' | xargs -r rm -f
+       rm -f tools/clang tools/polly tools/lld tools/lldb projects/compiler-rt
+       rm -rf tools/clang/tools/extra clang/tools/extra/
+       rm -f $(CURDIR)/utils/vim/llvm-$(LLVM_VERSION).vim $(CURDIR)/utils/vim/tablegen-$(LLVM_VERSION).vim
+       rm -f $(CURDIR)/clang/tools/clang-format/clang-format-diff-$(LLVM_VERSION)
+       rm -f $(CURDIR)/clang/tools/clang-format/clang-format-$(LLVM_VERSION).py
+
+
+.PHONY: override_dh_strip preconfigure
diff --git a/source.lintian-overrides b/source.lintian-overrides
new file mode 100644 (file)
index 0000000..a690f2f
--- /dev/null
@@ -0,0 +1,6 @@
+# Removed by patch remove-dbtree.diff
+source: source-is-missing clang/www/analyzer/scripts/dbtree.js
+# No longer used (we are using cmake now)
+source: outdated-autotools-helper-file autoconf/config.guess 2011-08-20
+source: outdated-autotools-helper-file autoconf/config.sub 2011-11-02
+
diff --git a/source/format b/source/format
new file mode 100644 (file)
index 0000000..163aaf8
--- /dev/null
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/watch b/watch
new file mode 100644 (file)
index 0000000..eb3378a
--- /dev/null
+++ b/watch
@@ -0,0 +1,4 @@
+version=3
+opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \
+http://llvm.org/releases/download.html (?:.*/)?clang-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian debian/orig-tar.sh
+