From owner-freebsd-gecko@FreeBSD.ORG Mon Aug 10 19:55:11 2009 Return-Path: Delivered-To: gecko@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72F2E106566B for ; Mon, 10 Aug 2009 19:55:11 +0000 (UTC) (envelope-from andreast-list@fgznet.ch) Received: from smtp.fgznet.ch (mail.fgznet.ch [81.92.96.47]) by mx1.freebsd.org (Postfix) with ESMTP id 134F78FC33 for ; Mon, 10 Aug 2009 19:55:10 +0000 (UTC) Received: from deuterium.andreas.nets ([91.190.8.131]) by smtp.fgznet.ch (8.13.8/8.13.8/Submit_SMTPAUTH) with ESMTP id n7AJt71p078640; Mon, 10 Aug 2009 21:55:07 +0200 (CEST) (envelope-from andreast-list@fgznet.ch) Message-ID: <4A807B1B.20605@fgznet.ch> Date: Mon, 10 Aug 2009 21:55:07 +0200 From: Andreas Tobler User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: gecko@freebsd.org References: <4A7F1AB0.9040605@fgznet.ch> In-Reply-To: <4A7F1AB0.9040605@fgznet.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.64 on 81.92.96.47 Cc: Joe Marcus Clarke Subject: Re: firefox3 under powerpc not building 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: Mon, 10 Aug 2009 19:55:11 -0000 Hi again, replying to myself. Andreas Tobler wrote: > I can not build firefox3 (3.0.13 and up) under FreeBSD -CURRENT. As far > as I tracked down it is an issue in the firefox sources itself. > > The last working build I had was 3.0.10. > > Here in this area it breaks: > > http://mxr.mozilla.org/mozilla1.9.1/diff?file=/security/nss/lib/freebl/Makefile&diffvar=mozilla1.8.0 > > The below snippet does somehow not work. > ----- > # some code wants _X86_ defined for intel CPUs. > # coreconf does this for windows, but not for Linux, FreeBSD, etc. > ifeq (,$(filter-out x86 x86_64,$(CPU_ARCH))) > ifneq (,$(filter-out WIN%,$(OS_TARGET))) > DEFINES += -D_X86_ > endif > endif > ----- It does not work on powerpc since the CPU_ARCH is set to x86 in security/coreconf/FreeBSD.mk, gah! > On powerpc I get the -D_X86_ passed to the compile options, very bad. > But I do not understand why. Might be that the first filter-out does not > work as expected? > > I compared with an x86 build and with an x86_64 build. On the x86 it > works as expected. But also under der x86_64 it does not do what I > expect. Under x86_64 I'd expect the -D_X86_ in the compile options, right? The x86_64 case is also clear now, the CPU_ARCH is set to amd64, so the -D_X86_ is not set. We might need a patch to security/nss/lib/freebl/Makefile which also includes the amd64 to the first filter-out above? Like this one: deuterium_fbsd# diff -u security/nss/lib/freebl/Makefile.orig security/nss/lib/freebl/Makefile --- security/nss/lib/freebl/Makefile.orig 2009-08-10 21:50:15.000000000 +0200 +++ security/nss/lib/freebl/Makefile 2009-08-10 21:50:29.000000000 +0200 @@ -79,7 +79,7 @@ endif # some code wants _X86_ defined for intel CPUs. # coreconf does this for windows, but not for Linux, FreeBSD, etc. -ifeq (,$(filter-out x86 x86_64,$(CPU_ARCH))) +ifeq (,$(filter-out amd64 x86 x86_64,$(CPU_ARCH))) ifneq (,$(filter-out WIN%,$(OS_TARGET))) DEFINES += -D_X86_ endif For the powerpc issue the below patch lets me build firefox3 (3.0.13), firefox35 is still open. It has some other issues. wolfram# diff -u security/coreconf/FreeBSD.mk.orig security/coreconf/FreeBSD.mk --- security/coreconf/FreeBSD.mk.orig 2009-08-10 21:31:08.000000000 +0200 +++ security/coreconf/FreeBSD.mk 2009-08-10 21:37:52.000000000 +0200 @@ -48,9 +48,13 @@ ifeq ($(OS_TEST),amd64) CPU_ARCH = amd64 else +ifeq ($(OS_TEST),powerpc) +CPU_ARCH = powerpc +else CPU_ARCH = x86 endif endif +endif OS_CFLAGS = $(DSO_CFLAGS) -ansi -Wall -Wno-switch -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK TIA, Andreas