From owner-freebsd-gecko@FreeBSD.ORG Thu Apr 7 21:12:48 2011 Return-Path: Delivered-To: freebsd-gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 760041065675 for ; Thu, 7 Apr 2011 21:12:48 +0000 (UTC) (envelope-from inyaoo@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 04E2A8FC15 for ; Thu, 7 Apr 2011 21:12:47 +0000 (UTC) Received: by wwc33 with SMTP id 33so3423071wwc.31 for ; Thu, 07 Apr 2011 14:12:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-type; bh=IKsO3WO5fOOFWMRYzVGH11EEXQk1ztJ3LJY5o4GC7qA=; b=jFF64kie3EfqLbgmY43x6W5jFZO4BwynOC+/5K3mdRHPWjaolvBivT2HhvIBGdPl0j SwWR0DSHA98Cq/IUQxQsHZTDkhUfGbGi/VGJnCTbEFTBVbO27vfVYE/sJKt702dRz9A0 nJVlkCiRB6UrspUPeH8BxJCuNxltt5Et78UDs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; b=aWvXTupcAHIJ1ngvNMgWTqUc3LDnn2xkusFhbnw0IWiYuxWN6ISD60NjA921MQ/fgr ClpF/hJckWKce1K1mtbwQCPH5BaBsFT2CzUvjQVrSTUa2EG+de/tdOlt51V9ThjbTk4p sxwNdSN40O/oyD9JumzuwqVCPua2l0/cKrdGs= Received: by 10.227.200.210 with SMTP id ex18mr1416768wbb.139.1302210766619; Thu, 07 Apr 2011 14:12:46 -0700 (PDT) Received: from localhost ([109.123.119.163]) by mx.google.com with ESMTPS id b20sm1296093wbb.33.2011.04.07.14.12.42 (version=SSLv3 cipher=OTHER); Thu, 07 Apr 2011 14:12:44 -0700 (PDT) From: Pan Tsu To: freebsd-gecko@freebsd.org References: <86lizvn8wz.fsf@gmail.com> <8e8deacee319b46e9009fe05ee04b1fb@bluelife.at> Date: Fri, 08 Apr 2011 01:12:37 +0400 In-Reply-To: <8e8deacee319b46e9009fe05ee04b1fb@bluelife.at> (Bernhard Froehlich's message of "Mon, 04 Apr 2011 10:33:00 +0200") Message-ID: <867hb5935m.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: --disable-ipc is disallowed X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 21:12:48 -0000 Bernhard Froehlich writes: > On Thu, 31 Mar 2011 09:41:48 +0400, Pan Tsu wrote: >> Mozilla devs recently disabled the option >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=638755 >> >> mozilla-central (aka trunk) still builds fine on FreeBSD but I wonder >> how long it'll remain so. >> >> So, do you plan to fix IPC port[1], probably using some pieces from >> www/chromium, or try keep --disable-ipc as long as possible? >> >> [1] it was removed in r430 >> >> http://trillian.chruetertee.ch/freebsd-gecko/changeset/430 > > Thanks for the hint. We will definitely need to talk to the Mozilla > guys about that. The IPC code is just not working on FreeBSD in it's > current state and beat@ created some patch in the firefox 3.6.x days > that is not stable but hopefully a good starting point. Hmm, IPC seems stable for me. Tested on 67597:fb566937c787, PGO build, -Ofast, ports/146231 flash plugin no longer causes rendering glitches with vdpau, not sure if it's because of IPC or an update. %% build hacks for r67597 Index: www/firefox/Makefile =================================================================== RCS file: /a/.cvsup/ports/www/firefox/Makefile,v retrieving revision 1.239 diff -u -p -r1.239 Makefile --- www/firefox/Makefile 24 Mar 2011 11:04:17 -0000 1.239 +++ www/firefox/Makefile 7 Apr 2011 20:24:51 -0000 @@ -18,6 +17,7 @@ MAINTAINER= gecko@FreeBSD.org COMMENT= Web browser based on the browser portion of Mozilla BUILD_DEPENDS= nspr>=4.8.7:${PORTSDIR}/devel/nspr +LIB_DEPENDS= execinfo.1:${PORTSDIR}/devel/libexecinfo USE_AUTOTOOLS= autoconf213 USE_GECKO= gecko @@ -54,5 +52,9 @@ OPTIONS= DBUS "Enable D-BUS support" on PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off +# XXX: what is gcc46 specific? +CXXFLAGS+= -fpermissive +MOZ_OPTIONS+= --disable-warnings-as-errors + .include @@ -108,6 +112,9 @@ post-extract:: <${FILESDIR}/firefox.desktop.in >${WRKDIR}/${MOZILLA}.desktop 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:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \ ${WRKSRC}/storage/build/Makefile.in \ ${WRKSRC}/toolkit/library/Makefile.in \ Index: www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc diff -N www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-atomicops_internals_mutex.cc 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,10 @@ +--- ipc/chromium/src/base/atomicops_internals_mutex.cc~ ++++ ipc/chromium/src/base/atomicops_internals_mutex.cc +@@ -39,6 +39,7 @@ + * ***** END LICENSE BLOCK ***** */ + + #include "base/atomicops.h" ++#include "base/lock.h" + + namespace base { + namespace subtle { Index: www/firefox/files/patch-ipc-chromium-src-base-file_util.h =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-file_util.h diff -N www/firefox/files/patch-ipc-chromium-src-base-file_util.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-file_util.h 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,13 @@ +--- ipc/chromium/src/base/file_util.h~ ++++ ipc/chromium/src/base/file_util.h +@@ -15,8 +15,9 @@ + #elif defined(ANDROID) + #include + #elif defined(OS_POSIX) ++#include ++#include + #include +-#include + #endif + + #include Index: www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc diff -N www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-file_util_linux.cc 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,11 @@ +--- ipc/chromium/src/base/file_util_linux.cc~ ++++ ipc/chromium/src/base/file_util_linux.cc +@@ -28,7 +28,7 @@ bool GetShmemTempDir(FilePath* path) { + #ifdef ANDROID + return GetTempDir(path); + #else +- *path = FilePath("/dev/shm"); ++ *path = FilePath("/tmp"); + return true; + #endif + } Index: www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc diff -N www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-file_util_posix.cc 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,11 @@ +--- ipc/chromium/src/base/file_util_posix.cc~ ++++ ipc/chromium/src/base/file_util_posix.cc +@@ -30,6 +30,8 @@ + #include "base/string_util.h" + #include "base/time.h" + ++#define stat64 stat ++ + namespace file_util { + + #if defined(GOOGLE_CHROME_BUILD) Index: www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc diff -N www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-platform_file_posix.cc 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,10 @@ +--- ipc/chromium/src/base/platform_file_posix.cc~ ++++ ipc/chromium/src/base/platform_file_posix.cc +@@ -9,6 +9,7 @@ + #ifdef ANDROID + #include + #endif ++#include + + #include "base/logging.h" + #include "base/string_util.h" Index: www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc diff -N www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-platform_thread_posix.cc 7 Apr 2011 19:56:07 -0000 @@ -0,0 +1,21 @@ +--- ipc/chromium/src/base/platform_thread_posix.cc~ ++++ ipc/chromium/src/base/platform_thread_posix.cc +@@ -10,8 +10,7 @@ + #if defined(OS_MACOSX) + #include + #elif defined(OS_LINUX) +-#include +-#include ++#include + #endif + + #if defined(OS_MACOSX) +@@ -34,7 +33,7 @@ PlatformThreadId PlatformThread::Current + #if defined(OS_MACOSX) + return mach_thread_self(); + #elif defined(OS_LINUX) +- return syscall(__NR_gettid); ++ return pthread_getthreadid_np(); // thr_self(2) ? + #endif + } + Index: www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h diff -N www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-base-third_party-nspr-prcpucfg.h 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,11 @@ +--- ipc/chromium/src/base/third_party/nspr/prcpucfg.h~ ++++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h +@@ -34,7 +34,7 @@ + #include "base/third_party/nspr/prcpucfg_win.h" + #elif defined(__APPLE__) + #include "base/third_party/nspr/prcpucfg_mac.h" +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__FreeBSD__) || defined(ANDROID) + #include "base/third_party/nspr/prcpucfg_linux.h" + #else + #error Provide a prcpucfg.h appropriate for your platform Index: www/firefox/files/patch-ipc-chromium-src-build-build_config.h =================================================================== RCS file: www/firefox/files/patch-ipc-chromium-src-build-build_config.h diff -N www/firefox/files/patch-ipc-chromium-src-build-build_config.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ www/firefox/files/patch-ipc-chromium-src-build-build_config.h 7 Apr 2011 15:10:16 -0000 @@ -0,0 +1,11 @@ +--- ipc/chromium/src/build/build_config.h~ ++++ ipc/chromium/src/build/build_config.h +@@ -17,7 +17,7 @@ + // A set of macros to use for platform detection. + #if defined(__APPLE__) + #define OS_MACOSX 1 +-#elif defined(__linux__) || defined(ANDROID) ++#elif defined(__FreeBSD__) || defined(ANDROID) + #define OS_LINUX 1 + #elif defined(_WIN32) + #define OS_WIN 1 Index: www/firefox/files/patch-toolkit_library_Makefile.in =================================================================== RCS file: /a/.cvsup/ports/www/firefox/files/patch-toolkit_library_Makefile.in,v retrieving revision 1.2 diff -u -p -r1.2 patch-toolkit_library_Makefile.in --- www/firefox/files/patch-toolkit_library_Makefile.in 22 Mar 2011 15:24:49 -0000 1.2 +++ www/firefox/files/patch-toolkit_library_Makefile.in 7 Apr 2011 15:05:47 -0000 @@ -5,7 +5,7 @@ $(INSTALL) $^ . -EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -+EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) %%PTHREAD_LIBS%% ++EXTRA_DSO_LDOPTS += $(LIBS_DIR) $(EXTRA_DSO_LIBS) -lexecinfo %%PTHREAD_LIBS%% ifdef MOZ_ENABLE_LIBXUL include $(srcdir)/libxul-rules.mk Index: www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in =================================================================== RCS file: /a/.cvsup/ports/www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in,v retrieving revision 1.3 diff -u -p -r1.3 patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in --- www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in 22 Mar 2011 15:24:49 -0000 1.3 +++ www/firefox/files/patch-xpcom_reflect_xptcall_src_md_unix_Makefile.in 28 Mar 2011 07:48:47 -0000 @@ -29,9 +29,9 @@ +CPPSRCS := xptcinvoke_amd64_openbsd.cpp xptcstubs_amd64_openbsd.cpp +endif +# - # BeOS/Intel (uses the same unixish_x86 code) + # Neutrino/Intel (uses the same unixish_x86 code) # - ifeq ($(OS_ARCH)$(OS_TEST),BeOSBePC) + ifeq ($(OS_TARGET),NTO) @@ -158,9 +167,15 @@ ASFILES := xptcinvoke_asm_osf1_alpha.s xptcstubs_asm_osf1_alpha.s endif %%