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