From 64b082fca0c39bcfbeeeb6c08a7e201eac004893 Mon Sep 17 00:00:00 2001 From: "S. Lockwood-Childs" Date: Wed, 28 Nov 2018 10:06:12 +0000 Subject: 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 --- dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch | 14 ++++++++++++++ dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild | 1 + 2 files changed, 15 insertions(+) create mode 100644 dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch diff --git a/dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch b/dev-lang/spidermonkey/files/spidermonkey-threadlocal.patch new file mode 100644 index 00000000..3658c418 --- /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 ++#define MOZ_THREAD_LOCAL(TYPE) MOZ_EXPORT __thread mozilla::detail::ThreadLocal + #else + #define MOZ_THREAD_LOCAL(TYPE) mozilla::detail::ThreadLocal + #endif diff --git a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1.ebuild index 40303383..7f5ec3c3 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 -- cgit v1.2.3-65-gdbad