Disable JS Helper threads on ppc64le

https://bugzilla.redhat.com/show_bug.cgi?id=1523121
This commit is contained in:
Kalev Lember 2018-05-11 12:05:39 +02:00
parent 79138d90f0
commit ffed5a7c4b
2 changed files with 27 additions and 0 deletions

View File

@ -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;

View File

@ -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 <klember@redhat.com> - 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 <klember@redhat.com> - 52.7.3-1
- Update to 52.7.3