[xulrunner/f16] fix build on secondary arches

Dan Horák sharkcz at fedoraproject.org
Tue Oct 11 15:39:17 UTC 2011


commit 4e44d76599cabeed6a38b1da76cd30e833feb454
Author: Dan Horák <dan at danny.cz>
Date:   Tue Oct 11 17:39:11 2011 +0200

    fix build on secondary arches

 mozilla-670719.patch           |   53 ++++++++++++++++++++++++++++++++++++++++
 xulrunner-7.0.1-yarr-jit.patch |   44 +++++++++++++++++++++++++++++++++
 xulrunner.spec                 |   10 +++++++-
 3 files changed, 106 insertions(+), 1 deletions(-)
---
diff --git a/mozilla-670719.patch b/mozilla-670719.patch
new file mode 100644
index 0000000..afae907
--- /dev/null
+++ b/mozilla-670719.patch
@@ -0,0 +1,53 @@
+# HG changeset patch
+# User Mike Hommey <mh+mozilla at glandium.org>
+# Date 1313846520 -7200
+# Node ID fdc3b63938f5a76d99c1e2bb12fd448465debc94
+# Parent  07a5a618ebe3f67b23100ceb1b51e92bb79be0cd
+Bug 670719 - Only add -DENABLE_JIT=1 to CXXFLAGS if any of trace/method/yarr jit is enabled.
+
+diff --git a/js/src/Makefile.in b/js/src/Makefile.in
+--- a/js/src/Makefile.in
++++ b/js/src/Makefile.in
+@@ -433,16 +433,19 @@ CPPSRCS += \
+ 		YarrPattern.cpp \
+ 		YarrSyntaxChecker.cpp \
+ 		$(NULL)
+ else
+ 
+ ###############################################
+ # BEGIN include sources for the Nitro assembler
+ #
++
++ENABLE_YARR_JIT = 1
++
+ VPATH += 	$(srcdir)/assembler \
+ 		$(srcdir)/assembler/wtf \
+ 		$(srcdir)/assembler/jit \
+ 		$(srcdir)/assembler/assembler \
+ 		$(srcdir)/methodjit \
+ 		$(srcdir)/yarr \
+ 		$(NONE)
+ 
+@@ -1070,17 +1073,21 @@ endif
+ 
+ ###############################################
+ # BEGIN kludges for the Nitro assembler
+ #
+ 
+ # Needed to "configure" it correctly.  Unfortunately these
+ # flags wind up being applied to all code in js/src, not just
+ # the code in js/src/assembler.
+-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1
++CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
++
++ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
++CXXFLAGS +=  -DENABLE_JIT=1
++endif
+ 
+ INCLUDES +=	-I$(srcdir)/assembler -I$(srcdir)/yarr
+ 
+ ifdef ENABLE_METHODJIT
+ # Build a standalone test program that exercises the assembler
+ # sources a bit.
+ TESTMAIN_OBJS = \
+ 		Assertions.$(OBJ_SUFFIX) \
diff --git a/xulrunner-7.0.1-yarr-jit.patch b/xulrunner-7.0.1-yarr-jit.patch
new file mode 100644
index 0000000..da64d0f
--- /dev/null
+++ b/xulrunner-7.0.1-yarr-jit.patch
@@ -0,0 +1,44 @@
+diff -up xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h
+--- xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h.yarr-jit	2011-09-28 22:24:50.000000000 +0200
++++ xulrunner-7.0.1/mozilla-release/js/src/jsregexpinlines.h	2011-10-11 17:35:10.000000000 +0200
+@@ -491,7 +491,9 @@ RegExp::compileHelper(JSContext *cx, JSL
+     }
+ #endif
+ 
++#if ENABLE_YARR_JIT
+     codeBlock.setFallBack(true);
++#endif
+     byteCode = JSC::Yarr::byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
+ 
+     return true;
+diff -up xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h
+--- xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h.yarr-jit	2011-09-28 22:24:52.000000000 +0200
++++ xulrunner-7.0.1/mozilla-release/js/src/yarr/wtfbridge.h	2011-10-11 17:35:10.000000000 +0200
+@@ -50,7 +50,9 @@
+ #include "jstl.h"
+ #include "vm/String.h"
+ #include "assembler/wtf/Platform.h"
++#if ENABLE_YARR_JIT
+ #include "assembler/jit/ExecutableAllocator.h"
++#endif
+ 
+ namespace JSC { namespace Yarr {
+ 
+@@ -261,6 +263,8 @@ deleteAllValues(Vector<T, N> &v) {
+     v.deleteAllValues();
+ }
+ 
++#if ENABLE_YARR_JIT
++
+ /*
+  * Minimal JSGlobalData. This used by Yarr to get the allocator.
+  */
+@@ -272,6 +276,8 @@ class JSGlobalData {
+      : regexAllocator(regexAllocator) { }
+ };
+ 
++#endif
++
+ /*
+  * Sentinel value used in Yarr.
+  */
diff --git a/xulrunner.spec b/xulrunner.spec
index bd3caa5..5a6911e 100644
--- a/xulrunner.spec
+++ b/xulrunner.spec
@@ -50,7 +50,7 @@
 Summary:        XUL Runtime for Gecko Applications
 Name:           xulrunner
 Version:        7.0.1
-Release:        2%{?pre_tag}%{?dist}
+Release:        3%{?pre_tag}%{?dist}
 URL:            http://developer.mozilla.org/En/XULRunner
 License:        MPLv1.1 or GPLv2+ or LGPLv2+
 Group:          Applications/Internet
@@ -83,6 +83,9 @@ Patch24:        crashreporter-remove-static.patch
 # Upstream patches
 Patch34:        xulrunner-2.0-network-link-service.patch
 Patch35:        xulrunner-2.0-NetworkManager09.patch
+Patch36:        mozilla-670719.patch
+# backport from 8.0beta
+Patch37:        xulrunner-7.0.1-yarr-jit.patch
 
 # ---------------------------------------------------
 
@@ -209,6 +212,8 @@ sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \
 
 %patch34 -p1 -b .network-link-service
 %patch35 -p1 -b .NetworkManager09
+%patch36 -p1 -b .moz670719
+%patch37 -p2 -b .yarr-jit
 
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig
@@ -449,6 +454,9 @@ fi
 #---------------------------------------------------------------------
 
 %changelog
+* Tue Oct 11 2011 Dan Horák <dan[at]danny.cz> 7.0.1-3
+- fix build on secondary arches
+
 * Mon Oct 10 2011 Martin Stransky <stransky at redhat.com> 7.0.1-2
 - Removed GRE stuff
 - Removed xulrunner rpath (mozbz#686434)


More information about the scm-commits mailing list