Commit Graph

54 Commits

Author SHA1 Message Date
Andreas Müller
89b9507d89 mozjs: Fix python3 build with gold
Fixes [1]

[1] http://errors.yoctoproject.org/Errors/Details/390559/

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-11 16:46:31 -08:00
Andreas Müller
23eb06562d mozjs: port build to python3
While at it:

* cleanup our patches
* remove useless sed in do_configure

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-02-02 08:08:09 -08:00
Martin Jansa
21899d1f3a mozjs: search nspr header files in ${STAGING_INCDIR}/nspr directory
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-27 20:04:56 -08:00
Khem Raj
e4a2593a21 recipes: Replace using BBPATH with BBFILE_COLLECTIONS for meta-python2 check
BBPATH check actually does not work

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-22 19:21:39 -08:00
Khem Raj
8c0c7f0a37 recipes: Turn inherit classes from meta-py2 to conditional constructs
helps parsing without meta-py2 in mix

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-22 14:20:35 -08:00
Andreas Müller
a804b0c1bb 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>
2020-01-22 09:56:34 -08:00
Khem Raj
12b6f0c7d8 mozjs: extend --with-intl-api=build to ppc
This fixes mozjs crash, in launching js in qemu during gjs build

    Fixes
    |
    | (process:606857): Gjs-ERROR **: 02:02:06.039: Could not initialize Javascript

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-01-16 12:02:10 -08:00
Khem Raj
72600f0a4f mozjs: extend --with-intl-api=build to all mips
This fixes mozjs crash, in launching js in qemu during gjs build

Fixes
|
| (process:606857): Gjs-ERROR **: 02:02:06.039: Could not initialize Javascript

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
2019-12-13 18:29:14 -08:00
Denys Dmytriyenko
4c00e5fed9 recipes: rename distro_features_check to features_check
Avoid warning due to the class rename in OE-Core.

Signed-off-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-11-21 17:51:37 -08:00
Slater, Joseph
e368f7e2c7 mozjs: do not expose intl api for mips64
Add --with-intl-api=build to configure options.  Otherwise,
JS_Init() will fail.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-08-08 10:01:45 -07:00
Kai Kang
73550ce6a8 mozjs: fix configure failure on CentOS 7.6
Option '-std=gnu++14' has been supported from gcc 4.9. But on some build hosts
such as CentOS 7.6 which only has gcc 4.8.5 and fails to configure:

| checking whether the host C compiler can be used... no
| ERROR: Only GCC 4.9 or newer is supported (found version 4.8.5).

Fallback to 2011 C++ standard and lower required gcc version to 4.8.0 which is
the same as in previous version 52.9.1 of mozjs.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-07-10 09:28:20 -07:00
Mingli Yu
fce37fcfa2 mozjs: Fix do_patch error for mips64-n32
After mozjs upgrade to 60.5.2 in below commit:
9ca3aad9c mozjs: Upgrade to version 60.x

With below logic in local.conf:
MACHINE ??= "qemumips64"
MULTILIB_GLOBAL_VARIANTS_append = " libn32"
MULTILIBS ?= "multilib:lib32 multilib:libn32"
DEFAULTTUNE_virtclass-multilib-lib32 ?= "mips"
DEFAULTTUNE_virtclass-multilib-libn32 ?= "mips64-n32"
require conf/multilib.conf

$ bitbake libn32-mozjs -cpatch
| NOTE: Applying patch '0001-fix-compiling-failure-on-mips64-n32-bsp.patch' (../layers/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs/0001-fix-compiling-failure-on-mips64-n32-bsp.patch)
| ERROR: Command Error: 'quilt --quiltrc TOPDIR/tmp/work/mips64-n32-wrsmllibn32-linux-gnun32/libn32-mozjs/60.5.2-r0/recipe-sysroot-native/etc/quiltrc push' exited with 0  Output:
| Applying patch 0001-fix-compiling-failure-on-mips64-n32-bsp.patch
| patching file build/moz.configure/init.configure
| patching file js/src/jit/mips-shared/Architecture-mips-shared.h
| Hunk #1 succeeded at 28 with fuzz 2 (offset 2 lines).
| Hunk #2 FAILED at 95.
| 1 out of 2 hunks FAILED -- rejects in file js/src/jit/mips-shared/Architecture-mips-shared.h
| patching file python/mozbuild/mozbuild/configure/constants.py
| Patch 0001-fix-compiling-failure-on-mips64-n32-bsp.patch does not apply (enforce with -f)

Rework 0001-fix-compiling-failure-on-mips64-n32-bsp.patch
to fix the above do_patch error.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-06-19 06:06:47 -07:00
Khem Raj
9ca3aad9cf mozjs: Upgrade to version 60.x
Disable JIT (ion) on all mips

It fails to compile in first place, even if we fix the compilation
next it assert failures and runtime test failures, its best to disable
it for mips for now

Fix build on riscv

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-05-29 02:26:16 -07:00
leimaohui
7b503471b0 mozjs: Make mozjs support arm32BE.
Fixed a build error on arm32BE.

Upstream-Status: Pending

Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-05-10 09:19:21 -07:00
Khem Raj
d06ded1803 mozjs: Fix cross-builds of nsinstall
nsinstall must be built for host, so we need to define HOST_* compiler
defines so, it gets built using native compiler correctly

Disable stripping, OE will do it

Disable optimizing, set BUILD_OPT

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-02-26 10:16:24 -08:00
Khem Raj
c4432a5f62 mozjs: Fix symbol visibility with clang/libc++
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2019-01-30 13:34:49 -08:00
Khem Raj
e1db44b73f mozjs: Remove -Werror=format from CXXFLAGS
This is to make way for gcc9 since it spews some extra warnings
which need to be eventually fixed

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-12-23 13:29:20 -08:00
Otavio Salvador
cce5af60b1 mozjs: Avoid use of X11 from host when X11 is disabled
The mozjs build system makes use of host headers and libraries if not
passed an invalid path for `--x-includes` and `--x-libraries`. This
fixes host contamination while building in a development host.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-11-28 21:48:21 -08:00
Hong Liu
3709fa6124 mozjs: upgrade to 52.9.1
Upgrade mozjs from 52.8.1 to 52.9.1

Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com>

	renamed:    mozjs_52.8.1.bb -> mozjs_52.9.1.bb

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-09-25 22:24:15 -07:00
Ricardo Salveti
b833067233 mozjs: disable null pointer optimization with GCC >= 6
Mozjs fails to start on several architectures due broken build
optimizations when built with GCC >= 6.

Set -fno-tree-vrp -fno-strict-aliasing -fno-delete-null-pointer-checks
to both CFLAGS and CXXFLAGS as workaround (flags also used by Firefox
and Fedora).

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-19 16:09:28 -07:00
Hongxu Jia
eedd084d3b mozjs: tweak location of tmp dir creation
The tmp dir creation is out of build dir which has
the risk to be broken by others.
...
|   File "build/tmp-glibc/work/i586-wrs-linux/mozjs/52.8.1-r0/
mozjs-52.8.1/build/moz.configure/util.configure", line 190,
in try_invoke_compiler
|     os.remove(path)
| OSError: [Errno 2] No such file or directory: '/tmp/conftest.OiV37V.cpp'
...

Set var-TMP for tempfile.mktemp to use current build dir to
replace default `/tmp'.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-03 09:34:29 -07:00
Changqing Li
6d8982b61e mozjs: fix coredump caused by wrong use of getenv
getenv need include header stdlib.h, or an assumed int
return for getenv to char * pointer will tripping up
the code

Signed-off-by: Changqing Li <changqing.li@windriver.com>
2018-08-02 11:23:03 -07:00
Ricardo Salveti
2585bc07ee mozjs: add support for RISC-V
Based on pending patch that was already submitted at
https://bugzilla.mozilla.org/show_bug.cgi?id=1318905.

Signed-off-by: Ricardo Salveti <ricardo@foundries.io>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-08-02 11:23:03 -07:00
Ricardo Salveti
70f1e5f668 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>
2018-07-27 07:19:15 -07:00
Hongxu Jia
0aff7abedc mozjs: add support for mips64-n32
- Tweak configure for mips64-n32

- Disable gold linker which not supported by mips64-n32

- Since n32 and n64 use the same registers, add n32 to
  n64's register definition.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-20 16:14:22 -07:00
Hongxu Jia
50e8ed5fd4 mozjs: 17.0.0 -> 52.8.1
- Refactor recipe 52.8.1
  0001 ~ 0006

- Rebase patches to 52.8.1;
  0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch
  0010-fix-cross-compilation-on-i586-targets.patch'

- Drop 0001-regenerate-configure.patch and everything works well

- Drop Manually_mmap_heap_memory_esr17.patch which is backported

- Drop obsolete patches
  0001-compare-the-first-character-of-string-to-be-null-or-.patch
  0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch
  0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch
  0004-mozbug746112-no-decommit-on-large-pages.patch
  0005-aarch64-64k-page.patch
  fix_milestone_compile_issue.patch
  fix-the-compile-error-of-powerpc64.patch
  Update-Double-Conversion.patch and Update-the-double-conversion-update-script.patch

- Set DISABLE_STATIC = "" to build without option `--disable-static'

- Set musl patch (0006-support-musl.patch) with musl override.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-07-16 18:42:40 -07:00
Alistair Francis
f097a2d7d6 mozjs: Update Double-Conversion inside mozjs
Update the Double-Conversion source inside mozjs to add support for more
architectures.

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2018-06-20 21:43:55 -07:00
Andreas Müller
2363cb3a6a mozjs: refresh patch Manually_mmap_heap_memory_esr17.patch
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
2018-04-08 17:00:06 -07:00
Huang Qiyu
a6a27107b3 mozjs: Add HOMEPAGE info into recipe file.
Signed-off-by: Huang Qiyu <huangqy.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-09-18 10:18:11 +02:00
Mingli Yu
ff017c9bed mozjs: customize HOST_CFLAGS
Customize HOST_CFLAGS, HOST_CXXFLAGS and HOST_LDFLAGS
to fix do_configure error as previously use the common
CFLAGS and CXXFLAGS in both cross-compile env and host env,
and the option -fstack-protector-strong which not
recognized in host env can result in do_configure
error as below.

| checking whether the host c compiler (gcc -O2 -pipe -g -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now) works... configure: error: installation or configuration problem: host compiler gcc cannot create executables.

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-08-28 11:06:03 +02:00
Andre McCurdy
a0b2e6f4fc mozjs: prevent target CFLAGS etc being passed to the host
Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-04-26 20:14:16 +02:00
Khem Raj
c9f063c218 mozjs: Fix build with gcc7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2017-04-26 20:14:15 +02:00
Peter Kjellerstedt
0c31f55bcf Make use of the new bb.utils.filter() function
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-07 13:30:26 +01:00
Koen Kooi
bfa10542df mozjs: fix crash on non-x86 64 bit systems
Mozjs is mozillaware, meaning that it barely works on x86 and is plain broken on everything else. This time mozjs assumes that noone will ever have more than 47bit for VA, breaking aarch64 which can have more. Thanks to polkit developers using mozjs systemd will crash early during boot when using polkit.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-09-26 08:29:15 +02:00
Martin Jansa
dc48e768f5 meta-oe: remove trailing spaces
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-22 15:56:29 +02:00
Robert P. J. Day
107689a133 meta-oe: Standardize use of "_append" versus use of "+="
Remove superfluous "+=", then manually add necessary leading space.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-22 15:49:29 +02:00
Jeremy Puhlman
1d41fe47e4 mozjs: Fix incorrect usage of PN.
When building mutlilib, using ${PN} in the middle of the package name
creates incorrect package names:

lib32-liblib32-mozjs
lib32-liblib32-mozjs.shlibdeps

Which in turn breaks license.bbclass during image creation.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-08-08 13:46:50 +02:00
Mark Asselstine
6fbaf07c2b mozjs: fix configure host contamination
When building mozjs the following error was observed

| Traceback (most recent call last):
|   File "./config.status", line 9, in <module>
|     from ConfigStatus import config_status
|   File "/build/bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/mozjs17.0.0/js/src/build/ConfigStatus.py", line 11, in <module>
|     import sys, re, os, posixpath, ntpath
|   File "/usr/lib/python2.7/ntpath.py", line 15, in <module>
|     from genericpath import _unicode
| ImportError: cannot import name _unicode
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /build//bitbake_build/tmp/work/corei7-64-wrs-linux/mozjs/17.0.0-r0/temp/do_configure/log.do_configure.1056

Note the host paths found in the error msg. Further this issue can be
explored using the host python, which will not error when attempting
the above import, and the python in the sysroot, which will fail when
we attempt the import.

By inheriting pythonnative we ensure the proper paths are set to avoid
this host contamination.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-04-28 10:38:56 +02:00
Li xin
1e17ae18fa mozjs_17.0.0.bb: Fix do_srpm error
The function do_sourceclean() will lead to do_srpm failed, so use
do_unpack instead.

Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-04-28 10:38:40 +02:00
Koen Kooi
d95712f0fa mozjs: fix armeb builds
The mozjs builds fails on armeb, so add a define to make it work.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-04-28 10:38:36 +02:00
Maciej Borzecki
6ec1dde77e mozjs: fix linking issues on i586
When building for qemux86 on a x86 host, there's a possibility that the build
will try to link with incorrect libraries. Due to problematic -rpath-link the
linker may try to use host libraries if they are present and are arch
compatible.

Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-01-14 11:30:15 +01:00
Jackie Huang
d33f7dacfe mozjs: add PACKAGECONFIG for x11
Add PACKAGECONFIG for x11 and enable it when x11 is
included in DISTRO_FEATURES, and specify the correct
path for x-includes and x-libraries to avoid
searching the host libraries.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-09-23 15:39:45 +02:00
Armin Kuster
f2ead8e308 mozjs: fix lib soname issue
polkit failed to build do to missing mozjs libs. The libs created are:
libmozjs-..a   libmozjs-..so

this was caused by a perl script error
Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at config/milestone.pl line 58.

this script is use to determine the major and minor lib versions. I believe this
issue is do to the recent perl update.

this fixes the lib creation error and polkit build error.

I am not a perl person so this may not be the idea fix.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Acked-By: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-07-30 21:24:30 +02:00
Martin Jansa
e836f8f936 gegl, crash, libsecret, mpg123, tinymembench, gammu, mosh, llvm3.3, breakpad, php, mozjs, libopus: disable thumb where it fails for qemuarm
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-07-16 21:09:05 +02:00
Yi Zhao
fd5b7b64c6 mozjs: fix PN -> BPN for multilib
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-05-13 14:32:02 +02:00
Chunrong Guo
894298d930 mozjs: fix the compile error of powerpc64
fix the following error
  |error: 'jsuword' does not name a type

Signed-off-by: Chunrong Guo <B40290@freescale.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-05-11 10:25:52 +02:00
Dmitry Eremin-Solenikov
6f3ed4ec77 mozjs: disable methodjit for armv4
methodjit uses assembler instructions which are not available on armv4
architecture. Disable methodjit for it.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-04-21 13:03:10 +02:00
Koen Kooi
2a3ffe806a mozjs 17.0.0: fix aarch64 and 64k page builds, generic cleanups
* Mozjs17 has problems with 64k page sizes (powerpc64, aarch64 and probably others) and lacks support for aarch64. Patches were lifted from the fedora src rpm and rediffed.

* Regenerate configure with autoconf-2.13 to make the fixes mentioned above take effect.

* Provide proper config.guess and config.sub files

* Explicitly disable static builds and regroup configure options.

* Also clean out the patches/ dir present in the tarball to avoid conflicts with the OE patcher.

Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-03-06 07:34:07 +01:00
leimaohui
736e3daa82 mozjs_17.0.0: Fix build error in powerpc(e500v2)
To fix the bug as following

error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for
argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**,
JSBool, jsval**, __va_list_tag (*)[1])'

Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2015-02-12 19:31:53 +01:00
Richard Purdie
8576cc15c7 mozjs: Add missing zlib dependency
Avoids a QA warning. In reality zlib is likely nearly always built before mozjs.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2014-07-22 00:01:50 +02:00