spidermonkey: fix i686 build

main
sg2002 2 years ago
parent 01188530fd
commit 49a6efa32a
  1. 3
      pkgs/development/interpreters/spidermonkey/common.nix
  2. 16
      pkgs/development/interpreters/spidermonkey/fix-float-i686.patch

@ -75,6 +75,9 @@ stdenv.mkDerivation (finalAttrs: rec {
url = "https://hg.mozilla.org/releases/mozilla-esr102/raw-rev/1fa20fb474f5d149cc32d98df169dee5e6e6861b";
sha256 = "sha256-eCisKjNxy9SLr9KoEE2UB26BflUknnR7PIvnpezsZeA=";
})
] ++ lib.optionals (lib.versionAtLeast version "91" && stdenv.hostPlatform.system == "i686-linux") [
# Fixes i686 build, https://bugzilla.mozilla.org/show_bug.cgi?id=1729459
./fix-float-i686.patch
];
nativeBuildInputs = [

@ -0,0 +1,16 @@
diff --git a/modules/fdlibm/src/math_private.h b/modules/fdlibm/src/math_private.h
index 51d79f9c2ec59..fafd7d6fc1e0d 100644
--- a/modules/fdlibm/src/math_private.h
+++ b/modules/fdlibm/src/math_private.h
@@ -30,5 +30,9 @@
* Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
*/
+#if defined __FLT_EVAL_METHOD__ && (__FLT_EVAL_METHOD__ == 2)
+typedef long double __double_t;
+#else
typedef double __double_t;
+#endif
typedef __double_t double_t;
/*
Loading…
Cancel
Save