1 |
commit: 64b082fca0c39bcfbeeeb6c08a7e201eac004893 |
2 |
Author: S. Lockwood-Childs <sjl <AT> vctlabs <DOT> com> |
3 |
AuthorDate: Wed Nov 28 10:06:12 2018 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 2 18:03:14 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/musl.git/commit/?id=64b082fc |
7 |
|
8 |
dev-lang/spidermonkey: fix runtime relocation error |
9 |
|
10 |
polkitd executable from sys-auth/polkit-0.115-r1 was failing to run |
11 |
with error: |
12 |
Error relocating /usr/lib/libmozjs-52.so: _ZN2js16TlsPerThreadDataE: symbol not found |
13 |
|
14 |
demangled equivalent to "_ZN2js16TlsPerThreadDataE" being |
15 |
js::PerThreadData, which was a hidden symbol according to readelf |
16 |
|
17 |
readelf -s usr/lib/libmozjs-52.so | grep Tls | c++filt |
18 |
1: 00000004 4 TLS LOCAL HIDDEN 17 js::TlsPerThreadData |
19 |
|
20 |
Fix such runtime errors by switching thread-local data to default |
21 |
visibility. |
22 |
|
23 |
Signed-off-by: Anthony G. Basile <blueness <AT> gentoo.org> |
24 |
|
25 |
dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch | 14 ++++++++++++++ |
26 |
dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild | 1 + |
27 |
2 files changed, 15 insertions(+) |
28 |
|
29 |
diff --git a/dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch b/dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch |
30 |
new file mode 100644 |
31 |
index 0000000..3658c41 |
32 |
--- /dev/null |
33 |
+++ b/dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch |
34 |
@@ -0,0 +1,14 @@ |
35 |
+Fixes: |
36 |
+ Error relocating /usr/lib/libmozjs-52.so: _ZN2js16TlsPerThreadDataE: symbol not found |
37 |
+ |
38 |
+--- mozjs-52.9.1pre1/mfbt/ThreadLocal.h.orig 2018-11-28 09:48:43.746859132 +0000 |
39 |
++++ mozjs-52.9.1pre1/mfbt/ThreadLocal.h 2018-11-28 09:48:45.930897382 +0000 |
40 |
+@@ -211,7 +211,7 @@ |
41 |
+ } |
42 |
+ |
43 |
+ #ifdef MOZ_HAS_THREAD_LOCAL |
44 |
+-#define MOZ_THREAD_LOCAL(TYPE) __thread mozilla::detail::ThreadLocal<TYPE> |
45 |
++#define MOZ_THREAD_LOCAL(TYPE) MOZ_EXPORT __thread mozilla::detail::ThreadLocal<TYPE> |
46 |
+ #else |
47 |
+ #define MOZ_THREAD_LOCAL(TYPE) mozilla::detail::ThreadLocal<TYPE> |
48 |
+ #endif |
49 |
|
50 |
diff --git a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild |
51 |
index 4030338..7f5ec3c 100644 |
52 |
--- a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild |
53 |
+++ b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild |
54 |
@@ -50,6 +50,7 @@ src_prepare() { |
55 |
eapply "${FILESDIR}"/moz38-dont-hardcode-libc-soname.patch |
56 |
eapply "${FILESDIR}"/${PN}-52.0-fix-alpha-bitness.patch |
57 |
use elibc_musl && eapply "${FILESDIR}"/${PN}-musl.patch |
58 |
+ use elibc_musl && eapply "${FILESDIR}"/${PN}-threadlocal.patch |
59 |
|
60 |
eapply_user |