summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@foundries.io>2018-07-25 18:45:15 -0300
committerKhem Raj <raj.khem@gmail.com>2018-07-27 07:19:15 -0700
commit70f1e5f668efe202692d45d63356e233aa5f2dc7 (patch)
tree3b8c554a66b9d3780710e470e502f501cf83868c /meta-oe/recipes-extended
parent95930af10773018676fc1f98d2bb5328dcf0250b (diff)
downloadmeta-openembedded-70f1e5f668efe202692d45d63356e233aa5f2dc7.tar.gz
mozjs: disable MOZ_GLUE_IN_PROGRAM in standalone builds
Otherwise anyone consuming mozjs will fail to start with a segmentation fault (e.g. polkitd). Patch also used by Fedora and Debian. Signed-off-by: Ricardo Salveti <ricardo@foundries.io> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch74
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb1
2 files changed, 75 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch b/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch
new file mode 100644
index 000000000..5487cdbe6
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs/disable-mozglue-in-stand-alone-builds.patch
@@ -0,0 +1,74 @@
1From 2fb531ac753500314336ccd508cb2d53f5e768e5 Mon Sep 17 00:00:00 2001
2From: Till Schneidereit <till@tillschneidereit.net>
3Date: Thu, 1 Oct 2015 12:59:09 +0200
4Subject: Disable MOZ_GLUE_IN_PROGRAM in stand-alone builds on all platforms
5
6Otherwise, build fails not being able to find HashBytes.
7
8Patch ported forward to mozjs52 by Philip Chimento
9<philip.chimento@gmail.com>.
10
11https://bugzilla.mozilla.org/show_bug.cgi?id=1176787
12
13Upstream-Status: Backport
14
15Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
16---
17 js/src/old-configure | 20 ++++++++++++--------
18 mozglue/build/moz.build | 2 +-
19 2 files changed, 13 insertions(+), 9 deletions(-)
20
21diff --git a/js/src/old-configure b/js/src/old-configure
22index d7afcff..8a6f142 100644
23--- a/js/src/old-configure
24+++ b/js/src/old-configure
25@@ -8546,21 +8546,25 @@ if test -z "$MOZ_ENABLE_WARNINGS_AS_ERRORS"; then
26 fi
27
28
29-case "${OS_TARGET}" in
30-Android|WINNT|Darwin)
31+if test "$JS_STANDALONE"; then
32 MOZ_GLUE_IN_PROGRAM=
33- ;;
34-*)
35- MOZ_GLUE_IN_PROGRAM=1
36- cat >> confdefs.pytmp <<\EOF
37+else
38+ case "${OS_TARGET}" in
39+ Android|WINNT|Darwin)
40+ MOZ_GLUE_IN_PROGRAM=
41+ ;;
42+ *)
43+ MOZ_GLUE_IN_PROGRAM=1
44+ cat >> confdefs.pytmp <<\EOF
45 (''' MOZ_GLUE_IN_PROGRAM ''', ' 1 ')
46 EOF
47 cat >> confdefs.h <<\EOF
48 #define MOZ_GLUE_IN_PROGRAM 1
49 EOF
50
51- ;;
52-esac
53+ ;;
54+ esac
55+fi
56
57 if test "$MOZ_MEMORY"; then
58 if test "x$MOZ_DEBUG" = "x1"; then
59diff --git a/mozglue/build/moz.build b/mozglue/build/moz.build
60index d289747..e3be5a2 100644
61--- a/mozglue/build/moz.build
62+++ b/mozglue/build/moz.build
63@@ -6,7 +6,7 @@
64
65 # Build mozglue as a shared lib on Windows, OSX and Android.
66 # If this is ever changed, update MOZ_SHARED_MOZGLUE in browser/installer/Makefile.in
67-if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android'):
68+if CONFIG['OS_TARGET'] in ('WINNT', 'Darwin', 'Android') and not CONFIG['JS_STANDALONE']:
69 SharedLibrary('mozglue')
70 else:
71 Library('mozglue')
72--
732.7.4
74
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb b/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
index 599681215..da80b63c5 100644
--- a/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
+++ b/meta-oe/recipes-extended/mozjs/mozjs_52.8.1.bb
@@ -11,6 +11,7 @@ SRC_URI = "http://archive.ubuntu.com/ubuntu/pool/main/m/mozjs52/mozjs52_52.8.1.o
11 file://0003-workaround-autoconf-2.13-detection-failed.patch \ 11 file://0003-workaround-autoconf-2.13-detection-failed.patch \
12 file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \ 12 file://0004-do-not-use-autoconf-2.13-to-refresh-old.configure.patch \
13 file://0005-fix-do_compile-failed-on-mips.patch \ 13 file://0005-fix-do_compile-failed-on-mips.patch \
14 file://disable-mozglue-in-stand-alone-builds.patch \
14 " 15 "
15SRC_URI_append_libc-musl = " \ 16SRC_URI_append_libc-musl = " \
16 file://0006-support-musl.patch \ 17 file://0006-support-musl.patch \