diff --git a/debian/changelog b/debian/changelog index 73e5eebd..285ee1c2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 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 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 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 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 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 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 Tue, 17 Aug 2021 10:19:22 +0200 + -- Sylvestre Ledru Wed, 25 Aug 2021 10:18:14 +0200 llvm-toolchain-12 (1:12.0.1-4) unstable; urgency=medium diff --git a/debian/control b/debian/control index ec65ea8d..bc1359ba 100644 --- a/debian/control +++ b/debian/control @@ -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 ] | 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/ diff --git a/debian/libclc-X.Y.install.in b/debian/libclc-X.Y.install.in index 36023694..923094ff 100644 --- a/debian/libclc-X.Y.install.in +++ b/debian/libclc-X.Y.install.in @@ -1 +1,2 @@ usr/lib/clc/*.bc +#spv usr/lib/clc/*.spv diff --git a/debian/patches/libclc-llvm-spirv.diff b/debian/patches/libclc-llvm-spirv.diff new file mode 100644 index 00000000..2d6e85bf --- /dev/null +++ b/debian/patches/libclc-llvm-spirv.diff @@ -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}" ) diff --git a/debian/patches/omp-riscv64.patch b/debian/patches/omp-riscv64.patch new file mode 100644 index 00000000..e0cba704 --- /dev/null +++ b/debian/patches/omp-riscv64.patch @@ -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 diff --git a/debian/patches/series b/debian/patches/series index 6d9ac220..f4213aca 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 diff --git a/debian/prepare-new-release.sh b/debian/prepare-new-release.sh index ee11419a..36cb54e1 100644 --- a/debian/prepare-new-release.sh +++ b/debian/prepare-new-release.sh @@ -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 diff --git a/debian/rules b/debian/rules index a47597e0..85aef512 100755 --- a/debian/rules +++ b/debian/rules @@ -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 $@ diff --git a/debian/tests/integration-test-suite-test b/debian/tests/integration-test-suite-test index 3f35552a..e674750f 100755 --- a/debian/tests/integration-test-suite-test +++ b/debian/tests/integration-test-suite-test @@ -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