Source: llvm-toolchain-7 Version: 1:7~+rc3-1 Severity: normal Hello!
The logic used for toggling polly and openmp in the debian/rules file is inverted. It's currently using the Makefile "filter-out" function which I actually never noticed before: ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc powerpcspe s390x)) POLLY_ENABLE=no endif From the GNU Make documentation [1]. "$(filter-out pattern…,text)" "Returns all whitespace-separated words in text that do not match any of the pattern words, removing the words that do match one or more. This is the exact opposite of the filter function." This means, that in our case above, "filter-out" will just remove any strings matching "DEB_HOST_ARCH" in "powerpc powerpcpe s390x" and then compare the resulting string with an empty string. So, for example, if "DEB_HOST_ARCH" is "powerpc", the right string will be reduced to "powerpcspe s390x" and then compared with an empty string which will fail. Thus, the ifeq-clause will never be true and POLLY_ENABLE will never be disabled for the affected architectures. The same applies to what is used for OPENMP_ENABLE. If I replace "ifeq" with "ifneq" and "filter-out" with "filter", the code works as intended and llvm-toolchain-6.0 builds fine for on powerpc except that the dh_install step fails because of missing cmake files: dh_install --fail-missing dh_install: Please use dh_missing --list-missing/--fail-missing instead dh_install: This feature will be removed in compat 12. dh_install: Cannot find (any matches for) "usr/lib/llvm-6.0/lib/cmake/polly/*.cmake" (tried in ., debian/tmp) dh_install: libclang-common-6.0-dev missing files: usr/lib/llvm-6.0/lib/cmake/polly/*.cmake dh_install: missing files, aborting make[1]: *** [debian/rules:520: override_dh_install] Error 25 make[1]: Leaving directory '/<<PKGBUILDDIR>>' make: *** [debian/rules:180: binary-arch] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary-arch subprocess returned exit status 2 However, we would just have to adjust the corresponding install.in file here to fix this issue. The behavior is the same with s390x. I suggest the following patch for llvm-toolchain-7: --- debian/rules.orig 2018-09-07 14:37:18.000000000 +0200 +++ debian/rules 2018-09-11 11:30:33.166678712 +0200 @@ -107,13 +107,13 @@ # Enable polly (or not) POLLY_ENABLE=yes -ifeq (,$(filter-out $(DEB_HOST_ARCH), powerpc powerpcspe s390x)) +ifneq (,$(filter $(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)) +ifneq (,$(filter $(DEB_HOST_ARCH), powerpc powerpcspe riscv64 sparc64 s390x)) OPENMP_ENABLE=no endif And the same patch for llvm-toolchain-6.0 with the openmp hunk removed. Plus, something figured out for install.in. Probably some sed magic in debian/rules. Adrian > [1] https://www.gnu.org/software/make/manual/html_node/Text-Functions.html -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913