diff options
Diffstat (limited to 'meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb')
-rw-r--r-- | meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb deleted file mode 100644 index 1747e6b29..000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs_60.9.0.bb +++ /dev/null | |||
@@ -1,147 +0,0 @@ | |||
1 | SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++" | ||
2 | HOMEPAGE = "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey" | ||
3 | LICENSE = "MPL-2.0" | ||
4 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dc9b6ecd19a14a54a628edaaf23733bf" | ||
5 | |||
6 | SRC_URI = " \ | ||
7 | https://archive.mozilla.org/pub/firefox/releases/${PV}esr/source/firefox-${PV}esr.source.tar.xz \ | ||
8 | file://0001-Port-build-to-python3.patch \ | ||
9 | file://0002-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \ | ||
10 | file://0003-fix-cross-compilation-on-i586-targets.patch \ | ||
11 | file://0004-do-not-create-python-environment.patch \ | ||
12 | file://0005-fix-cannot-find-link.patch \ | ||
13 | file://0006-workaround-autoconf-2.13-detection-failed.patch \ | ||
14 | file://0007-fix-do_compile-failed-on-mips.patch \ | ||
15 | file://0008-add-riscv-support.patch \ | ||
16 | file://0009-mozjs-fix-coredump-caused-by-getenv.patch \ | ||
17 | file://0010-format-overflow.patch \ | ||
18 | file://0011-To-fix-build-error-on-arm32BE.patch \ | ||
19 | file://0012-JS_PUBLIC_API.patch \ | ||
20 | file://0013-riscv-Disable-atomic-operations.patch \ | ||
21 | file://0014-remove-JS_VOLATIME_ARM.patch \ | ||
22 | " | ||
23 | SRC_URI:append:libc-musl = " \ | ||
24 | file://musl/0001-support-musl.patch \ | ||
25 | file://musl/0002-js-Fix-build-with-musl.patch \ | ||
26 | " | ||
27 | SRC_URI:append:mipsarchn32 = " \ | ||
28 | file://mipsarchn32/0001-fix-compiling-failure-on-mips64-n32-bsp.patch \ | ||
29 | " | ||
30 | SRC_URI[md5sum] = "69a0be9ce695e5dc4941ed0c78ef00c2" | ||
31 | SRC_URI[sha256sum] = "9f453c8cc5669e46e38f977764d49a36295bf0d023619d9aac782e6bb3e8c53f" | ||
32 | |||
33 | S = "${WORKDIR}/firefox-${@d.getVar("PV").replace("esr", "")}" | ||
34 | |||
35 | inherit autotools pkgconfig perlnative python3native | ||
36 | |||
37 | inherit features_check | ||
38 | CONFLICT_DISTRO_FEATURES:mipsarchn32 = "ld-is-gold" | ||
39 | |||
40 | DEPENDS += " \ | ||
41 | nspr zlib autoconf-2.13-native \ | ||
42 | python3-six-native python3-pytoml-native \ | ||
43 | python3-jsmin-native python3-six \ | ||
44 | " | ||
45 | |||
46 | # Disable null pointer optimization in gcc >= 6 | ||
47 | # https://bugzilla.redhat.com/show_bug.cgi?id=1328045 | ||
48 | CFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" | ||
49 | CXXFLAGS += "-fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks" | ||
50 | |||
51 | # nspr's package-config is ignored so set libs manually | ||
52 | EXTRA_OECONF = " \ | ||
53 | --target=${TARGET_SYS} \ | ||
54 | --host=${BUILD_SYS} \ | ||
55 | --prefix=${prefix} \ | ||
56 | --libdir=${libdir} \ | ||
57 | --disable-tests --disable-strip --disable-optimize \ | ||
58 | --disable-jemalloc \ | ||
59 | --with-nspr-cflags='-I${STAGING_INCDIR}/nspr -I${STAGING_INCDIR}/nss3' \ | ||
60 | --with-nspr-libs='-lplds4 -lplc4 -lnspr4' \ | ||
61 | ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "--enable-gold", '--disable-gold', d)} \ | ||
62 | " | ||
63 | |||
64 | # Without this, JS_Init() will fail for mips64. | ||
65 | EXTRA_OECONF:append:mipsarch = " --with-intl-api=build" | ||
66 | EXTRA_OECONF:append:powerpc = " --with-intl-api=build" | ||
67 | |||
68 | EXTRA_OECONF:append:mipsarch = " --disable-ion" | ||
69 | EXTRA_OECONF:append:riscv64 = " --disable-ion" | ||
70 | EXTRA_OECONF:append:riscv32 = " --disable-ion" | ||
71 | |||
72 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | ||
73 | PACKAGECONFIG[x11] = "--x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--x-includes=no --x-libraries=no,virtual/libx11" | ||
74 | |||
75 | EXTRA_OEMAKE:task-compile += "BUILD_OPT=1 OS_LDFLAGS='-Wl,-latomic ${LDFLAGS}'" | ||
76 | EXTRA_OEMAKE:task-install += "STATIC_LIBRARY_NAME=js_static" | ||
77 | |||
78 | export HOST_CC = "${BUILD_CC}" | ||
79 | export HOST_CXX = "${BUILD_CXX}" | ||
80 | export HOST_CFLAGS = "${BUILD_CFLAGS}" | ||
81 | export HOST_CPPFLAGS = "${BUILD_CPPFLAGS}" | ||
82 | export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" | ||
83 | |||
84 | do_configure() { | ||
85 | export SHELL="/bin/sh" | ||
86 | cd ${S} | ||
87 | # Add mozjs python-modules necessary | ||
88 | PYTHONPATH="${S}/third_party/python/which:${S}/config:${S}/build" | ||
89 | for sub_dir in python testing/mozbase; do | ||
90 | for module_dir in `ls $sub_dir -1`;do | ||
91 | [ $module_dir = "virtualenv" ] && continue | ||
92 | if [ -d "${S}/$sub_dir/$module_dir" ];then | ||
93 | PYTHONPATH="$PYTHONPATH:${S}/$sub_dir/$module_dir" | ||
94 | fi | ||
95 | done | ||
96 | done | ||
97 | echo "$PYTHONPATH" > ${B}/PYTHONPATH | ||
98 | export PYTHONPATH=`cat ${B}/PYTHONPATH` | ||
99 | |||
100 | cd ${S}/js/src | ||
101 | autoconf213 --macrodir=${STAGING_DATADIR_NATIVE}/autoconf213 old-configure.in > old-configure | ||
102 | |||
103 | cd ${B} | ||
104 | # use of /tmp can causes problems on heavily loaded hosts | ||
105 | mkdir -p "${B}/lcl_tmp" | ||
106 | TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} | ||
107 | |||
108 | # Make standard Makefile checks pass | ||
109 | touch ${S}/js/src/configure | ||
110 | touch ${B}/config.status | ||
111 | } | ||
112 | |||
113 | do_compile:prepend() { | ||
114 | export SHELL="/bin/sh" | ||
115 | export PYTHONPATH=`cat ${B}/PYTHONPATH` | ||
116 | } | ||
117 | |||
118 | do_install:prepend() { | ||
119 | export SHELL="/bin/sh" | ||
120 | export PYTHONPATH=`cat ${B}/PYTHONPATH` | ||
121 | } | ||
122 | |||
123 | inherit multilib_script multilib_header | ||
124 | |||
125 | MULTILIB_SCRIPTS += " ${PN}-dev:${bindir}/js60-config" | ||
126 | |||
127 | do_install:append() { | ||
128 | oe_multilib_header mozjs-60/js-config.h | ||
129 | sed -e 's@${STAGING_DIR_HOST}@@g' \ | ||
130 | -i ${D}${bindir}/js60-config | ||
131 | } | ||
132 | |||
133 | PACKAGES =+ "lib${BPN}" | ||
134 | FILES:lib${BPN} += "${libdir}/lib*.so" | ||
135 | FILES:${PN}-dev += "${bindir}/js60-config" | ||
136 | |||
137 | # Fails to build with thumb-1 (qemuarm) | ||
138 | #| {standard input}: Assembler messages: | ||
139 | #| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20' | ||
140 | #| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)' | ||
141 | #| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)' | ||
142 | #| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300' | ||
143 | #| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52' | ||
144 | ARM_INSTRUCTION_SET:armv5 = "arm" | ||
145 | ARM_INSTRUCTION_SET:armv4 = "arm" | ||
146 | |||
147 | DISABLE_STATIC = "" | ||