Commit e1b8bb64 authored by J0WI's avatar J0WI Committed by Rasmus Thomsen

testing/mozjs78: new aport

parent 358fd22b
Upstream: no
From 9ad10569e11a2fb96377188f895bc66abcc9511d Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Wed, 5 Sep 2018 15:05:24 +0200
Subject: [PATCH] silence sandbox violations
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
python/mozbuild/mozbuild/frontend/emitter.py | 5 -----
1 file changed, 5 deletions(-)
--- a/python/mozbuild/mozbuild/frontend/emitter.py
+++ b/python/mozbuild/mozbuild/frontend/emitter.py
@@ -1239,12 +1239,6 @@
'is a filename, but a directory is required: %s '
'(resolved to %s)' % (local_include, full_path),
context)
- if (full_path == context.config.topsrcdir or
- full_path == context.config.topobjdir):
- raise SandboxValidationError(
- 'Path specified in LOCAL_INCLUDES '
- '(%s) resolves to the topsrcdir or topobjdir (%s), which is '
- 'not allowed' % (local_include, full_path), context)
include_obj = LocalInclude(context, local_include)
local_includes.append(include_obj.path.full_path)
yield include_obj
# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=mozjs78
pkgver=78.1.0
pkgrel=0
pkgdesc="Standalone Mozilla JavaScript engine"
url="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust and cargo
license="MPL-2.0"
depends_dev="
icu-dev
nspr-dev
libffi-dev
readline-dev
"
_llvmver=10
makedepends="
$depends_dev
zlib-dev
python3-dev
perl
sed
autoconf2.13
linux-headers
rust
cargo
llvm$_llvmver
clang-dev
"
subpackages="$pkgname-dev"
source="https://ftp.mozilla.org/pub/firefox/releases/${pkgver}esr/source/firefox-${pkgver}esr.source.tar.xz
0001-silence-sandbox-violations.patch
disable-jslint.patch
fd6847c9416f9eebde636e21d794d25d1be8791d.patch
fix-musl-build.patch
fix-rust-target.patch
"
builddir="$srcdir"/firefox-$pkgver
_builddir="$builddir/js/src"
build() {
local _clangver=$(clang --version | awk '$3 == "version" {print $4}')
if [ "${_clangver#$_llvmver}" = "$_clangver" ]; then
error "clang version $_clangver does not match llvm version $_llvmver"
return 1
fi
cd "$_builddir"
export LDFLAGS="$LDFLAGS -Wl,-z,stack-size=1048576"
# avoid complains about autoconf
touch configure
# Fix broken ARM_ARCH check which doesn't work with newer GCCs it seems.
case "$CTARGET" in
armv*)
ARM_ARCH=$(echo ${CTARGET#*armv} | sed "s|-.*||")
sed -i "s|ARM_ARCH=.*|ARM_ARCH=$ARM_ARCH|" "$builddir"/build/autoconf/arch.m4
;;
esac
export RUST_TARGET="$CTARGET"
export SHELL=/bin/ash
export PYTHON=/usr/bin/python3
./configure --prefix=/usr \
--with-clang-path=/usr/bin/clang \
--with-intl-api \
--with-libclang-path=/usr/lib \
--with-system-icu \
--with-system-nspr \
--with-system-zlib \
--enable-ctypes \
--enable-hardening \
--enable-optimize="$CFLAGS -O2" \
--enable-readline \
--enable-release \
--enable-shared-js \
--enable-system-ffi \
--enable-tests \
--disable-debug \
--disable-debug-symbols \
--disable-jemalloc \
--disable-strip
make
}
check() {
cd "$_builddir"
dist/bin/jsapi-tests \
--format=none \
--exclude-random \
basic
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install
rm -f "$pkgdir"/usr/lib/*.ajs
}
sha512sums="4ab1b0d6ce41e51f5430c4ec1f5ddc5db41e4d3fe66a50132d77208ce48d1981f0748299900ec1a1b900aa62b42ad041e0d20b232608e17ee8b7b5dc269d3d84 firefox-78.1.0esr.source.tar.xz
f7e5bee97cfa495d491dac4b8b98e5d3081346d920700e8bb6d077543e18245e5c82201a9981036ec0bf16d9fbdd42fd76e8cf6d90bb811e7338261204020149 0001-silence-sandbox-violations.patch
4f2cb93f91e798218d83cb3ac4c60b61a3658c5b269bfe250f4c4875aedaacbd77598d8d20e3a868626e49988b2073a2404e37d6918b11def774c25db68dd08d disable-jslint.patch
60845dcb034b2c4459c30f7d5f25c8176cf42df794e2cc0e86c3e2abb6541c24b962f3a16ca70a288d4d6f377b68d00b2904b22463108559612053d835d9bff1 fd6847c9416f9eebde636e21d794d25d1be8791d.patch
bc91c2fb15eb22acb8acc36d086fb18fbf6f202b4511d138769b5ecaaed4a673349c55f808270c762616fafa42e3b01e74dc0af1dcbeea1289e043926e2750c8 fix-musl-build.patch
c397bd594428b009d1533922a3728a0ec74403714417f4b90c38c1b7751749b0585d48e77c79efa05c6c22a0d9a8ac04d535eb5bb8deb51684852c03c05d94cd fix-rust-target.patch"
--- a/js/src/build/moz.build
+++ b/js/src/build/moz.build
@@ -80,14 +80,3 @@
NO_EXPAND_LIBS = True
DIST_INSTALL = True
-
-# Run SpiderMonkey style checker after linking the static library. This avoids
-# running the script for no-op builds.
-GeneratedFile(
- 'spidermonkey_checks', script='/config/run_spidermonkey_checks.py',
- inputs=[
- '!%sjs_static.%s' % (CONFIG['LIB_PREFIX'], CONFIG['LIB_SUFFIX']),
- '/config/check_spidermonkey_style.py',
- '/config/check_macroassembler_style.py',
- '/config/check_js_opcode.py'
- ])
See https://bugzilla.mozilla.org/show_bug.cgi?id=1539739
From fd6847c9416f9eebde636e21d794d25d1be8791d Mon Sep 17 00:00:00 2001
From: Mike Hommey <mh@glandium.org>
Date: Sat, 1 Jun 2019 09:06:01 +0900
Subject: [PATCH] Bug 1526653 - Include struct definitions for user_vfp and
user_vfp_exc.
---
js/src/wasm/WasmSignalHandlers.cpp | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/js/src/wasm/WasmSignalHandlers.cpp b/js/src/wasm/WasmSignalHandlers.cpp
index 636537f8478..383c380f04c 100644
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
@@ -248,7 +248,16 @@ using mozilla::DebugOnly;
#endif
#ifdef WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS
-# include <sys/user.h>
+struct user_vfp {
+ unsigned long long fpregs[32];
+ unsigned long fpscr;
+};
+
+struct user_vfp_exc {
+ unsigned long fpexc;
+ unsigned long fpinst;
+ unsigned long fpinst2;
+};
#endif
#if defined(ANDROID)
--
2.20.1
Upstream: No
Reason: mozjs60 miscompiles on musl if built with HAVE_THREAD_TLS_KEYWORD:
https://github.com/void-linux/void-packages/issues/2598
diff --git a/js/src/old-configure.in b/js/src/old-configure.in
--- a/js/src/old-configure.in
+++ b/js/src/old-configure.in
@@ -1272,6 +1272,9 @@
*-android*|*-linuxandroid*)
:
;;
+ *-musl*)
+ :
+ ;;
*)
AC_DEFINE(HAVE_THREAD_TLS_KEYWORD)
;;
Allow us to just set RUST_TARGEt ourselves instead of hacking around in mozilla's
weird custom build system...
diff -upr firefox-68.9.0.orig/build/moz.configure/rust.configure firefox-68.9.0/build/moz.configure/rust.configure
--- firefox-68.9.0.orig/build/moz.configure/rust.configure 2020-06-02 22:54:39.982616128 +0200
+++ firefox-68.9.0/build/moz.configure/rust.configure 2020-06-02 23:08:37.656332899 +0200
@@ -345,7 +345,7 @@ def rust_triple_alias(host_or_target):
return None
- rustc_target = find_candidate(candidates)
+ rustc_target = os.environ['RUST_TARGET']
if rustc_target is None:
die("Don't know how to translate {} for rustc".format(
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment