summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
diff options
context:
space:
mode:
authorAndreas Müller <schnitzeltony@gmail.com>2020-01-21 08:04:18 +0100
committerKhem Raj <raj.khem@gmail.com>2020-01-22 09:56:34 -0800
commita804b0c1bbdc3273a41fbd4aeb5cc3b7d1ffc6b5 (patch)
tree1c3588995ec08c1314b5a316c4b00182a27f6f20 /meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
parentfe1607060ac2dd42ae8c5115b8cbc4993b467a87 (diff)
downloadmeta-openembedded-a804b0c1bbdc3273a41fbd4aeb5cc3b7d1ffc6b5.tar.gz
mozjs: upgrade 60.5.2 -> 60.9.0 and rework
* build with firefox-esr sources to simplyfy upgrade path * cleanup: Should make python2-> python3 transition easier Signed-off-by: Andreas Müller <schnitzeltony@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb')
-rw-r--r--meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb132
1 files changed, 132 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb b/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
new file mode 100644
index 0000000000..e229bf424c
--- /dev/null
+++ b/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
@@ -0,0 +1,132 @@
1SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
2HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
3LICENSE = "MPL-2.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf"
5
6SRC_URI = "https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \
7 file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
8 file://0010-fix-cross-compilation-on-i586-targets.patch \
9 file://0001-do-not-create-python-environment.patch \
10 file://0002-fix-cannot-find-link.patch \
11 file://0003-workaround-autoconf-2.13-detection-failed.patch \
12 file://0005-fix-do_compile-failed-on-mips.patch \
13 file://add-riscv-support.patch \
14 file://0001-mozjs-fix-coredump-caused-by-getenv.patch \
15 file://format-overflow.patch \
16 file://0001-To-fix-build-error-on-arm32BE.patch \
17 file://JS_PUBLIC_API.patch \
18 file://0001-riscv-Disable-atomic-operations.patch \
19 file://fallback-to-2011-C++-standard.patch \
20 "
21SRC_URI_append_libc-musl = " \
22 file://0006-support-musl.patch \
23 file://0001-js-Fix-build-with-musl.patch \
24 "
25SRC_URI_append_mipsarchn32 = " \
26 file://0001-fix-compiling-failure-on-mips64-n32-bsp.patch \
27 "
28SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2"
29SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f"
30
31S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}"
32
33inherit autotools pkgconfig perlnative pythonnative
34
35inherit features_check
36CONFLICT_DISTRO_FEATURES_mipsarchn32 = "ld-is-gold"
37
38DEPENDS += "nspr zlib autoconf-2.13-native \
39 python-six-native python-pytoml-native \
40 python-jsmin-native python-futures-native \
41 python-which-native"
42
43# Disable null pointer optimization in gcc >= 6
44# https://bugzilla.redhat.com/show_bug.cgi?id=1328045
45CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
46CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks"
47
48# nspr's package-config is ignored so set libs manually
49EXTRA_OECONF = " \
50 --target=${TARGET_SYS} \
51 --host=${BUILD_SYS} \
52 --prefix=${prefix} \
53 --libdir=${libdir} \
54 --disable-tests --disable-strip --disable-optimize \
55 --disable-jemalloc \
56 --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
57 ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \
58"
59
60# Without this, JS_Init() will fail for mips64.
61EXTRA_OECONF_append_mipsarch = " --with-intl-api=build"
62EXTRA_OECONF_append_powerpc = " --with-intl-api=build"
63
64EXTRA_OECONF_append_mipsarch = " --disable-ion"
65EXTRA_OECONF_append_riscv64 = " --disable-ion"
66EXTRA_OECONF_append_riscv32 = " --disable-ion"
67
68PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
69PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11"
70
71EXTRA_OEMAKE_task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'"
72EXTRA_OEMAKE_task-install += "STATIC_LIBRARY_NAME=js_static"
73
74export HOST_CC = "${BUILD_CC}"
75export HOST_CXX = "${BUILD_CXX}"
76export HOST_CFLAGS = "${BUILD_CFLAGS}"
77export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}"
78export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
79
80do_configure() {
81 export SHELL="/bin/sh"
82 cd ${S}
83 # Add mozjs python-modules necessary
84 PYTHONPATH="$PYTHONPATH:${S}/config:${S}/build"
85 for sub_dir in python testing/mozbase; do
86 for module_dir in `ls $sub_dir -1`;do
87 [ $module_dir = "virtualenv" ] && continue
88 if [ -d "${S}/$sub_dir/$module_dir" ];then
89 PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir"
90 fi
91 done
92 done
93 echo "$PYTHONPATH" > ${B}/PYTHONPATH
94 export PYTHONPATH=`cat ${B}/PYTHONPATH`
95
96 cd ${S}/js/src
97 autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure
98 sed -i 's:refresh = True:refresh = False:g' ${S}/build/moz.configure/old.configure
99
100 cd ${B}
101 ${S}/js/src/configure ${EXTRA_OECONF}
102
103 # Make standard Makefile checks pass
104 touch ${S}/js/src/configure
105 touch ${B}/config.status
106}
107
108do_compile_prepend() {
109 export SHELL="/bin/sh"
110 export PYTHONPATH=`cat ${B}/PYTHONPATH`
111}
112
113do_install_prepend() {
114 export SHELL="/bin/sh"
115 export PYTHONPATH=`cat ${B}/PYTHONPATH`
116}
117
118PACKAGES =+ "lib${BPN}"
119FILES_lib${BPN} += "${libdir}/lib*.so"
120FILES_${PN}-dev += "${bindir}/js60-config"
121
122# Fails to build with thumb-1 (qemuarm)
123#| {standard input}: Assembler messages:
124#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
125#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
126#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
127#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
128#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
129ARM_INSTRUCTION_SET_armv5 = "arm"
130ARM_INSTRUCTION_SET_armv4 = "arm"
131
132DISABLE_STATIC = ""