diff --git a/firefox-60.2.2-add-riscv64.patch b/firefox-60.2.2-add-riscv64.patch index ca366fd..063187d 100644 --- a/firefox-60.2.2-add-riscv64.patch +++ b/firefox-60.2.2-add-riscv64.patch @@ -12,6 +12,38 @@ index 83b8d7055..200ea47e5 100644 elif cpu == 'sh4': canonical_cpu = 'sh4' endianness = 'little' +diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h +index a8970b0d3..41503c81e 100644 +--- a/js/src/jit/AtomicOperations.h ++++ b/js/src/jit/AtomicOperations.h +@@ -387,6 +387,8 @@ AtomicOperations::isLockfreeJS(int32_t size) + # include "jit/none/AtomicOperations-feeling-lucky.h" + #elif defined(__s390__) || defined(__s390x__) + # include "jit/none/AtomicOperations-feeling-lucky.h" ++#elif defined(__riscv) ++# include "jit/none/AtomicOperations-feeling-lucky.h" + #else + # error "No AtomicOperations support provided for this platform" + #endif +diff --git a/js/src/jit/none/AtomicOperations-feeling-lucky.h b/js/src/jit/none/AtomicOperations-feeling-lucky.h +index da5722843..288b45313 100644 +--- a/js/src/jit/none/AtomicOperations-feeling-lucky.h ++++ b/js/src/jit/none/AtomicOperations-feeling-lucky.h +@@ -79,6 +79,14 @@ + # define GNUC_COMPATIBLE + #endif + ++#ifdef __riscv ++# define GNUC_COMPATIBLE ++# if __riscv_xlen == 64 ++# define HAS_64BIT_ATOMICS ++# define HAS_64BIT_LOCKFREE ++# endif ++#endif ++ + // The default implementation tactic for gcc/clang is to use the newer + // __atomic intrinsics added for use in C++11 . Where that + // isn't available, we use GCC's older __sync functions instead. diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp index 06c24ed03..708ea558e 100644 --- a/mfbt/tests/TestPoisonArea.cpp diff --git a/mozjs60.spec b/mozjs60.spec index 141032b..bbb6565 100644 --- a/mozjs60.spec +++ b/mozjs60.spec @@ -12,7 +12,7 @@ Name: mozjs%{major} Version: 60.2.2 -Release: 1.0.riscv64%{?dist} +Release: 1.1.riscv64%{?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 @@ -181,7 +181,7 @@ ln -s libmozjs-%{major}.so.0 %{buildroot}%{_libdir}/libmozjs-%{major}.so %{_includedir}/mozjs-%{major}/ %changelog -* Tue Oct 16 2018 David Abdurachmanov - 60.2.2-1.0.riscv64 +* Tue Oct 16 2018 David Abdurachmanov - 60.2.2-1.1.riscv64 - Add support for RISC-V (riscv64) * Thu Oct 04 2018 Kalev Lember - 60.2.2-1