From 8f6a1a09347a7567a26b8ec188d0fcda69e38865 Mon Sep 17 00:00:00 2001 From: Gianfranco Costamagna Date: Wed, 3 Jul 2019 08:49:30 +0200 Subject: [PATCH 1/4] Do not fail lldb on i386, it never worked there TODO: open an upstream bug if anybody cares about i386 --- debian/qualify-clang.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index 4a7ea9fd..2ce60c95 100755 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -725,7 +725,10 @@ lldb-$VERSION -s lldb-cmd.txt ./foo &> foo.log if ! grep -q "stop reason = step over" foo.log; then echo "Could not find the lldb expected output" cat foo.log - exit 42 + # do not fail on i386, never worked here + if [ $DEB_HOST_ARCH != "i386" ]; then + exit 42 + fi fi if test ! -f /usr/lib/llvm-$VERSION/lib/libclangToolingInclusions.a; then From 8b0c52697fa3c85a900e0ab41bff793a10b05fd2 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Thu, 11 Jul 2019 08:53:50 +0200 Subject: [PATCH 2/4] New snapshot release --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index e6c37024..ba3e40b1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +llvm-toolchain-8 (1:8.0.1~+rc4-1) unstable; urgency=medium + + * New snapshot release + + -- Sylvestre Ledru Thu, 11 Jul 2019 08:39:38 +0200 + llvm-toolchain-8 (1:8.0.1~+rc3-1) unstable; urgency=medium * New testing release in unstable From be2b5264203c98a34b119d2de176d7bb11c3176f Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Thu, 18 Jul 2019 14:00:02 -0500 Subject: [PATCH 3/4] Compile against Python 3 --- debian/changelog | 7 +++++++ debian/control | 24 ++++++++++++------------ debian/rules | 2 +- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/debian/changelog b/debian/changelog index ba3e40b1..5b19d26e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +llvm-toolchain-8 (1:8.0.1~+rc4-2) unstable; urgency=medium + + * Compile against Python 3 + (Closes: #931029) + + -- Christian Biesinger Thu, 18 Jul 2019 14:13:56 -0500 + llvm-toolchain-8 (1:8.0.1~+rc4-1) unstable; urgency=medium * New snapshot release diff --git a/debian/control b/debian/control index f09ba72c..94e266fe 100644 --- a/debian/control +++ b/debian/control @@ -6,13 +6,13 @@ Maintainer: LLVM Packaging Team Uploaders: Sylvestre Ledru Build-Depends: debhelper (>= 9.0), cmake, 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.3.6), + lsb-release, patchutils, diffstat, xz-utils, python3-dev, + libedit-dev, libncurses5-dev, swig, python3-six, python3-sphinx (>= 1.3.6), 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], - libjs-mathjax, python-recommonmark, + libjs-mathjax, python3-recommonmark, doxygen, gfortran, ocaml-nox [amd64 arm64 armhf i386 ppc64el s390x], ocaml-findlib [amd64 arm64 armhf i386 ppc64el s390x], @@ -33,7 +33,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${dep:devlibs}, ${dep:devlibs-objc}, libclang-common-8-dev (= ${binary:Version}), libclang1-8 (= ${binary:Version}), libc6-dev, binutils Provides: c-compiler, objc-compiler, c++-compiler -Recommends: llvm-8-dev, python, libomp-8-dev +Recommends: llvm-8-dev, python3, libomp-8-dev Suggests: clang-8-doc Description: C, C++ and Objective-C compiler Clang project is a C, C++, Objective C and Objective C++ front-end @@ -46,7 +46,7 @@ Description: C, C++ and Objective-C compiler Package: clang-tools-8 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, clang-8 (= ${binary:Version}), - python + python3 Description: clang-based tools for C/C++ developments 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 @@ -60,7 +60,7 @@ Description: clang-based tools for C/C++ developments Package: clang-format-8 Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python, +Depends: ${shlibs:Depends}, ${misc:Depends}, python3, libllvm8 (= ${binary:Version}) Description: Tool to format C/C++/Obj-C code Clang-format is both a library and a stand-alone tool with the goal of @@ -76,9 +76,9 @@ Description: Tool to format C/C++/Obj-C code Package: clang-tidy-8 Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python, +Depends: ${shlibs:Depends}, ${misc:Depends}, python3, libllvm8 (= ${binary:Version}), libclang-common-8-dev, - clang-tools-8, python-yaml + clang-tools-8, python3-yaml Replaces: clang-modernize-8, clang-8 (<< 8~svn250696-1) Breaks: clang-modernize-8, clang-8 (<< 8~svn250696-1) Description: clang-based C++ linter tool @@ -179,7 +179,7 @@ Description: Library for coverage-guided fuzz testing Package: python-clang-8 Section: python Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python +Depends: ${shlibs:Depends}, ${misc:Depends}, python3 Replaces: python-clang-3.8, python-clang-3.9, python-clang-x.y Breaks: python-clang-3.8, python-clang-3.9 Conflicts: python-clang-x.y @@ -295,8 +295,8 @@ Description: Modular compiler and toolchain technologies, libraries and headers Package: llvm-8-tools Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, python, - python-pygments, python-yaml, +Depends: ${shlibs:Depends}, ${misc:Depends}, python3, + python3-pygments, python3-yaml, llvm-8-dev (= ${binary:Version}) Description: Modular compiler and toolchain technologies, tools LLVM is a collection of libraries and tools that make it easy to build @@ -448,7 +448,7 @@ Package: python-lldb-8 Section: python 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}, python, python-six +Depends: ${shlibs:Depends}, ${misc:Depends}, python3, python3-six Conflicts: python-lldb-3.8, python-lldb-3.9, python-lldb-x.y Replaces: python-lldb-x.y Provides: python-lldb-x.y diff --git a/debian/rules b/debian/rules index d69e3f49..e0fbc92b 100755 --- a/debian/rules +++ b/debian/rules @@ -40,7 +40,7 @@ LDFLAGS_EXTRA = CXXFLAGS_EXTRA = CFLAGS_EXTRA = CONFIGURE_EXTRA = -CMAKE_EXTRA = +CMAKE_EXTRA = -DPYTHON_EXECUTABLE=/usr/bin/python3 BASE_PATH := $(CURDIR) LIBCXX_EXCEPTIONS :=ON From 1d150a9275e991904753cce044993b6084e57020 Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Thu, 18 Jul 2019 14:57:19 -0500 Subject: [PATCH 4/4] Also remove the explicit version list from CMakeLists.txt This is required to make the previous Python 3 patch work correctly. --- ...-Remove-explicit-python-version-list.patch | 28 +++++++++++++++++++ debian/patches/series | 3 ++ 2 files changed, 31 insertions(+) create mode 100644 debian/patches/0050-Remove-explicit-python-version-list.patch diff --git a/debian/patches/0050-Remove-explicit-python-version-list.patch b/debian/patches/0050-Remove-explicit-python-version-list.patch new file mode 100644 index 00000000..4dc34ded --- /dev/null +++ b/debian/patches/0050-Remove-explicit-python-version-list.patch @@ -0,0 +1,28 @@ +From 61caa3a0c61fd4f2a049e9a14b5f4f74354dbb29 Mon Sep 17 00:00:00 2001 +From: Christian Biesinger +Date: Thu, 18 Jul 2019 14:52:36 -0500 +Subject: [PATCH] Remove explicit python version list + +This is required to make -DPYTHON_EXECUTABLE work correctly +--- + llvm/CMakeLists.txt | 4 ---- + 1 file changed, 4 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 81c2bab39ec..e2222d42aae 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -603,10 +603,6 @@ message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}") + + include(HandleLLVMOptions) + +-# Verify that we can find a Python 2 interpreter. Python 3 is unsupported. +-# FIXME: We should support systems with only Python 3, but that requires work +-# on LLDB. +-set(Python_ADDITIONAL_VERSIONS 2.7) + include(FindPythonInterp) + if( NOT PYTHONINTERP_FOUND ) + message(FATAL_ERROR +-- +2.22.0.510.g264f2c817a-goog + diff --git a/debian/patches/series b/debian/patches/series index 91f876f3..29a54464 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -135,3 +135,6 @@ OpenCL-Fix-assertion-due-to-blocks.patch ubuntu-eoan-distro.patch 930008-arm.diff + +# Python 3 +0050-Remove-explicit-python-version-list.patch