Commit Graph

26 Commits

Author SHA1 Message Date
Khem Raj 26222766ba mozjs-78: Switch to system libicu
Fixes build with gcc-12
intl/icu/source/common/stringtriebuilder.cpp:388: more undefined references to `std::type_info::operator==(std::type_info const&) const' follow
collect2: error: ld returned 1 exit status

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-04-20 10:58:01 -07:00
Andreas Müller d195826983 mozjs-78: renumber patches
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-05 11:10:02 -08:00
Andreas Müller bfa98138ac mozjs-78: Shelve breaking lib rename/linking & split lib to separate package
* our rename broke gjs:
  | /usr/bin/gjs: error while loading shared libraries: libmozjs-78.so: cannot open shared object file: No such file or directory
* to reduce image size and to avoid warnings, follow mozjs-91 by splitting
  library into seperate package

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2022-01-05 11:10:02 -08:00
Changqing Li b7b303fa69 mozjs-91/mozjs-78: fix compile failure on centos7
Mozjs compile failed with this failure:
/bin/sh: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by
/build/tmp-glibc/work/corei7-64-wrs-linux/mozjs/91.1.0-r0/recipe-sysroot-native/usr/lib/libtinfo.so.5)

Root Cause:
cargo-host-linker has /bin/sh as it's interpreter, but cargo run the cmd
with LD_LIBRARY_PATH set to recipe-sysroot-native. The host /bin/sh
links libtinfo.so.5 under recipe-sysroot-native, which needs higher
libc. But host libc is older libc. So the incompatible problem occurred.

Solution:
rewrite cargo-host-linker in python3

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-19 08:31:14 -08:00
Changqing Li 3eb7478a46 mozjs-78: fix do_configure failure
do_configure fails occasionally with following error:
| File "/firefox-91.1.0/build/moz.configure/util.configure", line 239, in try_invoke_compiler
| os.remove(path)
| FileNotFoundError: [Errno 2] No such file or directory: '/tmp/conftest.jr1qrcw3.cpp'

change the temp file's prefix to avoid it is deleted by others

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-13 01:17:26 -08:00
Khem Raj d10abc71d6 mozjs-78: Pass C/C++ flags to js configure
On mips ensure -fpie is passed when using clang compiler, this fixes
configure issues e.g.

/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/mozjs-78/78.15.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: non-dynamic relocations refer to dynamic symbol localtime_r@@GLIBC_2.0
/mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/mozjs-78/78.15.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: failed to set dynamic section sizes: bad value

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:48 -07:00
Khem Raj a59370541d mozjs-78: Set X lib/include paths
mozjs does not really use X but arcane autoconf 2.13 means its poking at
build host for X headers and libraries. On build hosts where X is
installed this results in wrong paths being searched for target X
headers, this gets caught by configure QA and it fails

ERROR: mozjs-78-78.15.0-r0 do_configure: QA Issue: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities.
Rerun configure task after fixing this. [configure-unsafe]
ERROR: mozjs-78-78.15.0-r0 do_configure: Fatal QA errors were found, failing task.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:48 -07:00
Khem Raj e3ef25a2f5 mozjs-78: Check for big-endian icu data file existence before creating it
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:48 -07:00
Andreas Müller f878dc7278 mozjs-78: Initial add
* Did not get rid of checks using llvm-objdump. So depend either llvm-native
  from oe-core or clang-native from meta-clang
* Unfortunately we still need python3-six(-native) although firefox ships a
  version in third_party. If somebody more clever than me can solve this,
  mozjs-78 can be moved out of dynamic-layers

* Get rid of erroneous dependency trying to satisfy llvm_objdump
  It was tested improperly so configure faile for meta-clang not in layers
  It is not necessary for building js only - see mozjs-91

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:48 -07:00
Andreas Müller e764ca5214 mozjs: Move back to recipes-extended - no meta-python specifics required
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-11-03 06:57:48 -07:00
Khem Raj 7c20920cb6 mozjs: Fix build for 32bit systems disabling JIT
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-26 10:38:40 -07:00
Khem Raj f917e5fe40 mozjs: Update to 91.2.0
This has bunch of security fixes
https://www.mozilla.org/en-US/security/advisories/mfsa2021-45/

No need to disable jit explicitly for rv32, it works ok without it

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-26 10:06:20 -07:00
Khem Raj 7937fa5a8a mozjs: Add riscv32 support
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-25 08:38:43 -07:00
Khem Raj bd276908c7 mozjs: Fix musl miscompiles with HAVE_THREAD_TLS_KEYWORD
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-20 16:57:31 -07:00
Khem Raj 145a127636 mozjs: Fix build on mips/musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-20 16:57:31 -07:00
Kurt Kiefer 7892e882a2 mozjs: move large static library into staticdev package
The libmozjs package was including /usr/lib/libjs_static.ajs, not
required for runtime usage.

Keep this file, but move it to the staticdev package.

Signed-off-by: Kurt Kiefer <kurt.kiefer@arthrex.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-19 09:23:08 -07:00
Khem Raj be77bddae1 mozjs: Disable JIT on mips
Fixes
error: static assertion failed: MIPS32 jit only supports FR=0 fpu mode

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-16 09:50:39 -07:00
Alexander Kanavin 66a0f5b8eb mozjs: update 60.9.0 -> 91.1.0
The new release requires rust to build and at the same time allows
updating to python 3.10; I took the opportunity to rewrite the
recipe from scratch, drop all the old cruft and use the official,
current upstream build system in it.

All prior patches and tweaks have been dropped; I have no
reasonable way to test them, so if something regressed
for you I'm afraid it needs to be addressed after the fact.

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-10-16 09:50:39 -07:00
Martin Jansa c61dc077bb Convert to new override syntax
This is the result of automated script (0.9.1) conversion:

oe-core/scripts/contrib/convert-overrides.py .

converting the metadata to use ":" as the override character instead of "_".

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2021-08-03 10:21:25 -07:00
Andreas Müller 74fe5f9d4e mozjs/0001-Port-build-to-python3.patch: Fix typos in description
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-07-27 09:52:23 -07:00
Khem Raj db5637f64e mozjs: Drop using JS_VOLATILE_ARM
JS_VOLATILE_ARM was a workaround for a gcc 4.7 bug on B2G where it
would generate unaligned word accesses that should have been
individual byte accesses.  firefox now a days require at least gcc 6.1+ (and ARM
systems support unaligned accesses). see [1]

in gcc11 volatile wont be accepted as argument qualifier in functions,
hence the build breaks, this patch unbreaks it

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1495731

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
2021-03-03 11:11:06 -08:00
Mingli Yu 470fbe378c mozjs: improve reproducibility
Remove the build path from the file js60-config.

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2021-02-04 09:26:48 -08:00
Changqing Li e7bf8b6cb2 mozjs: fix multilib conflict
fix error:
.do_rootfs.2023872:4562:  file /usr/bin/js60-config conflicts between attempted installs of mozjs-dev-60.9.0-r0.core2_64 and lib32-mozjs-dev-60.9.0-r0.core2_32
log.do_rootfs.2023872:4563:  file /usr/include/mozjs-60/js-config.h conflicts between attempted installs of mozjs-dev-60.9.0-r0.core2_64 and lib32-mozjs-dev-60.9.0-r0.core2_32

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-14 06:51:01 -07:00
Slater, Joseph 8fd3da8ab8 mozjs: specify TMPDIR
Although it is extremely rare the following type of error
can occur during configuration:

Creating `/tmp/conftest.i53clm4z.cpp` with content:
...
x86_64-wrs-linux-g++: error: /tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: error: /tmp/conftest.i53clm4z.cpp: No such file or directory
x86_64-wrs-linux-g++: fatal error: no input files

So, specify a local directory as TMPDIR during configuration.

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-08-11 23:35:32 -07:00
Adrian Bunk ffd0911796 mozjs: Remove workaround for gcc < 4.9
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-05-12 14:16:19 -07:00
Changqing Li d178745cbf conf/layer.conf: add BBFILES_DYNAMIC and dynamic layers
some recipes under meta-oe have dependency on meta-python,
and test_world of yocto-check-layer will failed with error
like:

ERROR: test_world (common.CommonCheckLayer)
ERROR: Nothing PROVIDES 'python3-pytoml-native' (but
/meta-openembedded/meta-oe/recipes-extended/mozjs/mozjs_60.9.0.bb
DEPENDS on or otherwise requires it). Close matches:
  python3-numpy-native
  python3-pycairo-native
  python3-rpm-native
ERROR: Required build target 'meta-world-pkgdata' has no buildable
providers.
Missing or unbuildable dependency chain was: ['meta-world-pkgdata',
'mozjs', 'python3-pytoml-native']

fix by make these recipes only active when identified layers are
present

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2020-03-11 08:58:57 -07:00