From ff0a0e6a1531df5bc2da81eb2b03234b9c9f7b66 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 10:56:33 +0100 Subject: [PATCH 01/12] Fix m68k architecture --- debian/control | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debian/control b/debian/control index c99bb96e..fa5bf1f9 100644 --- a/debian/control +++ b/debian/control @@ -432,7 +432,7 @@ Description: Modular compiler and toolchain technologies, examples # ------------- lld ------------- Package: lld-9 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m69k powerpcspe ppc64 sh4 sparc64 x32 +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}, libllvm9 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} @@ -442,7 +442,7 @@ Description: LLVM-based linker Project. Package: liblld-9 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m69k powerpcspe ppc64 sh4 sparc64 x32 +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}, libllvm9 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} @@ -456,7 +456,7 @@ Description: LLVM-based linker, library Package: liblld-9-dev Section: libdevel -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m69k powerpcspe ppc64 sh4 sparc64 x32 +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}, lld-9 (= ${binary:Version}), liblld-9 (= ${binary:Version}) @@ -472,7 +472,7 @@ Description: LLVM-based linker, header files # ------------- lldb ------------- Package: lldb-9 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m69k sh4 x32 +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m68k sh4 x32 # ia64 hurd powerpc powerpcspe ppc64 alpha sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm9 (= ${binary:Version}), llvm-9-dev, python3-lldb-9 @@ -483,7 +483,7 @@ Description: Next generation, high-performance debugger Project, such as the Clang expression parser and LLVM disassembler. Package: liblldb-9 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m69k sh4 x32 +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m68k sh4 x32 # ia64 hurd powerpc powerpcspe ppc64 alpha sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm9 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} @@ -497,7 +497,7 @@ Description: Next generation, high-performance debugger, library Package: python3-lldb-9 Section: python -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m69k sh4 x32 +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m68k sh4 x32 # ia64 hurd powerpc powerpcspe ppc64 alpha sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, liblldb-9, python3-six Conflicts: python3-lldb-x.y @@ -514,7 +514,7 @@ Description: Next generation, high-performance debugger, python3 lib Package: liblldb-9-dev Section: libdevel -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m69k sh4 x32 +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m68k sh4 x32 # ia64 hurd powerpc powerpcspe ppc64 alpha sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lldb-9 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} From 5bfaab6d828adf1f49ae7724c71a0d3d10ebc0d4 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 11:19:49 +0100 Subject: [PATCH 02/12] Add Myself to uploaders --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fa5bf1f9..fb2e7ca8 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: devel Priority: optional Rules-Requires-Root: no Maintainer: LLVM Packaging Team -Uploaders: Sylvestre Ledru +Uploaders: Sylvestre Ledru , Gianfranco Costamagna Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python3-dev, From 9badd59546a0daa2f5c2a07aa27f6704417c8100 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 14:30:09 +0100 Subject: [PATCH 03/12] Revert site-packages/dist-packages hacking mv, this is done upstream now --- debian/rules | 4 ---- 1 file changed, 4 deletions(-) diff --git a/debian/rules b/debian/rules index 1dd61933..6803d6dc 100755 --- a/debian/rules +++ b/debian/rules @@ -587,10 +587,6 @@ endif # Path changed. Make a copy of it cp $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/README.txt $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/clang/$(LLVM_VERSION_FULL)/share/README.txt -# idem for the lldb python binding - mkdir -p $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3/dist-packages/ - mv $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3.*/site-packages/* $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/lib/python3/dist-packages/ - # Remove things that CMake install but which aren't packaged yet, # or are packaged from the source or build tree. mv $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/clang-$(LLVM_VERSION) \ From cb145e6724db7e3d4d6a5128b3c3c41e3f8c72c7 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 14:35:00 +0100 Subject: [PATCH 04/12] Update changelog, prepare for unstable upload --- debian/changelog | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index dadc8d85..b08687b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ -llvm-toolchain-9 (1:9.0.1-8) UNRELEASED; urgency=medium +llvm-toolchain-9 (1:9.0.1-8) unstable; urgency=medium * Add two new python autopkgtests to avoid regressions in the future + * Fix m68k architecture + * Add Myself to uploaders + * Revert site-packages/dist-packages hacking mv, this is done upstream now - -- Gianfranco Costamagna Thu, 23 Jan 2020 10:08:27 +0100 + -- Gianfranco Costamagna Thu, 23 Jan 2020 14:30:57 +0100 llvm-toolchain-9 (1:9.0.1-7) unstable; urgency=medium From 8bca9142e16f9188b84836d1690a3448c2b89225 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Jan 2020 14:56:15 +0100 Subject: [PATCH 05/12] Tighteen version constraints --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index fb2e7ca8..c17990df 100644 --- a/debian/control +++ b/debian/control @@ -499,7 +499,7 @@ Package: python3-lldb-9 Section: python Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 s390x sparc hppa m68k sh4 x32 # ia64 hurd powerpc powerpcspe ppc64 alpha sparc64 have been removed -Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, liblldb-9, python3-six +Depends: ${shlibs:Depends}, ${misc:Depends}, ${python3:Depends}, liblldb-9 (= ${binary:Version}), python3-six Conflicts: python3-lldb-x.y Replaces: python3-lldb-x.y Provides: python3-lldb-x.y From 66786d35c601e38b136b8c4c63047258936f3e8a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sun, 2 Feb 2020 21:43:58 +0100 Subject: [PATCH 06/12] add a tsan example --- debian/qualify-clang.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index d5958748..f89becd9 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -510,6 +510,40 @@ int main(int argc, char **argv) clang-$VERSION -fsanitize=address foo.c -o foo -lc ./foo &> /dev/null || true +echo ' +#include +#include + +int Global; + +void *Thread1(void *x) { + Global++; + return NULL; +} + +void *Thread2(void *x) { + Global--; + return NULL; +} + +int main() { + pthread_t t[2]; + pthread_create(&t[0], NULL, Thread1, NULL); + pthread_create(&t[1], NULL, Thread2, NULL); + pthread_join(t[0], NULL); + pthread_join(t[1], NULL); +} ' > foo.c + +clang-$VERSION -o foo -fsanitize=thread -g -O1 foo.c +if ! strings ./foo 2>&1 | grep -q "tsan"; then + echo "binary doesn't contain tsan code" + strings foo + exit 42 +fi +if ! ./foo 2>&1 | grep -q "data race"; then + echo "sanitize=address is failing" + exit 42 +fi echo ' class a { From 607c9cfe7e567904c13f19132b58cfdb642e17f3 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 25 Feb 2020 15:28:44 +0100 Subject: [PATCH 07/12] Add patch to move from old cgi to new html parser, fixing python3.8 issues --- debian/patches/no-cgi.patch | 44 +++++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 45 insertions(+) create mode 100644 debian/patches/no-cgi.patch diff --git a/debian/patches/no-cgi.patch b/debian/patches/no-cgi.patch new file mode 100644 index 00000000..bf782e02 --- /dev/null +++ b/debian/patches/no-cgi.patch @@ -0,0 +1,44 @@ +Description: cgi method is deprecated, use html instead +Author: Gianfranco Costamagna +Last-Update: 2020-02-25 + +--- llvm-toolchain-10-10.0.0~+rc2.orig/llvm/tools/opt-viewer/opt-viewer.py ++++ llvm-toolchain-10-10.0.0~+rc2/llvm/tools/opt-viewer/opt-viewer.py +@@ -3,7 +3,7 @@ + from __future__ import print_function + + import argparse +-import cgi ++import html + import codecs + import errno + import functools +@@ -200,7 +200,7 @@ class IndexRenderer: + self.max_hottest_remarks_on_index = max_hottest_remarks_on_index + + def render_entry(self, r, odd): +- escaped_name = cgi.escape(r.DemangledFunctionName) ++ escaped_name = html.escape(r.DemangledFunctionName) + print(u''' + + {r.DebugLocString} +--- llvm-toolchain-10-10.0.0~+rc2.orig/llvm/tools/opt-viewer/optrecord.py ++++ llvm-toolchain-10-10.0.0~+rc2/llvm/tools/opt-viewer/optrecord.py +@@ -10,7 +10,7 @@ except ImportError: + print("For faster parsing, you may want to install libYAML for PyYAML") + from yaml import Loader + +-import cgi ++import html + from collections import defaultdict + import fnmatch + import functools +@@ -158,7 +158,7 @@ class Remark(yaml.YAMLObject): + (key, value) = list(mapping.items())[0] + + if key == 'Caller' or key == 'Callee' or key == 'DirectCallee': +- value = cgi.escape(self.demangle(value)) ++ value = html.escape(self.demangle(value)) + + if dl and key != 'Caller': + dl_dict = dict(list(dl)) diff --git a/debian/patches/series b/debian/patches/series index 288ba2b2..4786cf31 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -141,3 +141,4 @@ no-z3.patch D71028-mips-rust-test.diff python3-shebang.patch print-lldb-path.patch +no-cgi.patch From 48adc09e341f782ac9db916f0fcf6a24dc87c0d1 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Tue, 25 Feb 2020 15:29:50 +0100 Subject: [PATCH 08/12] Update changelog --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index b08687b6..51b49339 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-9 (1:9.0.1-9) UNRELEASED; urgency=medium + + * Add patch to fix python3.8 test failures with deprecated cgi method, move + to new html parser + + -- Gianfranco Costamagna Tue, 25 Feb 2020 15:28:58 +0100 + llvm-toolchain-9 (1:9.0.1-8) unstable; urgency=medium * Add two new python autopkgtests to avoid regressions in the future From 97a3ae6bd856b77fdbc74ed0179c5d42bc26adef Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Fri, 6 Mar 2020 15:07:18 +0100 Subject: [PATCH 09/12] Upload to sid --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 51b49339..fa1ab6bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-9 (1:9.0.1-9) UNRELEASED; urgency=medium +llvm-toolchain-9 (1:9.0.1-9) unstable; urgency=medium * Add patch to fix python3.8 test failures with deprecated cgi method, move to new html parser From 9e4ac38183546689f3d297fbdb09edad55f56b64 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Sun, 8 Mar 2020 21:49:43 +0100 Subject: [PATCH 10/12] cherry-pick upstream fix for new glibc 2.31 --- debian/changelog | 7 ++ ...9692440836dcb8d88b74b69dd379d85974ce.patch | 81 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 89 insertions(+) create mode 100644 debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch diff --git a/debian/changelog b/debian/changelog index fa1ab6bc..d2e6954c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-9 (1:9.0.1-10) UNRELEASED; urgency=medium + + * debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch: + - cherry-pick upstream fix for glibc 2.31 + + -- Gianfranco Costamagna Sat, 07 Mar 2020 01:01:35 +0100 + llvm-toolchain-9 (1:9.0.1-9) unstable; urgency=medium * Add patch to fix python3.8 test failures with deprecated cgi method, move diff --git a/debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch b/debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch new file mode 100644 index 00000000..e0e84db7 --- /dev/null +++ b/debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch @@ -0,0 +1,81 @@ +From 947f9692440836dcb8d88b74b69dd379d85974ce Mon Sep 17 00:00:00 2001 +From: Evgenii Stepanov +Date: Mon, 25 Nov 2019 13:52:17 -0800 +Subject: [PATCH] Fix sanitizer-common build with glibc 2.31 + +Summary: +As mentioned in D69104, glibc changed ABI recently with the [[ https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=2f959dfe849e0646e27403f2e4091536496ac0f0| 2f959dfe ]] change. +D69104 dealt with just 32-bit ARM, but that is just one of the many affected architectures. +E.g. x86_64, i?86, riscv64, sparc 32-bit, s390 31-bit are affected too (and various others). + +This patch instead of adding a long list of further architectures that wouldn't be checked ever next to arm 32-bit changes the structures to match the 2.31 layout and performs the checking on Linux for ipc_perm mode position/size only on non-Linux or on Linux with glibc 2.31 or later. I think this matches what is done for aarch64 already. +If needed, we could list architectures that haven't changed ABI (e.g. powerpc), so that they would be checked even with older glibcs. AFAIK sanitizers don't actually use ipc_perm.mode and +so all they care about is the size and alignment of the whole structure. + +Note, s390 31-bit and arm 32-bit big-endian changed ABI even further, there will now be shmctl with old symbol version and shmctl@@GLIBC_2.31 which will be incompatible. I'm afraid this isn't really solvable unless the sanitizer libraries are symbol versioned and use matching symbol versions to glibc symbols for stuff they intercept, plus use dlvsym. +This patch doesn't try to address that. + +Patch by Jakub Jelinek. + +Reviewers: kcc, eugenis, dvyukov + +Reviewed By: eugenis + +Subscribers: jyknight, kristof.beyls, fedor.sergeev, simoncook, PkmX, s.egerton, steven.zhang, #sanitizers, llvm-commits + +Tags: #sanitizers, #llvm + +Differential Revision: https://reviews.llvm.org/D70662 +--- + .../sanitizer_platform_limits_posix.cpp | 8 +++----- + .../sanitizer_platform_limits_posix.h | 15 +-------------- + 2 files changed, 4 insertions(+), 19 deletions(-) + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +index b4f8f67b664c..aa845df4dde4 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1126,8 +1126,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid); + CHECK_SIZE_AND_OFFSET(ipc_perm, gid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cuid); + CHECK_SIZE_AND_OFFSET(ipc_perm, cgid); +-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21) +-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */ ++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31) ++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit ++ on many architectures. */ + CHECK_SIZE_AND_OFFSET(ipc_perm, mode); + #endif + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +index 7789bc5887a4..5337b26b29b8 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -203,26 +203,13 @@ namespace __sanitizer { + u64 __unused1; + u64 __unused2; + #elif defined(__sparc__) +-#if defined(__arch64__) + unsigned mode; +- unsigned short __pad1; +-#else +- unsigned short __pad1; +- unsigned short mode; + unsigned short __pad2; +-#endif + unsigned short __seq; + unsigned long long __unused1; + unsigned long long __unused2; +-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__) +- unsigned int mode; +- unsigned short __seq; +- unsigned short __pad1; +- unsigned long __unused1; +- unsigned long __unused2; + #else +- unsigned short mode; +- unsigned short __pad1; ++ unsigned int mode; + unsigned short __seq; + unsigned short __pad2; + #if defined(__x86_64__) && !defined(_LP64) diff --git a/debian/patches/series b/debian/patches/series index 4786cf31..f45e0794 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -142,3 +142,4 @@ D71028-mips-rust-test.diff python3-shebang.patch print-lldb-path.patch no-cgi.patch +947f9692440836dcb8d88b74b69dd379d85974ce.patch From 3463a4b84cf97bee77f085c90fd20abdf65bf6fa Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 19 Mar 2020 09:49:18 +0100 Subject: [PATCH 11/12] Upload to sid --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index d2e6954c..c4b9f7aa 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -llvm-toolchain-9 (1:9.0.1-10) UNRELEASED; urgency=medium +llvm-toolchain-9 (1:9.0.1-10) unstable; urgency=medium * debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch: - cherry-pick upstream fix for glibc 2.31 From 35295a2e4327c7f10d369a89796bb0362efaa3cb Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Tue, 31 Mar 2020 21:47:36 +0200 Subject: [PATCH 12/12] Allow to build g++ 9 & 10 to fix a gcc build dependency (closes: #955144) And disable thin lto on all archs It needs gcc-8 after after 8 will reject the -flto=thin arg And BOOTSTRAP_LLVM_ENABLE_LTO wil generate .so with llvm IR instead of native code --- debian/changelog | 10 ++++++++++ debian/control | 2 +- debian/rules | 20 +++++++++++++------- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/debian/changelog b/debian/changelog index c4b9f7aa..d171c5bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +llvm-toolchain-9 (1:9.0.1-11) unstable; urgency=medium + + * Allow to build g++ 9 & 10 to fix a gcc build dependency (closes: #955144) + And disable thin lto on all archs + It needs gcc-8 after after 8 will reject the -flto=thin arg + And BOOTSTRAP_LLVM_ENABLE_LTO wil generate .so with llvm IR instead + of native code + + -- Sylvestre Ledru Tue, 31 Mar 2020 21:11:56 +0200 + llvm-toolchain-9 (1:9.0.1-10) unstable; urgency=medium * debian/patches/947f9692440836dcb8d88b74b69dd379d85974ce.patch: diff --git a/debian/control b/debian/control index c17990df..a08ecb56 100644 --- a/debian/control +++ b/debian/control @@ -19,7 +19,7 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils, libctypes-ocaml-dev [amd64 arm64 armhf i386 ppc64el s390x], dh-exec, dh-ocaml [amd64 arm64 armhf i386 ppc64el s390x], libpfm4-dev [linux-any], python3-setuptools, libz3-dev, - g++-8 | g++-7 | g++-6 | g++-5 | g++-4.7 + g++-10 | g++-9 | g++-8 | g++-7 | g++-6 | g++-5 | g++-4.7 Build-Conflicts: oprofile, ocaml Standards-Version: 4.2.1 Homepage: https://www.llvm.org/ diff --git a/debian/rules b/debian/rules index 6803d6dc..b5be01a8 100755 --- a/debian/rules +++ b/debian/rules @@ -74,12 +74,13 @@ ifneq ($(shell dpkg-vendor --derives-from Ubuntu && echo yes),yes) endif endif -FORCE_NOT_GCC_9_DISTRO := eoan focal bullseye sid -ifneq (,$(filter $(DISTRO),$(FORCE_NOT_GCC_9_DISTRO))) -# Force gcc before 9 (gcc 8 on Debian unstable) because it causes -# huge increase of the size of the .deb (because of .a and .so) and issues in the libs - GCC_VERSION := 8 -endif +# Disable as we don't build with thin lto anymore +# FORCE_NOT_GCC_9_DISTRO := eoan focal bullseye sid +# ifneq (,$(filter $(DISTRO),$(FORCE_NOT_GCC_9_DISTRO))) +# # Force gcc before 9 (gcc 8 on Debian unstable) because it causes +# # huge increase of the size of the .deb (because of .a and .so) and issues in the libs +# GCC_VERSION := 8 +# endif @@ -243,7 +244,12 @@ ifneq (,$(filter $(DEB_HOST_ARCH),$(BINUTILS_GOLD_ARCHS))) # armhf is not yet quite ready for Thin, it FTBFS # see https://buildd.debian.org/status/fetch.php?pkg=llvm-toolchain-8&arch=armhf&ver=1%3A8.0.1%7E%2Brc2-1%7Eexp1&stamp=1560334266&raw=0 ifeq (,$(filter $(DEB_HOST_ARCH), armhf)) - CMAKE_EXTRA += -DLLVM_ENABLE_LTO="Thin" + CMAKE_EXTRA += +# Disable thin lto on all archs +# it needs gcc-8 after after 8 will reject the -flto=thin arg +# And BOOTSTRAP_LLVM_ENABLE_LTO wil generate .so with llvm IR instead +# of native code +# -DLLVM_ENABLE_LTO="Thin" endif endif endif