diff options
| author | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-13 11:51:51 +0200 |
|---|---|---|
| committer | Rasmus Thomsen <oss@cogitri.dev> | 2020-04-14 13:55:12 +0000 |
| commit | c9c4693578eeb5a549abcb938364f0d2b2381ad5 (patch) | |
| tree | a10d0d05fcb33f0b486dca99651b530147d2102c /community/ldc/disable-static-assert.patch | |
| parent | 73e56b23657c29245adc3fe33b37d98604661285 (diff) | |
| download | aports-c9c4693578eeb5a549abcb938364f0d2b2381ad5.tar.bz2 aports-c9c4693578eeb5a549abcb938364f0d2b2381ad5.tar.xz | |
community/ldc: enable on aarch64
See https://github.com/ldc-developers/ldc/issues/3270
Diffstat (limited to 'community/ldc/disable-static-assert.patch')
| -rw-r--r-- | community/ldc/disable-static-assert.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/community/ldc/disable-static-assert.patch b/community/ldc/disable-static-assert.patch new file mode 100644 index 0000000000..96a5431649 --- /dev/null +++ b/community/ldc/disable-static-assert.patch @@ -0,0 +1,26 @@ +https://github.com/ldc-developers/ldc/issues/3270 + +See https://git.musl-libc.org/cgit/musl/tree/src/math/sqrtl.c +diff --git a/runtime/phobos/std/math.d b/runtime/phobos/std/math.d +index 1c526d8..67f2521 100644 +--- a/runtime/phobos/std/math.d ++++ b/runtime/phobos/std/math.d +@@ -4925,7 +4925,17 @@ + enum real SQRTMIN = 0.5 * sqrt(real.min_normal); // This is a power of 2. + enum real SQRTMAX = 1.0L / SQRTMIN; // 2^^((max_exp)/2) = nextUp(sqrt(real.max)) + +- static assert(2*(SQRTMAX/2)*(SQRTMAX/2) <= real.max); ++ // https://github.com/ldc-developers/ldc/issues/3270#issuecomment-613132406 ++ version(AArch64) ++ { ++ } ++ else version(SystemZ) ++ { ++ } ++ else ++ { ++ static assert(2*(SQRTMAX/2)*(SQRTMAX/2) <= real.max); ++ } + + static if (floatTraits!(real).realFormat == RealFormat.ieeeQuadruple) + { |
