spack/var/spack/repos/builtin/packages/llvm/thread-p9.patch
Galen Shipman 5d523dd689 Add patch to fix issue building current llvm develop master on power9 (#13986)
* Add patch to fix issue building current llvm develop master on power9

* Conform to proper block commenting

Co-Authored-By: Adam J. Stewart <ajstewart426@gmail.com>
2019-12-06 12:38:58 -06:00

17 lines
723 B
Diff

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)