diff options
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/llvm/thread-p9.patch | 16 |
2 files changed, 19 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/llvm/package.py b/var/spack/repos/builtin/packages/llvm/package.py index 9d209adf1a..87b598263c 100644 --- a/var/spack/repos/builtin/packages/llvm/package.py +++ b/var/spack/repos/builtin/packages/llvm/package.py @@ -203,6 +203,9 @@ class Llvm(CMakePackage): # for a bug report about this problem in llvm master. patch('llvm_py37.patch', when='@4:6 ^python@3.7:') + # https://bugs.llvm.org/show_bug.cgi?id=39696 + patch('thread-p9.patch', when='@develop+libcxx') + @run_before('cmake') def check_darwin_lldb_codesign_requirement(self): if not self.spec.satisfies('+lldb platform=darwin'): diff --git a/var/spack/repos/builtin/packages/llvm/thread-p9.patch b/var/spack/repos/builtin/packages/llvm/thread-p9.patch new file mode 100644 index 0000000000..140473a850 --- /dev/null +++ b/var/spack/repos/builtin/packages/llvm/thread-p9.patch @@ -0,0 +1,16 @@ +diff --git a/libcxx/include/thread b/libcxx/include/thread +index 02da703..d1677a1 100644 +--- a/projects/libcxx/include/thread ++++ b/projects/libcxx/include/thread +@@ -368,9 +368,9 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d) + { + #if defined(_LIBCPP_COMPILER_GCC) && (__powerpc__ || __POWERPC__) + // GCC's long double const folding is incomplete for IBM128 long doubles. +- _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max(); +-#else + _LIBCPP_CONSTEXPR duration<long double> _Max = duration<long double>(ULLONG_MAX/1000000000ULL) ; ++#else ++ _LIBCPP_CONSTEXPR duration<long double> _Max = nanoseconds::max(); + #endif + nanoseconds __ns; + if (__d < _Max) |