--- /dev/null
+Description: Disable the js JIT on x32.
+Author: Adam Borowski <kilobyte@angband.pl>
+Index: mozjs24-24.2.0/js/src/configure.in
+===================================================================
+--- mozjs24-24.2.0.orig/js/src/configure.in
++++ mozjs24-24.2.0/js/src/configure.in
+@@ -2072,6 +2072,8 @@ fi
+ dnl Configure JIT support
+
+ case "$target" in
++x86_64*-gnux32)
++ ;;
+ i?86-*)
+ ENABLE_METHODJIT=1
+ ENABLE_ION=1
+--- mozjs-24.2.0/js/src/configure~ 2013-12-11 23:23:20.000000000 +0100
++++ mozjs-24.2.0/js/src/configure 2015-03-23 22:55:24.995319443 +0100
+@@ -8243,6 +8243,8 @@
+
+
+ case "$target" in
++x86_64*-gnux32)
++ ;;
+ i?86-*)
+ ENABLE_METHODJIT=1
+ ENABLE_ION=1
--- /dev/null
+--- mozilla-esr38/js/src/jstypes.h.x32fix 2017-03-21 08:17:52.446161040 +0100
++++ mozilla-esr38/js/src/jstypes.h 2017-03-21 08:18:23.531014466 +0100
+@@ -142,7 +142,7 @@
+ # endif
+ #elif defined(__GNUC__)
+ /* Additional GCC defines are when running on Solaris, AIX, and HPUX */
+-# if defined(__x86_64__) || defined(__sparcv9) || \
++# if (defined(__x86_64__) && !defined(__ILP32__)) || defined(__sparcv9) || \
+ defined(__64BIT__) || defined(__LP64__)
+ # define JS_64BIT
+ # endif
Patch1: %{name}-pkg-config-version.patch
Patch2: %{name}-1269317.patch
Patch3: %{name}-system-virtualenv.patch
+Patch4: Disable-js-JIT-on-x32.patch
+Patch5: %{name}-x32.patch
URL: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/Releases/38
BuildRequires: libffi-devel >= 5:3.0.9
BuildRequires: libstdc++-devel >= 6:4.4
%patch1 -p1
%patch2 -p1
%patch3 -p1
+%patch4 -p1
+%patch5 -p1
cd js/src