forked from mirrors/nixpkgs
spidermonkey: fix i686 build
This commit is contained in:
parent
01188530fd
commit
49a6efa32a
|
@ -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…
Reference in a new issue