From 2d34082b0c91a564327854240f4d2e54003b3987 Mon Sep 17 00:00:00 2001 From: Bernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com> Date: Mon, 29 Nov 2021 21:48:18 +0100 Subject: llvm: Fix building llvm@4:9 using %clang@6: and %gcc@10: (#27233) Add z3 variant, fix @:9%gcc@9: with glibc2.31, fix no_cyclades range --- .../packages/llvm/llvm4-lld-ELF-Symbols.patch | 112 +++++++++++++++++++++ .../packages/llvm/llvm5-lld-ELF-Symbols.patch | 33 ++++++ .../packages/llvm/llvm5-sanitizer-ustat.patch | 25 +++++ .../builtin/packages/llvm/missing-includes.patch | 23 +++++ .../repos/builtin/packages/llvm/no_cyclades9.patch | 42 ++++++++ var/spack/repos/builtin/packages/llvm/package.py | 75 +++++++++++--- .../packages/llvm/sanitizer-ipc_perm_mode.patch | 9 ++ .../packages/llvm/xray_buffer_queue-cstddef.patch | 5 + 8 files changed, 308 insertions(+), 16 deletions(-) create mode 100644 var/spack/repos/builtin/packages/llvm/llvm4-lld-ELF-Symbols.patch create mode 100644 var/spack/repos/builtin/packages/llvm/llvm5-lld-ELF-Symbols.patch create mode 100644 var/spack/repos/builtin/packages/llvm/llvm5-sanitizer-ustat.patch create mode 100644 var/spack/repos/builtin/packages/llvm/missing-includes.patch create mode 100644 var/spack/repos/builtin/packages/llvm/no_cyclades9.patch create mode 100644 var/spack/repos/builtin/packages/llvm/sanitizer-ipc_perm_mode.patch create mode 100644 var/spack/repos/builtin/packages/llvm/xray_buffer_queue-cstddef.patch diff --git a/var/spack/repos/builtin/packages/llvm/llvm4-lld-ELF-Symbols.patch b/var/spack/repos/builtin/packages/llvm/llvm4-lld-ELF-Symbols.patch new file mode 100644 index 0000000000..1a86cda358 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/llvm4-lld-ELF-Symbols.patch @@ -0,0 +1,112 @@ +--- a/lldb/include/lldb/Utility/TaskPool.h ++++ b/lldb/include/lldb/Utility/TaskPool.h +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + // Global TaskPool class for running tasks in parallel on a set of worker thread + // created the first +# Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463 +--- a/lld/ELF/LTO.cpp ++++ b/lld/ELF/LTO.cpp +@@ -158,7 +158,7 @@ + return Ret; + } + +-template void BitcodeCompiler::template add(BitcodeFile &); +-template void BitcodeCompiler::template add(BitcodeFile &); +-template void BitcodeCompiler::template add(BitcodeFile &); +-template void BitcodeCompiler::template add(BitcodeFile &); ++template void BitcodeCompiler::add(BitcodeFile &); ++template void BitcodeCompiler::add(BitcodeFile &); ++template void BitcodeCompiler::add(BitcodeFile &); ++template void BitcodeCompiler::add(BitcodeFile &); +--- a/lld/ELF/Symbols.cpp ++++ b/lld/ELF/Symbols.cpp +@@ -343,45 +343,45 @@ + template bool SymbolBody::hasThunk() const; + template bool SymbolBody::hasThunk() const; + +-template uint32_t SymbolBody::template getVA(uint32_t) const; +-template uint32_t SymbolBody::template getVA(uint32_t) const; +-template uint64_t SymbolBody::template getVA(uint64_t) const; +-template uint64_t SymbolBody::template getVA(uint64_t) const; +- +-template uint32_t SymbolBody::template getGotVA() const; +-template uint32_t SymbolBody::template getGotVA() const; +-template uint64_t SymbolBody::template getGotVA() const; +-template uint64_t SymbolBody::template getGotVA() const; +- +-template uint32_t SymbolBody::template getGotOffset() const; +-template uint32_t SymbolBody::template getGotOffset() const; +-template uint64_t SymbolBody::template getGotOffset() const; +-template uint64_t SymbolBody::template getGotOffset() const; +- +-template uint32_t SymbolBody::template getGotPltVA() const; +-template uint32_t SymbolBody::template getGotPltVA() const; +-template uint64_t SymbolBody::template getGotPltVA() const; +-template uint64_t SymbolBody::template getGotPltVA() const; +- +-template uint32_t SymbolBody::template getThunkVA() const; +-template uint32_t SymbolBody::template getThunkVA() const; +-template uint64_t SymbolBody::template getThunkVA() const; +-template uint64_t SymbolBody::template getThunkVA() const; +- +-template uint32_t SymbolBody::template getGotPltOffset() const; +-template uint32_t SymbolBody::template getGotPltOffset() const; +-template uint64_t SymbolBody::template getGotPltOffset() const; +-template uint64_t SymbolBody::template getGotPltOffset() const; +- +-template uint32_t SymbolBody::template getPltVA() const; +-template uint32_t SymbolBody::template getPltVA() const; +-template uint64_t SymbolBody::template getPltVA() const; +-template uint64_t SymbolBody::template getPltVA() const; +- +-template uint32_t SymbolBody::template getSize() const; +-template uint32_t SymbolBody::template getSize() const; +-template uint64_t SymbolBody::template getSize() const; +-template uint64_t SymbolBody::template getSize() const; ++template uint32_t SymbolBody::getVA(uint32_t) const; ++template uint32_t SymbolBody::getVA(uint32_t) const; ++template uint64_t SymbolBody::getVA(uint64_t) const; ++template uint64_t SymbolBody::getVA(uint64_t) const; ++ ++template uint32_t SymbolBody::getGotVA() const; ++template uint32_t SymbolBody::getGotVA() const; ++template uint64_t SymbolBody::getGotVA() const; ++template uint64_t SymbolBody::getGotVA() const; ++ ++template uint32_t SymbolBody::getGotOffset() const; ++template uint32_t SymbolBody::getGotOffset() const; ++template uint64_t SymbolBody::getGotOffset() const; ++template uint64_t SymbolBody::getGotOffset() const; ++ ++template uint32_t SymbolBody::getGotPltVA() const; ++template uint32_t SymbolBody::getGotPltVA() const; ++template uint64_t SymbolBody::getGotPltVA() const; ++template uint64_t SymbolBody::getGotPltVA() const; ++ ++template uint32_t SymbolBody::getThunkVA() const; ++template uint32_t SymbolBody::getThunkVA() const; ++template uint64_t SymbolBody::getThunkVA() const; ++template uint64_t SymbolBody::getThunkVA() const; ++ ++template uint32_t SymbolBody::getGotPltOffset() const; ++template uint32_t SymbolBody::getGotPltOffset() const; ++template uint64_t SymbolBody::getGotPltOffset() const; ++template uint64_t SymbolBody::getGotPltOffset() const; ++ ++template uint32_t SymbolBody::getPltVA() const; ++template uint32_t SymbolBody::getPltVA() const; ++template uint64_t SymbolBody::getPltVA() const; ++template uint64_t SymbolBody::getPltVA() const; ++ ++template uint32_t SymbolBody::getSize() const; ++template uint32_t SymbolBody::getSize() const; ++template uint64_t SymbolBody::getSize() const; ++template uint64_t SymbolBody::getSize() const; + + template class elf::Undefined; + template class elf::Undefined; diff --git a/var/spack/repos/builtin/packages/llvm/llvm5-lld-ELF-Symbols.patch b/var/spack/repos/builtin/packages/llvm/llvm5-lld-ELF-Symbols.patch new file mode 100644 index 0000000000..727647d3b8 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/llvm5-lld-ELF-Symbols.patch @@ -0,0 +1,33 @@ +# Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463 +--- a/lld/ELF/Symbols.cpp ++++ b/lld/ELF/Symbols.cpp +@@ -383,17 +383,17 @@ + return B.getName(); + } + +-template uint32_t SymbolBody::template getSize() const; +-template uint32_t SymbolBody::template getSize() const; +-template uint64_t SymbolBody::template getSize() const; +-template uint64_t SymbolBody::template getSize() const; ++template uint32_t SymbolBody::getSize() const; ++template uint32_t SymbolBody::getSize() const; ++template uint64_t SymbolBody::getSize() const; ++template uint64_t SymbolBody::getSize() const; + +-template bool DefinedRegular::template isMipsPIC() const; +-template bool DefinedRegular::template isMipsPIC() const; +-template bool DefinedRegular::template isMipsPIC() const; +-template bool DefinedRegular::template isMipsPIC() const; ++template bool DefinedRegular::isMipsPIC() const; ++template bool DefinedRegular::isMipsPIC() const; ++template bool DefinedRegular::isMipsPIC() const; ++template bool DefinedRegular::isMipsPIC() const; + +-template uint32_t SharedSymbol::template getAlignment() const; +-template uint32_t SharedSymbol::template getAlignment() const; +-template uint32_t SharedSymbol::template getAlignment() const; +-template uint32_t SharedSymbol::template getAlignment() const; ++template uint32_t SharedSymbol::getAlignment() const; ++template uint32_t SharedSymbol::getAlignment() const; ++template uint32_t SharedSymbol::getAlignment() const; ++template uint32_t SharedSymbol::getAlignment() const; diff --git a/var/spack/repos/builtin/packages/llvm/llvm5-sanitizer-ustat.patch b/var/spack/repos/builtin/packages/llvm/llvm5-sanitizer-ustat.patch new file mode 100644 index 0000000000..531a3c5d6d --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/llvm5-sanitizer-ustat.patch @@ -0,0 +1,25 @@ +# has been removed from glibc 2.28, +# backport fix from llvm-6.0.1: +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -159,1 +159,0 @@ +-#include +@@ -252,5 +252,17 @@ + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +- unsigned struct_ustat_sz = sizeof(struct ustat); ++ // Use pre-computed size of struct ustat to avoid which ++ // has been removed from glibc 2.28. ++#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \ ++ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \ ++ || defined(__x86_64__) ++#define SIZEOF_STRUCT_USTAT 32 ++#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \ ++ || defined(__powerpc__) || defined(__s390__) ++#define SIZEOF_STRUCT_USTAT 20 ++#else ++#error Unknown size of struct ustat ++#endif ++ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT; + unsigned struct_rlimit64_sz = sizeof(struct rlimit64); + unsigned struct_statvfs64_sz = sizeof(struct statvfs64); diff --git a/var/spack/repos/builtin/packages/llvm/missing-includes.patch b/var/spack/repos/builtin/packages/llvm/missing-includes.patch new file mode 100644 index 0000000000..e88b8fcfde --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/missing-includes.patch @@ -0,0 +1,23 @@ +# https://github.com/spack/spack/issues/24270 (This hunk is upstream since llvm-10) +--- a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h ++++ b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h +@@ -4,6 +4,8 @@ + #include "llvm/Demangle/Compiler.h" + #include "llvm/Demangle/StringView.h" + #include ++#include ++#include + + class OutputStream; + +# https://github.com/spack/spack/pull/27233 +--- a/llvm/utils/benchmark/src/benchmark_register.h ++++ b/llvm/utils/benchmark/src/benchmark_register.h +@@ -2,6 +2,7 @@ + #define BENCHMARK_REGISTER_H + + #include ++#include + + #include "check.h" + diff --git a/var/spack/repos/builtin/packages/llvm/no_cyclades9.patch b/var/spack/repos/builtin/packages/llvm/no_cyclades9.patch new file mode 100644 index 0000000000..7532865e6d --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/no_cyclades9.patch @@ -0,0 +1,42 @@ +--- a/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -370,9 +370,0 @@ +- _(CYGETDEFTHRESH, WRITE, sizeof(int)); +- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); +- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); +- _(CYGETTHRESH, WRITE, sizeof(int)); +- _(CYGETTIMEOUT, WRITE, sizeof(int)); +- _(CYSETDEFTHRESH, NONE, 0); +- _(CYSETDEFTIMEOUT, NONE, 0); +- _(CYSETTHRESH, NONE, 0); +- _(CYSETTIMEOUT, NONE, 0); +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -986,1 +986,0 @@ +- extern unsigned struct_cyclades_monitor_sz; +@@ -1331,9 +1327,0 @@ +- extern unsigned IOCTL_CYGETDEFTHRESH; +- extern unsigned IOCTL_CYGETDEFTIMEOUT; +- extern unsigned IOCTL_CYGETMON; +- extern unsigned IOCTL_CYGETTHRESH; +- extern unsigned IOCTL_CYGETTIMEOUT; +- extern unsigned IOCTL_CYSETDEFTHRESH; +- extern unsigned IOCTL_CYSETDEFTIMEOUT; +- extern unsigned IOCTL_CYSETTHRESH; +- extern unsigned IOCTL_CYSETTIMEOUT; +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -143,1 +143,0 @@ +-#include +@@ -460,1 +459,0 @@ +- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); +@@ -824,9 +822,0 @@ +- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; +- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; +- unsigned IOCTL_CYGETMON = CYGETMON; +- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; +- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; +- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; +- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; +- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; +- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 36c3984dc1..d87c924d6b 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -2,6 +2,7 @@ # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +import os import os.path import re import sys @@ -163,11 +164,13 @@ class Llvm(CMakePackage, CudaPackage): variant("python", default=False, description="Install python bindings") variant('version_suffix', default='none', description="Add a symbol suffix") + variant('z3', default=False, description='Use Z3 for the clang static analyzer') extends("python", when="+python") # Build dependency depends_on("cmake@3.4.3:", type="build") + depends_on('cmake@3.13.4:', type='build', when='@12:') depends_on("ninja", type="build") depends_on("python@2.7:2.8", when="@:4 ~python", type="build") depends_on("python", when="@5: ~python", type="build") @@ -176,7 +179,7 @@ class Llvm(CMakePackage, CudaPackage): # Universal dependency depends_on("python@2.7:2.8", when="@:4+python") depends_on("python", when="@5:+python") - depends_on("z3", when="@9:") + depends_on('z3', when='@8:+clang+z3') # openmp dependencies depends_on("perl-data-dumper", type=("build")) @@ -212,10 +215,13 @@ class Llvm(CMakePackage, CudaPackage): conflicts('~mlir', when='+flang', msg='Flang requires MLIR') # Older LLVM do not build with newer compilers, and vice versa - conflicts("%gcc@11:", when="@:7") conflicts("%gcc@8:", when="@:5") conflicts("%gcc@:5.0", when="@8:") - conflicts("%apple-clang@13:", when="@:9") + # clang/lib: a lambda parameter cannot shadow an explicitly captured entity + conflicts("%clang@8:", when="@:4") + + # When these versions are concretized, but not explicitly with +libcxx, these + # conflicts will enable clingo to set ~libcxx, making the build successful: # libc++ of LLVM13, see https://libcxx.llvm.org/#platform-and-compiler-support # @13 does not support %gcc@:10 https://bugs.llvm.org/show_bug.cgi?id=51359#c1 @@ -224,7 +230,15 @@ class Llvm(CMakePackage, CudaPackage): # AppleClang 12 - latest stable release per Xcode release page conflicts("%gcc@:10", when="@13:+libcxx") conflicts("%clang@:10", when="@13:+libcxx") - conflicts("%apple_clang@:11", when="@13:+libcxx") + conflicts("%apple-clang@:11", when="@13:+libcxx") + + # libcxx-4 and compiler-rt-4 fail to build with "newer" clang and gcc versions: + conflicts('%gcc@7:', when='@:4+libcxx') + conflicts('%clang@6:', when='@:4+libcxx') + conflicts('%apple-clang@6:', when='@:4+libcxx') + conflicts('%gcc@7:', when='@:4+compiler-rt') + conflicts('%clang@6:', when='@:4+compiler-rt') + conflicts('%apple-clang@6:', when='@:4+compiler-rt') # OMP TSAN exists in > 5.x conflicts("+omp_tsan", when="@:5") @@ -260,10 +274,22 @@ class Llvm(CMakePackage, CudaPackage): # Github issue #4986 patch("llvm_gcc7.patch", when="@4.0.0:4.0.1+lldb %gcc@7.0:") - # https://github.com/spack/spack/issues/24270 - patch('https://src.fedoraproject.org/rpms/llvm10/raw/7ce7ebd066955ea95ba2b491c41fbc6e4ee0643a/f/llvm10-gcc11.patch', - sha256='958c64838c9d469be514eef195eca0f8c3ab069bc4b64a48fad59991c626bab8', - when='@8:11 %gcc@11:') + # sys/ustat.h has been removed in favour of statfs from glibc-2.28. Use fixed sizes: + patch('llvm5-sanitizer-ustat.patch', when="@4:6+compiler-rt") + + # Fix lld templates: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230463 + patch('llvm4-lld-ELF-Symbols.patch', when="@4+lld%clang@6:") + patch('llvm5-lld-ELF-Symbols.patch', when="@5+lld%clang@7:") + + # Fix missing std:size_t in 'llvm@4:5' when built with '%clang@7:' + patch('xray_buffer_queue-cstddef.patch', when="@4:5+compiler-rt%clang@7:") + + # https://github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce + patch('sanitizer-ipc_perm_mode.patch', when="@5:7+compiler-rt%clang@11:") + patch('sanitizer-ipc_perm_mode.patch', when="@5:9+compiler-rt%gcc@9:") + + # github.com/spack/spack/issues/24270 and MicrosoftDemangle: %gcc@10: and %clang@13: + patch('missing-includes.patch', when='@8:11') # Backport from llvm master + additional fix # see https://bugs.llvm.org/show_bug.cgi?id=39696 @@ -292,7 +318,8 @@ class Llvm(CMakePackage, CudaPackage): # Remove cyclades support to build against newer kernel headers # https://reviews.llvm.org/D102059 - patch('no_cyclades.patch', when='@10:11') + patch('no_cyclades.patch', when='@10:12.0.0') + patch('no_cyclades9.patch', when='@6:9') # The functions and attributes below implement external package # detection for LLVM. See: @@ -457,6 +484,17 @@ class Llvm(CMakePackage, CudaPackage): return(None, flags, None) return(flags, None, None) + def setup_build_environment(self, env): + """When using %clang, add only its ld.lld-$ver and/or ld.lld to our PATH""" + if self.compiler.name in ['clang', 'apple-clang']: + for lld in 'ld.lld-{0}'.format(self.compiler.version.version[0]), 'ld.lld': + bin = os.path.join(os.path.dirname(self.compiler.cc), lld) + sym = os.path.join(self.stage.path, 'ld.lld') + if os.path.exists(bin) and not os.path.exists(sym): + mkdirp(self.stage.path) + os.symlink(bin, sym) + env.prepend_path('PATH', self.stage.path) + def setup_run_environment(self, env): if "+clang" in self.spec: env.set("CC", join_path(self.spec.prefix.bin, "clang")) @@ -543,6 +581,13 @@ class Llvm(CMakePackage, CudaPackage): else: projects.append("openmp") + if self.spec.satisfies("@8"): + cmake_args.append(define('CLANG_ANALYZER_ENABLE_Z3_SOLVER', + self.spec.satisfies('@8+z3'))) + if self.spec.satisfies("@9:"): + cmake_args.append(define('LLVM_ENABLE_Z3_SOLVER', + self.spec.satisfies('@9:+z3'))) + if "+flang" in spec: projects.append("flang") if "+lldb" in spec: @@ -566,15 +611,13 @@ class Llvm(CMakePackage, CudaPackage): from_variant("BUILD_SHARED_LIBS", "shared_libs"), from_variant("LLVM_BUILD_LLVM_DYLIB", "build_llvm_dylib"), from_variant("LLVM_LINK_LLVM_DYLIB", "link_llvm_dylib"), - from_variant("LLVM_USE_SPLIT_DWARF", "split_dwarf") + from_variant("LLVM_USE_SPLIT_DWARF", "split_dwarf"), + # By default on Linux, libc++.so is a ldscript. CMake fails to add + # CMAKE_INSTALL_RPATH to it, which fails. Statically link libc++abi.a + # into libc++.so, linking with -lc++ or -stdlib=libc++ is enough. + define('LIBCXX_ENABLE_STATIC_ABI_LIBRARY', True) ]) - # By default on Linux, libc++.so is a linker script, and CMake tries to add the - # CMAKE_INSTALL_RPATH to it, which fails, causing installation to fail. The - # easiest workaround is to just statically link libc++abi.a into libc++.so, - # so that linking with -lc++ or -stdlib=libc++ is enough. - cmake_args.append(define('LIBCXX_ENABLE_STATIC_ABI_LIBRARY', True)) - if "+all_targets" not in spec: # all is default on cmake targets = ["NVPTX", "AMDGPU"] diff --git a/var/spack/repos/builtin/packages/llvm/sanitizer-ipc_perm_mode.patch b/var/spack/repos/builtin/packages/llvm/sanitizer-ipc_perm_mode.patch new file mode 100644 index 0000000000..8f91703a32 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/sanitizer-ipc_perm_mode.patch @@ -0,0 +1,9 @@ +# ipc_perm.mode is not used and has changed from short to int over architecures +# and versions. The last change was in glibc-2.31. +# LLVM upstream decided to not check ipc_perm.mode below glibc-2.31, +# because it is not actually used in the sanitizer: +# github.com/llvm/llvm-project/commit/947f9692440836dcb8d88b74b69dd379d85974ce +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -1143,1 +1143,0 @@ +-CHECK_SIZE_AND_OFFSET(ipc_perm, mode); diff --git a/var/spack/repos/builtin/packages/llvm/xray_buffer_queue-cstddef.patch b/var/spack/repos/builtin/packages/llvm/xray_buffer_queue-cstddef.patch new file mode 100644 index 0000000000..b5ca841e3e --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/xray_buffer_queue-cstddef.patch @@ -0,0 +1,5 @@ +# Fix missing std:size_t in 'llvm@4:5' for build with '%clang@7:' +--- a/compiler-rt/lib/xray/xray_buffer_queue.h ++++ b/compiler-rt/lib/xray/xray_buffer_queue.h +@@ -18,0 +18,1 @@ ++#include -- cgit v1.2.3-60-g2f50