[oe-commits] org.oe.dev mozilla: add EABI patches from poky (not applied yet, just for reference)

koen commit openembedded-commits at lists.openembedded.org
Wed May 9 11:27:17 UTC 2007


mozilla: add EABI patches from poky (not applied yet, just for reference)

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: f4394378e45366dc9b87bc34aa484175484485b2
ViewMTN: http://monotone.openembedded.org/revision.psp?id=f4394378e45366dc9b87bc34aa484175484485b2
Files:
1
packages/mozilla/eabi-fix.patch
packages/mozilla/eabi-fix2.patch
packages/mozilla/eabi-fix3.patch
Diffs:

#
# mt diff -rf82eb273fbe78d5e3835d3d95c85ac6d251df0de -rf4394378e45366dc9b87bc34aa484175484485b2
#
# 
# 
# add_file "packages/mozilla/eabi-fix.patch"
#  content [e7e9c0d2144f9839578b23aacff3bf6f9c44b0e9]
# 
# add_file "packages/mozilla/eabi-fix2.patch"
#  content [bdb8b35c4d7ca46dc549694298d00fc8e6ba8944]
# 
# add_file "packages/mozilla/eabi-fix3.patch"
#  content [30b2e7bb2b7b6b0ba9893fe42702e28f6f98d8c9]
# 
============================================================
--- packages/mozilla/eabi-fix.patch	e7e9c0d2144f9839578b23aacff3bf6f9c44b0e9
+++ packages/mozilla/eabi-fix.patch	e7e9c0d2144f9839578b23aacff3bf6f9c44b0e9
@@ -0,0 +1,66 @@
+http://lists.debian.org/debian-arm/2007/05/msg00039.html
+
+From: Lennert Buytenhek <buytenh at wantstofly.org>
+
+Hi,
+
+The reason that building nss (i.e., firefox) would segfault on ARM EABI
+systems is an assumption about the layout of the jmp_buf structure in
+the nspr library (which nss depends on) that does hold on old-ABI but
+no longer holds on EABI.  The attached patch fixes this assumption,
+and fixes the shlibsign segfault during the building of nss (it also
+fixes a floating point byte order assumption.)
+
+Looks sane?
+
+It's of course a stupid idea to depend on a particular layout of the
+jmp_buf structure in application programs, but oh well.  People write
+ugly buggy code, film at 11.
+
+
+--- mozilla/nsprpub/pr/src/misc/prdtoa.c.orig        2007-05-06 02:39:00.000000000 +0200
++++ mozilla/nsprpub/pr/src/misc/prdtoa.c     2007-05-06 02:39:22.000000000 +0200
+@@ -59,8 +59,8 @@
+     /* FIXME: deal with freelist and p5s. */
+ }
+ 
+-#if defined(__arm) || defined(__arm__) || defined(__arm26__) \
+-    || defined(__arm32__)
++#if (defined(__arm) || defined(__arm__) || defined(__arm26__) \
++    || defined(__arm32__)) && !defined(__ARM_EABI__) && !defined(__ARMEB__)
+ #define IEEE_ARM
+ #elif defined(IS_LITTLE_ENDIAN)
+ #define IEEE_8087
+--- mozilla/nsprpub/pr/include/md/_linux.h.orig      2007-05-06 02:39:45.000000000 +0200
++++ mozilla/nsprpub/pr/include/md/_linux.h   2007-05-06 02:40:57.000000000 +0200
+@@ -346,7 +346,7 @@
+ #error "Linux/MIPS pre-glibc2 not supported yet"
+ #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+ 
+-#elif defined(__arm__)
++#elif defined(__arm__) && !defined(__ARM_EABI__)
+ /* ARM/Linux */
+ #if defined(__GLIBC__) && __GLIBC__ >= 2
+ #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
+@@ -358,6 +358,18 @@
+ #error "ARM/Linux pre-glibc2 not supported yet"
+ #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+ 
++#elif defined(__arm__) && defined(__ARM_EABI__)
++/* ARM/Linux */
++#if defined(__GLIBC__) && __GLIBC__ >= 2
++#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
++#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
++#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
++#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
++#define _MD_SP_TYPE __ptr_t
++#else
++#error "ARM/Linux pre-glibc2 not supported yet"
++#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
++
+ #else
+ 
+ #error "Unknown CPU architecture"
+
+
+
============================================================
--- packages/mozilla/eabi-fix2.patch	bdb8b35c4d7ca46dc549694298d00fc8e6ba8944
+++ packages/mozilla/eabi-fix2.patch	bdb8b35c4d7ca46dc549694298d00fc8e6ba8944
@@ -0,0 +1,56 @@
+https://bugzilla.mozilla.org/show_bug.cgi?id=369722
+
+Index: js/src/jsnum.h
+===================================================================
+RCS file: /cvsroot/mozilla/js/src/jsnum.h,v
+retrieving revision 3.27
+diff -p -u -8 -r3.27 jsnum.h
+--- mozilla/js/src/jsnum.h	21 Dec 2006 01:00:32 -0000	3.27
++++ mozilla/js/src/jsnum.h	8 Feb 2007 12:13:01 -0000
+@@ -52,23 +52,24 @@ JS_BEGIN_EXTERN_C
+ 
+ /*
+  * Stefan Hanske <sh990154 at mail.uni-greifswald.de> reports:
+  *  ARM is a little endian architecture but 64 bit double words are stored
+  * differently: the 32 bit words are in little endian byte order, the two words
+  * are stored in big endian`s way.
+  */
+ 
+-#if defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__)
+-#define CPU_IS_ARM
++#if !defined(__ARM_EABI__) && \
++    (defined(__arm) || defined(__arm32__) || defined(__arm26__) || defined(__arm__))
++#define IEEE_ARM
+ #endif
+ 
+ typedef union jsdpun {
+     struct {
+-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
++#if defined(IS_LITTLE_ENDIAN) && !defined(IEEE_ARM)
+         uint32 lo, hi;
+ #else
+         uint32 hi, lo;
+ #endif
+     } s;
+     jsdouble d;
+ } jsdpun;
+ 
+@@ -87,17 +88,17 @@ typedef union jsdpun {
+ 
+ #else /* not or old GNUC */
+ 
+ /*
+  * We don't know of any non-gcc compilers that perform alias optimization,
+  * so this code should work.
+  */
+ 
+-#if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
++#if defined(IS_LITTLE_ENDIAN) && !defined(IEEE_ARM)
+ #define JSDOUBLE_HI32(x)        (((uint32 *)&(x))[1])
+ #define JSDOUBLE_LO32(x)        (((uint32 *)&(x))[0])
+ #else
+ #define JSDOUBLE_HI32(x)        (((uint32 *)&(x))[0])
+ #define JSDOUBLE_LO32(x)        (((uint32 *)&(x))[1])
+ #endif
+ 
+ #define JSDOUBLE_SET_HI32(x, y) (JSDOUBLE_HI32(x)=(y))
============================================================
--- packages/mozilla/eabi-fix3.patch	30b2e7bb2b7b6b0ba9893fe42702e28f6f98d8c9
+++ packages/mozilla/eabi-fix3.patch	30b2e7bb2b7b6b0ba9893fe42702e28f6f98d8c9
@@ -0,0 +1,15 @@
+From: Marcin Juszkiewicz <openembedded at hrw.one.pl>
+
+Index: mozilla/extensions/transformiix/source/base/Double.cpp
+===================================================================
+--- mozilla.orig/extensions/transformiix/source/base/Double.cpp	2007-05-09 11:21:34.000000000 +0200
++++ mozilla/extensions/transformiix/source/base/Double.cpp	2007-05-09 11:23:59.000000000 +0200
+@@ -71,7 +71,7 @@
+  * are stored in big endian`s way.
+  */
+ 
+-#if defined(__arm) || defined(__arm32__) || defined(_arm26__) || defined(__arm__)
++#if !defined(__ARM_EABI__) && defined(__arm) || defined(__arm32__) || defined(_arm26__) || defined(__arm__)
+ #define CPU_IS_ARM
+ #endif
+ 






More information about the Openembedded-commits mailing list