From 6cb77a53e77b4f2564e717eed6c5df7a22ee09b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Zatloukal?= Date: Sun, 17 Nov 2019 20:42:08 +0100 Subject: [PATCH] armv7 fixes --- ...WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch | 10 ++++++ mozjs68.spec | 14 ++++++-- rust_armv7.patch | 36 +++++++++++++++++++ 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch create mode 100644 rust_armv7.patch diff --git a/armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch b/armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch new file mode 100644 index 0000000..0cb26ac --- /dev/null +++ b/armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch @@ -0,0 +1,10 @@ +--- firefox-68.0/js/src/wasm/WasmSignalHandlers.cpp ++++ firefox-68.0/js/src/wasm/WasmSignalHandlers.cpp +@@ -243,7 +243,7 @@ + // If you run into compile problems on a tier-3 platform, you can disable the + // emulation here. + +-#if defined(__linux__) && defined(__arm__) ++#if 0 && defined(__linux__) && defined(__arm__) + # define WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS + #endif diff --git a/mozjs68.spec b/mozjs68.spec index 0fc9fdf..f3e0a96 100644 --- a/mozjs68.spec +++ b/mozjs68.spec @@ -20,7 +20,7 @@ Name: mozjs%{major} Version: 68.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: SpiderMonkey JavaScript library License: MPLv2.0 and MPLv1.1 and BSD and GPLv2+ and GPLv3+ and LGPLv2+ and AFL and ASL 2.0 @@ -42,7 +42,10 @@ Patch13: emitter_test.patch Patch14: init_patch.patch # TODO: Check with mozilla for cause of these fails and re-enable spidermonkey compile time checks if needed Patch15: spidermonkey_checks_disable.patch + +# armv7 fixes Patch16: rust_armv7.patch +Patch17: armv7_disable_WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS.patch # Patches from Fedora firefox package: Patch26: build-icu-big-endian.patch @@ -99,10 +102,12 @@ pushd ../.. %patch14 -p1 %patch15 -p1 -# Correct armv7hl rust triple is armv7-unknown-linux-gnueabihf and not armv7-unknown-linux-gnueabi -# according to rust spec file in Fedora %ifarch armv7hl +# Correct armv7hl rust triple seems to be armv7-unknown-linux-gnueabihf and not armv7-unknown-linux-gnueabi %patch16 -p1 +# Disable WASM_EMULATE_ARM_UNALIGNED_FP_ACCESS as it causes the compilation to fail +# https://bugzilla.mozilla.org/show_bug.cgi?id=1526653 +%patch17 -p1 %endif # Patch for big endian platforms only @@ -244,6 +249,9 @@ PYTHONPATH=tests/lib %{__python3} jit-test/jit_test.py -s -t 1800 --no-progress %{_includedir}/mozjs-%{major}/ %changelog +* Sun Nov 17 2019 Frantisek Zatloukal - 68.2.0-3 +- Fix armv7 build + * Thu Nov 14 2019 Frantisek Zatloukal - 68.2.0-2 - Fix s390x build - Exclude armv7 for now, see comment up in the spec diff --git a/rust_armv7.patch b/rust_armv7.patch new file mode 100644 index 0000000..4e417ba --- /dev/null +++ b/rust_armv7.patch @@ -0,0 +1,36 @@ +--- firefox-68.0/build/moz.configure/rust.configure ++++ firefox-68.0/build/moz.configure/rust.configure +@@ -276,13 +276,15 @@ + if rustc_target: + break + ++ rustc_target = 'armv7-unknown-linux-gnueabihf' ++ + if rustc_target is None: + die("Don't know how to translate {} for rustc".format( + host_or_target.alias)) + + # Check to see whether our rustc has a reasonably functional stdlib + # for our chosen target. +- target_arg = '--target=' + rustc_target.alias ++ target_arg = '--target=' + rustc_target + in_fd, in_path = mkstemp(prefix='conftest', suffix='.rs') + out_fd, out_path = mkstemp(prefix='conftest', suffix='.rlib') + os.close(out_fd) +@@ -310,7 +312,7 @@ + a rust std library for that target installed. Try: + + rustup target add {} +- '''.format(host_or_target.alias, rustc, rustc_target.alias))) ++ '''.format(host_or_target.alias, rustc, rustc_target))) + check_cmd_output(*cmd, onerror=failed) + if not os.path.exists(out_path) or os.path.getsize(out_path) == 0: + failed() +@@ -319,7 +321,7 @@ + os.remove(out_path) + + # This target is usable. +- return rustc_target.alias ++ return rustc_target + + return rust_target