Merge remote-tracking branch 'origin/7' into snapshot

This commit is contained in:
Sylvestre Ledru 2018-09-06 10:25:47 +02:00
commit 422c4a8ff3
14 changed files with 53 additions and 169 deletions

17
debian/changelog vendored
View File

@ -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 <glaubitz@physik.fu-berlin.de> 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 <sylvestre@debian.org> Thu, 06 Sep 2018 10:25:33 +0200
llvm-toolchain-snapshot (1:8~svn340819-1) unstable; urgency=medium

View File

@ -1,2 +0,0 @@
#!/bin/sh
clang++-@LLVM_VERSION@ -stdlib=libc++ "$@"

34
debian/control vendored
View File

@ -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)

16
debian/g++-libc++.in vendored
View File

@ -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/ "$@"

View File

@ -1,2 +0,0 @@
debian/clang++-libc++ usr/lib/llvm-@LLVM_VERSION@/bin/
debian/g++-libc++ usr/lib/llvm-@LLVM_VERSION@/bin/

View File

@ -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@

View File

@ -1,42 +0,0 @@
#!/bin/sh
# postinst script for libc++
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# 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

View File

@ -1,39 +0,0 @@
#!/bin/sh
# prerm script for libc++
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# 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

View File

@ -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

View File

@ -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 <stdint.h>
#include <stddef.h>
@ -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 <objc/objc.h>" > 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"

41
debian/rules vendored
View File

@ -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 \

View File

@ -1,4 +0,0 @@
Tests: llvm
Depends: @
Restrictions: build-needed

View File

@ -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

3
debian/tests/control vendored Normal file
View File

@ -0,0 +1,3 @@
Test-Command: sh ./debian/qualify-clang.sh
Depends: @
Restrictions: allow-stderr