From owner-freebsd-gecko@FreeBSD.ORG Fri Jun 8 14:17:02 2012 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58132106564A for ; Fri, 8 Jun 2012 14:17:02 +0000 (UTC) (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: from trillian.chruetertee.ch (trillian.chruetertee.ch [217.150.245.56]) by mx1.freebsd.org (Postfix) with ESMTP id 825F88FC0A for ; Fri, 8 Jun 2012 14:17:01 +0000 (UTC) Received: from trillian.chruetertee.ch (trillian [217.150.245.56]) by trillian.chruetertee.ch (8.14.4/8.14.3) with ESMTP id q58EH0mL000364 for ; Fri, 8 Jun 2012 14:17:00 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Received: (from www@localhost) by trillian.chruetertee.ch (8.14.4/8.14.3/Submit) id q58EGtxF094670 for freebsd-gecko@freebsd.org; Fri, 8 Jun 2012 14:16:55 GMT (envelope-from svn-freebsd-gecko@chruetertee.ch) Date: Fri, 8 Jun 2012 14:16:55 GMT Message-Id: <201206081416.q58EGtxF094670@trillian.chruetertee.ch> X-Authentication-Warning: trillian.chruetertee.ch: www set sender to svn-freebsd-gecko@chruetertee.ch using -f From: svn-freebsd-gecko@chruetertee.ch To: freebsd-gecko@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-gecko@freebsd.org List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jun 2012 14:17:02 -0000 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 +.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 + #endif + #include ++#include + #ifdef ANDROID + #include + #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 and Chris Jones +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 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 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 args; +- args.push_back(MungePluginDsoPath(mPluginFilePath)); ++ std::vector 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 #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 + 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 ++#include + + #include + #include +@@ -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 + #include ++#include + + #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 + #endif + #include ++#include + #ifdef ANDROID + #include + #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 and Chris Jones +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 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 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 args; +- args.push_back(MungePluginDsoPath(mPluginFilePath)); ++ std::vector 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 #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 + 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 ++#include + + #include + #include +@@ -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 + #include ++#include + + #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 + #endif + #include ++#include + #ifdef ANDROID + #include + #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 and Chris Jones +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 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 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 args; +- args.push_back(MungePluginDsoPath(mPluginFilePath)); ++ std::vector 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 #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 + 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 ++#include + + #include + #include +@@ -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 + #include ++#include + + #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 + #endif + #include ++#include + #ifdef ANDROID + #include + #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 and Chris Jones +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 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 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 args; +- args.push_back(MungePluginDsoPath(mPluginFilePath)); ++ std::vector 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 #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 +