Skip to contentSkip to conversation

firefox_3.6.8.bb: Add mipsel support.

PATCH New Graham Gower 1 participant 1 message Sep 26, 2010

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 firefox_3.6.8.bb: Add mipsel support.

Patches taken from Gentoo and Debian.

Runs almost acceptably on my 350mhz/128mb mipsel, after a lengthy startup delay. Should work for big endian mips without much more work, but I can't test.

---
 ...nvoke-and-xptstubs-on-mips-o32-big-endian.patch |   81 ++++++++
 ...ncrease-stability-and-performance-on-mips.patch |   50 +++++
 recipes/mozilla/files/mips-disable-TLS.patch       |   12 ++
 recipes/mozilla/files/mipsel/jsautocfg.h           |   54 +++++
 .../files/xulrunner-1.9.2.8-mips-bus-error.patch   |   26 +++
 .../mozilla/files/xulrunner-chromium-mips.patch    |  208 ++++++++++++++++++++
 recipes/mozilla/firefox_3.6.8.bb                   |    9 +-
 7 files changed, 438 insertions(+), 2 deletions(-)
 create mode 100644 recipes/mozilla/files/Fix-xptinvoke-and-xptstubs-on-mips-o32-big-endian.patch
 create mode 100644 recipes/mozilla/files/Increase-stability-and-performance-on-mips.patch
 create mode 100644 recipes/mozilla/files/mips-disable-TLS.patch
 create mode 100644 recipes/mozilla/files/mipsel/jsautocfg.h
 create mode 100644 recipes/mozilla/files/xulrunner-1.9.2.8-mips-bus-error.patch
 create mode 100644 recipes/mozilla/files/xulrunner-chromium-mips.patch
recipes/mozilla/files/Fix-xptinvoke-and-xptstubs-on-mips-o32-big-endian.patch new file +81 -0
new file mode 100644
index 0000000..d373bdd
@@ -0,0 +1,81 @@
+From: Mike Hommey <[email protected]>
+Date: Sun, 14 Feb 2010 14:42:19 +0100
+Subject: Fix xptinvoke and xptstubs on mips o32 big endian
+
+---
+ .../xptcall/src/md/unix/xptcinvoke_mips.cpp        |   10 +++++++++
+ .../reflect/xptcall/src/md/unix/xptcstubs_mips.cpp |   21 ++++++++++++++++++-
+ 2 files changed, 29 insertions(+), 2 deletions(-)
+
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
+index 2c27a26..b2f0da7 100644
+--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
+@@ -92,18 +92,28 @@ invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
+ 
+         switch(s->type)
+         {
++        case nsXPTType::T_I8     : *d = (PRUint32) s->val.i8;   break;
++        case nsXPTType::T_I16    : *d = (PRUint32) s->val.i16;  break;
++        case nsXPTType::T_I32    : *d = (PRUint32) s->val.i32;  break;
+         case nsXPTType::T_I64    :
+             if ((PRWord)d & 4) d++;
+             *((PRInt64*) d)  = s->val.i64;    d++;
+             break;
++        case nsXPTType::T_U8     : *d = (PRUint32) s->val.u8;   break;
++        case nsXPTType::T_U16    : *d = (PRUint32) s->val.u16;  break;
++        case nsXPTType::T_U32    : *d = (PRUint32) s->val.u32;  break;
+         case nsXPTType::T_U64    :
+             if ((PRWord)d & 4) d++;
+             *((PRUint64*) d) = s->val.u64;    d++;
+             break;
++        case nsXPTType::T_FLOAT  : *((float*)   d) = s->val.f;  break;
+         case nsXPTType::T_DOUBLE :
+             if ((PRWord)d & 4) d++;
+             *((double*)   d) = s->val.d;      d++;
+             break;
++        case nsXPTType::T_BOOL   : *d = (PRBool)  s->val.b;     break;
++        case nsXPTType::T_CHAR   : *d = (char)    s->val.c;     break;
++        case nsXPTType::T_WCHAR  : *d = (wchar_t) s->val.wc;    break;
+         default:
+             *((void**)d) = s->val.p;
+             break;
+diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
+index bdce59c..730ab5d 100644
+--- a/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
++++ b/xpcom/reflect/xptcall/src/md/unix/xptcstubs_mips.cpp
+@@ -87,8 +87,6 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
+             continue;
+         }
+ 
+-        dp->val.p = (void*) *ap;
+-
+         switch(type)
+         {
+         case nsXPTType::T_I64   :
+@@ -103,6 +101,25 @@ PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
+             if ((PRWord)ap & 4) ap++;
+             dp->val.d   = *((double*) ap);  ap++;
+             break;
++#ifdef IS_LITTLE_ENDIAN
++        default:
++            dp->val.p = (void*) *ap;
++            break;
++#else
++        case nsXPTType::T_I8    : dp->val.i8  = (PRInt8)   *ap; break;
++        case nsXPTType::T_I16   : dp->val.i16 = (PRInt16)  *ap; break;
++        case nsXPTType::T_I32   : dp->val.i32 = (PRInt32)  *ap; break;
++        case nsXPTType::T_U8    : dp->val.u8  = (PRUint8)  *ap; break;
++        case nsXPTType::T_U16   : dp->val.u16 = (PRUint16) *ap; break;
++        case nsXPTType::T_U32   : dp->val.u32 = (PRUint32) *ap; break;
++        case nsXPTType::T_BOOL  : dp->val.b   = (PRBool)   *ap; break;
++        case nsXPTType::T_CHAR  : dp->val.c   = (char)     *ap; break;
++        case nsXPTType::T_WCHAR : dp->val.wc  = (wchar_t)  *ap; break;
++        case nsXPTType::T_FLOAT : dp->val.f   = *(float *)  ap; break;
++        default:
++            NS_ASSERTION(0, "bad type");
++            break;
++#endif
+         }
+     }
+ 
recipes/mozilla/files/Increase-stability-and-performance-on-mips.patch new file +50 -0

50 lines not on this page · raw message

recipes/mozilla/files/mips-disable-TLS.patch new file +12 -0
new file mode 100644
index 0000000..9ed50b2
@@ -0,0 +1,12 @@
+# See https://bugzilla.mozilla.org/show_bug.cgi?id=528687
+# The bug report's configure.in patch not usable as we dont autoconf.
+--- mozilla-1.9.2/configure.orig	2010-09-24 10:18:43.000000000 +0930
++++ mozilla-1.9.2/configure	2010-09-24 10:19:47.000000000 +0930
+@@ -12659,6 +12659,7 @@
+ rm -f conftest*
+ fi
+ 
++ac_cv_thread_keyword=no
+ echo "$ac_t""$ac_cv_thread_keyword" 1>&6
+ LDFLAGS=$_SAVE_LDFLAGS
+ if test "$ac_cv_thread_keyword" = yes; then
recipes/mozilla/files/mipsel/jsautocfg.h new file +54 -0

54 lines not on this page · raw message

recipes/mozilla/files/xulrunner-1.9.2.8-mips-bus-error.patch new file +26 -0
new file mode 100644
index 0000000..05dcd5d
@@ -0,0 +1,26 @@
+From:
+http://gentoo-overlays.zugaina.org/loongson/portage/net-libs/xulrunner/files/xulrunner-1.9.2.8-mips-bus-error.patch
+--- ./xpcom/glue/nsTArray.h.orig	2009-04-26 01:21:58.000000000 +0800
++++ ./xpcom/glue/nsTArray.h	2009-04-26 01:21:33.000000000 +0800
+@@ -168,6 +168,7 @@
+ 
+     // The array's elements (prefixed with a Header).  This pointer is never
+     // null.  If the array is empty, then this will point to sEmptyHdr.
++    void   *padding;
+     Header *mHdr;
+ };
+
+diff --git a/layout/svg/base/src/nsSVGGlyphFrame.cpp b/layout/svg/base/src/nsSVGGlyphFrame.cpp
+index 6d452d0..3ce4193 100644
+--- a/layout/svg/base/src/nsSVGGlyphFrame.cpp
++++ b/layout/svg/base/src/nsSVGGlyphFrame.cpp
+@@ -169,8 +169,8 @@ private:
+   PRBool SetupForDirectTextRun(gfxContext *aContext, float aScale);
+   void SetupFor(gfxContext *aContext, float aScale);
+ 
+-  nsSVGGlyphFrame *mSource;
+   nsAutoTArray<CharacterPosition,80> mPositions;
++  nsSVGGlyphFrame *mSource;
+   gfxMatrix mInitialMatrix;
+   // Textrun advance width from start to mCurrentChar, in appunits
+   gfxFloat mCurrentAdvance;
recipes/mozilla/files/xulrunner-chromium-mips.patch new file +208 -0

208 lines not on this page · raw message

recipes/mozilla/firefox_3.6.8.bb +7 -2
index 7927a22..04dde08 100644
@@ -1,5 +1,5 @@
 DEPENDS += "cairo sqlite3 libnotify"
-PR = "r2"
+PR = "r3"
 
 # The .pc files below have "3.6" hardcoded, fix that before using them in a newer FF version!
 SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/firefox-${PV}.source.tar.bz2;name=archive \
@@ -16,8 +16,14 @@ SRC_URI = "ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PV}/source/f
 	file://firefox-plugin.pc \
 	file://firefox-xpcom.pc \
 	file://nspr.pc \
+	file://xulrunner-chromium-mips.patch \
+	file://xulrunner-1.9.2.8-mips-bus-error.patch \
+	file://Fix-xptinvoke-and-xptstubs-on-mips-o32-big-endian.patch \
+	file://Increase-stability-and-performance-on-mips.patch \
 "
 
+SRC_URI_append_mipsel = " file://mips-disable-TLS.patch "
+
 SRC_URI[archive.md5sum] = "0ee5f14fd8be07513d16131027ebcb61"
 SRC_URI[archive.sha256sum] = "fc609cc6a0ddaa2a9ebd8511ec39ae4a404e1107a12e07b233e2afca51d9a10e"
 
@@ -28,7 +34,6 @@ require firefox.inc
 
 EXTRA_OECONF += " --enable-official-branding --disable-crashreporter"
 
-
 FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O2"
 
 do_compile_prepend() {
Signature · 1 line
1.7.1