summaryrefslogtreecommitdiff
path: root/dev-lang/spidermonkey
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/spidermonkey')
-rw-r--r--dev-lang/spidermonkey/Manifest12
-rw-r--r--dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch107
-rw-r--r--dev-lang/spidermonkey/spidermonkey-1.8.5-r10.ebuild (renamed from dev-lang/spidermonkey/spidermonkey-1.8.5-r9.ebuild)2
-rw-r--r--dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r4.ebuild (renamed from dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r3.ebuild)0
-rw-r--r--dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r6.ebuild (renamed from dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r5.ebuild)0
-rw-r--r--dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild1
-rw-r--r--dev-lang/spidermonkey/spidermonkey-78.14.0.ebuild454
7 files changed, 571 insertions, 5 deletions
diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest
index 3b1957380df2..68880b5136f2 100644
--- a/dev-lang/spidermonkey/Manifest
+++ b/dev-lang/spidermonkey/Manifest
@@ -4,6 +4,7 @@ AUX spidermonkey-52.0-fix-alpha-bitness.patch 836 BLAKE2B bf89aadfdceab9d1460c31
AUX spidermonkey-52.0-gcc9-overflow.patch 821 BLAKE2B c35c5a37b40e86d1a23588aebd9b53e81e0a70b01e969bc54c24c68a8adef567d03833e1afa8a02d1659f373226958b8ef3ce84982a8ba24d18fa28a96aa6e40 SHA512 6173486c4d28cb727096a470b22b6b98c675ee355934bf134882a5d068ef492e4cd3519e7da293eae756d5b9cb9950ffd4b1723c6a47de6493491a4bc3573f3b
AUX spidermonkey-60.5.2-ia64-fix-virtual-address-length.patch 2554 BLAKE2B d5759da22c521e389b8633aa2aa75e0a300af76f431a53c0bd445781002b0b7dd93543657cdf53afb12d87e4be1464584d5c3ccb30a2c9acc608aaeb1b2eb34f SHA512 d767cb00988772a0e5789d5b27aaaf0c0cc0124f4dd78ba67d2c4b4587c26346b01fc5b3d29f346e931dcd037ecefc8cec0d5c48510726a1841a6b6396c5507c
AUX spidermonkey-60.5.2-ia64-support.patch 1615 BLAKE2B bd2ae36194bdb6a17638ec500e5211abb9700f2b7c5056b5be51e8e54d59326a5c9f0cb6d2d6fa56dd946dba264635e6d75e9b4ed52103c7904df19d33257c7d SHA512 71f2a0f27910ae086910f6599985a32ad2fdedeffc9c4c6baa446f4856dee74051fa158cc0552a3f21210098e0d006a0b5d781437fded80969e1edf23c04b9e0
+AUX spidermonkey-68.0-add-riscv-support.patch 4328 BLAKE2B 64ef005bff60ce3cc3e698a65494ef97441b9f27493bcbc7576286f6e06ce754dbcbcc8d9088ca88f6aa1a1ea7f008565922b5a4baf54019c64d8040c5b509f1 SHA512 70aad64600221f805f0fcd485b63c5383e9f160889b001963f5b6196d57672257c8ce02e75ad384bd2a0eeb9eeae0f7fc4820f1abcec3677f736cd60391f7d6f
AUX spidermonkey-perl-defined-array-check.patch 341 BLAKE2B e11a74cc2afbea5e39ec5f3fb4c108278a8b71b57ce71644184bc4e19188059f6cb9c164ab87877605028241ed0b68a1447414f1aa0f5453fa26a603ecd4f6a6 SHA512 5d178b68cf0744da874624da79cd31555bd882aed205e697a3f0bfc3cb91a149d74da79b7af5883ea5a23e1d1692753ebfda0d83e7a25ac000105849db5c1548
DIST firefox-68.0-patches-15.tar.xz 16060 BLAKE2B f9e6cd58ea51bed1af90a9d30fd551dc7e939afcd1b4d00de1271bd4bda94021c6f1799fd9945962c14ffa1fd0b6a6429369c4e45efc2000f179b9b2e46971e7 SHA512 9cb2479637dd8b84e0ab68dc0fe144acd2dc74feca282fd3c4b485ca6f0de8190244587622713a5421b243ccda153f738e9a8f463e87e15e93e9b725d943e128
DIST firefox-68.12.0esr.source.tar.xz 313856956 BLAKE2B eeaa4acc9fabf15ec1b313170a30cee8e1fc10a8b08512b915b83b7d6a81c09b365733ed94638bd434864fd7b0cb8cbf1bc2e43441be69e31117e8e6a099234c SHA512 839b02422e4c87bdb12e0995cd35ca8c1996f3fba00bbb46b419e46b67df5ec48a264cb14632db777ce29166ee4fdcb06e2ee3ce847e64328c58c9a2f9129f4c
@@ -11,10 +12,12 @@ DIST firefox-78.10.1esr.source.tar.xz 334444960 BLAKE2B 76f9bae7f9fddbf3ab14293d
DIST firefox-78.11.0esr.source.tar.xz 333002576 BLAKE2B a8268886f86afb41b86d227f8a8f642674ea9c0a85365acb517c6997099dbddad9779efa772cce645da6443a78d6e94c89a750152386f8dff7bbbf31bf5df129 SHA512 d02fc2eda587155b1c54ca12a6c5cde220a29f41f154f1c9b71ae8f966d8cc9439201a5b241e03fc0795b74e2479f7aa5d6b69f70b7639432e5382f321f7a6f4
DIST firefox-78.12.0esr.source.tar.xz 333737488 BLAKE2B 775a55511a48f4210807d2648833bca6f95d9f4cd48b5d0de8cf0bf2609590c1615fca7ff855ae3643a25466d131e15dc293e6a57aa05e1d91d2cf819b0b89ca SHA512 646eb803e0d0e541773e3111708c7eaa85e784e4bae6e4a77dcecdc617ee29e2e349c9ef16ae7e663311734dd7491aebd904359124dda62672dbc18bfb608f0a
DIST firefox-78.13.0esr.source.tar.xz 333506484 BLAKE2B 1922e2f6b2ada46e581e4eaaa388873d31c6a922e5165ba225eeaccde5c1c6d7369a57ecf8e89371a34f692dca5754a461abb7d1c9bfda9cbc4f021d39549439 SHA512 78a5dc8713ab879ebfc3b8fd7a8219844d06f0d897342fdf9a11471633d98e148ff85cf10e561899df4910b94a33b57709b64788df4621a8c0b83eb9a7102cef
+DIST firefox-78.14.0esr.source.tar.xz 340771180 BLAKE2B 7b83bf081138fbf2367116099839c6d05ec5ade58f183ba033c5167d503a2a1f40976f88bdba680a7a8df7c66ac32449004e58a5211f16086b792a2b41e27c67 SHA512 5d5e4b1197f87b458a8ab14a62701fa0f3071e9facbb4fba71a64ef69abf31edbb4c5efa6c20198de573216543b5289270b5929c6e917f01bb165ce8c139c1ac
DIST firefox-78esr-patches-13.tar.xz 83664 BLAKE2B 92250d5bc3821ee1ff032236bd00e01a53e0af4f9e39696a634edb39f0a182bf5ff74b7fc0f107c9c53136c64485c398391e3a857c8b2b904115fd13d17e2a4f SHA512 96739811bea833a6a9cb09075dfe49c6fa7f613e8bd41e1d830d6ae6851ce8e2f5d27c87d0035b6f3a099340dfd7eebe6ecb930ff25079e76cea92a7610293ca
DIST firefox-78esr-patches-14.tar.xz 82976 BLAKE2B 08cc3618c8069f4169b7647e7eb699153d558bb89f8a4f1ed74d5ccd339f77119cd8f253df011f0c2f255ad889b65e843171d7559f469788463ca7e9aa2e96aa SHA512 1611c6f9d2c7d586e7b53810c1cfdb2682f5d289b1b019b71694b1ab2d8bbdfe827a73cfaf59f7e4808c0b90409ca4fa57e27655d8cdf0c578ffdbad33659f26
DIST firefox-78esr-patches-15.tar.xz 65604 BLAKE2B 86e421e555ffd5f7f201d0f1a1c446c649739c67cdf8dca536efa115e09d9c357ce1551b7270c77e8bfe7dd53e0f3e6386496283879cf5e0c59b3c864951ebb3 SHA512 b229e895f083a0404cda1da0d8ae937429d5975ac52ab20e8b15611d9c737381a1076ebfa8c8a127dacac0e12a2a905ffd579facde2d80c6facc911e5739e34b
DIST firefox-78esr-patches-16.tar.xz 55964 BLAKE2B 79d3a465c69656bb55ee7c1e9060606464b6404435b92f534db275521ac2343e045feae1fff6166fde9e2599a82cd982b0b2395271b1033f0f784e745e2c6965 SHA512 3aa971c726646cbf37a14a0dba6c4ac966b88db655cd8b730c5572543bfbf682991ee7c139889541e4f6936c13f27233dc1837fbdb9ee340b33ebb2cec59b01f
+DIST firefox-78esr-patches-17.tar.xz 56004 BLAKE2B 01d2ded2658c24176a3d13d0267d1c4df4ef0113c5c40b1002acd39a0f04db35b773bc617afed1c681df3ec38120621a5c3753ba2d36688d7d5926233bfb8501 SHA512 43b372b848c1f30e02505d06bbb11f5b80d976fe7ee39c0d2aacf60d48bc1d3e378c325f4e2fd4730b971e88c3bd902539a7b81874f53b8b92369f876e05be5e
DIST js185-1.0.0.tar.gz 6164605 BLAKE2B 76a37f0ceae05d3475853875bd0ce4be6e525e4114816f8f281ea6fc6b60a71060975a0fa1cb843f57ad1e2f842dfb26b24244fa0fd6c20f6ae2ebbe430f70be SHA512 2af7122a7c7007fd7b6668776fe1222515a810b3e43bbf0f76b8f94e1ef406ffd3fb5ccec393021b00274c05b38a77235bc8d6886994c56762fcaf0aa7cf6718
DIST mozjs-52.9.1pre1.tar.bz2 30178574 BLAKE2B 0920432b5140e78297a9bcbccb54268d75a223d5e75e4ff90b3b01aab4f7736b4a4e05c47b3a925ff0a74607a0abad3b6583c75d070ef5142009b20ebaf6e4bf SHA512 187b231b246a5ae09e55c0fef77866b316d75f38f4c2e066d5d4325d8da63433027020c929439cab46af3253ac63ab2f780223a8fd2c6ff535b3409bb6c4aa0f
DIST mozjs-60.5.2.tar.bz2 32816585 BLAKE2B 45ac4c9646e1275faf60eeedbf486f802cd106583eb7f640fe2243adc7cbb811dced5cefa94426cceca63468b0112be84078ffcef24cb2b8c1a7b6c8173c0d45 SHA512 5fb73330e7803bdd524fbe7cfdf4e6b72e85d4b22b0c827400317b5d052d1088d36e558ceac376393089e9d03e658b24e69262851fc04a66bbcda47135423dc0
@@ -23,12 +26,13 @@ DIST spidermonkey-60.0-patches-04.tar.xz 4428 BLAKE2B af78049cd9b3ee6a9b689e6253
DIST spidermonkey-68.6.0-patches-04.tar.xz 5956 BLAKE2B b1250391a5173e676272d5926b710c06b0e9de1ff03b130a57fdac30f2deefbee3fa92250b37e28087572fe5cce73eb112ef4e1fb0c0401d6ecdb22ab9868998 SHA512 94575b11b4f006c6ee0c8d64b315734a173cecb68e9128ca61ba1a28177e3c149b8cf1f3b3c47a7a263fad8da6196fc0101df87392f016686a827e0cd24fdc74
DIST spidermonkey-78-patches-04.tar.xz 3408 BLAKE2B f2fdd4882e1e4de1908c458dc8dfedd5665ef7118f19704dabf2b2a80e2fae48813e9bc3d0c3410287e32c21e3f9d09233d8e5d15917f53aa2f60e6190cd9cdb SHA512 87ac83c0ccc05f482913b1fbf043db1878536f935f934362a47283809c0cbfdeff040206a9c18c687384b606ba8a7bd9a7c1fc3c0bcfdd620987990a33ca1fe2
DIST spidermonkey-slot0-patches-02.tar.xz 10952 BLAKE2B fb7bf5cdac6c821a48d407ff172fe0ec7297e047d3b3bab952f226f413b83ea70325175b41c1680725ff588111b424efc97a0c66e392989da510c43d38528ff1 SHA512 cd62890c4b58658d99fc1b52f05ccb35c07da835b168bb9d5e6b219de5021122c199cc2255c5b0be01ef582f53dd51c9975921e6bde9f14e9b43536e2bee85f2
-EBUILD spidermonkey-1.8.5-r9.ebuild 3997 BLAKE2B ad8cafb47ac200f2e3bed78327d1c5371a40d17d64613016f7262e3f04bdc647e90d7fb233966c594fb3815dbc0a0112464131defc62ebf8defe9a44a3f400c4 SHA512 293c708081130cf9bf4d3ad7281a4f27e27845b5805f4e552efc6ee3a8cc4b86184591291049f521425e7d72d0999e55e91ed081a694d2ed2028d97d797a46a4
-EBUILD spidermonkey-52.9.1_pre1-r3.ebuild 4596 BLAKE2B c6fc6d671fb6d3cedc6cb07f57fc98770c0fb20f3552cd8a88f8bcde57563cfe352757c8684a6026aaae3db588ad11b3ce3de27b4ade858690e13340cd2fa839 SHA512 8f43d1c741e57939e6b3e8a93ec46598a927bbf3ac6f0cbf33176cc0418ef2b44dc89540f37e83122e3bae27dcf95ffc8b0af373f41b6432ae6efa2f723e8297
-EBUILD spidermonkey-60.5.2_p0-r5.ebuild 4243 BLAKE2B 241ddff023bd60a1541a9e1681cbd1b233cf64fe22e39d91363ed0b0f5cf723f8812f8fa46e8c7e8e5ae1ec0b7e5b590404185bdae10cf46715bf1823da27426 SHA512 1a01517a201ad105bed700a24a60e9d91ef729ae22aa497a044c68dfdaa3e21612e74fdab388ae0f5d3f4acf21c72e55d2d2b3752a95e5bd88edd6ef3d321a63
-EBUILD spidermonkey-68.12.0.ebuild 7400 BLAKE2B 96bca8ee21c03b8f43a3db12075af6704c4ea3ca234d8bfa58cb28d80c5e05371476a6c9e4c329fc78efb3487fcc284b4654f1d5b7c8ed2196567d7e7ab356c9 SHA512 d419e29f27b55e1c2f1ab9be9adebae3aba74784c8d0195324aa6b13c453df5a0dbd8b3b57cb54d7bd89865604a3c7b87dfa5900145f0eec100d1e479e533bd3
+EBUILD spidermonkey-1.8.5-r10.ebuild 4000 BLAKE2B c150d2215de328dc57f3868db23b74135e63ed278edff61ff28663a6ea7556c03bc47bd62fc16dffbda697dd7b5f1d2d30b72f0ba1cb919bd0b84da39abf5508 SHA512 951d6daf23ae5ce5f5f900ef452e1e5d928584cc20f28d9d30ac234cc2047b3d79b19ca54dbd5722dc133f34f0605780e973e62612cfee0a42051cd357738905
+EBUILD spidermonkey-52.9.1_pre1-r4.ebuild 4596 BLAKE2B c6fc6d671fb6d3cedc6cb07f57fc98770c0fb20f3552cd8a88f8bcde57563cfe352757c8684a6026aaae3db588ad11b3ce3de27b4ade858690e13340cd2fa839 SHA512 8f43d1c741e57939e6b3e8a93ec46598a927bbf3ac6f0cbf33176cc0418ef2b44dc89540f37e83122e3bae27dcf95ffc8b0af373f41b6432ae6efa2f723e8297
+EBUILD spidermonkey-60.5.2_p0-r6.ebuild 4243 BLAKE2B 241ddff023bd60a1541a9e1681cbd1b233cf64fe22e39d91363ed0b0f5cf723f8812f8fa46e8c7e8e5ae1ec0b7e5b590404185bdae10cf46715bf1823da27426 SHA512 1a01517a201ad105bed700a24a60e9d91ef729ae22aa497a044c68dfdaa3e21612e74fdab388ae0f5d3f4acf21c72e55d2d2b3752a95e5bd88edd6ef3d321a63
+EBUILD spidermonkey-68.12.0.ebuild 7464 BLAKE2B 4162b72944c601bfc7600b1d01868bd85b13b74872ecb1b3ac2e7004b55603196407406f15c2bc54a62fe842a67e89c64cfa660acf0041ea32f92aa95e2588bd SHA512 efdf7a391d9a96dcd1b63f6fd73c70316c4be2eea0ad7acb45ec75ece74c7d2e080a1c9b0be2350ef7898aeb7c8b77f48e75d7cd37b6834b731c6a157e1d4649
EBUILD spidermonkey-78.10.1.ebuild 13020 BLAKE2B 1df644878ca6ced6f09412392dcf44a09226e8d7d436c5ead8e94d332d931aa3dd734565ca2e4c670871cf04c755b3b271640db34bbbcfdeb334187adb0d9e6f SHA512 c95d1e675d3c7822b5df2373c45e5535ea6ab7b0141a855c9a3d593edd9544de4faf975dbdc9bab276b5cdef8d96a736781aa24ac84574414eb08f66d9fab059
EBUILD spidermonkey-78.11.0.ebuild 13023 BLAKE2B 5c6ac236be68d84fa31d433f425f3298ca114abd206312da92098284478a4e8f40b8358b8298cd3e7f340fb3ce7cc6e7c5609da87a3f2b7f123b2c09a0ac0779 SHA512 7f55e7770c7e3e7bb6ebb7bccf432934e0cdd585b04ed7d0612ddf667eda0bed8c6102dc7d687c9afc5b44cb693c51989766e1c42523e6372471b0001b9719f1
EBUILD spidermonkey-78.12.0.ebuild 13021 BLAKE2B e0c048fc9845d7b24e72df1efb67764bfc9570efc2a40e753bd3d222ebfe297168a229242a5439e6922bad5b6d4f6275b6b6df52ca50a173049f394d6f8e41d1 SHA512 1748dd580ef80259e81586b24a07495ffd43ca94d6f794e2cd36849396e04e421cb2a40d1c17cf6a9cf7ef215adf31af9cb4de74a31edef7f6c8d60f3f098e3b
EBUILD spidermonkey-78.13.0.ebuild 13025 BLAKE2B eaaf4df87e0497daeb4bfb2a554f9f2009a64d94e02d94c9a852e3db4047d419132abc671898ce7beb239ee88721eac8be8ce794a5e9abaa2840ae4e87eadd6e SHA512 a8223fb84b0174b24845e8c226662823d196019d10989b08cf4c3c2975609799510edc3b25bb922d86b23bf58c8f6f4c1051cac14e9281ed90942dc926b4069d
+EBUILD spidermonkey-78.14.0.ebuild 13025 BLAKE2B 8e47866c1d3303258389b88ac6fdf58c59d9979f668be2378dee7d99d2db21eaf9454ed6dfdb6c6ea59843ad899a581a1e17613f67ab02f49991f5e19825997d SHA512 41d9fda7c6cb2df23f6ffe23727438fed49845f31c5143c3c8e85b4d43d217af47ebb324621907a9e4aaa4b29f38b9a48e753a0781a47bbe3fd3c93a8c39c332
MISC metadata.xml 868 BLAKE2B ee529f60bc83af6c54188ab4db2a1e05cbc3fcebf7732580cb5e507afada8560cb8812d4f155ae94c2ec87724bdfafe7312de86b47a95f599655695836c9b806 SHA512 caf3c383cd8109391cbf81baf5e942630bfd84ca6bc2a78430e58e5b0a40428e08b8a3d7c9fadccebaf94fe1aa673df837246fc32d5932b7f60dd43431ee1575
diff --git a/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch b/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch
new file mode 100644
index 000000000000..cc44da805898
--- /dev/null
+++ b/dev-lang/spidermonkey/files/spidermonkey-68.0-add-riscv-support.patch
@@ -0,0 +1,107 @@
+From f144113688168e2bd86d24a48c8d7cdfdb4ccaab Mon Sep 17 00:00:00 2001
+From: Thomas Deutschmann <whissi@gentoo.org>
+Date: Fri, 21 May 2021 17:17:45 +0200
+Subject: [PATCH] bmo#1318905: Make SpiderMonkey build on Linux/RISC-V
+
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ build/moz.configure/init.configure | 3 +++
+ js/src/jit/AtomicOperations.h | 2 +-
+ js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h | 5 +++++
+ mfbt/tests/TestPoisonArea.cpp | 3 +++
+ python/mozbuild/mozbuild/configure/constants.py | 2 ++
+ .../mozbuild/test/configure/test_toolchain_configure.py | 4 ++++
+ 6 files changed, 18 insertions(+), 1 deletion(-)
+
+diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
+index b887153321a..5c275076061 100644
+--- a/build/moz.configure/init.configure
++++ b/build/moz.configure/init.configure
+@@ -755,6 +755,9 @@ def split_triplet(triplet, allow_msvc=False):
+ elif cpu.startswith('aarch64'):
+ canonical_cpu = 'aarch64'
+ endianness = 'little'
++ elif cpu in ('riscv64', 'riscv64gc'):
++ canonical_cpu = 'riscv64'
++ endianness = 'little'
+ elif cpu == 'sh4':
+ canonical_cpu = 'sh4'
+ endianness = 'little'
+diff --git a/js/src/jit/AtomicOperations.h b/js/src/jit/AtomicOperations.h
+index 0f45ac8b58e..f48d2adce97 100644
+--- a/js/src/jit/AtomicOperations.h
++++ b/js/src/jit/AtomicOperations.h
+@@ -392,7 +392,7 @@ inline bool AtomicOperations::isLockfreeJS(int32_t size) {
+ defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+ defined(__PPC64LE__) || defined(__alpha__) || defined(__hppa__) || \
+ defined(__ia64__) || defined(__sh__) || defined(__s390__) || \
+- defined(__s390x__)
++ defined(__s390x__) || defined(__riscv)
+ # include "jit/shared/AtomicOperations-feeling-lucky.h"
+ #else
+ # error "No AtomicOperations support provided for this platform"
+diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+index f002cd46c93..1ce40efaccc 100644
+--- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
++++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h
+@@ -63,6 +63,11 @@
+ # define HAS_64BIT_LOCKFREE
+ #endif
+
++#if defined(__riscv) && __riscv_xlen == 64
++# define HAS_64BIT_ATOMICS
++# define HAS_64BIT_LOCKFREE
++#endif
++
+ #ifdef __sparc__
+ # ifdef __LP64__
+ # define HAS_64BIT_ATOMICS
+diff --git a/mfbt/tests/TestPoisonArea.cpp b/mfbt/tests/TestPoisonArea.cpp
+index fbd33647150..9d2ffa498b7 100644
+--- a/mfbt/tests/TestPoisonArea.cpp
++++ b/mfbt/tests/TestPoisonArea.cpp
+@@ -132,6 +132,9 @@
+ #elif defined _ARCH_PPC || defined _ARCH_PWR || defined _ARCH_PWR2
+ # define RETURN_INSTR 0x4E800020 /* blr */
+
++#elif defined __riscv
++# define RETURN_INSTR 0x80828082 /* ret; ret */
++
+ #elif defined __sparc || defined __sparcv9
+ # define RETURN_INSTR 0x81c3e008 /* retl */
+
+diff --git a/python/mozbuild/mozbuild/configure/constants.py b/python/mozbuild/mozbuild/configure/constants.py
+index 7542dcdc636..49ef3b857db 100644
+--- a/python/mozbuild/mozbuild/configure/constants.py
++++ b/python/mozbuild/mozbuild/configure/constants.py
+@@ -49,6 +49,7 @@
+ 'mips64': 64,
+ 'ppc': 32,
+ 'ppc64': 64,
++ 'riscv64': 64,
+ 's390': 32,
+ 's390x': 64,
+ 'sh4': 32,
+@@ -87,6 +88,7 @@
+ ('sparc', '__sparc__'),
+ ('mips64', '__mips64'),
+ ('mips32', '__mips__'),
++ ('riscv64', '__riscv && __riscv_xlen == 64'),
+ ('sh4', '__sh__'),
+ ))
+
+diff --git a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+index 37c4e26f0fb..5d3d5891dca 100755
+--- a/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
++++ b/python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py
+@@ -1208,6 +1208,10 @@ class LinuxCrossCompileToolchainTest(BaseToolchainTest):
+ 'mips-unknown-linux-gnu': big_endian + {
+ '__mips__': 1,
+ },
++ 'riscv64-unknown-linux-gnu': little_endian + {
++ '__riscv': 1,
++ '__riscv_xlen': 64,
++ },
+ 'sh4-unknown-linux-gnu': little_endian + {
+ '__sh__': 1,
+ },
diff --git a/dev-lang/spidermonkey/spidermonkey-1.8.5-r9.ebuild b/dev-lang/spidermonkey/spidermonkey-1.8.5-r10.ebuild
index b736bb0eadeb..7e2de60b12fb 100644
--- a/dev-lang/spidermonkey/spidermonkey-1.8.5-r9.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-1.8.5-r10.ebuild
@@ -4,7 +4,7 @@
EAPI=6
WANT_AUTOCONF="2.1"
PYTHON_COMPAT=( python2_7 )
-PYTHON_REQ_USE="threads"
+PYTHON_REQ_USE="threads(+)"
inherit autotools toolchain-funcs multilib python-any-r1 versionator pax-utils
MY_PN="js"
diff --git a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r3.ebuild b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r4.ebuild
index ac001314d8a5..ac001314d8a5 100644
--- a/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r3.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-52.9.1_pre1-r4.ebuild
diff --git a/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r5.ebuild b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r6.ebuild
index b0ea339891c7..b0ea339891c7 100644
--- a/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r5.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-60.5.2_p0-r6.ebuild
diff --git a/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild b/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
index 17fed702c273..250dca91fcc4 100644
--- a/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
+++ b/dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild
@@ -98,6 +98,7 @@ src_prepare() {
rm "${WORKDIR}"/firefox/2016_set_CARGO_PROFILE_RELEASE_LTO.patch
eapply "${WORKDIR}"/firefox
eapply "${WORKDIR}"/spidermonkey-patches
+ eapply "${FILESDIR}"/spidermonkey-68.0-add-riscv-support.patch
default
diff --git a/dev-lang/spidermonkey/spidermonkey-78.14.0.ebuild b/dev-lang/spidermonkey/spidermonkey-78.14.0.ebuild
new file mode 100644
index 000000000000..31a1b9912986
--- /dev/null
+++ b/dev-lang/spidermonkey/spidermonkey-78.14.0.ebuild
@@ -0,0 +1,454 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+# Patch version
+FIREFOX_PATCHSET="firefox-78esr-patches-17.tar.xz"
+SPIDERMONKEY_PATCHSET="spidermonkey-78-patches-04.tar.xz"
+
+LLVM_MAX_SLOT=12
+
+PYTHON_COMPAT=( python3_{7..9} )
+
+WANT_AUTOCONF="2.1"
+
+inherit autotools check-reqs flag-o-matic llvm multiprocessing prefix python-any-r1 toolchain-funcs
+
+MY_PN="mozjs"
+MY_PV="${PV/_pre*}" # Handle Gentoo pre-releases
+
+MY_MAJOR=$(ver_cut 1)
+
+MOZ_ESR=yes
+
+MOZ_PV=${PV}
+MOZ_PV_SUFFIX=
+if [[ ${PV} =~ (_(alpha|beta|rc).*)$ ]] ; then
+ MOZ_PV_SUFFIX=${BASH_REMATCH[1]}
+
+ # Convert the ebuild version to the upstream Mozilla version
+ MOZ_PV="${MOZ_PV/_alpha/a}" # Handle alpha for SRC_URI
+ MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
+ MOZ_PV="${MOZ_PV%%_rc*}" # Handle rc for SRC_URI
+fi
+
+if [[ -n ${MOZ_ESR} ]] ; then
+ # ESR releases have slightly different version numbers
+ MOZ_PV="${MOZ_PV}esr"
+fi
+
+MOZ_PN="firefox"
+MOZ_P="${MOZ_PN}-${MOZ_PV}"
+MOZ_PV_DISTFILES="${MOZ_PV}${MOZ_PV_SUFFIX}"
+MOZ_P_DISTFILES="${MOZ_PN}-${MOZ_PV_DISTFILES}"
+
+MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/releases/${MOZ_PV}"
+
+if [[ ${PV} == *_rc* ]] ; then
+ MOZ_SRC_BASE_URI="https://archive.mozilla.org/pub/${MOZ_PN}/candidates/${MOZ_PV}-candidates/build${PV##*_rc}"
+fi
+
+PATCH_URIS=(
+ https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${FIREFOX_PATCHSET}
+ https://dev.gentoo.org/~{whissi,polynomial-c,axs}/mozilla/patchsets/${SPIDERMONKEY_PATCHSET}
+)
+
+SRC_URI="${MOZ_SRC_BASE_URI}/source/${MOZ_P}.source.tar.xz -> ${MOZ_P_DISTFILES}.source.tar.xz
+ ${PATCH_URIS[@]}"
+
+DESCRIPTION="SpiderMonkey is Mozilla's JavaScript engine written in C and C++"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey"
+
+KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~s390 ~x86"
+
+SLOT="78"
+LICENSE="MPL-2.0"
+IUSE="clang cpu_flags_arm_neon debug +jit lto test"
+
+RESTRICT="!test? ( test )"
+
+BDEPEND="${PYTHON_DEPS}
+ >=virtual/rust-1.41.0
+ virtual/pkgconfig
+ || (
+ (
+ sys-devel/llvm:12
+ clang? (
+ sys-devel/clang:12
+ lto? ( =sys-devel/lld-12* )
+ )
+ )
+ (
+ sys-devel/llvm:11
+ clang? (
+ sys-devel/clang:11
+ lto? ( =sys-devel/lld-11* )
+ )
+ )
+ (
+ sys-devel/llvm:10
+ clang? (
+ sys-devel/clang:10
+ lto? ( =sys-devel/lld-10* )
+ )
+ )
+ )
+ lto? (
+ !clang? ( sys-devel/binutils[gold] )
+ )"
+
+CDEPEND=">=dev-libs/icu-67.1:=
+ >=dev-libs/nspr-4.25
+ sys-libs/readline:0=
+ >=sys-libs/zlib-1.2.3"
+
+DEPEND="${CDEPEND}
+ test? (
+ $(python_gen_any_dep 'dev-python/six[${PYTHON_USEDEP}]')
+ )"
+
+RDEPEND="${CDEPEND}"
+
+S="${WORKDIR}/firefox-${MY_PV}/js/src"
+
+llvm_check_deps() {
+ if ! has_version -b "sys-devel/llvm:${LLVM_SLOT}" ; then
+ einfo "sys-devel/llvm:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use clang ; then
+ if ! has_version -b "sys-devel/clang:${LLVM_SLOT}" ; then
+ einfo "sys-devel/clang:${LLVM_SLOT} is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+
+ if use lto ; then
+ if ! has_version -b "=sys-devel/lld-${LLVM_SLOT}*" ; then
+ einfo "=sys-devel/lld-${LLVM_SLOT}* is missing! Cannot use LLVM slot ${LLVM_SLOT} ..." >&2
+ return 1
+ fi
+ fi
+ fi
+
+ einfo "Using LLVM slot ${LLVM_SLOT} to build" >&2
+}
+
+python_check_deps() {
+ if use test ; then
+ has_version "dev-python/six[${PYTHON_USEDEP}]"
+ fi
+}
+
+pkg_pretend() {
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7600M"
+ else
+ CHECKREQS_DISK_BUILD="6400M"
+ fi
+
+ check-reqs_pkg_pretend
+}
+
+pkg_setup() {
+ if [[ ${MERGE_TYPE} != binary ]] ; then
+ if use test ; then
+ CHECKREQS_DISK_BUILD="7600M"
+ else
+ CHECKREQS_DISK_BUILD="6400M"
+ fi
+
+ check-reqs_pkg_setup
+
+ llvm_pkg_setup
+
+ if use clang && use lto ; then
+ local version_lld=$(ld.lld --version 2>/dev/null | awk '{ print $2 }')
+ [[ -n ${version_lld} ]] && version_lld=$(ver_cut 1 "${version_lld}")
+ [[ -z ${version_lld} ]] && die "Failed to read ld.lld version!"
+
+ # temp fix for https://bugs.gentoo.org/768543
+ # we can assume that rust 1.{49,50}.0 always uses llvm 11
+ local version_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'release:' | awk '{ print $2 }')
+ [[ -n ${version_rust} ]] && version_rust=$(ver_cut 1-2 "${version_rust}")
+ [[ -z ${version_rust} ]] && die "Failed to read version from rustc!"
+
+ if ver_test "${version_rust}" -ge "1.49" && ver_test "${version_rust}" -le "1.50" ; then
+ local version_llvm_rust="11"
+ else
+ local version_llvm_rust=$(rustc -Vv 2>/dev/null | grep -F -- 'LLVM version:' | awk '{ print $3 }')
+ [[ -n ${version_llvm_rust} ]] && version_llvm_rust=$(ver_cut 1 "${version_llvm_rust}")
+ [[ -z ${version_llvm_rust} ]] && die "Failed to read used LLVM version from rustc!"
+ fi
+
+ if ver_test "${version_lld}" -ne "${version_llvm_rust}" ; then
+ eerror "Rust is using LLVM version ${version_llvm_rust} but ld.lld version belongs to LLVM version ${version_lld}."
+ eerror "You will be unable to link ${CATEGORY}/${PN}. To proceed you have the following options:"
+ eerror " - Manually switch rust version using 'eselect rust' to match used LLVM version"
+ eerror " - Switch to dev-lang/rust[system-llvm] which will guarantee matching version"
+ eerror " - Build ${CATEGORY}/${PN} without USE=lto"
+ die "LLVM version used by Rust (${version_llvm_rust}) does not match with ld.lld version (${version_lld})!"
+ fi
+ fi
+
+ python-any-r1_pkg_setup
+
+ # Build system is using /proc/self/oom_score_adj, bug #604394
+ addpredict /proc/self/oom_score_adj
+
+ if ! mountpoint -q /dev/shm ; then
+ # If /dev/shm is not available, configure is known to fail with
+ # a traceback report referencing /usr/lib/pythonN.N/multiprocessing/synchronize.py
+ ewarn "/dev/shm is not mounted -- expect build failures!"
+ fi
+
+ # Ensure we use C locale when building, bug #746215
+ export LC_ALL=C
+ fi
+}
+
+src_prepare() {
+ pushd ../.. &>/dev/null || die
+
+ use lto && rm -v "${WORKDIR}"/firefox-patches/*-LTO-Only-enable-LTO-*.patch
+
+ eapply "${WORKDIR}"/firefox-patches
+ eapply "${WORKDIR}"/spidermonkey-patches
+
+ default
+
+ # Make LTO respect MAKEOPTS
+ sed -i \
+ -e "s/multiprocessing.cpu_count()/$(makeopts_jobs)/" \
+ build/moz.configure/lto-pgo.configure \
+ || die "sed failed to set num_cores"
+
+ # sed-in toolchain prefix
+ sed -i \
+ -e "s/objdump/${CHOST}-objdump/" \
+ python/mozbuild/mozbuild/configure/check_debug_ranges.py \
+ || die "sed failed to set toolchain prefix"
+
+ # use prefix shell in wrapper linker scripts, bug #789660
+ hprefixify "${S}"/../../build/cargo-{,host-}linker
+
+ einfo "Removing pre-built binaries ..."
+ find third_party -type f \( -name '*.so' -o -name '*.o' \) -print -delete || die
+
+ MOZJS_BUILDDIR="${WORKDIR}/build"
+ mkdir "${MOZJS_BUILDDIR}" || die
+
+ popd &>/dev/null || die
+ eautoconf
+}
+
+src_configure() {
+ # Show flags set at the beginning
+ einfo "Current CFLAGS: ${CFLAGS}"
+ einfo "Current CXXFLAGS: ${CXXFLAGS}"
+ einfo "Current LDFLAGS: ${LDFLAGS}"
+ einfo "Current RUSTFLAGS: ${RUSTFLAGS}"
+
+ local have_switched_compiler=
+ if use clang && ! tc-is-clang ; then
+ # Force clang
+ einfo "Enforcing the use of clang due to USE=clang ..."
+ have_switched_compiler=yes
+ AR=llvm-ar
+ CC=${CHOST}-clang
+ CXX=${CHOST}-clang++
+ NM=llvm-nm
+ RANLIB=llvm-ranlib
+ elif ! use clang && ! tc-is-gcc ; then
+ # Force gcc
+ have_switched_compiler=yes
+ einfo "Enforcing the use of gcc due to USE=-clang ..."
+ AR=gcc-ar
+ CC=${CHOST}-gcc
+ CXX=${CHOST}-g++
+ NM=gcc-nm
+ RANLIB=gcc-ranlib
+ fi
+
+ if [[ -n "${have_switched_compiler}" ]] ; then
+ # Because we switched active compiler we have to ensure
+ # that no unsupported flags are set
+ strip-unsupported-flags
+ fi
+
+ # Ensure we use correct toolchain
+ export HOST_CC="$(tc-getBUILD_CC)"
+ export HOST_CXX="$(tc-getBUILD_CXX)"
+ tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
+
+ cd "${MOZJS_BUILDDIR}" || die
+
+ # ../python/mach/mach/mixin/process.py fails to detect SHELL
+ export SHELL="${EPREFIX}/bin/bash"
+
+ local -a myeconfargs=(
+ --host="${CBUILD:-${CHOST}}"
+ --target="${CHOST}"
+ --disable-jemalloc
+ --disable-optimize
+ --disable-strip
+ --enable-readline
+ --enable-shared-js
+ --with-intl-api
+ --with-system-icu
+ --with-system-nspr
+ --with-system-zlib
+ --with-toolchain-prefix="${CHOST}-"
+ $(use_enable debug)
+ $(use_enable jit)
+ $(use_enable test tests)
+ )
+
+ if ! use x86 && [[ ${CHOST} != armv*h* ]] ; then
+ myeconfargs+=( --enable-rust-simd )
+ fi
+
+ # Modifications to better support ARM, bug 717344
+ if use cpu_flags_arm_neon ; then
+ myeconfargs+=( --with-fpu=neon )
+
+ if ! tc-is-clang ; then
+ # thumb options aren't supported when using clang, bug 666966
+ myeconfargs+=( --with-thumb=yes )
+ myeconfargs+=( --with-thumb-interwork=no )
+ fi
+ fi
+
+ # Tell build system that we want to use LTO
+ if use lto ; then
+ myeconfargs+=( --enable-lto )
+
+ if use clang ; then
+ myeconfargs+=( --enable-linker=lld )
+ else
+ myeconfargs+=( --enable-linker=gold )
+ fi
+ fi
+
+ # LTO flag was handled via configure
+ filter-flags '-flto*'
+
+ if tc-is-gcc ; then
+ if ver_test $(gcc-fullversion) -ge 10 ; then
+ einfo "Forcing -fno-tree-loop-vectorize to workaround GCC bug, see bug 758446 ..."
+ append-cxxflags -fno-tree-loop-vectorize
+ fi
+ fi
+
+ # Show flags we will use
+ einfo "Build CFLAGS: ${CFLAGS}"
+ einfo "Build CXXFLAGS: ${CXXFLAGS}"
+ einfo "Build LDFLAGS: ${LDFLAGS}"
+ einfo "Build RUSTFLAGS: ${RUSTFLAGS}"
+
+ # Forcing system-icu allows us to skip patching bundled ICU for PPC
+ # and other minor arches
+ ECONF_SOURCE="${S}" \
+ econf \
+ ${myeconfargs[@]} \
+ XARGS="${EPREFIX}/usr/bin/xargs"
+}
+
+src_compile() {
+ cd "${MOZJS_BUILDDIR}" || die
+ default
+}
+
+src_test() {
+ if "${MOZJS_BUILDDIR}/js/src/js" -e 'print("Hello world!")'; then
+ einfo "Smoke-test successful, continuing with full test suite"
+ else
+ die "Smoke-test failed: did interpreter initialization fail?"
+ fi
+
+ local -a KNOWN_TESTFAILURES
+ KNOWN_TESTFAILURES+=( non262/Date/reset-time-zone-cache-same-offset.js )
+ KNOWN_TESTFAILURES+=( non262/Date/time-zone-path.js )
+ KNOWN_TESTFAILURES+=( non262/Date/time-zones-historic.js )
+ KNOWN_TESTFAILURES+=( non262/Date/time-zones-imported.js )
+ KNOWN_TESTFAILURES+=( non262/Date/toString-localized.js )
+ KNOWN_TESTFAILURES+=( non262/Date/toString-localized-posix.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/Date/toLocaleString_timeZone.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/Date/toLocaleDateString_timeZone.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/format.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/format_timeZone.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/timeZone_backward_links.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DateTimeFormat/tz-environment-variable.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DisplayNames/language.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/DisplayNames/region.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/Locale/likely-subtags.js )
+ KNOWN_TESTFAILURES+=( non262/Intl/Locale/likely-subtags-generated.js )
+ KNOWN_TESTFAILURES+=( test262/intl402/Locale/prototype/minimize/removing-likely-subtags-first-adds-likely-subtags.js )
+
+ if use x86 ; then
+ KNOWN_TESTFAILURES+=( non262/Date/timeclip.js )
+ KNOWN_TESTFAILURES+=( test262/built-ins/Number/prototype/toPrecision/return-values.js )
+ KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.1.js )
+ KNOWN_TESTFAILURES+=( test262/language/types/number/S8.5_A2.2.js )
+ fi
+
+ if [[ $(tc-endian) == "big" ]] ; then
+ KNOWN_TESTFAILURES+=( test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js )
+ fi
+
+ echo "" > "${T}"/known_failures.list || die
+
+ local KNOWN_TESTFAILURE
+ for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
+ echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
+ done
+
+ PYTHONPATH="${S}/tests/lib" \
+ ${PYTHON} \
+ "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
+ --exclude-file="${T}"/known_failures.list \
+ "${MOZJS_BUILDDIR}"/js/src/js \
+ || die
+
+ if use jit ; then
+ KNOWN_TESTFAILURES=()
+
+ echo "" > "${T}"/known_failures.list || die
+
+ for KNOWN_TESTFAILURE in ${KNOWN_TESTFAILURES[@]} ; do
+ echo "${KNOWN_TESTFAILURE}" >> "${T}"/known_failures.list
+ done
+
+ PYTHONPATH="${S}/tests/lib" \
+ ${PYTHON} \
+ "${S}"/tests/jstests.py -d -s -t 1800 --wpt=disabled --no-progress \
+ --exclude-file="${T}"/known_failures.list \
+ "${MOZJS_BUILDDIR}"/js/src/js basic \
+ || die
+ fi
+}
+
+src_install() {
+ cd "${MOZJS_BUILDDIR}" || die
+ default
+
+ # fix soname links
+ pushd "${ED}"/usr/$(get_libdir) &>/dev/null || die
+ mv lib${MY_PN}-${MY_MAJOR}.so lib${MY_PN}-${MY_MAJOR}.so.0.0.0 || die
+ ln -s lib${MY_PN}-${MY_MAJOR}.so.0.0.0 lib${MY_PN}-${MY_MAJOR}.so.0 || die
+ ln -s lib${MY_PN}-${MY_MAJOR}.so.0 lib${MY_PN}-${MY_MAJOR}.so || die
+ popd &>/dev/null || die
+
+ # remove unneeded files
+ rm \
+ "${ED}"/usr/bin/js${MY_MAJOR}-config \
+ "${ED}"/usr/$(get_libdir)/libjs_static.ajs \
+ || die
+
+ # fix permissions
+ chmod -x \
+ "${ED}"/usr/$(get_libdir)/pkgconfig/*.pc \
+ "${ED}"/usr/include/mozjs-${MY_MAJOR}/js-config.h \
+ || die
+}