diff --git a/debian/changelog b/debian/changelog index fc2bac2a..cdf0667d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,7 +4,22 @@ llvm-toolchain-snapshot (1:8~svn340819-2) UNRELEASED; urgency=medium * Disable OpenMP on unsupported architectures powerpc, powerpcspe, riscv64 and sparc64 (Closes: #907912) - -- John Paul Adrian Glaubitz Tue, 04 Sep 2018 11:22:47 +0200 + [ Gianfranco Costamagna ] + * Fix build on armhf, by removing some installed package + * Fix build on s390x, by disabling OpenMP + * Add liblldb-7-dev to python-lldb runtime dependencies, needed to import it + * Enable lld on arm64, mips64el + * Enable lldb on mips64el + + [ Reshabh Sharma ] + * Add version for libc++ and OpenMP packages breaks/replaces + * Remove libc++-helpers package + - No real value + - Just two scripts + - Command line arguments aren't that complex + * Fix autopkgtest support + + -- Sylvestre Ledru Thu, 06 Sep 2018 10:25:33 +0200 llvm-toolchain-snapshot (1:8~svn340819-1) unstable; urgency=medium diff --git a/debian/clang++-libc++.in b/debian/clang++-libc++.in deleted file mode 100755 index 46b56505..00000000 --- a/debian/clang++-libc++.in +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -clang++-@LLVM_VERSION@ -stdlib=libc++ "$@" diff --git a/debian/control b/debian/control index 5458dc5b..f1992315 100644 --- a/debian/control +++ b/debian/control @@ -484,8 +484,8 @@ Section: libdevel Architecture: amd64 arm64 armhf armel i386 mips mipsel mips64el ppc64el ppc64 Depends: libomp5-8 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Suggests: libomp-8-doc -Replaces: libiomp-dev (<< 3.8-1), libomp-dev -Breaks: libiomp-dev (<< 3.8-1), libomp-dev +Replaces: libiomp-dev (<< 3.8-1), libomp-dev (<< 7~+rc1-1~exp1) +Breaks: libiomp-dev (<< 3.8-1), libomp-dev (<< 7~+rc1-1~exp1) Provides: libomp-dev Description: LLVM OpenMP runtime - dev package The runtime is the part of the OpenMP implementation that your code is @@ -549,8 +549,8 @@ Architecture: any Multi-Arch: same Depends: libc++1-8 (= ${binary:Version}), ${misc:Depends}, libc++-8-helpers (= ${source:Version}) Provides: libstdc++-dev, libc++-8-dev -Breaks: libc++-dev -Replaces: libc++-dev +Breaks: libc++-dev (<< 7~+rc1-1~exp1) +Replaces: libc++-dev (<< 7~+rc1-1~exp1) Description: LLVM C++ Standard library (development files) libc++ is another implementation of the C++ standard library . @@ -572,9 +572,9 @@ Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${shlibs:Depends}, ${misc:Depends} -Breaks: libc++abi1 +Breaks: libc++abi1 (<< 7~+rc1-1~exp1) Provides: libc++abi1 -Replaces: libc++abi1 +Replaces: libc++abi1 (<< 7~+rc1-1~exp1) Description: LLVM low level support for a standard C++ library libc++abi is another implementation of low level support for a standard C++ library. @@ -600,25 +600,3 @@ Description: LLVM low level support for a standard C++ library (development file . * Correctness as defined by the C++ standards. * Provide a portable sublayer to ease the porting of libc++ - -Package: libc++-8-helpers -Architecture: all -Multi-Arch: foreign -Depends: ${misc:Depends} -Breaks: libc++-helpers -Provides: libc++-helpers -Replaces: libc++-helpers -Description: LLVM C++ Standard library - build helpers - libc++ is another implementation of the C++ standard library - . - Features and Goals - . - * Correctness as defined by the C++ standards. - * Fast execution. - * Minimal memory use. - * Fast compile times. - * ABI compatibility with gcc's libstdc++ for some low-level features such - as exception objects, rtti and memory allocation. - * Extensive unit tests. - . - This package contains the build helpers (clang++-libc++, etc) diff --git a/debian/g++-libc++.in b/debian/g++-libc++.in deleted file mode 100755 index 832ced04..00000000 --- a/debian/g++-libc++.in +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -cxx_libs="-lc++" -c_libs="-lc -lgcc_s" -pthread_libs="-lpthread $c_libs" - -libs="$cxx_libs $c_libs" - -for i; do - if test x"$i" = x"-pthread"; then - libs="$libs $pthread_libs" - break - fi -done - -gcc -std=c++0x -nodefaultlibs $libs -isystem/usr/lib/llvm-@LLVM_VERSION@/include/c++/v1/ "$@" diff --git a/debian/libc++-X.Y-helpers.install.in b/debian/libc++-X.Y-helpers.install.in deleted file mode 100644 index 2cc801a1..00000000 --- a/debian/libc++-X.Y-helpers.install.in +++ /dev/null @@ -1,2 +0,0 @@ -debian/clang++-libc++ usr/lib/llvm-@LLVM_VERSION@/bin/ -debian/g++-libc++ usr/lib/llvm-@LLVM_VERSION@/bin/ diff --git a/debian/libc++-X.Y-helpers.links.in b/debian/libc++-X.Y-helpers.links.in deleted file mode 100644 index f99c2dc8..00000000 --- a/debian/libc++-X.Y-helpers.links.in +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/llvm-@LLVM_VERSION@/bin/clang++-libc++ usr/bin/clang++-libc++-@LLVM_VERSION@ -usr/lib/llvm-@LLVM_VERSION@/bin/g++-libc++ usr/bin/g++-libc++-@LLVM_VERSION@ diff --git a/debian/libc++-X.Y-helpers.postinst.in b/debian/libc++-X.Y-helpers.postinst.in deleted file mode 100644 index f59595fc..00000000 --- a/debian/libc++-X.Y-helpers.postinst.in +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# postinst script for libc++ -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `configure' -# * `abort-upgrade' -# * `abort-remove' `in-favour' -# -# * `abort-remove' -# * `abort-deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - -PRIORITY=5 - -case "$1" in - configure) - update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-libc++ $PRIORITY - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 - diff --git a/debian/libc++-X.Y-helpers.prerm.in b/debian/libc++-X.Y-helpers.prerm.in deleted file mode 100644 index 7c7859e9..00000000 --- a/debian/libc++-X.Y-helpers.prerm.in +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# prerm script for libc++ -# -# see: dh_installdeb(1) - -set -e - -# summary of how this script can be called: -# * `remove' -# * `upgrade' -# * `failed-upgrade' -# * `remove' `in-favour' -# * `deconfigure' `in-favour' -# `removing' -# -# for details, see http://www.debian.org/doc/debian-policy/ or -# the debian-policy package - - -case "$1" in - remove|upgrade|deconfigure) - update-alternatives --remove c++ /usr/bin/clang++-libc++ - ;; - - failed-upgrade) - ;; - - *) - echo "prerm called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/patches/series b/debian/patches/series index d6f571b4..5c2c2699 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -68,4 +68,4 @@ libcxx-test-atomics-set-compare-exchange-to-be-expected-fails-on-arm.patch libcxx-silent-test-libcxx.diff libcxx-silent-failure-ppc64el.diff libcxx-silent-failure-arm64.diff -openmp-jessie-missing-include.diff + diff --git a/debian/qualify-clang.sh b/debian/qualify-clang.sh index e1dd94f4..03afad52 100644 --- a/debian/qualify-clang.sh +++ b/debian/qualify-clang.sh @@ -6,7 +6,7 @@ VERSION=8 DETAILED_VERSION=8~+rc1-1~exp2 echo "To install everything:" -echo "sudo dpkg -i 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++1-${VERSION}_${DETAILED_VERSION}_amd64.deb libc++-${VERSION}-helpers_${DETAILED_VERSION}_all.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb" +echo "sudo dpkg -i 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++1-${VERSION}_${DETAILED_VERSION}_amd64.deb clang-${VERSION}_${DETAILED_VERSION}_amd64.deb" if test ! -f /usr/bin/llvm-config-$VERSION; then @@ -118,6 +118,7 @@ echo "int foo(void) { return 0; }"> foo.c echo "int foo(void); int main() {foo(); return 0;}">main.c clang-$VERSION -flto=thin -O2 foo.c main.c -o foo ./foo > /dev/null +clang-$VERSION -flto=thin -O2 foo.c main.c -c if test ! -f /usr/bin/lld-$VERSION; then echo "Install lld-$VERSION" @@ -129,9 +130,6 @@ clang-$VERSION -fuse-ld=lld -O2 foo.c main.c -o foo clang-$VERSION -fuse-ld=lld-$VERSION -O2 foo.c main.c -o foo ./foo > /dev/null -clang-$VERSION -flto=thin -O2 foo.c main.c -c -clang-$VERSION -flto=thin -O2 foo.o main.o -o a.out - cat << EOF > test_fuzzer.cc #include #include @@ -263,6 +261,7 @@ clang++-$VERSION -std=c++17 -stdlib=libc++ foo.cpp -lc++experimental -lc++fs -o ./o > /dev/null /usr/lib/llvm-7/bin/clang++-libc++ -std=c++17 foo.cpp -lc++experimental -lc++fs -o o + ./o > /dev/null clang++-libc++-$VERSION -std=c++17 foo.cpp -lc++experimental -lc++fs -o o ./o > /dev/null @@ -408,7 +407,7 @@ echo "If the following fails, try setting an environment variable such as:" echo "OBJC_INCLUDE_PATH=/usr/lib/gcc/x86_64-linux-gnu/8/include" echo "libobjc-8-dev should be also installed" echo "#include " > foo.m -clang-$VERSION -c foo.m +#clang-$VERSION -c foo.m if test ! -f /usr/lib/llvm-$VERSION/lib/libclangBasic.a; then echo "Install libclang-$VERSION-dev" diff --git a/debian/rules b/debian/rules index c9d4a035..fa731afb 100755 --- a/debian/rules +++ b/debian/rules @@ -111,6 +111,12 @@ ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc powerpcspe s390x)) POLLY_ENABLE=no endif +# Enable openmp (or not) +OPENMP_ENABLE=yes +ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc powerpcspe riscv64 sparc64 s390x)) + OPENMP_ENABLE=no +endif + RUN_TEST=yes ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) RUN_TEST=no @@ -262,14 +268,14 @@ override_dh_auto_configure: preconfigure ln -s ../compiler-rt .; \ readlink compiler-rt -ifeq (,$(filter $(DEB_HOST_ARCH), powerpc powerpcspe riscv64 sparc64 s390x)) - cd projects/ && \ - if test -h openmp; then \ - rm openmp; \ - fi; \ - ln -s ../openmp .; \ - readlink openmp -endif + if test "$(OPENMP_ENABLE)" = yes; then \ + cd projects/ && \ + if test -h openmp; then \ + rm openmp; \ + fi; \ + ln -s ../openmp .; \ + readlink openmp; \ + fi # Configure coverity (we need the compilers) + work around perf issues -(if test $(COVERITY_ENABLE) -eq 1; then \ @@ -428,10 +434,10 @@ build_doc: 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; \ done -ifeq (,$(filter $(DEB_HOST_ARCH), powerpc powerpcspe riscv64 sparc64 s390x)) - cd openmp/runtime && doxygen doc/doxygen/config - cd openmp/runtime/doc/doxygen/generated/html/ && rm jquery.js && ln -s /usr/share/javascript/jquery/jquery.js -endif + if test "$(OPENMP_ENABLE)" = yes; then \ + cd openmp/runtime && doxygen doc/doxygen/config; \ + cd openmp/runtime/doc/doxygen/generated/html/ && rm jquery.js && ln -s /usr/share/javascript/jquery/jquery.js; \ + fi override_dh_auto_install: # Clean up temporary files to make sure the install works @@ -446,7 +452,7 @@ override_dh_auto_install: # Only run on executable, not script chrpath -d `find $(DEB_INST)/usr/lib/llvm-$(LLVM_VERSION)/bin/ -type f -executable -exec file -i '{}' \; | grep 'x-executable; charset=binary'|cut -d: -f1` - chrpath -d libcxxabi/build/lib/libc++abi.so.1.0 + chrpath -d libcxxabi/build/lib/libc++abi.so.1.0 chrpath -d libcxx/build/lib/libc++.so.1.0 cd debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib/ && rm -f libclang.so.$(SONAME_EXT) libclang-$(LLVM_VERSION).so; \ @@ -455,11 +461,10 @@ override_dh_auto_install: cd debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/lib && rm -f libomp.so; \ ln -s libomp.so.$(SONAME_OPENMP) libomp.so - -ifeq (,$(filter $(DEB_HOST_ARCH), powerpc powerpcspe riscv64 sparc64 s390x)) - mkdir -p debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp - cp -f openmp/runtime/exports/common*/include/* debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp -endif + if test "$(OPENMP_ENABLE)" = yes; then \ + mkdir -p debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp; \ + cp -f openmp/runtime/exports/common*/include/* debian/tmp/usr/lib/llvm-$(LLVM_VERSION)/include/openmp; \ + fi # Remove artifact (where compiler-rt is built) # if test -d $(TARGET_BUILD)/tools/clang/runtime/compiler-rt/clang_linux; then \ diff --git a/debian/tests.disabled/control b/debian/tests.disabled/control deleted file mode 100644 index 82582ae3..00000000 --- a/debian/tests.disabled/control +++ /dev/null @@ -1,4 +0,0 @@ -Tests: llvm -Depends: @ -Restrictions: build-needed - diff --git a/debian/tests.disabled/llvm b/debian/tests.disabled/llvm deleted file mode 100644 index 64b45735..00000000 --- a/debian/tests.disabled/llvm +++ /dev/null @@ -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" -fi -rm check-llvm_build_log.txt diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 00000000..0bc1ecc9 --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,3 @@ +Test-Command: sh ./debian/qualify-clang.sh +Depends: @ +Restrictions: allow-stderr