summaryrefslogtreecommitdiffstats
path: root/meta-extras/packages/mozilla/files/eabi-fix.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta-extras/packages/mozilla/files/eabi-fix.patch
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta-extras/packages/mozilla/files/eabi-fix.patch')
-rw-r--r--meta-extras/packages/mozilla/files/eabi-fix.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-extras/packages/mozilla/files/eabi-fix.patch b/meta-extras/packages/mozilla/files/eabi-fix.patch
new file mode 100644
index 0000000000..fd3bb88683
--- /dev/null
+++ b/meta-extras/packages/mozilla/files/eabi-fix.patch
@@ -0,0 +1,66 @@
1http://lists.debian.org/debian-arm/2007/05/msg00039.html
2
3From: Lennert Buytenhek <buytenh@wantstofly.org>
4
5Hi,
6
7The reason that building nss (i.e., firefox) would segfault on ARM EABI
8systems is an assumption about the layout of the jmp_buf structure in
9the nspr library (which nss depends on) that does hold on old-ABI but
10no longer holds on EABI. The attached patch fixes this assumption,
11and fixes the shlibsign segfault during the building of nss (it also
12fixes a floating point byte order assumption.)
13
14Looks sane?
15
16It's of course a stupid idea to depend on a particular layout of the
17jmp_buf structure in application programs, but oh well. People write
18ugly buggy code, film at 11.
19
20
21--- mozilla/nsprpub/pr/src/misc/prdtoa.c.orig 2007-05-06 02:39:00.000000000 +0200
22+++ mozilla/nsprpub/pr/src/misc/prdtoa.c 2007-05-06 02:39:22.000000000 +0200
23@@ -59,8 +59,8 @@
24 /* FIXME: deal with freelist and p5s. */
25 }
26
27-#if defined(__arm) || defined(__arm__) || defined(__arm26__) \
28- || defined(__arm32__)
29+#if (defined(__arm) || defined(__arm__) || defined(__arm26__) \
30+ || defined(__arm32__)) && !defined(__ARM_EABI__) && !defined(__ARMEB__)
31 #define IEEE_ARM
32 #elif defined(IS_LITTLE_ENDIAN)
33 #define IEEE_8087
34--- mozilla/nsprpub/pr/include/md/_linux.h.orig 2007-05-06 02:39:45.000000000 +0200
35+++ mozilla/nsprpub/pr/include/md/_linux.h 2007-05-06 02:40:57.000000000 +0200
36@@ -346,7 +346,7 @@
37 #error "Linux/MIPS pre-glibc2 not supported yet"
38 #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
39
40-#elif defined(__arm__)
41+#elif defined(__arm__) && !defined(__ARM_EABI__)
42 /* ARM/Linux */
43 #if defined(__GLIBC__) && __GLIBC__ >= 2
44 #define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[20]
45@@ -358,6 +358,18 @@
46 #error "ARM/Linux pre-glibc2 not supported yet"
47 #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
48
49+#elif defined(__arm__) && defined(__ARM_EABI__)
50+/* ARM/Linux */
51+#if defined(__GLIBC__) && __GLIBC__ >= 2
52+#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[8]
53+#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[7] = (val))
54+#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
55+#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[7])
56+#define _MD_SP_TYPE __ptr_t
57+#else
58+#error "ARM/Linux pre-glibc2 not supported yet"
59+#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
60+
61 #else
62
63 #error "Unknown CPU architecture"
64
65
66