spack/var/spack/repos/builtin/packages/llvm/constexpr_longdouble.patch
Brian Homerding 5e20bd86e4 Convert llvm Spackage to use the monorepo (#11392)
* [WIP] Convert llvm spackage to use the monorepo

* Correcting python dependencies

* Adding develop version for llvm monorepo

* Python 2.6 Fix

* Build Flang fork in a different root_cmakelists_dir

* Formatting Fix

* Including flang package changes

* Removing explicit llvm dependencies variants

* flake8 fix

* Updating patches and llvm+flang logic

* Updating env setup API

* Add top level git

* Conflicting flang variant with other variants
2019-12-06 12:01:30 -06:00

16 lines
626 B
Diff

--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -435,7 +435,12 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d)
using namespace chrono;
if (__d > duration<_Rep, _Period>::zero())
{
+#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) ;
+#endif
nanoseconds __ns;
if (__d < _Max)
{