From 8c47ef9c85b51f8b1d3589ea580c2a5b06042de8 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Tue, 21 Aug 2018 23:50:56 +0200 Subject: [PATCH 01/16] Don't build with ld.gold on powerpcspe --- debian/changelog | 7 +++++++ debian/rules | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 9da66462..c3121cdc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium + + [ John Paul Adrian Glaubitz ] + * Don't build with ld.gold on powerpcspe + + -- John Paul Adrian Glaubitz Tue, 21 Aug 2018 23:50:12 +0200 + llvm-toolchain-7 (1:7~+rc1-1~exp3) experimental; urgency=medium * dh_strip should be verbose diff --git a/debian/rules b/debian/rules index 8aa78783..7cd4fe5a 100755 --- a/debian/rules +++ b/debian/rules @@ -95,7 +95,7 @@ else 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 arm64 armhf i386 ppc64 ppc64el sparc sparc64 x32 s390x 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) From 83180e554b1ea7bacfbfc449bbac428bc9390023 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Tue, 21 Aug 2018 23:51:35 +0200 Subject: [PATCH 02/16] Disable polly on powerpcspe --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index c3121cdc..ba661104 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium [ John Paul Adrian Glaubitz ] * Don't build with ld.gold on powerpcspe + * Disable polly on powerpcspe -- John Paul Adrian Glaubitz Tue, 21 Aug 2018 23:50:12 +0200 diff --git a/debian/rules b/debian/rules index 7cd4fe5a..b45080cc 100755 --- a/debian/rules +++ b/debian/rules @@ -107,7 +107,7 @@ endif # Enable polly (or not) POLLY_ENABLE=yes -ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc s390x)) +ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc powerpcspe s390x)) POLLY_ENABLE=no endif From 99648d8f3990199b0308c6b49ca7a9685fce91b6 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 22 Aug 2018 11:38:08 +0200 Subject: [PATCH 03/16] Propagate fixes from 6.0 and snapshot branches --- debian/control | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/debian/control b/debian/control index 6fb6de2b..977aa282 100644 --- a/debian/control +++ b/debian/control @@ -378,8 +378,8 @@ Description: Modular compiler and toolchain technologies, examples # ------------- lld ------------- Package: lld-7 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel -# ia64 mips mipsel hurd powerpc ppc64el have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 +# ia64 hurd powerpc ppc64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}), llvm-7-dev Pre-Depends: ${misc:Pre-Depends} Description: LLVM-based linker @@ -388,8 +388,8 @@ Description: LLVM-based linker Project. Package: liblld-7 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel -# ia64 mips mipsel hurd powerpc ppc64el have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 +# ia64 hurd powerpc ppc64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: libs @@ -402,8 +402,8 @@ Description: LLVM-based linker, library Package: liblld-7-dev Section: libdevel -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 mips mipsel -# ia64 mips mipsel hurd powerpc ppc64el have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 +# ia64 hurd powerpc ppc64el have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lld-7 (= ${binary:Version}), liblld-7 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} @@ -418,8 +418,8 @@ Description: LLVM-based linker, header files # ------------- lldb ------------- Package: lldb-7 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 ppc64el -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 +# ia64 hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}), llvm-7-dev, python-lldb-7 Pre-Depends: ${misc:Pre-Depends} @@ -429,8 +429,8 @@ Description: Next generation, high-performance debugger Project, such as the Clang expression parser and LLVM disassembler. Package: liblldb-7 -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 ppc64el -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 +# ia64 hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, libllvm7 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} Section: libs @@ -445,8 +445,8 @@ Description: Next generation, high-performance debugger, library Package: python-lldb-7 Section: python -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 ppc64el -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 +# ia64 hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, liblldb-7-dev, python, python-six Conflicts: python-lldb-3.8, python-lldb-3.9, python-lldb-x.y Replaces: python-lldb-x.y @@ -462,8 +462,8 @@ Description: Next generation, high-performance debugger, python lib Package: liblldb-7-dev Section: libdevel -Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 mips mipsel arm64 ppc64el -# ia64 mips mipsel hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed +Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el ppc64el kfreebsd-amd64 kfreebsd-i386 s390 sparc hppa m68k sh4 x32 +# ia64 hurd powerpc powerpcspe ppc64 alpha s390x sparc64 have been removed Depends: ${shlibs:Depends}, ${misc:Depends}, lldb-7 (= ${binary:Version}) Replaces: lldb-7-dev (<= 7~svn215195-2) Breaks: lldb-7-dev (<< 7~svn215195-2) From 609a783d56b0968deb55d4353196cd03a0dcb546 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 22 Aug 2018 11:42:20 +0200 Subject: [PATCH 04/16] Cosmetic fix from branch 6.0 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index b45080cc..045bbf41 100755 --- a/debian/rules +++ b/debian/rules @@ -57,7 +57,7 @@ ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' bin ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) lt 7.1.0-7~ || \ dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' g++-$(GCC_VERSION)) ge 7.2.0-2; echo $$?),0) # Only pass -gsplit-dwarf with working version of gcc 7 -# More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873709 +# More: https://bugs.llvm.org/show_bug.cgi?id=34140 & https://bugs.debian.org/873609 CXXFLAGS_EXTRA += -gsplit-dwarf else $(error "Broken gcc version for -gsplit-dwarf support. Please use < gcc 7 or >= 7.2.0-2") From 04a5cac2f81c0fe2782781c6653973cb2800827b Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 22 Aug 2018 11:42:28 +0200 Subject: [PATCH 05/16] Enable LLDB on mips64el, from branch 6.0 --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 045bbf41..a807b4a5 100755 --- a/debian/rules +++ b/debian/rules @@ -157,7 +157,7 @@ else endif LLDB_ENABLE=yes -LLDB_DISABLE_ARCHS := hurd-i386 ia64 mips64el powerpc powerpcspe ppc64 s390x sparc64 +LLDB_DISABLE_ARCHS := hurd-i386 ia64 powerpc powerpcspe ppc64 s390x sparc64 # hurd has threading issues ifeq (,$(filter-out $(LLDB_DISABLE_ARCHS), $(DEB_HOST_ARCH))) # Disable LLDB for this arch. From c1e4dc8e8aab710ee8d6cd7f46cd833fea8d8e9f Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Aug 2018 09:24:58 +0200 Subject: [PATCH 06/16] enable lld and lldb on ppc64el --- debian/control | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/debian/control b/debian/control index 977aa282..93eff2b7 100644 --- a/debian/control +++ b/debian/control @@ -378,8 +378,8 @@ Description: Modular compiler and toolchain technologies, examples # ------------- lld ------------- Package: lld-7 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 -# ia64 hurd powerpc ppc64el have been removed +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}), llvm-7-dev Pre-Depends: ${misc:Pre-Depends} Description: LLVM-based linker @@ -388,8 +388,8 @@ Description: LLVM-based linker Project. Package: liblld-7 -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 -# ia64 hurd powerpc ppc64el have been removed +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}) Pre-Depends: ${misc:Pre-Depends} Section: libs @@ -402,8 +402,8 @@ Description: LLVM-based linker, library Package: liblld-7-dev Section: libdevel -Architecture: amd64 arm64 armel armhf i386 mips mipsel mips64el kfreebsd-amd64 kfreebsd-i386 s390 sparc alpha hppa m68k powerpcspe ppc64 sh4 sparc64 x32 -# ia64 hurd powerpc ppc64el have been removed +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-7 (= ${binary:Version}), liblld-7 (= ${binary:Version}) Pre-Depends: ${misc:Pre-Depends} From 9789079af8a585eec08ea586c28c7b55c3c45d4a Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Aug 2018 09:37:14 +0200 Subject: [PATCH 07/16] Update changelog --- debian/changelog | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debian/changelog b/debian/changelog index ba661104..b04812d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,6 +4,9 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium * Don't build with ld.gold on powerpcspe * Disable polly on powerpcspe + [ Gianfranco Costamagna ] + * Enable lld on ppc64el + -- John Paul Adrian Glaubitz Tue, 21 Aug 2018 23:50:12 +0200 llvm-toolchain-7 (1:7~+rc1-1~exp3) experimental; urgency=medium From 84577d05225b3b5dbc84abb8c81698cae7665cd8 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Thu, 23 Aug 2018 10:27:39 +0200 Subject: [PATCH 08/16] Propagate changes of llvm 6.0 to 7 branch --- debian/changelog | 1 + debian/patches/D51108.diff | 65 ++++++++++++++++++++++++++++++++++++++ debian/patches/series | 2 +- 3 files changed, 67 insertions(+), 1 deletion(-) create mode 100644 debian/patches/D51108.diff diff --git a/debian/changelog b/debian/changelog index b04812d9..d600f157 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium [ John Paul Adrian Glaubitz ] * Don't build with ld.gold on powerpcspe * Disable polly on powerpcspe + * Add upstream patch to make rustc build on powerpc [ Gianfranco Costamagna ] * Enable lld on ppc64el diff --git a/debian/patches/D51108.diff b/debian/patches/D51108.diff new file mode 100644 index 00000000..aa7f7196 --- /dev/null +++ b/debian/patches/D51108.diff @@ -0,0 +1,65 @@ +Index: llvm-toolchain-6.0-6.0.1/lib/Target/PowerPC/PPCISelLowering.cpp +=================================================================== +--- llvm-toolchain-6.0-6.0.1.orig/lib/Target/PowerPC/PPCISelLowering.cpp ++++ llvm-toolchain-6.0-6.0.1/lib/Target/PowerPC/PPCISelLowering.cpp +@@ -3351,9 +3351,14 @@ + // Argument stored in memory. + assert(VA.isMemLoc()); + ++ // Get the extended size of the argument type in stack + unsigned ArgSize = VA.getLocVT().getStoreSize(); +- int FI = MFI.CreateFixedObject(ArgSize, VA.getLocMemOffset(), +- isImmutable); ++ // Get the actual size of the argument type ++ unsigned ObjSize = VA.getValVT().getStoreSize(); ++ unsigned ArgOffset = VA.getLocMemOffset(); ++ // Stack objects in PPC32 are right justified. ++ ArgOffset += ArgSize - ObjSize; ++ int FI = MFI.CreateFixedObject(ArgSize, ArgOffset, isImmutable); + + // Create load nodes to retrieve arguments from the stack. + SDValue FIN = DAG.getFrameIndex(FI, PtrVT); +@@ -5303,10 +5308,11 @@ + Arg = PtrOff; + } + +- if (VA.isRegLoc()) { +- if (Arg.getValueType() == MVT::i1) +- Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, Arg); ++ // Ensure callee will get either 0x00000001 or 0x00000000. ++ if (Arg.getValueType() == MVT::i1) ++ Arg = DAG.getNode(ISD::ZERO_EXTEND, dl, MVT::i32, Arg); + ++ if (VA.isRegLoc()) { + seenFloatArg |= VA.getLocVT().isFloatingPoint(); + // Put argument in a physical register. + RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg)); +Index: llvm-toolchain-6.0-6.0.1/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll +=================================================================== +--- /dev/null ++++ llvm-toolchain-6.0-6.0.1/test/CodeGen/PowerPC/ppc32-i1-stack-arguments-abi-bug.ll +@@ -0,0 +1,24 @@ ++; RUN: llc -verify-machineinstrs < %s -mcpu=ppc32 -mattr=+crbits | FileCheck %s ++target triple = "powerpc-unknown-linux-gnu" ++ ++define zeroext i1 @check_callee( ++ i1 zeroext, i1 zeroext, i1 zeroext, i1 zeroext, ++ i1 zeroext, i1 zeroext, i1 zeroext, i1 zeroext, ++ i1 zeroext %s1 ++) { ++ call void @check_caller( ++ i1 zeroext true, i1 zeroext true, i1 zeroext true, i1 zeroext true, ++ i1 zeroext true, i1 zeroext true, i1 zeroext true, i1 zeroext true, ++ i1 zeroext %s1) ++ ret i1 true ++} ++ ++; CHECK-LABEL: @check_callee ++; CHECK: lbz {{[0-9]+}}, 27(1) ++; CHECK: stw {{[0-9]+}}, 8(1) ++ ++declare void @check_caller( ++ i1 zeroext, i1 zeroext, i1 zeroext, i1 zeroext, ++ i1 zeroext, i1 zeroext, i1 zeroext, i1 zeroext, ++ i1 zeroext ++) diff --git a/debian/patches/series b/debian/patches/series index b1d83219..bdfeff29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -58,7 +58,7 @@ impl-path-hurd.diff openmp-check-execstack.diff openmp-soname.diff openmp-mips-affinity.patch - +D51108.diff # libcxx libcxxabi-test-don-t-fail-extended-long-double.patch From af42e860c36247ea2d9bbb629b32cd9c36b64802 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 24 Aug 2018 15:20:30 +0200 Subject: [PATCH 09/16] Force sphinx to be >> 1.2.3 --- debian/changelog | 4 +++- debian/control | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index d600f157..2a604345 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium + * Force sphinx to be >> 1.2.3 + [ John Paul Adrian Glaubitz ] * Don't build with ld.gold on powerpcspe * Disable polly on powerpcspe @@ -8,7 +10,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium [ Gianfranco Costamagna ] * Enable lld on ppc64el - -- John Paul Adrian Glaubitz Tue, 21 Aug 2018 23:50:12 +0200 + -- Sylvestre Ledru Fri, 24 Aug 2018 15:19:54 +0200 llvm-toolchain-7 (1:7~+rc1-1~exp3) experimental; urgency=medium diff --git a/debian/control b/debian/control index 93eff2b7..2d7d23c9 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,8 @@ Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, - libedit-dev, libncurses5-dev, swig, python-six, python-sphinx, binutils-dev, + libedit-dev, libncurses5-dev, swig, python-six, python-sphinx (>> 1.2.3), + binutils-dev, 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], From f2d5bf8c097cadd9731101d93e6e59690053a68c Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 24 Aug 2018 15:41:57 +0200 Subject: [PATCH 10/16] also ignore libc++experimental.a on dh_strip (fails on stretch) --- debian/changelog | 1 + debian/rules | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 2a604345..072443df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium * Force sphinx to be >> 1.2.3 + * also ignore libc++experimental.a on dh_strip (fails on stretch) [ John Paul Adrian Glaubitz ] * Don't build with ld.gold on powerpcspe diff --git a/debian/rules b/debian/rules index a807b4a5..7283a2c7 100755 --- a/debian/rules +++ b/debian/rules @@ -609,7 +609,7 @@ endif # endif ifeq ($(shell dpkg --compare-versions $(shell dpkg-query -W -f '$${Version}' binutils) ge 2.28 ; echo $$?),0) # strip segfaults on libFuzzer.a - dh_strip -a -v -XlibFuzzer.a -Xlibc++.a -Xlibc++abi.a + dh_strip -a -v -XlibFuzzer.a -Xlibc++.a -Xlibc++abi.a -Xlibc++experimental.a else dh_strip -a -v endif From a60424df6dfefe6d6b181b534e28dfccf23e52d2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 24 Aug 2018 15:52:41 +0200 Subject: [PATCH 11/16] fix the version --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 2d7d23c9..8b4b83b3 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, - libedit-dev, libncurses5-dev, swig, python-six, python-sphinx (>> 1.2.3), + libedit-dev, libncurses5-dev, swig, python-six, python-sphinx (>= 1.4.9), binutils-dev, libjsoncpp-dev, pkg-config, lcov, procps, help2man, zlib1g-dev, From 89d02f38cac50995f2408ae72b45a51f7150072a Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 24 Aug 2018 17:06:37 +0200 Subject: [PATCH 12/16] lower sphinx 1.3.6 version --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 8b4b83b3..e19ec486 100644 --- a/debian/control +++ b/debian/control @@ -6,7 +6,7 @@ Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), flex, bison, dejagnu, tcl, expect, cmake, perl, libtool, chrpath, texinfo, sharutils, libffi-dev (>= 3.0.9), lsb-release, patchutils, diffstat, xz-utils, python-dev, - libedit-dev, libncurses5-dev, swig, python-six, python-sphinx (>= 1.4.9), + libedit-dev, libncurses5-dev, swig, python-six, python-sphinx (>= 1.3.6), binutils-dev, libjsoncpp-dev, pkg-config, lcov, procps, help2man, zlib1g-dev, From ea92161f6575b0b6b9d5109bc40e46730790f37e Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Aug 2018 10:47:50 +0200 Subject: [PATCH 13/16] update of the news --- debian/NEWS | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/NEWS b/debian/NEWS index c66f9f8f..63cd553a 100644 --- a/debian/NEWS +++ b/debian/NEWS @@ -1,5 +1,7 @@ -llvm-toolchain-snapshot (1:7~svn322880-1) unstable; urgency=medium +llvm-toolchain-7 (1:7-1) unstable; urgency=medium + * From version 7, llvm-toolchain also provides libc++, libc++abi + and OpenMP packages * Packages, binaries and libraries have been renamed. Instead of the X.Y naming, we moved to X to match the naming from upstream. From 474bfccad3710b021e457eeda58b7e68138c04ff Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Aug 2018 10:48:00 +0200 Subject: [PATCH 14/16] Make libc++-7-dev & libc++abi-7-dev coinstallable --- debian/changelog | 1 + debian/control | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 072443df..945c1003 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-7 (1:7~+rc1-1~exp4) UNRELEASED; urgency=medium * Force sphinx to be >> 1.2.3 * also ignore libc++experimental.a on dh_strip (fails on stretch) + * Make libc++-7-dev & libc++abi-7-dev coinstallable [ John Paul Adrian Glaubitz ] * Don't build with ld.gold on powerpcspe diff --git a/debian/control b/debian/control index e19ec486..2269f19e 100644 --- a/debian/control +++ b/debian/control @@ -590,9 +590,9 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: libc++abi1-7 (= ${binary:Version}), ${misc:Depends} -Replaces: libc++-dev (<= 6.0.1-1), libc++-7-dev, libc++abi-dev (<= 6.0.1-1) -Breaks: libc++-dev (<= 6.0.1-1), libc++-7-dev, libc++abi-dev (<= 6.0.1-1) -Provides: libc++-dev, libc++-7-dev, libc++abi-dev +Replaces: libc++-dev (<= 6.0.1-1), libc++abi-dev (<= 6.0.1-1) +Breaks: libc++-dev (<= 6.0.1-1), libc++abi-dev (<= 6.0.1-1) +Provides: libc++abi-dev Description: LLVM low level support for a standard C++ library (development files) libc++abi is another implementation of low level support for a standard C++ library. From 77682082f8ab66f3ac55cf98897a17815e801989 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Aug 2018 10:48:19 +0200 Subject: [PATCH 15/16] update of the test --- debian/qualify-clang.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index c305e116..d5765985 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -187,9 +187,8 @@ int main(void) { clang-$VERSION foo.c -fopenmp -o o ./o > /dev/null - -if test ! -f /usr/lib/llvm-$VERSION/lib/libomp.so; then - echo "Install libomp-$VERSION-dev"; +if test ! -f /usr/lib/llvm-$VERSION/include/c++/v1/vector; then + echo "Install libc++-$VERSION-dev"; exit -1; fi @@ -226,6 +225,9 @@ clang++-$VERSION -std=c++11 -stdlib=libc++ foo.cpp -o o ./o > /dev/null clang++-$VERSION -std=c++14 -stdlib=libc++ foo.cpp -lc++experimental -o o ./o > /dev/null +# Force the usage of libc++abi (should be implicit) +clang++-$VERSION -stdlib=libc++ -lc++abi foo.cpp -o o +./o > /dev/null # fs from C++17 echo ' From a2cd24ff7718dfb6bd4287dbaec05cd9f1884d98 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Mon, 27 Aug 2018 10:52:06 +0200 Subject: [PATCH 16/16] add more libc++abi test --- debian/qualify-clang.sh | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index d5765985..6bac43ad 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -220,14 +220,33 @@ if ! ldd o 2>&1|grep -q libc++abi.so.1; then echo "not linked against libc++abi.so.1" exit -1 fi + ./o > /dev/null clang++-$VERSION -std=c++11 -stdlib=libc++ foo.cpp -o o ./o > /dev/null clang++-$VERSION -std=c++14 -stdlib=libc++ foo.cpp -lc++experimental -o o ./o > /dev/null -# Force the usage of libc++abi (should be implicit) + +if test ! -f /usr/lib/llvm-$VERSION/include/cxxabi.h; then + echo "Install libc++abi-$VERSION-dev"; + exit -1; +fi + +# Force the usage of libc++abi clang++-$VERSION -stdlib=libc++ -lc++abi foo.cpp -o o ./o > /dev/null +if ! ldd o 2>&1|grep -q libc++abi.so.1; then + echo "not linked against libc++abi.so.1" + exit -1 +fi + +# Use the libc++abi and uses the libstc++ headers +clang++-$VERSION -lc++abi foo.cpp -o o +./o > /dev/null +if ! ldd o 2>&1|grep -q libstdc++.so.; then + echo "not linked against libstdc++" + exit -1 +fi # fs from C++17 echo '