pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/www/firefox Fix many issues on Darwin
details: https://anonhg.NetBSD.org/pkgsrc/rev/32a0f2082fc0
branches: trunk
changeset: 645559:32a0f2082fc0
user: pho <pho%pkgsrc.org@localhost>
date: Fri Jan 30 07:32:24 2015 +0000
description:
Fix many issues on Darwin
PLIST:
* lib/firefox/libmozglue.so is built and installed as a shared
library on some platforms including Darwin.
mozilla-common.mk:
* Sandboxing support is only available when the toolkit is
cairo-cocoa.
* It tries to use MacOS X 10.6 SDK by default, which is not always
possible.
patches/patch-build_gyp.mozbuild:
* Don't assume iOS just because the toolkit is not cocoa. Ideally
there should be an AC_SUBST just like 'ARM_ARCH' but nothing
exists currently.
* MacOS X SDK version should be able to configure with ./configure
--enable-macos-target=VER
patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp:
* NS_NewNativeLocalFile() can fail and leave hunDir null, so we must
check if it succeeded. This is not Darwin specific though.
* "%%LOCALBASE%%" in the hunspell path is currently not substituted,
which looks very erroneous to me. But since I don't know why
ryoon@ changed it from "@PREFIX@" to "%%LOCALBASE%%" I leave it as
it is.
patches/patch-ipc_glue_moz.build:
* Don't assume cocoa toolkit just because OS_ARCH is Darwin.
patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp:
* Increase portability for non-x86 Darwin by not hardwiring
x86_THREAD_STATE.
patches/patch-js_xpconnect_src_xpcprivate.h:
* The declaration has to be C++11 'extern template', otherwise
non-weak symbol collision will occur between libmozjs and
libxul. We can't easily test if the feature is supported by
compiler due to GCC bug #1773:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=1773
patches/patch-memory_mozalloc_VolatileBufferOSX.cpp:
* Try to fallback to valloc(3) if posix_memalign(3) is not
avialble. It has been added since MacOS 10.6.
patches/patch-toolkit_library_moz.build:
* GSTREAMER_LIBS are linked to libxul on Darwin, while they are
dlopen(3)'ed at runtime on other platforms. The problem is that
the toolkit being cocoa isn't relevant at all. It's Darwin that
needs the special handling, not Cocoa.
patches/patch-toolkit_xre_nsAppRunner.cpp:
* MacOS X < 10.6 had an undocumented behavior concerning execve(2)
inside a threaded process. If a process tried to call execve(2)
and had more than one active thread, the kernel returned
ENOTSUP. So we have to either fork(2) or vfork(2) before calling
execve(2) to make sure the caller is single-threaded as otherwise
the application fails to restart itself.
patches/patch-xpcom_base_nsStackWalk.cpp,
patches/patch-xpcom_build_PoisonIOInterposer.h:
* Replace XP_MACOSX with XP_DARWIN as the former is not defined when
the toolkit is not cocoa.
patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp:
* Fix inconsistent use of XP_DARWIN and XP_MACOSX:
LEADING_UNDERSCORE should be empty when we are going to load XPCOM
using dlopen(3), not NSAddImage().
diffstat:
www/firefox/PLIST | 3 +-
www/firefox/distinfo | 18 +-
www/firefox/mozilla-common.mk | 16 +-
www/firefox/patches/patch-build_gyp.mozbuild | 36 +++-
www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp | 16 +-
www/firefox/patches/patch-ipc_glue_moz.build | 15 +
www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp | 102 ++++++++++
www/firefox/patches/patch-js_xpconnect_src_xpcprivate.h | 15 +-
www/firefox/patches/patch-memory_mozalloc_VolatileBufferOSX.cpp | 22 ++
www/firefox/patches/patch-toolkit_library_moz.build | 25 +-
www/firefox/patches/patch-toolkit_xre_nsAppRunner.cpp | 46 ++++
www/firefox/patches/patch-xpcom_base_nsStackWalk.cpp | 38 +++-
www/firefox/patches/patch-xpcom_build_PoisonIOInterposer.h | 58 +++++
www/firefox/patches/patch-xpcom_glue_standalone_nsXPCOMGlue.cpp | 17 +
14 files changed, 396 insertions(+), 31 deletions(-)
diffs (truncated from 626 to 300 lines):
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/PLIST
--- a/www/firefox/PLIST Fri Jan 30 01:38:29 2015 +0000
+++ b/www/firefox/PLIST Fri Jan 30 07:32:24 2015 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.91 2015/01/16 22:42:09 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.92 2015/01/30 07:32:24 pho Exp $
bin/firefox
lib/firefox/application.ini
lib/firefox/browser/blocklist.xml
@@ -2462,6 +2462,7 @@
lib/firefox/hyphenation/hyph_tr.dic
lib/firefox/hyphenation/hyph_uk.dic
lib/firefox/libmozalloc.so
+${PLIST.mozglue}lib/firefox/libmozglue.so
lib/firefox/libmozjs.so
lib/firefox/libxul.so
lib/firefox/modules/ActivitiesService.jsm
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/distinfo
--- a/www/firefox/distinfo Fri Jan 30 01:38:29 2015 +0000
+++ b/www/firefox/distinfo Fri Jan 30 07:32:24 2015 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.180 2015/01/29 22:22:26 wiz Exp $
+$NetBSD: distinfo,v 1.181 2015/01/30 07:32:24 pho Exp $
SHA1 (firefox-35.0.1.source.tar.bz2) = cf256ee1491ee502eb4432ade5a879104ebceede
RMD160 (firefox-35.0.1.source.tar.bz2) = ca4dc6f6c5de1e6e69133de3b8b502991d519fa7
@@ -14,7 +14,7 @@
SHA1 (patch-browser_installer_package-manifest.in) = 83a0073525c607e05414688aa07035cc3f08e50a
SHA1 (patch-build_autoconf_compiler-opts.m4) = ccdc06a2b07b7664f9cb91bcc4fb29052dda8b07
SHA1 (patch-build_autoconf_nss.m4) = bf65db126705a3a1ba294418b9380683ea401fc7
-SHA1 (patch-build_gyp.mozbuild) = 2842da0783d344dd12e86adde447f7cda6191518
+SHA1 (patch-build_gyp.mozbuild) = 201715e30e20090e9a9ef54cb981d283c9aabf8f
SHA1 (patch-build_pgo_profileserver.py) = 8666187258e47c037f2065a19a5b38946fdc0f6c
SHA1 (patch-config_Makefile.in) = 296bd3bc33346cfcfa658fe641c2ee2ac67549f1
SHA1 (patch-config_baseconfig.mk) = 07c295fbfbaeb969b336def32d8924729e332075
@@ -34,7 +34,7 @@
SHA1 (patch-dom_plugins_ipc_PluginModuleChild.h) = 0a7f3167e939822013ae6195406657453578453e
SHA1 (patch-dom_plugins_ipc_PluginProcessChild.cpp) = 5ab28cc0398b72cb5e1b0586406845495b9f87e4
SHA1 (patch-dom_system_OSFileConstants.cpp) = fec01c3c2c1b7e1c57abe9ec269067ee98eede3d
-SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = 9ccb4210902f3c9b60b2ced1aab83d6f8bfd3de3
+SHA1 (patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp) = 40534b11b594f29b1cc9f17409a85e7382e6f3dd
SHA1 (patch-gfx_graphite2_moz-gr-update.sh) = b987dad1bd4513b8a04fb280bd1c5280a03af746
SHA1 (patch-gfx_graphite2_src_Bidi.cpp) = 5e80b4a32a47ae44d237fec69ea87bdd612a76ce
SHA1 (patch-gfx_moz.build) = a98bda4727538f4a0f09a20b84f9dd883edaf7d9
@@ -65,18 +65,20 @@
SHA1 (patch-ipc_glue_GeckoChildProcessHost.cpp) = 45f2f22b4f567ffddd4458f635179b5201e87e64
SHA1 (patch-ipc_glue_ScopedXREEmbed.cpp) = 97c39f25527dac4c22b38ce446ca2cd4cef08fd0
SHA1 (patch-ipc_glue_StringUtil.cpp) = f238adebb5bdf57f7109a781c6f3fb195763f3c0
+SHA1 (patch-ipc_glue_moz.build) = 2682ca9de9606e50602a124e287dded2b9f2859b
SHA1 (patch-ipc_ipdl_ipdl_cxx_ast.py) = 047b7012dffdcfc2b07d2d249fb3523e7d4643f8
SHA1 (patch-ipc_ipdl_ipdl_cxx_cgen.py) = d7f7dc85b1ff26c6d7e902f94c0ac09f04497105
SHA1 (patch-ipc_ipdl_ipdl_lower.py) = 2ef9504e462d0e3db16f9b0a6303ea5971b9c2a2
SHA1 (patch-js__src__vm__SPSProfiler.cpp) = 989ba25e4c5308d21d07baa802decce13609a475
SHA1 (patch-js_src_Makefile.in) = 4f90e74c19b379bf756210a0cebda265876a2fa1
+SHA1 (patch-js_src_asmjs_AsmJSSignalHandlers.cpp) = 4d994e1f6b9a2bfc01204eb96f002cdf2a8d1bd9
SHA1 (patch-js_src_ctypes_CTypes.h) = 768a084239f92a424c1c7dc9eaaf9be9456ca9f0
SHA1 (patch-js_src_frontend_ParseMaps.cpp) = c00117d79b78904bc50a1d664a8fc0e4e339bfbc
SHA1 (patch-js_src_gc_Memory.cpp) = f2ee54f0a05d870651a3235b95bbb346586f3c3c
SHA1 (patch-js_src_jit_ExecutableAllocator.h) = 24bb91e5be41cc4a7658d633c9f4f7c0dc64fd8a
SHA1 (patch-js_src_jit_arm_Architecture-arm.cpp) = c1ff7591bd9b8b4a7aea254f674d25b89345f099
SHA1 (patch-js_src_jsmath.cpp) = 7d4993ae91e9b5e6820358165603819aefb586f9
-SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 3406e02342d8a890b83a241ee2cc8cd9b3fefdaa
+SHA1 (patch-js_xpconnect_src_xpcprivate.h) = 8a15ff542c9d3fce448d9ec63706f7dfb411d926
SHA1 (patch-media_libcubeb_AUTHORS) = 3db32086f98c2bbe16e9394bb5121d7a95cdb4af
SHA1 (patch-media_libcubeb_src_cubeb.c) = effe8771e42adddb478ecb302352ef003bdd01db
SHA1 (patch-media_libcubeb_src_cubeb__alsa.c) = 8c275bf024bf23dc42f82e6a0765ddc8b18bc1a9
@@ -109,6 +111,7 @@
SHA1 (patch-memory_build_mozjemalloc__compat.c) = ce6cd2865fd7ee6dd6a5926c9f85a2d6aa086517
SHA1 (patch-memory_jemalloc_Makefile.in) = 772e996c8da254f952d0f3a0c9325a177c838543
SHA1 (patch-memory_jemalloc_src_configure) = 563834e1a0dc0eba17b4f263de26787672ff9200
+SHA1 (patch-memory_mozalloc_VolatileBufferOSX.cpp) = 3ee53fd4213b6dab8bdce02b4c2f14cef7caaca8
SHA1 (patch-memory_mozalloc_mozalloc__abort.cpp) = 44cb29dac1e8032c3f58149227bfe5ad94e8edb9
SHA1 (patch-mfbt_Alignment.h) = 9ebc9892fd11eba7105974979b54f4f8759b7749
SHA1 (patch-mfbt_Attributes.h) = 0cf62084c0220a3fa46226714cea5c30b1b155e9
@@ -126,7 +129,7 @@
SHA1 (patch-toolkit_components_alerts_nsAlertsService.cpp) = e84436c5d5bde7ef23bf60b5f33c63924730e1da
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__back.jsm) = 6b926ccd793391ad7bd7101635f4b3eefe3db130
SHA1 (patch-toolkit_components_osfile_modules_osfile__unix__front.jsm) = f5adba2137f2d7fd4d4a6a1e8ef8625866513890
-SHA1 (patch-toolkit_library_moz.build) = 4e768a5388e1b22af9a7b2746fadf392ba0a8e8c
+SHA1 (patch-toolkit_library_moz.build) = f703ede3c619bdb38f6b90bcc468991803e55e44
SHA1 (patch-toolkit_modules_GMPInstallManager.jsm) = 7e410806f44e7f20109260bef96cd13101c27664
SHA1 (patch-toolkit_mozapps_extensions_internal_OpenH264Provider.jsm) = 75647c1b705bcac8b64064e1eea26cb15b435613
SHA1 (patch-toolkit_system_gnome_moz.build) = 75a35ca36fb760adf5b49134cb843608e6aa9eb5
@@ -135,6 +138,7 @@
SHA1 (patch-toolkit_system_gnome_nsGnomeModule.cpp) = 8e28490cfffaf868f27643044aeb0178c1929215
SHA1 (patch-toolkit_system_gnome_nsSystemAlertsService.cpp) = 1024f24a8d65a27f87056deb587fc967f016d020
SHA1 (patch-toolkit_system_gnome_nsSystemAlertsService.h) = ba4b9507f0e3e598788cd44c503a5735e682da87
+SHA1 (patch-toolkit_xre_nsAppRunner.cpp) = f335d64cb0e1d248fd2c41a167ee1874218e7db6
SHA1 (patch-toolkit_xre_nsEmbedFunctions.cpp) = 6ee6fba04a3ecc6596f8aed67f752a1075901fa8
SHA1 (patch-webapprt_moz.build) = 177468d5e12c49db1ad5376f0f3df34fa9df070c
SHA1 (patch-widget_gtk_gtk3drawing.c) = 35f849793b8051b88921987bc07062a2b1619092
@@ -142,9 +146,11 @@
SHA1 (patch-widget_gtk_nsLookAndFeel.cpp) = 34e87c51284cec254344993bfddbd6699bbc6117
SHA1 (patch-widget_gtk_nsLookAndFeel.h) = a639562ca57e1353160b306c8b5805349b130a8a
SHA1 (patch-widget_gtk_nsWindow.cpp) = b9f4cb3c46c34438b136246396de571ccf23d9b6
-SHA1 (patch-xpcom_base_nsStackWalk.cpp) = 933c44297371af2eaa5b7588cdcb6e3bc68f74fc
+SHA1 (patch-xpcom_base_nsStackWalk.cpp) = b1a4587c193ac84a3159add1de1e6aa9c13f2f53
SHA1 (patch-xpcom_base_nscore.h) = f4fe66cc9e714a2101a4d1287359d1c300574438
+SHA1 (patch-xpcom_build_PoisonIOInterposer.h) = b0a53ec580bf5c2277d19618c1240a447575ae68
SHA1 (patch-xpcom_build_XPCOMInit.cpp) = 9c0d4c7f937ccc127974a80c826316bfae9920f9
+SHA1 (patch-xpcom_glue_standalone_nsXPCOMGlue.cpp) = a6ef7f490d52037d2a72d3d52d834a182a29eccb
SHA1 (patch-xpcom_reflect_xptcall_md_unix_Makefile.in) = 1e4d71a06b34556fa9339f97b75a065539baa511
SHA1 (patch-xpcom_reflect_xptcall_md_unix_moz.build) = a0445488bbcabe7a67a83df3d75f2d956e172a1f
SHA1 (patch-xpcom_reflect_xptcall_md_unix_xptcinvoke__arm__netbsd.cpp) = 493d1433ae72bbd0c65ab3f51de43fb864a6f58d
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/mozilla-common.mk
--- a/www/firefox/mozilla-common.mk Fri Jan 30 01:38:29 2015 +0000
+++ b/www/firefox/mozilla-common.mk Fri Jan 30 07:32:24 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mozilla-common.mk,v 1.47 2014/11/06 13:56:32 ryoon Exp $
+# $NetBSD: mozilla-common.mk,v 1.48 2015/01/30 07:32:24 pho Exp $
#
# common Makefile fragment for mozilla packages based on gecko 2.0.
#
@@ -151,6 +151,20 @@
PLIST.mozglue= yes
.endif
+# See ${WRKSRC}/security/sandbox/mac/Sandbox.mm: On Darwin, sandboxing
+# support is only available when the toolkit is cairo-cocoa.
+.if ${OPSYS} == "Darwin"
+CONFIGURE_ARGS+= --disable-sandbox
+.endif
+
+# See ${WRKSRC}/configure.in: It tries to use MacOS X 10.6 SDK by
+# default, which is not always possible.
+.if !empty(MACHINE_PLATFORM:MDarwin-8.*-*)
+CONFIGURE_ARGS+= --enable-macos-target=10.4
+.elif !empty(MACHINE_PLATFORM:MDarwin-9.*-*)
+CONFIGURE_ARGS+= --enable-macos-target=10.5
+.endif
+
#
# pysqlite2 is used by xulrunner's Python virtualenv. If pysqlite2 isn't
# installed at build time it will attempt to download it instead, so the
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/patches/patch-build_gyp.mozbuild
--- a/www/firefox/patches/patch-build_gyp.mozbuild Fri Jan 30 01:38:29 2015 +0000
+++ b/www/firefox/patches/patch-build_gyp.mozbuild Fri Jan 30 07:32:24 2015 +0000
@@ -1,8 +1,17 @@
-$NetBSD: patch-build_gyp.mozbuild,v 1.1 2014/04/30 15:07:18 ryoon Exp $
+$NetBSD: patch-build_gyp.mozbuild,v 1.2 2015/01/30 07:32:24 pho Exp $
+
+Hunk #2:
+ On Darwin, don't assume iOS just because the toolkit is not
+ cocoa. Ideally there should be an AC_SUBST just like 'ARM_ARCH' but
+ nothing exists currently.
---- build/gyp.mozbuild.orig 2014-04-18 02:02:38.000000000 +0000
+Hunk #3:
+ MacOS X SDK version should be able to configure with
+ ./configure --enable-macos-target=VER
+
+--- build/gyp.mozbuild.orig 2015-01-23 05:59:58.000000000 +0000
+++ build/gyp.mozbuild
-@@ -11,6 +11,7 @@ gyp_vars = {
+@@ -12,6 +12,7 @@ gyp_vars = {
'have_ethtool_cmd_speed_hi': 1 if CONFIG['MOZ_WEBRTC_HAVE_ETHTOOL_SPEED_HI'] else 0,
'include_alsa_audio': 1 if CONFIG['MOZ_ALSA'] else 0,
'include_pulse_audio': 1 if CONFIG['MOZ_PULSEAUDIO'] else 0,
@@ -10,3 +19,24 @@
# basic stuff for everything
'include_internal_video_render': 0,
'clang_use_chrome_plugins': 0,
+@@ -85,7 +86,7 @@ flavors = {
+ 'WINNT': 'win',
+ 'Android': 'linux' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' else 'android',
+ 'Linux': 'linux',
+- 'Darwin': 'mac' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa' else 'ios',
++ 'Darwin': 'ios' if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cairo-uikit' else 'mac',
+ 'SunOS': 'solaris',
+ 'GNU/kFreeBSD': 'freebsd',
+ 'DragonFly': 'dragonfly',
+@@ -120,5 +121,11 @@ if CONFIG['INTEL_ARCHITECTURE']:
+ if not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSSE3'] or not CONFIG['HAVE_TOOLCHAIN_SUPPORT_MSSE4_1']:
+ gyp_vars['yuv_disable_asm'] = 1
+
++# MacOS X SDK version should be able to configure with ./configure
++# --enable-macos-target=VER
++if CONFIG['MACOSX_DEPLOYMENT_TARGET']:
++ gyp_vars['mac_sdk_min'] = CONFIG['MACOSX_DEPLOYMENT_TARGET']
++ gyp_vars['mac_deployment_target'] = CONFIG['MACOSX_DEPLOYMENT_TARGET']
++
+ if CONFIG['MACOS_SDK_DIR']:
+ gyp_vars['mac_sdk_path'] = CONFIG['MACOS_SDK_DIR']
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp
--- a/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp Fri Jan 30 01:38:29 2015 +0000
+++ b/www/firefox/patches/patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp Fri Jan 30 07:32:24 2015 +0000
@@ -1,16 +1,20 @@
-$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.5 2015/01/16 22:42:09 ryoon Exp $
+$NetBSD: patch-extensions_spellcheck_hunspell_src_mozHunspell.cpp,v 1.6 2015/01/30 07:32:24 pho Exp $
+
+Load system hunspell dictionaries.
---- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2015-01-09 04:38:27.000000000 +0000
+--- extensions/spellcheck/hunspell/src/mozHunspell.cpp.orig 2015-01-23 06:00:09.000000000 +0000
+++ extensions/spellcheck/hunspell/src/mozHunspell.cpp
-@@ -400,6 +400,12 @@ mozHunspell::LoadDictionaryList(bool aNo
+@@ -400,6 +400,14 @@ mozHunspell::LoadDictionaryList(bool aNo
}
}
+ // load system hunspell dictionaries
-+ nsIFile* hunDir;
++ nsCOMPtr<nsIFile> hunDir;
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
-+ true, &hunDir);
-+ LoadDictionariesFromDir(hunDir);
++ true, getter_AddRefs(hunDir));
++ if (hunDir) {
++ LoadDictionariesFromDir(hunDir);
++ }
+
// find dictionaries from extensions requiring restart
nsCOMPtr<nsISimpleEnumerator> dictDirs;
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/patches/patch-ipc_glue_moz.build
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-ipc_glue_moz.build Fri Jan 30 07:32:24 2015 +0000
@@ -0,0 +1,15 @@
+$NetBSD: patch-ipc_glue_moz.build,v 1.1 2015/01/30 07:32:24 pho Exp $
+
+Don't assume cocoa toolkit just because OS_ARCH is Darwin.
+
+--- ipc/glue/moz.build.orig 2015-01-29 12:45:33.000000000 +0000
++++ ipc/glue/moz.build
+@@ -87,7 +87,7 @@ elif CONFIG['OS_ARCH'] in ('DragonFly',
+ UNIFIED_SOURCES += [
+ 'ProcessUtils_bsd.cpp'
+ ]
+-elif CONFIG['OS_ARCH'] in ('Darwin'):
++elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ UNIFIED_SOURCES += [
+ 'ProcessUtils_mac.mm'
+ ]
diff -r ffcf443f895e -r 32a0f2082fc0 www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/www/firefox/patches/patch-js_src_asmjs_AsmJSSignalHandlers.cpp Fri Jan 30 07:32:24 2015 +0000
@@ -0,0 +1,102 @@
+$NetBSD: patch-js_src_asmjs_AsmJSSignalHandlers.cpp,v 1.1 2015/01/30 07:32:24 pho Exp $
+
+Increase portability for non-x86 Darwin by not hardwiring
+x86_THREAD_STATE.
+
+--- js/src/asmjs/AsmJSSignalHandlers.cpp.orig 2015-01-29 00:54:07.000000000 +0000
++++ js/src/asmjs/AsmJSSignalHandlers.cpp
+@@ -524,17 +524,62 @@ AsmJSExceptionHandler(LPEXCEPTION_POINTE
+ #elif defined(XP_MACOSX)
+ # include <mach/exc.h>
+
++# if defined(ARM_THREAD_STATE)
++typedef arm_thread_state_t moz_platform_thread_state_t;
++static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = ARM_THREAD_STATE;
++static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = ARM_THREAD_STATE_COUNT;
++
++# elif defined(PPC_THREAD_STATE)
++typedef ppc_thread_state_t moz_platform_thread_state_t;
++static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = PPC_THREAD_STATE;
++static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = PPC_THREAD_STATE_COUNT;
++
++# elif defined(PPC_THREAD_STATE64)
++typedef ppc_thread_state64_t moz_platform_thread_state_t;
++static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = PPC_THREAD_STATE64;
++static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = PPC_THREAD_STATE64_COUNT;
++
++# elif defined(x86_THREAD_STATE)
++typedef x86_thread_state_t moz_platform_thread_state_t;
++static const thread_state_flavor_t MOZ_PLATFORM_THREAD_STATE_FLAVOR = x86_THREAD_STATE;
++static const mach_msg_type_number_t MOZ_PLATFORM_THREAD_STATE_COUNT = x86_THREAD_STATE_COUNT;
++
++# else
++# error Type unknown for platform-specific thread_state_t
++# endif
++
++# if defined(__DARWIN_UNIX03)
++# define REG_FIELD(NAME) __ ## NAME
++# else
++# define REG_FIELD(NAME) NAME
++# endif
++
+ static uint8_t **
+-ContextToPC(x86_thread_state_t &state)
++ContextToPC(moz_platform_thread_state_t &state)
+ {
+-# if defined(JS_CODEGEN_X64)
+- JS_STATIC_ASSERT(sizeof(state.uts.ts64.__rip) == sizeof(void*));
+- return reinterpret_cast<uint8_t**>(&state.uts.ts64.__rip);
+-# elif defined(JS_CODEGEN_NONE)
+- MOZ_CRASH();
++#if defined(ARM_THREAD_STATE)
++ JS_STATIC_ASSERT(sizeof(state.REG_FIELD(pc)) == sizeof(void*));
++ return reinterpret_cast<uint8_t**>(&state.REG_FIELD(pc));
++
++#elif defined(PPC_THREAD_STATE) || defined(PPC_THREAD_STATE64)
++ JS_STATIC_ASSERT(sizeof(state.REG_FIELD(srr0)) == sizeof(void*));
++ return reinterpret_cast<uint8_t**>(&state.REG_FIELD(srr0));
++
++#elif defined(x86_THREAD_STATE)
++ switch (state.tsh.flavor) {
++ case x86_THREAD_STATE32:
++ JS_STATIC_ASSERT(sizeof(state.uts.ts32.REG_FIELD(eip)) == sizeof(void*));
++ return reinterpret_cast<uint8_t**>(&state.uts.ts32.REG_FIELD(eip));
++
Home |
Main Index |
Thread Index |
Old Index