Merge branch '13' into snapshot

This commit is contained in:
Gianfranco Costamagna 2021-08-27 11:45:05 +02:00
commit c4df26ee62
9 changed files with 102 additions and 14 deletions

33
debian/changelog vendored
View File

@ -6,10 +6,20 @@ llvm-toolchain-snapshot (1:14~++20210817085703+f5616a981c60-1~exp1) UNRELEASED;
merged upstream
* Also install libomptarget-nvptx in libomp-X.Y-dev next to amdgcn
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 17 Aug 2021 21:01:03 +0200
llvm-toolchain-13 (1:13.0.0~+rc2-1~exp1) UNRELEASED; urgency=medium
[ John Paul Adrian Glaubitz ]
* Disable libunwind on m68k, sparc64 and x32
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 17 Aug 2021 21:01:03 +0200
[ Gianfranco Costamagna ]
* integration-test-suite-test: fix build by using 13 as default version
[ Sylvestre Ledru ]
* experimental New snapshot release
-- Sylvestre Ledru <sylvestre@debian.org> Fri, 27 Aug 2021 09:36:35 +0200
llvm-toolchain-snapshot (1:14~++20210715093511+afc760ef3527-1~exp2) unstable; urgency=medium
@ -127,12 +137,29 @@ llvm-toolchain-snapshot (1:13~++20210129063721+010b176cdefb-1~exp1) experimental
-- Sylvestre Ledru <sylvestre@debian.org> Sat, 30 Jan 2021 17:31:15 +0100
llvm-toolchain-12 (1:12.0.1-7) UNRELEASED; urgency=medium
* Add a patch to fix omp build on riscv64
-- Gianfranco Costamagna <locutusofborg@debian.org> Fri, 27 Aug 2021 10:43:26 +0200
llvm-toolchain-12 (1:12.0.1-6) unstable; urgency=medium
* Fixup build process on riscv64, the architecture building was enabled
in control file but not in rules file, neither required build-deps were
installed. (note: this should fail, but at least we will have a build log
stored.
* Add ocaml support on riscv64.
* Don't require hello package on i386 (helps Ubuntu alternate dependencies)
-- Gianfranco Costamagna <locutusofborg@debian.org> Thu, 26 Aug 2021 15:33:24 +0200
llvm-toolchain-12 (1:12.0.1-5) unstable; urgency=medium
[ Jordan Justen ]
* libclc: Include libclc spir-v outputs (used by Mesa opencl)
* Include SPIR-V (*.spv) outputs in libclc package
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 17 Aug 2021 10:19:22 +0200
-- Sylvestre Ledru <sylvestre@debian.org> Wed, 25 Aug 2021 10:18:14 +0200
llvm-toolchain-12 (1:12.0.1-4) unstable; urgency=medium

13
debian/control vendored
View File

@ -15,11 +15,14 @@ Build-Depends: debhelper (>= 9.0), cmake, chrpath, texinfo, sharutils,
g++-multilib [amd64 i386 kfreebsd-amd64 mips mips64 mips64el mipsel powerpc ppc64 s390 s390x sparc sparc64 x32],
libjs-mathjax, python3-recommonmark,
doxygen, gfortran,
ocaml-nox [amd64 arm64 armhf ppc64el s390x],
ocaml-findlib [amd64 arm64 armhf ppc64el s390x],
libctypes-ocaml-dev [amd64 arm64 armhf ppc64el s390x],
dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el s390x],
libpfm4-dev [linux-any], python3-setuptools, libz3-dev
ocaml-nox [amd64 arm64 armhf ppc64el riscv64 s390x],
ocaml-findlib [amd64 arm64 armhf ppc64el riscv64 s390x],
libctypes-ocaml-dev [amd64 arm64 armhf ppc64el riscv64 s390x],
dh-exec, dh-ocaml [amd64 arm64 armhf ppc64el riscv64 s390x],
libpfm4-dev [linux-any], python3-setuptools, libz3-dev,
llvm-spirv [ amd64 arm64 armel armhf mips64el mipsel ppc64el s390x ] <!stage1> | hello [!i386],
spirv-tools [ linux-any ] | hello [ !i386]
# "| hello" is for older buster/bionic distros without spirv support
Build-Conflicts: oprofile, ocaml
Standards-Version: 4.2.1
Homepage: https://www.llvm.org/

View File

@ -1 +1,2 @@
usr/lib/clc/*.bc
#spv usr/lib/clc/*.spv

13
debian/patches/libclc-llvm-spirv.diff vendored Normal file
View File

@ -0,0 +1,13 @@
diff --git a/libclc/CMakeLists.txt b/libclc/CMakeLists.txt
index b8b5ceff086c..5964468358f2 100644
--- a/libclc/CMakeLists.txt
+++ b/libclc/CMakeLists.txt
@@ -97,7 +97,7 @@ find_program( LLVM_CLANG clang PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
find_program( LLVM_AS llvm-as PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
find_program( LLVM_LINK llvm-link PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
find_program( LLVM_OPT opt PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
-find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR} NO_DEFAULT_PATH )
+find_program( LLVM_SPIRV llvm-spirv PATHS ${LLVM_BINDIR})
# Print toolchain
message( "clang: ${LLVM_CLANG}" )

23
debian/patches/omp-riscv64.patch vendored Normal file
View File

@ -0,0 +1,23 @@
Description: Define the affinity for riscv64
Last-Update: 2021-08-27
--- llvm-toolchain-12-12.0.1.orig/openmp/runtime/src/kmp_affinity.h
+++ llvm-toolchain-12-12.0.1/openmp/runtime/src/kmp_affinity.h
@@ -209,6 +209,17 @@ public:
#elif __NR_sched_getaffinity != 123
#error Wrong code for getaffinity system call.
#endif /* __NR_sched_getaffinity */
+#elif KMP_ARCH_RISCV64
+#ifndef __NR_sched_setaffinity
+#define __NR_sched_setaffinity 122
+#elif __NR_sched_setaffinity != 122
+#error Wrong code for setaffinity system call.
+#endif /* __NR_sched_setaffinity */
+#ifndef __NR_sched_getaffinity
+#define __NR_sched_getaffinity 123
+#elif __NR_sched_getaffinity != 123
+#error Wrong code for getaffinity system call.
+#endif /* __NR_sched_getaffinity */
#elif KMP_ARCH_X86_64
#ifndef __NR_sched_setaffinity
#define __NR_sched_setaffinity 203

View File

@ -142,3 +142,7 @@ lld-use-link-atomic-i386.diff
lower-python-dep.diff
scan-build-py-fix-analyze-path.diff
scan-build-py-fix-default-bin.diff
clang-soname-extract-version.diff
libclc-llvm-spirv.diff
omp-riscv64.patch

View File

@ -6,7 +6,7 @@ TARGET_VERSION_2=14_0
ORIG_VERSION_3=130
TARGET_VERSION_3=140
LIST=`ls debian/control debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch debian/patches/clang-tidy-run-bin.diff debian/patches/fix-scan-view-path.diff debian/README debian/patches/clang-analyzer-force-version.diff debian/patches/clang-tidy-run-bin.diff debian/tests/control debian/unpack.sh debian/tests/cmake-test debian/patches/scan-build-py-fix-analyze-path.diff debian/patches/scan-build-py-fix-default-bin.diff`
LIST=`ls debian/control debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff debian/patches/lldb/lldb-addversion-suffix-to-llvm-server-exec.patch debian/patches/clang-tidy-run-bin.diff debian/patches/fix-scan-view-path.diff debian/README debian/patches/clang-analyzer-force-version.diff debian/patches/clang-tidy-run-bin.diff debian/tests/control debian/tests/integration-test-suite-test debian/unpack.sh debian/tests/cmake-test debian/patches/scan-build-py-fix-analyze-path.diff debian/patches/scan-build-py-fix-default-bin.diff`
for F in $LIST; do
sed -i -e "s|$ORIG_VERSION_3|$TARGET_VERSION_3|g" $F
sed -i -e "s|$ORIG_VERSION_2|$TARGET_VERSION_2|g" $F

25
debian/rules vendored
View File

@ -140,6 +140,17 @@ else
control_vars = '-Vdep:devlibs=libstdc++6-$(GCC_VERSION)-dev'
endif
ifeq ($(shell which llvm-spirv),)
LLVM_SPIRV_INSTALLED = no
else
LLVM_SPIRV_INSTALLED = yes
endif
LIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"
ifeq ($(LLVM_SPIRV_INSTALLED),yes)
LIBCLC_TARGETS_TO_BUILD := $(LIBCLC_TARGETS_TO_BUILD)";spirv-mesa3d-;spirv64-mesa3d-"
endif
# Disabled:
# Host compiler does not support '-fuse-ld=lld'
# USE_LLD_ARCHS := amd64
@ -189,7 +200,7 @@ endif
# Enable openmp (or not)
OPENMP_ENABLE=yes
ifneq (,$(filter $(DEB_HOST_ARCH), m68k mips mipsel powerpc powerpcspe riscv64 sparc64 s390x x32))
ifneq (,$(filter $(DEB_HOST_ARCH), m68k mips mipsel powerpc powerpcspe sparc64 s390x x32))
OPENMP_ENABLE=no
else
PROJECTS+=;openmp
@ -252,7 +263,7 @@ else
endif
LLDB_ENABLE=yes
LLDB_DISABLE_ARCHS := hurd-i386 ia64 powerpc powerpcspe ppc64 riscv64 sparc64
LLDB_DISABLE_ARCHS := hurd-i386 ia64 powerpc powerpcspe ppc64 sparc64
# hurd has threading issues
ifeq (,$(filter-out $(LLDB_DISABLE_ARCHS), $(DEB_HOST_ARCH)))
# Disable LLDB for this arch.
@ -288,7 +299,7 @@ endif
DH_OPTIONS=
OCAML_ENABLE= no
OCAML_ARCHS := amd64 arm64 armhf ppc64el s390x
OCAML_ARCHS := amd64 arm64 armhf ppc64el riscv64 s390x
ifneq (,$(filter $(DEB_HOST_ARCH),$(OCAML_ARCHS)))
# Enable OCAML for this arch.
OCAML_ENABLE=yes
@ -359,6 +370,12 @@ preconfigure:
debian/llvm-$(LLVM_VERSION)-dev.install \
debian/llvm-$(LLVM_VERSION)-linker-tools.install
# Conditionally enable *.spv files. Debian buster and Ubuntu 18.04
# don't have llvm-spirv to create the *.spv files.
if test "$(LLVM_SPIRV_INSTALLED)" = "yes"; then \
sed -i -e "s|#spv\ ||g" debian/libclc-$(LLVM_VERSION).install; \
fi
# Override this two targets. They are trying to manage the .in conversion for me
override_dh_ocamlinit:
override_dh_ocamlclean:
@ -539,7 +556,7 @@ debian-libclc-build:
-DCMAKE_INSTALL_DATADIR=lib \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DLLVM_CONFIG=$(CURDIR)/$(TARGET_BUILD_STAGE2)/bin/llvm-config \
-DLIBCLC_TARGETS_TO_BUILD="amdgcn--;amdgcn--amdhsa;r600--;nvptx--;nvptx64--;nvptx--nvidiacl;nvptx64--nvidiacl"; \
-DLIBCLC_TARGETS_TO_BUILD=$(LIBCLC_TARGETS_TO_BUILD); \
make $(NJOBS) $(VERBOSE)
touch $@

View File

@ -2,7 +2,7 @@
set -e
LLVM_VERSION=12
LLVM_VERSION=13
# this is taken from libjsoncpp package
# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us, so we