diff -Nru llvm-toolchain-6.0-6.0/debian/changelog llvm-toolchain-6.0-6.0/debian/changelog --- llvm-toolchain-6.0-6.0/debian/changelog 2018-05-10 07:02:25.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/changelog 2018-05-22 10:54:13.000000000 +0000 @@ -1,71 +1,10 @@ -llvm-toolchain-6.0 (1:6.0-3ubuntu1) cosmic; urgency=low +llvm-toolchain-6.0 (1:6.0-1ubuntu2~16.04.1~ppa1) xenial; urgency=medium - * Merge from Debian unstable. Remaining changes: - - ubuntu-cosmic-support.patch: Add Ubuntu Cosmic to the distro release list. + * Backport to xenial. (LP: #1772632) + - Don't build the Fuzzer library on powerpc. + - set BINUTILS_GOLD_ARCHS to match 4.0, dropping arm64 and s390x - -- Gianfranco Costamagna Thu, 10 May 2018 09:02:25 +0200 - -llvm-toolchain-6.0 (1:6.0-3) unstable; urgency=medium - - * Remove sysconf_interceptor_bypass_test.cc because it makes - Debian unstable and Ubuntu bionic freeze - * Remove the info text from the manpages (Closes: #894734) - - [ Reshabh Sharma ] - * Enable autopkgtest for amd64 & i386 on the llvm test suite - (Closes: #774294) - - [ Nicholas D Steeves ] - * Fix the lintian error 'privacy-breach-uses-embedded-file' - (Closes: #829361) - - [ Athos Ribeiro ] - * Create symlink to run-clang-tidy-X.Y.py to remove its .py extension - (Closes: #892089) - - [ David Tenty ] - * Migrate to automatic debug packages (Closes: #893267) - - [ Nishanth Aravamudan ] - * debian/patches/install-lldb-sb-headers.patch: Install lldb's - SB headers (pr36630). Thanks to Pavel Labath . - (LP: #1761009) (Closes: #895051) - - -- Sylvestre Ledru Tue, 24 Apr 2018 23:24:44 +0200 - -llvm-toolchain-6.0 (1:6.0.1-1~exp1) experimental; urgency=medium - - * preparation of the new release - * Remove sysconf_interceptor_bypass_test.cc because it makes - Debian unstable and Ubuntu bionic freeze - - [ David Tenty ] - * Migrate to automatic debug packages (Closes: #893267) - - [ Nishanth Aravamudan ] - * debian/patches/install-lldb-sb-headers.patch: Install lldb's - SB headers (pr36630). Thanks to Pavel Labath . - (LP: #1761009) (Closes: #895051) - - -- David Tenty Sat, 31 Mar 2018 21:11:28 +0000 - -llvm-toolchain-6.0 (1:6.0-2) unstable; urgency=medium - - * clang-tidy-6.0: depends on libclang-common-6.0-dev - (Closes: #891999) - * clang-tidy-6.0 also depends on clang-tools-6.0 for, at least - clang-apply-replacements - * Remove a bunch of old unused patches - * Fix debian-watch-uses-insecure-uri as upstream has now https - * Standards-Version updated to 4.1.3 - - -- Sylvestre Ledru Mon, 05 Mar 2018 09:58:10 +0100 - -llvm-toolchain-6.0 (1:6.0-1ubuntu3) cosmic; urgency=medium - - * ubuntu-cosmic-support.patch: Add Ubuntu Cosmic to the distro release list. - - -- Adam Conrad Thu, 03 May 2018 07:33:15 -0600 + -- Timo Aaltonen Tue, 22 May 2018 13:54:13 +0300 llvm-toolchain-6.0 (1:6.0-1ubuntu2) bionic; urgency=medium @@ -1877,4 +1816,3 @@ Thanks to Matthias Klose. -- Sylvestre Ledru Sat, 09 Feb 2013 12:14:10 +0100 - diff -Nru llvm-toolchain-6.0-6.0/debian/clang-tidy-X.Y.links.in llvm-toolchain-6.0-6.0/debian/clang-tidy-X.Y.links.in --- llvm-toolchain-6.0-6.0/debian/clang-tidy-X.Y.links.in 2018-05-04 16:05:21.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/clang-tidy-X.Y.links.in 2018-05-22 10:41:20.000000000 +0000 @@ -1,4 +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/run-clang-tidy.py usr/bin/run-clang-tidy-@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/share/clang/clang-tidy-diff.py usr/bin/clang-tidy-diff-@LLVM_VERSION@.py diff -Nru llvm-toolchain-6.0-6.0/debian/control llvm-toolchain-6.0-6.0/debian/control --- llvm-toolchain-6.0-6.0/debian/control 2018-05-04 16:05:21.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/control 2018-05-22 10:41:20.000000000 +0000 @@ -11,14 +11,13 @@ libjsoncpp-dev, pkg-config, lcov, procps, help2man, zlib1g-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], - libjs-mathjax # ocaml-nox [amd64 arm64 armel armhf i386 ppc64el s390x], # ocaml-findlib [amd64 arm64 armel armhf i386 ppc64el s390x], # libctypes-ocaml-dev [amd64 arm64 armel armhf i386 ppc64el s390x], # dh-ocaml [amd64 arm64 armel armhf i386 ppc64el s390x], Build-Conflicts: oprofile, ocaml, libllvm-3.8-ocaml-dev, libllvm-3.9-ocaml-dev -Standards-Version: 4.1.3 -Homepage: https://www.llvm.org/ +Standards-Version: 4.1.1 +Homepage: http://www.llvm.org/ Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 6.0 Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/6.0 @@ -73,8 +72,7 @@ Package: clang-tidy-6.0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python, - libllvm6.0 (= ${binary:Version}), libclang-common-6.0-dev, - clang-tools-6.0 + libllvm6.0 (= ${binary:Version}) Replaces: clang-modernize-6.0, clang-6.0 (<< 1:6.0~svn250696-1) Breaks: clang-modernize-6.0, clang-6.0 (<< 1:6.0~svn250696-1) Description: clang-based C++ linter tool @@ -86,7 +84,7 @@ Package: clang-6.0-doc Architecture: all Section: doc -Depends: ${shlibs:Depends}, ${misc:Depends}, libjs-mathjax +Depends: ${shlibs:Depends}, ${misc:Depends} Description: C, C++ and Objective-C compiler - Documentation Clang project is a C, C++, Objective C and Objective C++ front-end based on the LLVM compiler. Its goal is to offer a replacement to the @@ -119,6 +117,22 @@ locations with elements within the AST, and other facilities that support Clang-based development tools. +Package: libclang1-6.0-dbg +Architecture: any +Multi-Arch: same +Section: debug +Priority: optional +Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, libclang1-6.0 (= ${binary:Version}) +Description: clang library (debug) + Clang project is a C, C++, Objective C and Objective C++ front-end + based on the LLVM compiler. Its goal is to offer a replacement to the + GNU Compiler Collection (GCC). + . + Clang implements all of the ISO C++ 1998, 11 and 14 standards and also + provides most of the support of C++17. + . + This package contains the debugging symbols. + Package: libclang-6.0-dev Architecture: any Section: libdevel @@ -223,6 +237,22 @@ . This package contains the LLVM runtime library. +Package: libllvm6.0-dbg +Architecture: any +Section: debug +Priority: optional +Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm6.0 (= ${binary:Version}) +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same +Breaks: libllvm3.9v4-dbg +Replaces: libllvm3.9v4-dbg +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-6.0 Architecture: any Suggests: llvm-6.0-doc @@ -400,6 +430,21 @@ . This package contains the LLD runtime library. +# Package: liblld-6.0-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-6.0 (= ${binary:Version}) +# Pre-Depends: ${misc:Pre-Depends} +# Section: debug +# Priority: optional +# 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-6.0-dev Section: libdevel Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel @@ -418,8 +463,8 @@ # ------------- lldb ------------- Package: lldb-6.0 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 ppc64el alpha s390x sparc64 have been removed +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}, libllvm6.0 (= ${binary:Version}), llvm-6.0-dev, python-lldb-6.0 Pre-Depends: ${misc:Pre-Depends} @@ -429,8 +474,8 @@ Project, such as the Clang expression parser and LLVM disassembler. Package: liblldb-6.0 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 ppc64el alpha s390x sparc64 have been removed +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}, libllvm6.0 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: libs @@ -443,10 +488,26 @@ . This package contains the LLDB runtime library. +Package: liblldb-6.0-dbg +Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k powerpcspe sh4 x32 mips mipsel arm64 +# ia64 mips mipsel hurd ppc64el alpha s390x sparc64 powerpc ppc64 have been removed +Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-6.0 (= ${binary:Version}) +Pre-Depends: ${misc:Pre-Depends} +Conflicts: liblldb-7-dbg +Section: debug +Priority: optional +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-6.0 Section: python -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 ppc64el alpha s390x sparc64 have been removed +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}, python, python-six Conflicts: python-lldb-3.8, python-lldb-3.9, python-lldb-x.y Replaces: python-lldb-x.y @@ -462,8 +523,8 @@ Package: liblldb-6.0-dev Section: libdevel -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 ppc64el alpha s390x sparc64 have been removed +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-6.0 (= ${binary:Version}) Replaces: lldb-6.0-dev (<= 1:6.0~svn215195-2) Breaks: lldb-6.0-dev (<< 1:6.0~svn215195-2) diff -Nru llvm-toolchain-6.0-6.0/debian/copyright llvm-toolchain-6.0-6.0/debian/copyright --- llvm-toolchain-6.0-6.0/debian/copyright 2018-05-04 16:05:22.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/copyright 2018-05-22 10:41:20.000000000 +0000 @@ -1,6 +1,6 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: LLVM/Clang -Source: https://llvm.org/releases/download.html +Source: http://llvm.org/releases/download.html Files: * Copyright: 2003-2017 University of Illinois at Urbana-Champaign. @@ -17,7 +17,7 @@ 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 + 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 @@ -227,8 +227,8 @@ 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 + * 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 diff -Nru llvm-toolchain-6.0-6.0/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch llvm-toolchain-6.0-6.0/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch --- llvm-toolchain-6.0-6.0/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/0011-SimplifyCFG-Hoisting-invalidates-metadata.patch 2018-05-22 10:41:20.000000000 +0000 @@ -0,0 +1,84 @@ +From eee68eafa7e8e4ce996b49f5551636639a6c331a Mon Sep 17 00:00:00 2001 +From: David Majnemer +Date: Mon, 29 Aug 2016 17:14:08 +0000 +Subject: [PATCH 11/17] [SimplifyCFG] Hoisting invalidates metadata + +We forgot to remove optimization metadata when performing hosting during +FoldTwoEntryPHINode. + +This fixes PR29163. + +git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279980 91177308-0d34-0410-b5e6-96231b3b80d8 +--- + lib/Transforms/Utils/SimplifyCFG.cpp | 10 ++++++++-- + test/Transforms/SimplifyCFG/PR29163.ll | 31 +++++++++++++++++++++++++++++++ + 2 files changed, 39 insertions(+), 2 deletions(-) + create mode 100644 test/Transforms/SimplifyCFG/PR29163.ll + +diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp +index 0504646..c197317 100644 +--- a/lib/Transforms/Utils/SimplifyCFG.cpp ++++ b/lib/Transforms/Utils/SimplifyCFG.cpp +@@ -2024,14 +2024,20 @@ static bool FoldTwoEntryPHINode(PHINode *PN, const TargetTransformInfo &TTI, + + // Move all 'aggressive' instructions, which are defined in the + // conditional parts of the if's up to the dominating block. +- if (IfBlock1) ++ if (IfBlock1) { ++ for (auto &I : *IfBlock1) ++ I.dropUnknownNonDebugMetadata(); + DomBlock->getInstList().splice(InsertPt->getIterator(), + IfBlock1->getInstList(), IfBlock1->begin(), + IfBlock1->getTerminator()->getIterator()); +- if (IfBlock2) ++ } ++ if (IfBlock2) { ++ for (auto &I : *IfBlock2) ++ I.dropUnknownNonDebugMetadata(); + DomBlock->getInstList().splice(InsertPt->getIterator(), + IfBlock2->getInstList(), IfBlock2->begin(), + IfBlock2->getTerminator()->getIterator()); ++ } + + while (PHINode *PN = dyn_cast(BB->begin())) { + // Change the PHI node into a select instruction. +diff --git a/test/Transforms/SimplifyCFG/PR29163.ll b/test/Transforms/SimplifyCFG/PR29163.ll +new file mode 100644 +index 0000000..65f9090 +--- /dev/null ++++ b/test/Transforms/SimplifyCFG/PR29163.ll +@@ -0,0 +1,31 @@ ++; RUN: opt -S -simplifycfg < %s | FileCheck %s ++target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" ++target triple = "x86_64-unknown-linux-gnu" ++ ++@GV = external constant i64* ++ ++define i64* @test1(i1 %cond, i8* %P) { ++entry: ++ br i1 %cond, label %if, label %then ++ ++then: ++ %bc = bitcast i8* %P to i64* ++ br label %join ++ ++if: ++ %load = load i64*, i64** @GV, align 8, !dereferenceable !0 ++ br label %join ++ ++join: ++ %phi = phi i64* [ %bc, %then ], [ %load, %if ] ++ ret i64* %phi ++} ++ ++; CHECK-LABEL: define i64* @test1( ++; CHECK: %[[bc:.*]] = bitcast i8* %P to i64* ++; CHECK: %[[load:.*]] = load i64*, i64** @GV, align 8{{$}} ++; CHECK: %[[phi:.*]] = select i1 %cond, i64* %[[load]], i64* %[[bc]] ++; CHECK: ret i64* %[[phi]] ++ ++ ++!0 = !{i64 8} +-- +2.10.1 + diff -Nru llvm-toolchain-6.0-6.0/debian/patches/0021-shared-lib-debian.patch llvm-toolchain-6.0-6.0/debian/patches/0021-shared-lib-debian.patch --- llvm-toolchain-6.0-6.0/debian/patches/0021-shared-lib-debian.patch 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/0021-shared-lib-debian.patch 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/0023-link-libopagent.patch llvm-toolchain-6.0-6.0/debian/patches/0023-link-libopagent.patch --- llvm-toolchain-6.0-6.0/debian/patches/0023-link-libopagent.patch 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/0023-link-libopagent.patch 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/0048-Set-html_static_path-_static-everywhere.patch llvm-toolchain-6.0-6.0/debian/patches/0048-Set-html_static_path-_static-everywhere.patch --- llvm-toolchain-6.0-6.0/debian/patches/0048-Set-html_static_path-_static-everywhere.patch 2018-04-24 19:07:40.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/0048-Set-html_static_path-_static-everywhere.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -From: Nicholas D Steeves -Date: Sat, 10 Feb 2018 21:00:55 -0500 -Subject: Set html_static_path = ['_static'] everywhere. - ---- - clang-tools-extra/docs/conf.py | 2 +- - clang/docs/analyzer/conf.py | 2 +- - clang/docs/conf.py | 2 +- - polly/docs/conf.py | 2 +- - 4 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py -index e872c55..69f425a 100644 ---- a/clang-tools-extra/docs/conf.py -+++ b/clang-tools-extra/docs/conf.py -@@ -121,7 +121,7 @@ html_theme = 'haiku' - # Add any paths that contain custom static files (such as style sheets) here, - # relative to this directory. They are copied after the builtin static files, - # so a file named "default.css" will overwrite the builtin "default.css". --html_static_path = [] -+html_static_path = ['_static'] - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. -diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py -index c40af7a..666308d 100644 ---- a/clang/docs/analyzer/conf.py -+++ b/clang/docs/analyzer/conf.py -@@ -121,7 +121,7 @@ html_theme = 'haiku' - # Add any paths that contain custom static files (such as style sheets) here, - # relative to this directory. They are copied after the builtin static files, - # so a file named "default.css" will overwrite the builtin "default.css". --html_static_path = [] -+html_static_path = ['_static'] - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. -diff --git a/clang/docs/conf.py b/clang/docs/conf.py -index a9861cd..d125dc6 100644 ---- a/clang/docs/conf.py -+++ b/clang/docs/conf.py -@@ -121,7 +121,7 @@ html_theme = 'haiku' - # Add any paths that contain custom static files (such as style sheets) here, - # relative to this directory. They are copied after the builtin static files, - # so a file named "default.css" will overwrite the builtin "default.css". --html_static_path = [] -+html_static_path = ['_static'] - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. -diff --git a/polly/docs/conf.py b/polly/docs/conf.py -index 64d3968..aa854ad 100644 ---- a/polly/docs/conf.py -+++ b/polly/docs/conf.py -@@ -127,7 +127,7 @@ except ImportError: - # Add any paths that contain custom static files (such as style sheets) here, - # relative to this directory. They are copied after the builtin static files, - # so a file named "default.css" will overwrite the builtin "default.css". --html_static_path = [] -+html_static_path = ['_static'] - - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. diff -Nru llvm-toolchain-6.0-6.0/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch llvm-toolchain-6.0-6.0/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch --- llvm-toolchain-6.0-6.0/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch 2018-04-24 19:07:40.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/0049-Use-Debian-provided-MathJax-everywhere.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,122 +0,0 @@ -From: Nicholas D Steeves -Date: Sat, 10 Feb 2018 21:02:17 -0500 -Subject: Use Debian-provided MathJax everywhere. - ---- - clang-tools-extra/docs/Doxyfile | 2 +- - clang-tools-extra/docs/conf.py | 3 +++ - clang-tools-extra/docs/doxygen.cfg.in | 2 +- - clang/docs/analyzer/conf.py | 3 +++ - clang/docs/conf.py | 3 +++ - clang/docs/doxygen.cfg.in | 2 +- - docs/doxygen.cfg.in | 2 +- - polly/docs/doxygen.cfg.in | 2 +- - 8 files changed, 14 insertions(+), 5 deletions(-) - -diff --git a/clang-tools-extra/docs/Doxyfile b/clang-tools-extra/docs/Doxyfile -index d674390..1bf4f72 100644 ---- a/clang-tools-extra/docs/Doxyfile -+++ b/clang-tools-extra/docs/Doxyfile -@@ -1206,7 +1206,7 @@ USE_MATHJAX = NO - # MathJax, but it is strongly recommended to install a local copy of MathJax - # before deployment. - --MATHJAX_RELPATH = http://www.mathjax.org/mathjax -+MATHJAX_RELPATH = /usr/share/javascript/mathjax - - # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension - # names that should be enabled during MathJax rendering. -diff --git a/clang-tools-extra/docs/conf.py b/clang-tools-extra/docs/conf.py -index 69f425a..46f8eea 100644 ---- a/clang-tools-extra/docs/conf.py -+++ b/clang-tools-extra/docs/conf.py -@@ -123,6 +123,9 @@ html_theme = 'haiku' - # so a file named "default.css" will overwrite the builtin "default.css". - html_static_path = ['_static'] - -+# Use Debian-provided MathJax -+mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' -+ - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. - #html_last_updated_fmt = '%b %d, %Y' -diff --git a/clang-tools-extra/docs/doxygen.cfg.in b/clang-tools-extra/docs/doxygen.cfg.in -index 6dbf6db..da44cfc 100644 ---- a/clang-tools-extra/docs/doxygen.cfg.in -+++ b/clang-tools-extra/docs/doxygen.cfg.in -@@ -1438,7 +1438,7 @@ MATHJAX_FORMAT = HTML-CSS - # The default value is: http://cdn.mathjax.org/mathjax/latest. - # This tag requires that the tag USE_MATHJAX is set to YES. - --MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -+MATHJAX_RELPATH = /usr/share/javascript/mathjax - - # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax - # extension names that should be enabled during MathJax rendering. For example -diff --git a/clang/docs/analyzer/conf.py b/clang/docs/analyzer/conf.py -index 666308d..2881bcc 100644 ---- a/clang/docs/analyzer/conf.py -+++ b/clang/docs/analyzer/conf.py -@@ -123,6 +123,9 @@ html_theme = 'haiku' - # so a file named "default.css" will overwrite the builtin "default.css". - html_static_path = ['_static'] - -+# Use Debian-provided MathJax -+mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' -+ - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. - #html_last_updated_fmt = '%b %d, %Y' -diff --git a/clang/docs/conf.py b/clang/docs/conf.py -index d125dc6..2ce1a91 100644 ---- a/clang/docs/conf.py -+++ b/clang/docs/conf.py -@@ -123,6 +123,9 @@ html_theme = 'haiku' - # so a file named "default.css" will overwrite the builtin "default.css". - html_static_path = ['_static'] - -+# Use Debian-provided MathJax -+mathjax_path = '/usr/share/javascript/mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML' -+ - # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, - # using the given strftime format. - #html_last_updated_fmt = '%b %d, %Y' -diff --git a/clang/docs/doxygen.cfg.in b/clang/docs/doxygen.cfg.in -index 13ed722..77bed6e 100644 ---- a/clang/docs/doxygen.cfg.in -+++ b/clang/docs/doxygen.cfg.in -@@ -1432,7 +1432,7 @@ MATHJAX_FORMAT = HTML-CSS - # The default value is: http://cdn.mathjax.org/mathjax/latest. - # This tag requires that the tag USE_MATHJAX is set to YES. - --MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -+MATHJAX_RELPATH = /usr/share/javascript/mathjax - - # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax - # extension names that should be enabled during MathJax rendering. For example -diff --git a/docs/doxygen.cfg.in b/docs/doxygen.cfg.in -index e3c7f47..dcdade1 100644 ---- a/docs/doxygen.cfg.in -+++ b/docs/doxygen.cfg.in -@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT = HTML-CSS - # The default value is: http://cdn.mathjax.org/mathjax/latest. - # This tag requires that the tag USE_MATHJAX is set to YES. - --MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -+MATHJAX_RELPATH = /usr/share/javascript/mathjax - - # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax - # extension names that should be enabled during MathJax rendering. For example -diff --git a/polly/docs/doxygen.cfg.in b/polly/docs/doxygen.cfg.in -index 36786aa..26a8984 100644 ---- a/polly/docs/doxygen.cfg.in -+++ b/polly/docs/doxygen.cfg.in -@@ -1433,7 +1433,7 @@ MATHJAX_FORMAT = HTML-CSS - # The default value is: http://cdn.mathjax.org/mathjax/latest. - # This tag requires that the tag USE_MATHJAX is set to YES. - --MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest -+MATHJAX_RELPATH = /usr/share/javascript/mathjax - - # The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax - # extension names that should be enabled during MathJax rendering. For example diff -Nru llvm-toolchain-6.0-6.0/debian/patches/31-powerpcspe.diff llvm-toolchain-6.0-6.0/debian/patches/31-powerpcspe.diff --- llvm-toolchain-6.0-6.0/debian/patches/31-powerpcspe.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/31-powerpcspe.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/34-powerpc-no-altivec.diff llvm-toolchain-6.0-6.0/debian/patches/34-powerpc-no-altivec.diff --- llvm-toolchain-6.0-6.0/debian/patches/34-powerpc-no-altivec.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/34-powerpc-no-altivec.diff 2018-05-22 10:41:20.000000000 +0000 @@ -0,0 +1,24 @@ +Description: Make sure PowerPC doesn't default to altivec on +Author: Adam Conrad +Author: Peter Michael Green +Forwarded: no +Reviewed-By: Colin Watson + +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 -Nru llvm-toolchain-6.0-6.0/debian/patches/clang-apply-replacements.diff llvm-toolchain-6.0-6.0/debian/patches/clang-apply-replacements.diff --- llvm-toolchain-6.0-6.0/debian/patches/clang-apply-replacements.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/clang-apply-replacements.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 CARPathOrErr = +- findProgramByName("clang-apply-replacements"); ++ findProgramByName("clang-apply-replacements-6.0"); + 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-6.0"); + 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-6.0', + help='path to clang-apply-replacements binary') + parser.add_argument('-checks', default=None, + help='checks filter, when not specified, use clang-tidy ' diff -Nru llvm-toolchain-6.0-6.0/debian/patches/clang-default-to-i686-on-32bit-x86-targets.patch llvm-toolchain-6.0-6.0/debian/patches/clang-default-to-i686-on-32bit-x86-targets.patch --- llvm-toolchain-6.0-6.0/debian/patches/clang-default-to-i686-on-32bit-x86-targets.patch 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/clang-default-to-i686-on-32bit-x86-targets.patch 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/compiler-rt-i586.diff llvm-toolchain-6.0-6.0/debian/patches/compiler-rt-i586.diff --- llvm-toolchain-6.0-6.0/debian/patches/compiler-rt-i586.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/compiler-rt-i586.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/disable-execinfo-usage.diff llvm-toolchain-6.0-6.0/debian/patches/disable-execinfo-usage.diff --- llvm-toolchain-6.0-6.0/debian/patches/disable-execinfo-usage.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/disable-execinfo-usage.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/follow-parallel-var.diff llvm-toolchain-6.0-6.0/debian/patches/follow-parallel-var.diff --- llvm-toolchain-6.0-6.0/debian/patches/follow-parallel-var.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/follow-parallel-var.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/force-link-pass.o.diff llvm-toolchain-6.0-6.0/debian/patches/force-link-pass.o.diff --- llvm-toolchain-6.0-6.0/debian/patches/force-link-pass.o.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/force-link-pass.o.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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 -Nru llvm-toolchain-6.0-6.0/debian/patches/lld-arg-cmake-issue.diff llvm-toolchain-6.0-6.0/debian/patches/lld-arg-cmake-issue.diff --- llvm-toolchain-6.0-6.0/debian/patches/lld-arg-cmake-issue.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/lld-arg-cmake-issue.diff 2018-05-22 10:41:20.000000000 +0000 @@ -0,0 +1,141 @@ +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/cmake/modules/AddLLD.cmake +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/cmake/modules/AddLLD.cmake ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/cmake/modules/AddLLD.cmake +@@ -1,5 +1,5 @@ + macro(add_lld_library name) +- add_llvm_library(${name} ${ARGN}) ++ llvm_add_library(${name} ${ARGN}) + set_target_properties(${name} PROPERTIES FOLDER "lld libraries") + endmacro(add_lld_library) + +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Config/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Config/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Config/CMakeLists.txt +@@ -4,6 +4,6 @@ + ADDITIONAL_HEADER_DIRS + ${LLD_INCLUDE_DIR}/lld/Config + +- LINK_LIBS +- LLVMSupport ++ LINK_COMPONENTS ++ Support + ) +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Core/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Core/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Core/CMakeLists.txt +@@ -12,6 +12,6 @@ + ADDITIONAL_HEADER_DIRS + ${LLD_INCLUDE_DIR}/lld/Core + +- LINK_LIBS +- LLVMSupport ++ LINK_COMPONENTS ++ Support + ) +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Driver/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/Driver/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/Driver/CMakeLists.txt +@@ -8,15 +8,17 @@ + ADDITIONAL_HEADER_DIRS + ${LLD_INCLUDE_DIR}/lld/Driver + ++ LINK_COMPONENTS ++ Object ++ Option ++ Support ++ + LINK_LIBS + lldConfig + lldMachO + lldCore + lldReaderWriter + lldYAML +- LLVMObject +- LLVMOption +- LLVMSupport + ) + + add_dependencies(lldDriver DriverOptionsTableGen) +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/CMakeLists.txt +@@ -11,9 +11,11 @@ + ADDITIONAL_HEADER_DIRS + ${LLD_INCLUDE_DIR}/lld/ReaderWriter + ++ LINK_COMPONENTS ++ Object ++ Support ++ + LINK_LIBS + lldCore + lldYAML +- LLVMObject +- LLVMSupport + ) +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/MachO/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/MachO/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/MachO/CMakeLists.txt +@@ -18,13 +18,16 @@ + StubsPass.cpp + TLVPass.cpp + WriterMachO.cpp ++ ++ LINK_COMPONENTS ++ DebugInfoDWARF ++ Object ++ Support ++ Demangle ++ + LINK_LIBS + lldCore + lldYAML +- LLVMDebugInfoDWARF +- LLVMObject +- LLVMSupport +- LLVMDemangle + ${PTHREAD_LIB} + ) + +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/YAML/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/lib/ReaderWriter/YAML/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/lib/ReaderWriter/YAML/CMakeLists.txt +@@ -1,6 +1,9 @@ + add_lld_library(lldYAML + ReaderWriterYAML.cpp ++ ++ LINK_COMPONENTS ++ Support ++ + LINK_LIBS + lldCore +- LLVMSupport + ) +Index: llvm-toolchain-snapshot_4.0~svn290969/lld/tools/lld/CMakeLists.txt +=================================================================== +--- llvm-toolchain-snapshot_4.0~svn290969.orig/lld/tools/lld/CMakeLists.txt ++++ llvm-toolchain-snapshot_4.0~svn290969/lld/tools/lld/CMakeLists.txt +@@ -1,12 +1,15 @@ ++set(LLVM_LINK_COMPONENTS ++ Support ++ ) ++ + add_lld_tool(lld + lld.cpp + ) + + target_link_libraries(lld + lldDriver + lldCOFF + lldELF +- LLVMSupport + ) + + install(TARGETS lld diff -Nru llvm-toolchain-6.0-6.0/debian/patches/pthread-link.diff llvm-toolchain-6.0-6.0/debian/patches/pthread-link.diff --- llvm-toolchain-6.0-6.0/debian/patches/pthread-link.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/pthread-link.diff 2018-05-22 10:41:20.000000000 +0000 @@ -0,0 +1,18 @@ +Index: llvm-toolchain-4.0-4.0~svn292009/clang/tools/libclang/CMakeLists.txt +1;4601;0c=================================================================== +--- llvm-toolchain-4.0-4.0~svn292009.orig/clang/tools/libclang/CMakeLists.txt ++++ llvm-toolchain-4.0-4.0~svn292009/clang/tools/libclang/CMakeLists.txt +@@ -56,6 +56,13 @@ endif () + find_library(DL_LIBRARY_PATH dl) + if (DL_LIBRARY_PATH) + list(APPEND LIBS dl) ++ ++endif() ++if (PTHREAD_LIB) ++ # libpthreads overrides some standard library symbols, so main ++ # executable must be linked with it in order to provide consistent ++ # API for all shared libaries loaded by this executable. ++ list(APPEND LIBS ${PTHREAD_LIB}) + endif() + + option(LIBCLANG_BUILD_STATIC diff -Nru llvm-toolchain-6.0-6.0/debian/patches/remove-test-freezing.diff llvm-toolchain-6.0-6.0/debian/patches/remove-test-freezing.diff --- llvm-toolchain-6.0-6.0/debian/patches/remove-test-freezing.diff 2018-04-06 15:08:08.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/remove-test-freezing.diff 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -Index: llvm-toolchain-snapshot_7~svn323616/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc -=================================================================== ---- llvm-toolchain-snapshot_7~svn323616.orig/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc -+++ llvm-toolchain-snapshot_7~svn323616/compiler-rt/test/sanitizer_common/TestCases/Linux/sysconf_interceptor_bypass_test.cc -@@ -1,27 +0,0 @@ --// RUN: %clangxx -O2 %s -o %t && %run %t 2>&1 | FileCheck %s -- --// XFAIL: android -- --#include -- --// getauxval() used instead of sysconf() in GetPageSize() is defined starting --// glbc version 2.16. --#if defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16) --extern "C" long sysconf(int name) { -- fprintf(stderr, "sysconf wrapper called\n"); -- return 0; --} --#endif // defined(__GLIBC_PREREQ) && __GLIBC_PREREQ(2, 16) -- --int main() { -- // All we need to check is that the sysconf() interceptor defined above was -- // not called. Should it get called, it will crash right there, any -- // instrumented code executed before sanitizer init is finished will crash -- // accessing non-initialized sanitizer internals. Even if it will not crash -- // in some configuration, it should never be called anyway. -- fprintf(stderr, "Passed\n"); -- // CHECK-NOT: sysconf wrapper called -- // CHECK: Passed -- // CHECK-NOT: sysconf wrapper called -- return 0; --} diff -Nru llvm-toolchain-6.0-6.0/debian/patches/scan-build-py-default.diff llvm-toolchain-6.0-6.0/debian/patches/scan-build-py-default.diff --- llvm-toolchain-6.0-6.0/debian/patches/scan-build-py-default.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/scan-build-py-default.diff 2018-05-22 10:41:20.000000000 +0000 @@ -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='', +- default="compile_commands.json", +- help="""The JSON compilation database.""") +- +- parser.add_argument( +- '--output', '-o', +- metavar='', +- 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='', +- 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 -Nru llvm-toolchain-6.0-6.0/debian/patches/series llvm-toolchain-6.0-6.0/debian/patches/series --- llvm-toolchain-6.0-6.0/debian/patches/series 2018-05-10 07:02:25.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/series 2018-05-22 10:41:20.000000000 +0000 @@ -47,8 +47,4 @@ silent-llvm-isel-fuzzer.diff test-keep-alive.diff sparc64-add-missing-tls-get-addr.diff -remove-test-freezing.diff install-lldb-sb-headers.patch -0048-Set-html_static_path-_static-everywhere.patch -0049-Use-Debian-provided-MathJax-everywhere.patch -ubuntu-cosmic-support.patch diff -Nru llvm-toolchain-6.0-6.0/debian/patches/silent-amdgpu-test-failing.diff llvm-toolchain-6.0-6.0/debian/patches/silent-amdgpu-test-failing.diff --- llvm-toolchain-6.0-6.0/debian/patches/silent-amdgpu-test-failing.diff 1970-01-01 00:00:00.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/silent-amdgpu-test-failing.diff 2018-05-22 10:41:20.000000000 +0000 @@ -0,0 +1,46 @@ +Index: llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll +=================================================================== +--- llvm-toolchain-snapshot_5.0~svn292012.orig/test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll ++++ llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata1.ll +@@ -2,5 +2,6 @@ + ; check llc does not crash for invalid opencl version metadata + + ; CHECK: { amd.MDVersion: [ 2, 0 ] } ++; XFAIL: * + + !opencl.ocl.version = !{} +Index: llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll +=================================================================== +--- llvm-toolchain-snapshot_5.0~svn292012.orig/test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll ++++ llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata2.ll +@@ -2,6 +2,7 @@ + ; check llc does not crash for invalid opencl version metadata + + ; CHECK: { amd.MDVersion: [ 2, 0 ] } ++; XFAIL: * + + !opencl.ocl.version = !{!0} + !0 = !{} +Index: llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll +=================================================================== +--- llvm-toolchain-snapshot_5.0~svn292012.orig/test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll ++++ llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/invalid-opencl-version-metadata3.ll +@@ -2,6 +2,7 @@ + ; check llc does not crash for invalid opencl version metadata + + ; CHECK: { amd.MDVersion: [ 2, 0 ] } ++; XFAIL: * + + !opencl.ocl.version = !{!0} + !0 = !{i32 1} +Index: llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/runtime-metadata.ll +=================================================================== +--- llvm-toolchain-snapshot_5.0~svn292012.orig/test/CodeGen/AMDGPU/runtime-metadata.ll ++++ llvm-toolchain-snapshot_5.0~svn292012/test/CodeGen/AMDGPU/runtime-metadata.ll +@@ -1,5 +1,6 @@ + ; RUN: llc -mtriple=amdgcn--amdhsa -filetype=obj -o - < %s | llvm-readobj -amdgpu-runtime-metadata | FileCheck %s + ; RUN: llc -mtriple=amdgcn--amdhsa -filetype=obj -amdgpu-dump-rtmd -amdgpu-check-rtmd-parser %s -o - 2>&1 | FileCheck --check-prefix=CHECK --check-prefix=PARSER %s ++; XFAIL: * + + %struct.A = type { i8, float } + %opencl.image1d_t = type opaque diff -Nru llvm-toolchain-6.0-6.0/debian/patches/ubuntu-cosmic-support.patch llvm-toolchain-6.0-6.0/debian/patches/ubuntu-cosmic-support.patch --- llvm-toolchain-6.0-6.0/debian/patches/ubuntu-cosmic-support.patch 2018-05-03 13:33:11.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/patches/ubuntu-cosmic-support.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -Description: Add Ubuntu Cosmic to the distro release list. -Author: Adam Conrad <adconrad@ubuntu.com> -Last-Update: 2018-05-03 - ---- llvm-toolchain-6.0-6.0.orig/clang/include/clang/Driver/Distro.h -+++ llvm-toolchain-6.0-6.0/clang/include/clang/Driver/Distro.h -@@ -61,6 +61,7 @@ public: - UbuntuZesty, - UbuntuArtful, - UbuntuBionic, -+ UbuntuCosmic, - UnknownDistro - }; - -@@ -114,7 +115,7 @@ public: - } - - bool IsUbuntu() const { -- return DistroVal >= UbuntuHardy && DistroVal <= UbuntuBionic; -+ return DistroVal >= UbuntuHardy && DistroVal <= UbuntuCosmic; - } - - bool IsAlpineLinux() const { ---- llvm-toolchain-6.0-6.0.orig/clang/lib/Driver/Distro.cpp -+++ llvm-toolchain-6.0-6.0/clang/lib/Driver/Distro.cpp -@@ -49,6 +49,7 @@ static Distro::DistroType DetectDistro(v - .Case("zesty", Distro::UbuntuZesty) - .Case("artful", Distro::UbuntuArtful) - .Case("bionic", Distro::UbuntuBionic) -+ .Case("cosmic", Distro::UbuntuCosmic) - .Default(Distro::UnknownDistro); - if (Version != Distro::UnknownDistro) - return Version; diff -Nru llvm-toolchain-6.0-6.0/debian/README llvm-toolchain-6.0-6.0/debian/README --- llvm-toolchain-6.0-6.0/debian/README 2018-05-04 16:05:21.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/README 2018-05-22 10:41:20.000000000 +0000 @@ -2,7 +2,7 @@ ============================== The debian package for each LLVM point release is maintained as a git branch. -For example, the 6.0 release lives at in the "6.0" branch. +For example, the 4.0 release lives at in the "4.0" branch. The current snapshot release is maintained in the "snapshot" branch. @@ -50,24 +50,20 @@ ================================================================== When using orig-tar.sh, if you need to retrieve a specific branch, you can pass -the branch name as the first argument. For example, to get the 6.0 release +the branch name as the first argument. For example, to get the 4.0 release branch at - http://llvm.org/svn/llvm-project/{llvm,...}/branches/release_60 + http://llvm.org/svn/llvm-project/{llvm,...}/branches/release_40 you should use, - $ sh 6.0/debian/orig-tar.sh release_60 + $ sh 4.0/debian/orig-tar.sh release_40 To retrieve a specific release candidate, you can pass the branch name as the first argument, and the tag rc number as the second argument. For example, to -get the 6.0.1 release candidate rc3 at - http://llvm.org/svn/llvm-project/{llvm,...}/tags/RELEASE_601/rc3 +get the 4.0.1 release candidate rc3 at + http://llvm.org/svn/llvm-project/{llvm,...}/tags/RELEASE_401/rc3 you should use, - $ sh 6.0/debian/orig-tar.sh RELEASE_601 rc3 6.0.1 - -For a stable release, the syntax is: - - $ sh 6.0/debian/orig-tar.sh RELEASE_600 final 6.0 + $ sh 4.0/debian/orig-tar.sh RELEASE_401 rc3 4.0.1 Additional maintainer scripts ============================= diff -Nru llvm-toolchain-6.0-6.0/debian/rules llvm-toolchain-6.0-6.0/debian/rules --- llvm-toolchain-6.0-6.0/debian/rules 2018-05-10 07:02:25.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/rules 2018-05-22 10:54:13.000000000 +0000 @@ -21,7 +21,6 @@ endif VENDOR=$(shell lsb_release -is) -DH_VERSION := $(shell dpkg -s debhelper | grep '^Version' | awk '{print $$2}') DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) @@ -84,7 +83,7 @@ control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev' endif -BINUTILS_GOLD_ARCHS := amd64 arm64 armhf i386 powerpcspe ppc64 ppc64el sparc sparc64 x32 s390x +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) @@ -174,6 +173,9 @@ ifeq (,$(filter $(DEB_HOST_ARCH_OS),linux)) LIBFUZZER_ENABLE=no endif +ifneq (,$(filter $(DEB_HOST_ARCH), powerpc)) + LIBFUZZER_ENABLE=no +endif %: @@ -339,14 +341,14 @@ cd $$d && rm -f underscore.js && ln -s /usr/share/javascript/underscore/underscore.js && cd -; \ done - mkdir -p debian/man/ - help2man --no-info --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 - help2man --no-info --version-string=$(LLVM_VERSION) clang/tools/clang-format/clang-format-diff.py > debian/man/clang-format-diff-$(LLVM_VERSION).1 + mkdir debian/man/ + help2man --version-string=$(LLVM_VERSION) clang/tools/scan-view/bin/scan-view > debian/man/scan-view-$(LLVM_VERSION).1 + help2man --version-string=$(LLVM_VERSION) 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++ clang-tblgen clang-check clang-cpp clang-import-test clang-tidy clang-apply-replacements clang-rename clang-query pp-trace sancov lli modularize clang-include-fixer find-all-symbols clang-reorder-fields ld.lld llvm-tblgen clang-change-namespace clang-offload-bundler"; \ 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) $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ + LD_LIBRARY_PATH=$(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/:/usr/lib/*/libfakeroot help2man --version-string=$(LLVM_VERSION) $(TARGET_BUILD)/bin/$$f > debian/man/$$f-$(LLVM_VERSION).1; \ done override_dh_auto_install: @@ -502,12 +504,9 @@ override_dh_strip: : # running out of diskspace on the buildds find $(TARGET_BUILD) -name '*.o' -o -name '*.a' | xargs -r rm -f -ifeq (0, $(strip $(shell dpkg --compare-versions $(DH_VERSION) ge 9.20160114; echo $$?))) - : # If we don't have the right version of debhelper, don't run the option - dh_strip -p libclang$(SONAME_EXT)-$(LLVM_VERSION) --dbgsym-migration='libclang$(SONAME_EXT)-$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' - dh_strip -p libllvm$(LLVM_VERSION) --dbgsym-migration='libllvm$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' - dh_strip -p liblldb-$(LLVM_VERSION) --dbgsym-migration='liblldb-$(LLVM_VERSION)-dbg (<< 1:6.0-2~)' -endif + 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 @@ -536,8 +535,7 @@ # LLVM tests ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK))) -# logs the output to check-llvm_build_log.txt for validation through autopkgtest - $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm | tee check-llvm_build_log.txt + $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm else $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-llvm || true endif @@ -554,7 +552,11 @@ endif # Sanitizer +ifneq (,$(filter $(DEB_HOST_ARCH), amd64)) + @echo Not running the Sanitizer tests on the Ubuntu buildds, hanging ... +else $(MAKE) $(NJOBS) -C $(TARGET_BUILD) check-sanitizer || true +endif # LLDB tests ifeq (,$(filter $(DEB_HOST_ARCH), $(LLDB_DISABLE_ARCHS) armhf armel)) diff -Nru llvm-toolchain-6.0-6.0/debian/tests/control llvm-toolchain-6.0-6.0/debian/tests/control --- llvm-toolchain-6.0-6.0/debian/tests/control 2018-04-24 19:07:40.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -Tests: llvm -Depends: @ -Restrictions: build-needed - diff -Nru llvm-toolchain-6.0-6.0/debian/tests/llvm llvm-toolchain-6.0-6.0/debian/tests/llvm --- llvm-toolchain-6.0-6.0/debian/tests/llvm 2018-04-24 19:07:40.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/tests/llvm 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -#!/bin/sh -# Checks llvm build passing on architectiures known to have 100% tests workings - -if grep -q "Unexpected Failure" check-llvm_build_log.txt; then - exit 1 -else - echo "build OK" -f1 -rm check-llvm_build_log.txt diff -Nru llvm-toolchain-6.0-6.0/debian/watch llvm-toolchain-6.0-6.0/debian/watch --- llvm-toolchain-6.0-6.0/debian/watch 2018-05-04 16:05:22.000000000 +0000 +++ llvm-toolchain-6.0-6.0/debian/watch 2018-05-22 10:41:20.000000000 +0000 @@ -1,4 +1,4 @@ version=3 opts=uversionmangle=s/\.(tar.*|tgz|zip|gz|bz2)$//i,dversionmangle=s/[-.+~]?(cvs|svn|git|snapshot|pre|hg)(.*)$//i,pasv \ -https://llvm.org/releases/download.html (?:.*/)?clang-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian debian/orig-tar.sh +http://llvm.org/releases/download.html (?:.*/)?clang-?_?([\d+\.]+|\d+)\.(tar.*|tgz|zip|gz|bz2|) debian debian/orig-tar.sh