[seamonkey] fix build on secondary arches

Dan Horák sharkcz at fedoraproject.org
Fri Oct 14 09:10:37 UTC 2011


commit 24b8bad6750bd37d9397843b573d1f9ec22fbc3e
Author: Dan Horák <dan at danny.cz>
Date:   Fri Oct 14 11:10:33 2011 +0200

    fix build on secondary arches

 mozilla-670719.patch              |   26 ++++++++++++++++
 seamonkey.spec                    |   13 +++++++-
 xulrunner-6.0-secondary-ipc.patch |   60 +++++++++++++++++++++++++++++++++++++
 xulrunner-7.0.1-yarr-jit.patch    |   44 +++++++++++++++++++++++++++
 4 files changed, 142 insertions(+), 1 deletions(-)
---
diff --git a/mozilla-670719.patch b/mozilla-670719.patch
new file mode 100644
index 0000000..5c4d3df
--- /dev/null
+++ b/mozilla-670719.patch
@@ -0,0 +1,26 @@
+diff -up seamonkey-2.4.1/comm-release/mozilla/js/src/Makefile.in.moz670719 seamonkey-2.4.1/comm-release/mozilla/js/src/Makefile.in
+--- seamonkey-2.4.1/comm-release/mozilla/js/src/Makefile.in.moz670719	2011-09-29 01:21:42.000000000 +0200
++++ seamonkey-2.4.1/comm-release/mozilla/js/src/Makefile.in	2011-10-14 10:18:03.000000000 +0200
+@@ -431,6 +431,9 @@ else
+ ###############################################
+ # BEGIN include sources for the Nitro assembler
+ #
++
++ENABLE_YARR_JIT = 1
++
+ VPATH += 	$(srcdir)/assembler \
+ 		$(srcdir)/assembler/wtf \
+ 		$(srcdir)/assembler/jit \
+@@ -1051,7 +1054,11 @@ endif
+ # 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
+ 
diff --git a/seamonkey.spec b/seamonkey.spec
index c8f24f0..11c07f4 100644
--- a/seamonkey.spec
+++ b/seamonkey.spec
@@ -16,7 +16,7 @@
 Name:           seamonkey
 Summary:        Web browser, e-mail, news, IRC client, HTML editor
 Version:        2.4.1
-Release:        2%{?dist}
+Release:        3%{?dist}
 URL:            http://www.mozilla.org/projects/seamonkey/
 License:        MPLv1.1
 Group:          Applications/Internet
@@ -36,6 +36,11 @@ Source20:       seamonkey-fedora-default-prefs.js
 Source100:      find-external-requires
 
 Patch1:         mozilla-23-path.patch
+# copied from xulrunner (s/mozilla-release/mozilla/g)
+Patch2:         xulrunner-6.0-secondary-ipc.patch
+Patch3:         xulrunner-7.0.1-yarr-jit.patch
+# rediffed
+Patch4:         mozilla-670719.patch
 
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:  nspr-devel >= %{minimum_build_nspr_version}
@@ -97,6 +102,9 @@ application formerly known as Mozilla Application Suite.
 cd %{sources_subdir}
 
 %patch1 -p0 -b .path
+%patch2 -p1 -b .secondary-ipc
+%patch3 -p1 -b .yarr-jit
+%patch4 -p2 -b .moz670719
 
 %{__rm} -f .mozconfig
 %{__cp} %{SOURCE10} .mozconfig
@@ -348,6 +356,9 @@ update-desktop-database %{_datadir}/applications
 
 
 %changelog
+* Fri Oct 14 2011 Dan Horák <dan[at]danny.cz> - 2.4.1-3
+- fix build on secondary arches
+
 * Tue Oct 11 2011 Kai Engert <kaie at redhat.com> - 2.4.1-2
 - Update to 2.4.1
 
diff --git a/xulrunner-6.0-secondary-ipc.patch b/xulrunner-6.0-secondary-ipc.patch
new file mode 100644
index 0000000..35cf014
--- /dev/null
+++ b/xulrunner-6.0-secondary-ipc.patch
@@ -0,0 +1,60 @@
+diff -up xulrunner-6.0/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc xulrunner-6.0/mozilla/ipc/chromium/src/base/data_pack.cc
+--- xulrunner-6.0/mozilla/ipc/chromium/src/base/data_pack.cc.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla/ipc/chromium/src/base/data_pack.cc	2011-08-16 10:05:26.325449386 +0200
+@@ -91,14 +91,7 @@ bool DataPack::Load(const FilePath& path
+ bool DataPack::Get(uint32_t resource_id, StringPiece* data) {
+   // It won't be hard to make this endian-agnostic, but it's not worth
+   // bothering to do right now.
+-#if defined(__BYTE_ORDER)
+-  // Linux check
+-  COMPILE_ASSERT(__BYTE_ORDER == __LITTLE_ENDIAN,
+-                 datapack_assumes_little_endian);
+-#elif defined(__BIG_ENDIAN__)
+-  // Mac check
+-  #error DataPack assumes little endian
+-#endif
++#warning DoTheRightThingMakingThisEndianAgnostic!
+ 
+   DataPackEntry* target = reinterpret_cast<DataPackEntry*>(
+       bsearch(&resource_id, mmap_->data() + kHeaderLength, resource_count_,
+diff -up xulrunner-6.0/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc xulrunner-6.0/mozilla/ipc/chromium/src/build/build_config.h
+--- xulrunner-6.0/mozilla/ipc/chromium/src/build/build_config.h.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla/ipc/chromium/src/build/build_config.h	2011-08-16 10:07:23.093899409 +0200
+@@ -57,9 +57,24 @@
+ #define ARCH_CPU_ARMEL 1
+ #define ARCH_CPU_32_BITS 1
+ #define WCHAR_T_IS_UNSIGNED 1
++#elif defined(__powerpc64__)
++#define ARCH_CPU_PPC64 1
++#define ARCH_CPU_64_BITS 1
+ #elif defined(__ppc__) || defined(__powerpc__)
+ #define ARCH_CPU_PPC 1
+ #define ARCH_CPU_32_BITS 1
++#elif defined(__s390x__)
++#define ARCH_CPU_S390X 1
++#define ARCH_CPU_64_BITS 1
++#elif defined(__s390__)
++#define ARCH_CPU_S390 1
++#define ARCH_CPU_32_BITS 1
++#elif defined(__sparc__) && !defined(__arch64)
++#define ARCH_CPU_SPARC 1
++#define ARCH_CPU_32_BITS 1
++#elif defined(__sparc__) && defined(__arch64)
++#define ARCH_CPU_SPARC64 1
++#define ARCH_CPU_64_BITS 1
+ #else
+ #error Please add support for your architecture in build/build_config.h
+ #endif
+diff -up xulrunner-6.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc xulrunner-6.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h
+--- xulrunner-6.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.secondary-ipc	2011-08-11 23:41:01.000000000 +0200
++++ xulrunner-6.0/mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h	2011-08-16 10:05:26.326449206 +0200
+@@ -219,7 +219,8 @@ struct ParamTraits<unsigned long> {
+   }
+ };
+ 
+-#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)))
++// Although s390 is a 32-bit system it defines size_t as unsigned long
++#if !(defined(OS_MACOSX) || defined(OS_WIN) || (defined(CHROMIUM_MOZILLA_BUILD) && defined(OS_LINUX) && (defined(ARCH_CPU_64_BITS) || defined(ARCH_CPU_S390))))
+ // There size_t is a synonym for |unsigned long| ...
+ template <>
+ struct ParamTraits<size_t> {
diff --git a/xulrunner-7.0.1-yarr-jit.patch b/xulrunner-7.0.1-yarr-jit.patch
new file mode 100644
index 0000000..5bb7ccc
--- /dev/null
+++ b/xulrunner-7.0.1-yarr-jit.patch
@@ -0,0 +1,44 @@
+diff -up xulrunner-7.0.1/mozilla/js/src/jsregexpinlines.h.yarr-jit xulrunner-7.0.1/mozilla/js/src/jsregexpinlines.h
+--- xulrunner-7.0.1/mozilla/js/src/jsregexpinlines.h.yarr-jit	2011-09-28 22:24:50.000000000 +0200
++++ xulrunner-7.0.1/mozilla/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/js/src/yarr/wtfbridge.h.yarr-jit xulrunner-7.0.1/mozilla/js/src/yarr/wtfbridge.h
+--- xulrunner-7.0.1/mozilla/js/src/yarr/wtfbridge.h.yarr-jit	2011-09-28 22:24:52.000000000 +0200
++++ xulrunner-7.0.1/mozilla/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.
+  */


More information about the scm-commits mailing list