Date: Fri, 8 Jun 2012 14:16:55 GMT From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org Subject: [SVN-Commit] r737 - in branches/experimental: Mk www/firefox www/firefox-beta www/firefox-beta/files www/firefox-esr www/firefox-esr/files www/firefox/files www/libxul www/libxul/files Message-ID: <201206081416.q58EGtxF094670@trillian.chruetertee.ch>
next in thread | raw e-mail | index | archive | help
Author: jbeich
Date: Fri Jun 8 14:16:54 2012
New Revision: 737
Log:
unbreak building firefox/libxul with libc++
PR: ports/163454
Added:
branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-time_posix.cc
branches/experimental/www/firefox-beta/files/patch-libcxx-revert-bug519601
branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc
branches/experimental/www/firefox-esr/files/patch-libcxx-revert-bug519601
branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-time_posix.cc
branches/experimental/www/firefox/files/patch-libcxx-revert-bug519601
branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-time_posix.cc
branches/experimental/www/libxul/files/patch-libcxx-revert-bug519601
Modified:
branches/experimental/Mk/bsd.gecko.mk
branches/experimental/www/firefox-beta/Makefile
branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-file_util_linux.cc
branches/experimental/www/firefox-beta/files/patch-toolkit_library_Makefile.in
branches/experimental/www/firefox-beta/files/patch-xpcom_base_nsStackWalk.cpp
branches/experimental/www/firefox-esr/Makefile
branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
branches/experimental/www/firefox-esr/files/patch-toolkit_library_Makefile.in
branches/experimental/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp
branches/experimental/www/firefox/Makefile
branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
branches/experimental/www/firefox/files/patch-toolkit_library_Makefile.in
branches/experimental/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp
branches/experimental/www/libxul/Makefile
branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-file_util_linux.cc
branches/experimental/www/libxul/files/patch-toolkit_library_Makefile.in
branches/experimental/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
Modified: branches/experimental/Mk/bsd.gecko.mk
==============================================================================
--- branches/experimental/Mk/bsd.gecko.mk Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/Mk/bsd.gecko.mk Fri Jun 8 14:16:54 2012 (r737)
@@ -794,6 +794,7 @@
@if [ -f ${MOZSRC}/${subdir}/config/system-headers ] ; then \
${ECHO_CMD} "fenv.h" >> ${MOZSRC}/${subdir}/config/system-headers ; \
${ECHO_CMD} "pthread_np.h" >> ${MOZSRC}/${subdir}/config/system-headers ; \
+ ${ECHO_CMD} "unwind.h" >> ${MOZSRC}/${subdir}/config/system-headers ; \
fi
.endfor
@${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \
Modified: branches/experimental/www/firefox-beta/Makefile
==============================================================================
--- branches/experimental/www/firefox-beta/Makefile Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-beta/Makefile Fri Jun 8 14:16:54 2012 (r737)
@@ -24,7 +24,6 @@
CONFLICTS_BUILD= spidermonkey-*
USE_AUTOTOOLS= autoconf213
-USE_GCC= 4.6+
USE_GECKO= gecko
CONFLICTS= firefox-10.*
MOZ_PKGCONFIG_FILES= # empty
@@ -56,6 +55,10 @@
.include <bsd.port.pre.mk>
+.if empty(CXX:M*clang++*) && ${OSVERSION} > 900000
+USE_GCC= 4.6+
+.endif
+
WRKSRC:= ${WRKDIR}/mozilla-release
.if ${HAVE_GNOME:Mlibgnomeui}!=""
@@ -80,6 +83,12 @@
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
+.if ${CXXFLAGS:M-stdlib=libc++}
+CXXABI= -lcxxrt
+.else
+CXXABI= # implied
+.endif
+
pre-extract:
.if defined(WITH_PGO)
@${ECHO} "*****************************************************************"
@@ -104,6 +113,7 @@
-e 's|/proc/self/fd|/dev/fd|' \
-e 's|/proc["/]|/compat/linux&|'
${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
+ -e 's|%%CXXABI%%|${CXXABI}|' \
${WRKSRC}/storage/build/Makefile.in \
${WRKSRC}/toolkit/library/Makefile.in \
${WRKSRC}/db/sqlite3/src/Makefile.in
Modified: branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-file_util_linux.cc
==============================================================================
--- branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -1,6 +1,6 @@
--- ipc/chromium/src/base/file_util_linux.cc~
+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) {
+@@ -28,7 +29,7 @@ bool GetShmemTempDir(FilePath* path) {
#ifdef ANDROID
return GetTempDir(path);
#else
Added: branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-time_posix.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox-beta/files/patch-ipc-chromium-src-base-time_posix.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/time_posix.cc~
++++ ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
Added: branches/experimental/www/firefox-beta/files/patch-libcxx-revert-bug519601
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox-beta/files/patch-libcxx-revert-bug519601 Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,118 @@
+changeset: 40752:cc5ace5d6ade
+user: Karl Tomlinson <karlt@mozbugz.karlt.net> and Chris Jones <jones.chris.g@gmail.com>
+date: Wed Apr 14 02:04:52 2010 -0500
+summary: Bug 519601: s/netscape/netsc@pe/ for plugin dso paths passed on the command line on linux. r=karlt
+
+diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp
+--- dom/plugins/ipc/PluginMessageUtils.cpp
++++ dom/plugins/ipc/PluginMessageUtils.cpp
+@@ -13,8 +13,6 @@
+ #include "PluginScriptableObjectParent.h"
+ #include "PluginScriptableObjectChild.h"
+
+-using std::string;
+-
+ using mozilla::ipc::RPCChannel;
+
+ namespace {
+@@ -82,44 +80,6 @@ MediateRace(const RPCChannel::Message& p
+ }
+ }
+
+-#if defined(OS_LINUX)
+-static string
+-ReplaceAll(const string& haystack, const string& needle, const string& with)
+-{
+- string munged = haystack;
+- string::size_type i = 0;
+-
+- while (string::npos != (i = munged.find(needle, i))) {
+- munged.replace(i, needle.length(), with);
+- i += with.length();
+- }
+-
+- return munged;
+-}
+-#endif
+-
+-string
+-MungePluginDsoPath(const string& path)
+-{
+-#if defined(OS_LINUX)
+- // https://bugzilla.mozilla.org/show_bug.cgi?id=519601
+- return ReplaceAll(path, "netscape", "netsc@pe");
+-#else
+- return path;
+-#endif
+-}
+-
+-string
+-UnmungePluginDsoPath(const string& munged)
+-{
+-#if defined(OS_LINUX)
+- return ReplaceAll(munged, "netsc@pe", "netscape");
+-#else
+- return munged;
+-#endif
+-}
+-
+-
+ PRLogModuleInfo* gPluginLog = PR_NewLogModule("IPCPlugins");
+
+ void
+diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h
+--- dom/plugins/ipc/PluginMessageUtils.h
++++ dom/plugins/ipc/PluginMessageUtils.h
+@@ -48,11 +48,6 @@ mozilla::ipc::RPCChannel::RacyRPCPolicy
+ MediateRace(const mozilla::ipc::RPCChannel::Message& parent,
+ const mozilla::ipc::RPCChannel::Message& child);
+
+-std::string
+-MungePluginDsoPath(const std::string& path);
+-std::string
+-UnmungePluginDsoPath(const std::string& munged);
+-
+ extern PRLogModuleInfo* gPluginLog;
+
+ const uint32_t kAllowAsyncDrawing = 0x1;
+diff --git a/dom/plugins/ipc/PluginProcessChild.cpp b/dom/plugins/ipc/PluginProcessChild.cpp
+--- dom/plugins/ipc/PluginProcessChild.cpp
++++ dom/plugins/ipc/PluginProcessChild.cpp
+@@ -95,7 +95,7 @@ PluginProcessChild::Init()
+ std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
+ NS_ABORT_IF_FALSE(values.size() >= 2, "not enough args");
+
+- pluginFilename = UnmungePluginDsoPath(values[1]);
++ pluginFilename = values[1];
+
+ #elif defined(OS_WIN)
+ std::vector<std::wstring> values =
+diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp
+--- dom/plugins/ipc/PluginProcessParent.cpp
++++ dom/plugins/ipc/PluginProcessParent.cpp
+@@ -10,10 +10,6 @@
+ #include "base/process_util.h"
+
+ #include "mozilla/ipc/BrowserProcessSubThread.h"
+-#include "mozilla/plugins/PluginMessageUtils.h"
+-
+-using std::vector;
+-using std::string;
+
+ using mozilla::ipc::BrowserProcessSubThread;
+ using mozilla::ipc::GeckoChildProcessHost;
+@@ -73,8 +69,12 @@ PluginProcessParent::Launch(PRInt32 time
+ }
+ }
+
+- vector<string> args;
+- args.push_back(MungePluginDsoPath(mPluginFilePath));
++ std::vector<std::string> args;
++#if defined(XP_WIN)
++ args.push_back("\""+ mPluginFilePath +"\"");
++#else
++ args.push_back(mPluginFilePath);
++#endif
+ return SyncLaunch(args, timeoutMs, selectedArchitecture);
+ }
+
Modified: branches/experimental/www/firefox-beta/files/patch-toolkit_library_Makefile.in
==============================================================================
--- branches/experimental/www/firefox-beta/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-beta/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:16:54 2012 (r737)
@@ -5,7 +5,7 @@
$(INSTALL) $^ .
-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
-+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%%
++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% %%CXXABI%%
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-rules.mk
Modified: branches/experimental/www/firefox-beta/files/patch-xpcom_base_nsStackWalk.cpp
==============================================================================
--- branches/experimental/www/firefox-beta/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-beta/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:16:54 2012 (r737)
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
+
+ #elif defined(HAVE__UNWIND_BACKTRACE)
+
++#define _GNU_SOURCE
+ // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
+ #include <unwind.h>
+
Modified: branches/experimental/www/firefox-esr/Makefile
==============================================================================
--- branches/experimental/www/firefox-esr/Makefile Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-esr/Makefile Fri Jun 8 14:16:54 2012 (r737)
@@ -80,6 +80,16 @@
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
+.if !empty(CXX:M*clang++*)
+CXXFLAGS+= -Wno-error=return-type-c-linkage
+.endif
+
+.if ${CXXFLAGS:M-stdlib=libc++}
+CXXABI= -lcxxrt
+.else
+CXXABI= # implied
+.endif
+
pre-extract:
.if defined(WITH_PGO)
@${ECHO} "*****************************************************************"
@@ -104,6 +114,7 @@
-e 's|/proc/self/fd|/dev/fd|' \
-e 's|/proc["/]|/compat/linux&|'
${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
+ -e 's|%%CXXABI%%|${CXXABI}|' \
${WRKSRC}/storage/build/Makefile.in \
${WRKSRC}/toolkit/library/Makefile.in \
${WRKSRC}/db/sqlite3/src/Makefile.in
Modified: branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc
==============================================================================
--- branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -1,6 +1,14 @@
--- ipc/chromium/src/base/file_util_linux.cc~
+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) {
+@@ -5,6 +5,7 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include <string>
+ #include <vector>
+@@ -28,7 +29,7 @@ bool GetShmemTempDir(FilePath* path) {
#ifdef ANDROID
return GetTempDir(path);
#else
Added: branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-message_pump_libevent.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/message_pump_libevent.cc~
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
Added: branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox-esr/files/patch-ipc-chromium-src-base-time_posix.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/time_posix.cc~
++++ ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
Added: branches/experimental/www/firefox-esr/files/patch-libcxx-revert-bug519601
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox-esr/files/patch-libcxx-revert-bug519601 Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,116 @@
+changeset: 40752:cc5ace5d6ade
+user: Karl Tomlinson <karlt@mozbugz.karlt.net> and Chris Jones <jones.chris.g@gmail.com>
+date: Wed Apr 14 02:04:52 2010 -0500
+summary: Bug 519601: s/netscape/netsc@pe/ for plugin dso paths passed on the command line on linux. r=karlt
+
+diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp
+--- dom/plugins/ipc/PluginMessageUtils.cpp
++++ dom/plugins/ipc/PluginMessageUtils.cpp
+@@ -13,8 +13,6 @@
+ #include "PluginScriptableObjectParent.h"
+ #include "PluginScriptableObjectChild.h"
+
+-using std::string;
+-
+ using mozilla::ipc::RPCChannel;
+
+ namespace {
+@@ -114,42 +112,6 @@ MediateRace(const RPCChannel::Message& p
+ }
+ }
+
+-static string
+-ReplaceAll(const string& haystack, const string& needle, const string& with)
+-{
+- string munged = haystack;
+- string::size_type i = 0;
+-
+- while (string::npos != (i = munged.find(needle, i))) {
+- munged.replace(i, needle.length(), with);
+- i += with.length();
+- }
+-
+- return munged;
+-}
+-
+-string
+-MungePluginDsoPath(const string& path)
+-{
+-#if defined(OS_LINUX)
+- // https://bugzilla.mozilla.org/show_bug.cgi?id=519601
+- return ReplaceAll(path, "netscape", "netsc@pe");
+-#else
+- return path;
+-#endif
+-}
+-
+-string
+-UnmungePluginDsoPath(const string& munged)
+-{
+-#if defined(OS_LINUX)
+- return ReplaceAll(munged, "netsc@pe", "netscape");
+-#else
+- return munged;
+-#endif
+-}
+-
+-
+ PRLogModuleInfo* gPluginLog = PR_NewLogModule("IPCPlugins");
+
+ void
+diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h
+--- dom/plugins/ipc/PluginMessageUtils.h
++++ dom/plugins/ipc/PluginMessageUtils.h
+@@ -48,11 +48,6 @@ mozilla::ipc::RPCChannel::RacyRPCPolicy
+ MediateRace(const mozilla::ipc::RPCChannel::Message& parent,
+ const mozilla::ipc::RPCChannel::Message& child);
+
+-std::string
+-MungePluginDsoPath(const std::string& path);
+-std::string
+-UnmungePluginDsoPath(const std::string& munged);
+-
+ extern PRLogModuleInfo* gPluginLog;
+
+ const uint32_t kAllowAsyncDrawing = 0x1;
+diff --git a/dom/plugins/ipc/PluginProcessChild.cpp b/dom/plugins/ipc/PluginProcessChild.cpp
+--- dom/plugins/ipc/PluginProcessChild.cpp
++++ dom/plugins/ipc/PluginProcessChild.cpp
+@@ -95,7 +95,7 @@ PluginProcessChild::Init()
+ std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
+ NS_ABORT_IF_FALSE(values.size() >= 2, "not enough args");
+
+- pluginFilename = UnmungePluginDsoPath(values[1]);
++ pluginFilename = values[1];
+
+ #elif defined(OS_WIN)
+ std::vector<std::wstring> values =
+diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp
+--- dom/plugins/ipc/PluginProcessParent.cpp
++++ dom/plugins/ipc/PluginProcessParent.cpp
+@@ -10,10 +10,6 @@
+ #include "base/process_util.h"
+
+ #include "mozilla/ipc/BrowserProcessSubThread.h"
+-#include "mozilla/plugins/PluginMessageUtils.h"
+-
+-using std::vector;
+-using std::string;
+
+ using mozilla::ipc::BrowserProcessSubThread;
+ using mozilla::ipc::GeckoChildProcessHost;
+@@ -73,8 +69,12 @@ PluginProcessParent::Launch(PRInt32 time
+ }
+ }
+
+- vector<string> args;
+- args.push_back(MungePluginDsoPath(mPluginFilePath));
++ std::vector<std::string> args;
++#if defined(XP_WIN)
++ args.push_back("\""+ mPluginFilePath +"\"");
++#else
++ args.push_back(mPluginFilePath);
++#endif
+ return SyncLaunch(args, timeoutMs, selectedArchitecture);
+ }
+
Modified: branches/experimental/www/firefox-esr/files/patch-toolkit_library_Makefile.in
==============================================================================
--- branches/experimental/www/firefox-esr/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-esr/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:16:54 2012 (r737)
@@ -5,7 +5,7 @@
$(INSTALL) $^ .
-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
-+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%%
++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% %%CXXABI%%
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-rules.mk
Modified: branches/experimental/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp
==============================================================================
--- branches/experimental/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox-esr/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:16:54 2012 (r737)
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
+
+ #elif defined(HAVE__UNWIND_BACKTRACE)
+
++#define _GNU_SOURCE
+ // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
+ #include <unwind.h>
+
Modified: branches/experimental/www/firefox/Makefile
==============================================================================
--- branches/experimental/www/firefox/Makefile Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox/Makefile Fri Jun 8 14:16:54 2012 (r737)
@@ -79,6 +79,16 @@
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
+.if !empty(CXX:M*clang++*)
+CXXFLAGS+= -Wno-error=return-type-c-linkage
+.endif
+
+.if ${CXXFLAGS:M-stdlib=libc++}
+CXXABI= -lcxxrt
+.else
+CXXABI= # implied
+.endif
+
pre-extract:
.if defined(WITH_PGO)
@${ECHO} "*****************************************************************"
@@ -103,6 +113,7 @@
-e 's|/proc/self/fd|/dev/fd|' \
-e 's|/proc["/]|/compat/linux&|'
${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
+ -e 's|%%CXXABI%%|${CXXABI}|' \
${WRKSRC}/storage/build/Makefile.in \
${WRKSRC}/toolkit/library/Makefile.in \
${WRKSRC}/db/sqlite3/src/Makefile.in
Modified: branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc
==============================================================================
--- branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -1,6 +1,14 @@
--- ipc/chromium/src/base/file_util_linux.cc~
+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) {
+@@ -5,6 +5,7 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include <string>
+ #include <vector>
+@@ -28,7 +29,7 @@ bool GetShmemTempDir(FilePath* path) {
#ifdef ANDROID
return GetTempDir(path);
#else
Added: branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-message_pump_libevent.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/message_pump_libevent.cc~
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
Added: branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-time_posix.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox/files/patch-ipc-chromium-src-base-time_posix.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/time_posix.cc~
++++ ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
Added: branches/experimental/www/firefox/files/patch-libcxx-revert-bug519601
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/firefox/files/patch-libcxx-revert-bug519601 Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,116 @@
+changeset: 40752:cc5ace5d6ade
+user: Karl Tomlinson <karlt@mozbugz.karlt.net> and Chris Jones <jones.chris.g@gmail.com>
+date: Wed Apr 14 02:04:52 2010 -0500
+summary: Bug 519601: s/netscape/netsc@pe/ for plugin dso paths passed on the command line on linux. r=karlt
+
+diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp
+--- dom/plugins/ipc/PluginMessageUtils.cpp
++++ dom/plugins/ipc/PluginMessageUtils.cpp
+@@ -13,8 +13,6 @@
+ #include "PluginScriptableObjectParent.h"
+ #include "PluginScriptableObjectChild.h"
+
+-using std::string;
+-
+ using mozilla::ipc::RPCChannel;
+
+ namespace {
+@@ -114,42 +112,6 @@ MediateRace(const RPCChannel::Message& p
+ }
+ }
+
+-static string
+-ReplaceAll(const string& haystack, const string& needle, const string& with)
+-{
+- string munged = haystack;
+- string::size_type i = 0;
+-
+- while (string::npos != (i = munged.find(needle, i))) {
+- munged.replace(i, needle.length(), with);
+- i += with.length();
+- }
+-
+- return munged;
+-}
+-
+-string
+-MungePluginDsoPath(const string& path)
+-{
+-#if defined(OS_LINUX)
+- // https://bugzilla.mozilla.org/show_bug.cgi?id=519601
+- return ReplaceAll(path, "netscape", "netsc@pe");
+-#else
+- return path;
+-#endif
+-}
+-
+-string
+-UnmungePluginDsoPath(const string& munged)
+-{
+-#if defined(OS_LINUX)
+- return ReplaceAll(munged, "netsc@pe", "netscape");
+-#else
+- return munged;
+-#endif
+-}
+-
+-
+ PRLogModuleInfo* gPluginLog = PR_NewLogModule("IPCPlugins");
+
+ void
+diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h
+--- dom/plugins/ipc/PluginMessageUtils.h
++++ dom/plugins/ipc/PluginMessageUtils.h
+@@ -48,11 +48,6 @@ mozilla::ipc::RPCChannel::RacyRPCPolicy
+ MediateRace(const mozilla::ipc::RPCChannel::Message& parent,
+ const mozilla::ipc::RPCChannel::Message& child);
+
+-std::string
+-MungePluginDsoPath(const std::string& path);
+-std::string
+-UnmungePluginDsoPath(const std::string& munged);
+-
+ extern PRLogModuleInfo* gPluginLog;
+
+ const uint32_t kAllowAsyncDrawing = 0x1;
+diff --git a/dom/plugins/ipc/PluginProcessChild.cpp b/dom/plugins/ipc/PluginProcessChild.cpp
+--- dom/plugins/ipc/PluginProcessChild.cpp
++++ dom/plugins/ipc/PluginProcessChild.cpp
+@@ -95,7 +95,7 @@ PluginProcessChild::Init()
+ std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
+ NS_ABORT_IF_FALSE(values.size() >= 2, "not enough args");
+
+- pluginFilename = UnmungePluginDsoPath(values[1]);
++ pluginFilename = values[1];
+
+ #elif defined(OS_WIN)
+ std::vector<std::wstring> values =
+diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp
+--- dom/plugins/ipc/PluginProcessParent.cpp
++++ dom/plugins/ipc/PluginProcessParent.cpp
+@@ -10,10 +10,6 @@
+ #include "base/process_util.h"
+
+ #include "mozilla/ipc/BrowserProcessSubThread.h"
+-#include "mozilla/plugins/PluginMessageUtils.h"
+-
+-using std::vector;
+-using std::string;
+
+ using mozilla::ipc::BrowserProcessSubThread;
+ using mozilla::ipc::GeckoChildProcessHost;
+@@ -73,8 +69,12 @@ PluginProcessParent::Launch(PRInt32 time
+ }
+ }
+
+- vector<string> args;
+- args.push_back(MungePluginDsoPath(mPluginFilePath));
++ std::vector<std::string> args;
++#if defined(XP_WIN)
++ args.push_back("\""+ mPluginFilePath +"\"");
++#else
++ args.push_back(mPluginFilePath);
++#endif
+ return SyncLaunch(args, timeoutMs, selectedArchitecture);
+ }
+
Modified: branches/experimental/www/firefox/files/patch-toolkit_library_Makefile.in
==============================================================================
--- branches/experimental/www/firefox/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:16:54 2012 (r737)
@@ -5,7 +5,7 @@
$(INSTALL) $^ .
-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
-+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%%
++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% %%CXXABI%%
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-rules.mk
Modified: branches/experimental/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp
==============================================================================
--- branches/experimental/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/firefox/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:16:54 2012 (r737)
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
+
+ #elif defined(HAVE__UNWIND_BACKTRACE)
+
++#define _GNU_SOURCE
+ // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
+ #include <unwind.h>
+
Modified: branches/experimental/www/libxul/Makefile
==============================================================================
--- branches/experimental/www/libxul/Makefile Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/libxul/Makefile Fri Jun 8 14:16:54 2012 (r737)
@@ -66,11 +66,22 @@
BUILD_DEPENDS+= yasm:${PORTSDIR}/devel/yasm
.endif
+.if !empty(CXX:M*clang++*)
+CXXFLAGS+= -Wno-error=return-type-c-linkage
+.endif
+
+.if ${CXXFLAGS:M-stdlib=libc++}
+CXXABI= -lcxxrt
+.else
+CXXABI= # implied
+.endif
+
post-patch:
@${GREP} -Flr \"/proc ${WRKSRC}/ipc/chromium/src/base | ${XARGS} ${REINPLACE_CMD} \
-e 's|/proc/self/fd|/dev/fd|' \
-e 's|/proc["/]|/compat/linux&|'
@${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
+ -e 's|%%CXXABI%%|${CXXABI}|' \
${WRKSRC}/storage/build/Makefile.in \
${WRKSRC}/toolkit/library/Makefile.in \
${WRKSRC}/db/sqlite3/src/Makefile.in
Modified: branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-file_util_linux.cc
==============================================================================
--- branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-file_util_linux.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -1,6 +1,14 @@
--- ipc/chromium/src/base/file_util_linux.cc~
+++ ipc/chromium/src/base/file_util_linux.cc
-@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) {
+@@ -5,6 +5,7 @@
+ #include "base/file_util.h"
+
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include <string>
+ #include <vector>
+@@ -28,7 +29,7 @@ bool GetShmemTempDir(FilePath* path) {
#ifdef ANDROID
return GetTempDir(path);
#else
Added: branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-message_pump_libevent.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-message_pump_libevent.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/message_pump_libevent.cc~
++++ ipc/chromium/src/base/message_pump_libevent.cc
+@@ -6,6 +6,7 @@
+
+ #include <errno.h>
+ #include <fcntl.h>
++#include <unistd.h>
+
+ #include "eintr_wrapper.h"
+ #include "base/logging.h"
Added: branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-time_posix.cc
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/libxul/files/patch-ipc-chromium-src-base-time_posix.cc Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,10 @@
+--- ipc/chromium/src/base/time_posix.cc~
++++ ipc/chromium/src/base/time_posix.cc
+@@ -8,6 +9,7 @@
+ #include <mach/mach_time.h>
+ #endif
+ #include <sys/time.h>
++#include <unistd.h>
+ #ifdef ANDROID
+ #include <time64.h>
+ #else
Added: branches/experimental/www/libxul/files/patch-libcxx-revert-bug519601
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/experimental/www/libxul/files/patch-libcxx-revert-bug519601 Fri Jun 8 14:16:54 2012 (r737)
@@ -0,0 +1,116 @@
+changeset: 40752:cc5ace5d6ade
+user: Karl Tomlinson <karlt@mozbugz.karlt.net> and Chris Jones <jones.chris.g@gmail.com>
+date: Wed Apr 14 02:04:52 2010 -0500
+summary: Bug 519601: s/netscape/netsc@pe/ for plugin dso paths passed on the command line on linux. r=karlt
+
+diff --git a/dom/plugins/ipc/PluginMessageUtils.cpp b/dom/plugins/ipc/PluginMessageUtils.cpp
+--- dom/plugins/ipc/PluginMessageUtils.cpp
++++ dom/plugins/ipc/PluginMessageUtils.cpp
+@@ -13,8 +13,6 @@
+ #include "PluginScriptableObjectParent.h"
+ #include "PluginScriptableObjectChild.h"
+
+-using std::string;
+-
+ using mozilla::ipc::RPCChannel;
+
+ namespace {
+@@ -114,42 +112,6 @@ MediateRace(const RPCChannel::Message& p
+ }
+ }
+
+-static string
+-ReplaceAll(const string& haystack, const string& needle, const string& with)
+-{
+- string munged = haystack;
+- string::size_type i = 0;
+-
+- while (string::npos != (i = munged.find(needle, i))) {
+- munged.replace(i, needle.length(), with);
+- i += with.length();
+- }
+-
+- return munged;
+-}
+-
+-string
+-MungePluginDsoPath(const string& path)
+-{
+-#if defined(OS_LINUX)
+- // https://bugzilla.mozilla.org/show_bug.cgi?id=519601
+- return ReplaceAll(path, "netscape", "netsc@pe");
+-#else
+- return path;
+-#endif
+-}
+-
+-string
+-UnmungePluginDsoPath(const string& munged)
+-{
+-#if defined(OS_LINUX)
+- return ReplaceAll(munged, "netsc@pe", "netscape");
+-#else
+- return munged;
+-#endif
+-}
+-
+-
+ PRLogModuleInfo* gPluginLog = PR_NewLogModule("IPCPlugins");
+
+ void
+diff --git a/dom/plugins/ipc/PluginMessageUtils.h b/dom/plugins/ipc/PluginMessageUtils.h
+--- dom/plugins/ipc/PluginMessageUtils.h
++++ dom/plugins/ipc/PluginMessageUtils.h
+@@ -48,11 +48,6 @@ mozilla::ipc::RPCChannel::RacyRPCPolicy
+ MediateRace(const mozilla::ipc::RPCChannel::Message& parent,
+ const mozilla::ipc::RPCChannel::Message& child);
+
+-std::string
+-MungePluginDsoPath(const std::string& path);
+-std::string
+-UnmungePluginDsoPath(const std::string& munged);
+-
+ extern PRLogModuleInfo* gPluginLog;
+
+ const uint32_t kAllowAsyncDrawing = 0x1;
+diff --git a/dom/plugins/ipc/PluginProcessChild.cpp b/dom/plugins/ipc/PluginProcessChild.cpp
+--- dom/plugins/ipc/PluginProcessChild.cpp
++++ dom/plugins/ipc/PluginProcessChild.cpp
+@@ -95,7 +95,7 @@ PluginProcessChild::Init()
+ std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
+ NS_ABORT_IF_FALSE(values.size() >= 2, "not enough args");
+
+- pluginFilename = UnmungePluginDsoPath(values[1]);
++ pluginFilename = values[1];
+
+ #elif defined(OS_WIN)
+ std::vector<std::wstring> values =
+diff --git a/dom/plugins/ipc/PluginProcessParent.cpp b/dom/plugins/ipc/PluginProcessParent.cpp
+--- dom/plugins/ipc/PluginProcessParent.cpp
++++ dom/plugins/ipc/PluginProcessParent.cpp
+@@ -10,10 +10,6 @@
+ #include "base/process_util.h"
+
+ #include "mozilla/ipc/BrowserProcessSubThread.h"
+-#include "mozilla/plugins/PluginMessageUtils.h"
+-
+-using std::vector;
+-using std::string;
+
+ using mozilla::ipc::BrowserProcessSubThread;
+ using mozilla::ipc::GeckoChildProcessHost;
+@@ -73,8 +69,12 @@ PluginProcessParent::Launch(PRInt32 time
+ }
+ }
+
+- vector<string> args;
+- args.push_back(MungePluginDsoPath(mPluginFilePath));
++ std::vector<std::string> args;
++#if defined(XP_WIN)
++ args.push_back("\""+ mPluginFilePath +"\"");
++#else
++ args.push_back(mPluginFilePath);
++#endif
+ return SyncLaunch(args, timeoutMs, selectedArchitecture);
+ }
+
Modified: branches/experimental/www/libxul/files/patch-toolkit_library_Makefile.in
==============================================================================
--- branches/experimental/www/libxul/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/libxul/files/patch-toolkit_library_Makefile.in Fri Jun 8 14:16:54 2012 (r737)
@@ -5,7 +5,7 @@
$(INSTALL) $^ .
-EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS)
-+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%%
++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% %%CXXABI%%
ifdef MOZ_ENABLE_LIBXUL
include $(srcdir)/libxul-rules.mk
Modified: branches/experimental/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp
==============================================================================
--- branches/experimental/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:14:50 2012 (r736)
+++ branches/experimental/www/libxul/files/patch-xpcom_base_nsStackWalk.cpp Fri Jun 8 14:16:54 2012 (r737)
@@ -9,3 +9,11 @@
#include <dlfcn.h>
#endif
+@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
+
+ #elif defined(HAVE__UNWIND_BACKTRACE)
+
++#define _GNU_SOURCE
+ // libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
+ #include <unwind.h>
+
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206081416.q58EGtxF094670>
