From 7e0e54429e065a9f5b250e481dffa5c2711fe905 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 13:10:57 +0200 Subject: [PATCH 01/14] add missing break/replace --- debian/control | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control b/debian/control index e86cf031..c399a48f 100644 --- a/debian/control +++ b/debian/control @@ -297,6 +297,8 @@ Description: Modular compiler and toolchain technologies, libraries and headers Package: libllvm-lto-7-dev Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Breaks: llvm-7-dev (<< 7-3) +Replaces: llvm-7-dev (<< 7-3) Description: Modular compiler and toolchain technologies, LTO lib LLVM is a collection of libraries and tools that make it easy to build compilers, optimizers, just-in-time code generators, and many other From 8b9da86dfed7dba1672e4389dead71798789eab8 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 13:23:05 +0200 Subject: [PATCH 02/14] new package --- debian/qualify-clang.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 7d350ad1..191f5064 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -3,8 +3,8 @@ set -e VERSION=7 -DETAILED_VERSION=7~+rc1-1~exp3 -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb" +DETAILED_VERSION=7-3 +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm-lto-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo dpkg -i $LIST" L="" From 942eec2f4b287e546356b63210dc45edeb224fcd Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 14:37:54 +0200 Subject: [PATCH 03/14] add a new test --- debian/qualify-clang.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 191f5064..0f861a19 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -147,6 +147,10 @@ fi clang-$VERSION -fuse-ld=lld -O2 foo.c main.c -o foo ./foo > /dev/null +clang-$VERSION -fuse-ld=lld -flto -O2 foo.c main.c -o foo +./foo > /dev/null +exit 0 + clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo ./foo > /dev/null From 3609b7b65177e745b33c6e4f9a38932167d3f2e1 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 14:39:02 +0200 Subject: [PATCH 04/14] add the libllvm-lto-7-dev dep --- debian/control | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/control b/debian/control index c399a48f..0b29d9e8 100644 --- a/debian/control +++ b/debian/control @@ -276,7 +276,8 @@ Description: Modular compiler and toolchain technologies, IR interpreter Package: llvm-7-dev Architecture: any Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, - llvm-7 (= ${binary:Version}), libllvm7 (= ${binary:Version}), libtinfo-dev + llvm-7 (= ${binary:Version}), libllvm7 (= ${binary:Version}), libtinfo-dev, + libllvm-lto-7-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 From 82ef1354de2838e91ba0b83f6b81bf1079460441 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 14:40:22 +0200 Subject: [PATCH 05/14] * remove dep from lld to llvm-7-dev because lld doesn't use LLVM LTO * remove old Replaces/Breaks --- debian/changelog | 4 +++- debian/control | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index adaabd84..2164b7e3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,7 +3,9 @@ llvm-toolchain-7 (1:7-3) unstable; urgency=medium * Fix a syntax issue in a scan-build patch * Fix the autopkgtest script (no gcc in the test) * Create a new llvm-lto-7-dev package to ship lto - This will avoid to download llvm-dev to get lld + * remove dep from lld to llvm-7-dev because lld + doesn't use LLVM LTO + * remove old Replaces/Breaks -- Sylvestre Ledru Fri, 21 Sep 2018 22:48:47 +0200 diff --git a/debian/control b/debian/control index 0b29d9e8..6d3cb7ec 100644 --- a/debian/control +++ b/debian/control @@ -255,8 +255,6 @@ Description: Modular compiler and toolchain technologies Package: llvm-7-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 @@ -278,7 +276,6 @@ Architecture: any Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, llvm-7 (= ${binary:Version}), libllvm7 (= ${binary:Version}), libtinfo-dev, libllvm-lto-7-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 From a54bc66d06b6244d97ff96c72f08e06bb668c48c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 14:40:47 +0200 Subject: [PATCH 06/14] Standards-Version: 4.2.1 --- debian/changelog | 1 + debian/control | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2164b7e3..a4174cda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ llvm-toolchain-7 (1:7-3) unstable; urgency=medium * remove dep from lld to llvm-7-dev because lld doesn't use LLVM LTO * remove old Replaces/Breaks + * Standards-Version: 4.2.1 -- Sylvestre Ledru Fri, 21 Sep 2018 22:48:47 +0200 diff --git a/debian/control b/debian/control index 6d3cb7ec..d0a1d1df 100644 --- a/debian/control +++ b/debian/control @@ -18,7 +18,7 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, # 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.2.0 +Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ Vcs-Git: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain.git -b 7 Vcs-Browser: https://salsa.debian.org/pkg-llvm-team/llvm-toolchain/tree/7 From eac6d99183dac11be498a394ca96711b60bd4925 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 14:43:13 +0200 Subject: [PATCH 07/14] bring back ocaml --- debian/control | 52 +++++++++++++++++++++++++------------------------- debian/rules | 8 ++++---- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/debian/control b/debian/control index d0a1d1df..b74bfd5e 100644 --- a/debian/control +++ b/debian/control @@ -13,10 +13,10 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, doxygen, gfortran -# 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], + 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.2.1 Homepage: https://www.llvm.org/ @@ -323,28 +323,28 @@ Description: Modular compiler and toolchain technologies, tools . This package provides tools for testing. -# Package: libllvm-7-ocaml-dev -# Section: ocaml -# Architecture: amd64 arm64 armel armhf i386 ppc64el s390x -# Suggests: llvm-7-doc -# Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-7-dev (= ${binary:Version}) -# Replaces: libllvm-x.y-ocaml-dev -# Conflicts: libllvm-x.y-ocaml-dev -# Provides: ${ocaml:Provides}, libllvm-x.y-ocaml-dev -# 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: libllvm-7-ocaml-dev +Section: ocaml +Architecture: amd64 arm64 armel armhf i386 ppc64el s390x +Suggests: llvm-7-doc +Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}, llvm-7-dev (= ${binary:Version}) +Replaces: libllvm-x.y-ocaml-dev +Conflicts: libllvm-x.y-ocaml-dev +Provides: ${ocaml:Provides}, libllvm-x.y-ocaml-dev +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-7-doc Section: doc diff --git a/debian/rules b/debian/rules index c8b4de02..05a32d68 100755 --- a/debian/rules +++ b/debian/rules @@ -188,12 +188,12 @@ OCAML_ENABLE= no OCAML_ARCHS := amd64 arm64 armel armhf i386 ppc64el s390x 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 + OCAML_ENABLE=yes + OCAML_STDLIB_DIR ?= $(shell ocamlc -where) + DH_OPTIONS=--with ocaml endif # Force the deactivation of ocaml until the transition is done -OCAML_ENABLE=no +#OCAML_ENABLE=no LIBFUZZER_ENABLE=yes ifeq (,$(filter $(DEB_HOST_ARCH_OS),linux)) From a5b8ca7299a3bc494ce9618a05590c410d3d67e0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 17:40:06 +0200 Subject: [PATCH 08/14] fix a typo --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index b74bfd5e..2d057470 100644 --- a/debian/control +++ b/debian/control @@ -12,7 +12,7 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, lcov, procps, help2man, zlib1g-dev, g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32], libjs-mathjax, - doxygen, gfortran + doxygen, gfortran, 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], From 6d365c027bc42513909ff4f6a457dd7ead9ead9c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 25 Sep 2018 23:48:39 +0100 Subject: [PATCH 09/14] remove the lto package, not a good idea --- debian/changelog | 1 - debian/control | 17 ++--------------- debian/libllvm-lto-X.Y-dev.install.in | 1 - debian/llvm-X.Y-dev.install.in | 1 + 4 files changed, 3 insertions(+), 17 deletions(-) delete mode 100644 debian/libllvm-lto-X.Y-dev.install.in diff --git a/debian/changelog b/debian/changelog index a4174cda..2d867ff5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,7 +2,6 @@ llvm-toolchain-7 (1:7-3) unstable; urgency=medium * Fix a syntax issue in a scan-build patch * Fix the autopkgtest script (no gcc in the test) - * Create a new llvm-lto-7-dev package to ship lto * remove dep from lld to llvm-7-dev because lld doesn't use LLVM LTO * remove old Replaces/Breaks diff --git a/debian/control b/debian/control index 2d057470..090139a4 100644 --- a/debian/control +++ b/debian/control @@ -274,8 +274,7 @@ Description: Modular compiler and toolchain technologies, IR interpreter Package: llvm-7-dev Architecture: any Depends: ${shlibs:Depends}, libffi-dev (>= 3.0.9), ${misc:Depends}, - llvm-7 (= ${binary:Version}), libllvm7 (= ${binary:Version}), libtinfo-dev, - libllvm-lto-7-dev + llvm-7 (= ${binary:Version}), libllvm7 (= ${binary:Version}), libtinfo-dev 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 @@ -292,18 +291,6 @@ Description: Modular compiler and toolchain technologies, libraries and headers This package provides the libraries and headers to develop applications using llvm. -Package: libllvm-lto-7-dev -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Breaks: llvm-7-dev (<< 7-3) -Replaces: llvm-7-dev (<< 7-3) -Description: Modular compiler and toolchain technologies, LTO lib - 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 provides the LTO libraries. - Package: llvm-7-tools Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, python, @@ -391,7 +378,7 @@ Description: Modular compiler and toolchain technologies, examples Package: lld-7 Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 # ia64 hurd powerpc have been removed -Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}), libllvm-lto-7-dev (= ${binary:Version}) +Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Description: LLVM-based linker LLD is a new, high-performance linker. It is built as a set of reusable diff --git a/debian/libllvm-lto-X.Y-dev.install.in b/debian/libllvm-lto-X.Y-dev.install.in deleted file mode 100644 index 4eeb014f..00000000 --- a/debian/libllvm-lto-X.Y-dev.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/llvm-@LLVM_VERSION@/lib/libLTO.* diff --git a/debian/llvm-X.Y-dev.install.in b/debian/llvm-X.Y-dev.install.in index 25d65a75..f367b8e9 100644 --- a/debian/llvm-X.Y-dev.install.in +++ b/debian/llvm-X.Y-dev.install.in @@ -4,6 +4,7 @@ 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@/lib/TestPlugin.so usr/lib/llvm-@LLVM_VERSION@/include/llvm/ usr/include/llvm-@LLVM_VERSION@/ From 03191bf7d4970aba792115403d6d59c52ba1f848 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Sep 2018 14:34:59 +0100 Subject: [PATCH 10/14] Backport a fix to improve scan-build code error. Thanks to Roman Lebedev for the fix(Closes: #909662) --- debian/changelog | 7 +++ ...ild-if-status-bugs-is-passed-don-t-f.patch | 46 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 54 insertions(+) create mode 100644 debian/patches/0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch diff --git a/debian/changelog b/debian/changelog index 2d867ff5..4f1d4612 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-7 (1:7-4) unstable; urgency=medium + + * Backport a fix to improve scan-build code error. + Thanks to Roman Lebedev for the fix(Closes: #909662) + + -- Sylvestre Ledru Wed, 26 Sep 2018 14:32:41 +0100 + llvm-toolchain-7 (1:7-3) unstable; urgency=medium * Fix a syntax issue in a scan-build patch diff --git a/debian/patches/0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch b/debian/patches/0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch new file mode 100644 index 00000000..e8a65a55 --- /dev/null +++ b/debian/patches/0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch @@ -0,0 +1,46 @@ +From 564f50e7536dab9dec5ed73f811b0b2d9d3aed14 Mon Sep 17 00:00:00 2001 +From: Roman Lebedev +Date: Wed, 26 Sep 2018 13:08:44 +0000 +Subject: [PATCH] [analyzer] scan-build: if --status-bugs is passed, don't + forget about the exit status of the actual build + +Summary: +This has been bothering me for a while, but only now i have actually looked into this. +I'm using one CI job for static analysis - clang static analyzers as compilers + clang-tidy via cmake. +And i'd like for the build to fail if at least one of those finds issues. +If clang-tidy finds issues, it will fail the build since the warnings-as-errors is set. +If static analyzer finds anything, since --status-bugs is set, it will fail the build. +But if clang-tidy find anything, but static analyzer does not, the build succeeds :/ + +Reviewers: sylvestre.ledru, alexfh, jroelofs, ygribov, george.karpenkov, krememek + +Reviewed By: jroelofs + +Subscribers: xazax.hun, szepet, a.sidorin, mikhail.ramalho, Szelethus, cfe-commits + +Differential Revision: https://reviews.llvm.org/D52530 + +git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@343105 91177308-0d34-0410-b5e6-96231b3b80d8 + +Index: llvm-toolchain-7-7/clang/tools/scan-build/bin/scan-build +=================================================================== +--- llvm-toolchain-7-7.orig/clang/tools/scan-build/bin/scan-build ++++ llvm-toolchain-7-7/clang/tools/scan-build/bin/scan-build +@@ -1192,7 +1192,7 @@ OPTIONS: + + By default, the exit status of scan-build is the same as the executed build + command. Specifying this option causes the exit status of scan-build to be 1 +- if it found potential bugs and 0 otherwise. ++ if it found potential bugs and the exit status of the build itself otherwise. + + --use-cc [compiler path] + --use-cc=[compiler path] +@@ -1878,7 +1878,7 @@ if (defined $Options{OutputFormat}) { + + if ($Options{ExitStatusFoundBugs}) { + exit 1 if ($NumBugs > 0); +- exit 0; ++ exit $ExitStatus; + } + } + } diff --git a/debian/patches/series b/debian/patches/series index 31697f6e..7e80a4bb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -75,3 +75,4 @@ D51108-rust-powerpc.diff disable-sse2-old-x86.diff scan-build-clang-X.diff +0001-analyzer-scan-build-if-status-bugs-is-passed-don-t-f.patch From eb2110afd764da2f40c4dad4806356e0b9700580 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Wed, 26 Sep 2018 14:58:17 +0100 Subject: [PATCH 11/14] Remove bat files https://bugs.llvm.org/show_bug.cgi?id=30755 --- debian/changelog | 1 + debian/rules | 2 ++ 2 files changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index 4f1d4612..db50c9e6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-7 (1:7-4) unstable; urgency=medium * Backport a fix to improve scan-build code error. Thanks to Roman Lebedev for the fix(Closes: #909662) + * Remove bat files https://bugs.llvm.org/show_bug.cgi?id=30755 -- Sylvestre Ledru Wed, 26 Sep 2018 14:32:41 +0100 diff --git a/debian/rules b/debian/rules index 05a32d68..832aaab7 100755 --- a/debian/rules +++ b/debian/rules @@ -456,6 +456,8 @@ override_dh_auto_install: # 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 + # Remove bat files https://bugs.llvm.org/show_bug.cgi?id=30755 + rm -f $(DEB_INST)/usr/share/clang/scan-build-$(LLVM_VERSION)/libexec/*.bat $(DEB_INST)/usr/share/clang/scan-build-$(LLVM_VERSION)/bin/*.bat cp $(TARGET_BUILD)/bin/clang-query $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin From 3df4907513813eeb3d404745d123772bb602f364 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Sep 2018 00:25:31 +0100 Subject: [PATCH 12/14] remove old package --- debian/qualify-clang.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 0f861a19..cf8d43f8 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -4,7 +4,7 @@ set -e VERSION=7 DETAILED_VERSION=7-3 -LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm-lto-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb" +LIST="libomp5-${VERSION}_${DETAILED_VERSION}_amd64.deb libomp-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb python-lldb-${VERSION}_${DETAILED_VERSION}_amd64.deb libllvm7_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang1-${VERSION}_${DETAILED_VERSION}_amd64.deb libclang-common-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}_${DETAILED_VERSION}_amd64.deb liblldb-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-runtime_${DETAILED_VERSION}_amd64.deb lld-${VERSION}_${DETAILED_VERSION}_amd64.deb libfuzzer-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libclang-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++abi-${VERSION}-dev_${DETAILED_VERSION}_amd64.deb libc++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++abi1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb llvm-${VERSION}-tools_${DETAILED_VERSION}_amd64.deb clang-tools-${VERSION}_${DETAILED_VERSION}_amd64.deb" echo "To install everything:" echo "sudo dpkg -i $LIST" L="" From adcb699efd6ca5c47626945be041bfa7132b579b Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 27 Sep 2018 08:07:14 +0100 Subject: [PATCH 13/14] Install bash-completion --- debian/changelog | 1 + debian/clang-X.Y.links.in | 1 + 2 files changed, 2 insertions(+) diff --git a/debian/changelog b/debian/changelog index db50c9e6..e3a2be5a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ llvm-toolchain-7 (1:7-4) unstable; urgency=medium * Backport a fix to improve scan-build code error. Thanks to Roman Lebedev for the fix(Closes: #909662) * Remove bat files https://bugs.llvm.org/show_bug.cgi?id=30755 + * Install bash-completion -- Sylvestre Ledru Wed, 26 Sep 2018 14:32:41 +0100 diff --git a/debian/clang-X.Y.links.in b/debian/clang-X.Y.links.in index 4ba8a3b9..47b41e10 100644 --- a/debian/clang-X.Y.links.in +++ b/debian/clang-X.Y.links.in @@ -1,2 +1,3 @@ usr/lib/llvm-@LLVM_VERSION@/bin/clang usr/lib/llvm-@LLVM_VERSION@/bin/clang-@LLVM_VERSION@ usr/lib/llvm-@LLVM_VERSION@/lib/cmake/clang usr/lib/cmake/clang-@LLVM_VERSION@ +usr/lib/llvm-@LLVM_VERSION@/share/clang/bash-autocomplete.sh etc/bash_completion.d/clang-@LLVM_VERSION@ \ No newline at end of file From 4432e6b41e1adf5d0ce3b452e4bae803c1123933 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 30 Sep 2018 19:34:04 +0100 Subject: [PATCH 14/14] remove old arg std=c++0x --- debian/rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/rules b/debian/rules index 832aaab7..f81d566b 100755 --- a/debian/rules +++ b/debian/rules @@ -31,7 +31,7 @@ DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS) LDFLAGS_EXTRA = -CXXFLAGS_EXTRA = -std=c++0x +CXXFLAGS_EXTRA = CONFIGURE_EXTRA = CMAKE_EXTRA = @@ -290,9 +290,9 @@ override_dh_auto_configure: preconfigure cov-configure --compiler clang --comptype clang; \ cov-configure --compiler gcc-$(GCC_VERSION) --comptype gcc; \ cov-configure --compiler g++-$(GCC_VERSION) --comptype gcc; \ - cov-configure -co /usr/bin/g++-$(GCC_VERSION) --comptype gcc -- -std=c++0x -fPIC -std=c++11; \ + cov-configure -co /usr/bin/g++-$(GCC_VERSION) --comptype gcc -- -fPIC -std=c++11; \ cov-configure -co /usr/bin/gcc-$(GCC_VERSION) --comptype gcc -- -fPIC; \ - cov-configure -co /usr/bin/g++-$(GCC_VERSION) --comptype gcc -- -std=c++0x -fPIC -std=c++11 -fno-exceptions; \ + cov-configure -co /usr/bin/g++-$(GCC_VERSION) --comptype gcc -- -fPIC -std=c++11 -fno-exceptions; \ cov-configure -co /usr/bin/g++-$(GCC_VERSION) --comptype gcc --template \ --xml-option append_arg:"--ppp_translator" \ --xml-option append_arg:"replace/llvm::AlignOf::Alignment/(llvm::AlignOf::Alignment)" \