From ffed5a7c4b54f7a3e8d41b5d2c14f35f36645f65 Mon Sep 17 00:00:00 2001 From: Kalev Lember Date: Fri, 11 May 2018 12:05:39 +0200 Subject: [PATCH] Disable JS Helper threads on ppc64le https://bugzilla.redhat.com/show_bug.cgi?id=1523121 --- disable-extra-threads.patch | 21 +++++++++++++++++++++ mozjs52.spec | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 disable-extra-threads.patch diff --git a/disable-extra-threads.patch b/disable-extra-threads.patch new file mode 100644 index 0000000..8e4e7fb --- /dev/null +++ b/disable-extra-threads.patch @@ -0,0 +1,21 @@ +diff -up firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads firefox-52.6.0esr/js/src/vm/Runtime.cpp +--- firefox-52.6.0esr/js/src/vm/Runtime.cpp.disable-extra-threads 2018-02-08 10:16:13.453828939 -0500 ++++ firefox-52.6.0esr/js/src/vm/Runtime.cpp 2018-02-08 10:23:31.283458826 -0500 +@@ -283,6 +283,17 @@ JSRuntime::init(uint32_t maxbytes, uint3 + ownerThreadNative_ = (size_t)pthread_self(); + #endif + ++ const char* enable_js_helper_threads; ++ enable_js_helper_threads = getenv("GJS_ENABLE_JS_HELPER_THREADS"); ++ ++#if defined(__PPC64__) && defined (__LITTLE_ENDIAN__) ++ if (enable_js_helper_threads == NULL) ++ js::DisableExtraThreads(); ++#endif ++ ++ if (enable_js_helper_threads != NULL && enable_js_helper_threads[0] == '0') ++ js::DisableExtraThreads(); ++ + if (!mainThread.init()) + return false; + diff --git a/mozjs52.spec b/mozjs52.spec index 606845a..198e065 100644 --- a/mozjs52.spec +++ b/mozjs52.spec @@ -23,6 +23,10 @@ Source0: https://ftp.mozilla.org/pub/firefox/releases/%{version}esr/sourc Patch0001: fix-soname.patch Patch0002: copy-headers.patch +# Disable JS Helper threads on ppc64le +# https://bugzilla.redhat.com/show_bug.cgi?id=1523121 +Patch0003: disable-extra-threads.patch + # Patches from https://github.com/ptomato/mozjs / Debian mozjs52_52.3.1-4.debian.tar.xz Patch0101: disable-mozglue.patch Patch0104: include-configure-script.patch @@ -67,6 +71,7 @@ developing applications that use %{name}. pushd ../.. %patch0001 -p1 %patch0002 -p1 +%patch0003 -p1 %patch0101 -p1 %patch0104 -p1 @@ -172,6 +177,7 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so * Fri May 11 2018 Kalev Lember - 52.8.0-1 - Update to 52.8.0 - Fix the build on ppc +- Disable JS Helper threads on ppc64le (#1523121) * Sat Apr 07 2018 Kalev Lember - 52.7.3-1 - Update to 52.7.3