File riscv.patch of Package rusty_v8
Index: rusty_v8-137.2.1/build/config/BUILDCONFIG.gn
===================================================================
--- rusty_v8-137.2.1.orig/build/config/BUILDCONFIG.gn
+++ rusty_v8-137.2.1/build/config/BUILDCONFIG.gn
@@ -139,8 +139,7 @@ declare_args() {
is_clang = current_os != "linux" ||
(current_cpu != "s390x" && current_cpu != "s390" &&
current_cpu != "ppc64" && current_cpu != "ppc" &&
- current_cpu != "mips" && current_cpu != "mips64" &&
- current_cpu != "riscv64")
+ current_cpu != "mips" && current_cpu != "mips64")
# Allows the path to a custom target toolchain to be injected as a single
# argument, and set as the default toolchain.
Index: rusty_v8-137.2.1/build/config/clang/BUILD.gn
===================================================================
--- rusty_v8-137.2.1.orig/build/config/clang/BUILD.gn
+++ rusty_v8-137.2.1/build/config/clang/BUILD.gn
@@ -210,6 +210,9 @@ template("clang_lib") {
} else if (current_cpu == "arm64") {
_dir = "aarch64-unknown-linux-gnu"
_suffix = "-aarch64"
+ } else if (current_cpu == "riscv64") {
+ _dir = "riscv64-unknown-linux-gnu"
+ _suffix = "-riscv64"
} else {
assert(false) # Unhandled cpu type
}
Index: rusty_v8-137.2.1/v8/third_party/highway/BUILD.gn
===================================================================
--- rusty_v8-137.2.1.orig/v8/third_party/highway/BUILD.gn
+++ rusty_v8-137.2.1/v8/third_party/highway/BUILD.gn
@@ -33,6 +33,9 @@ config("libhwy_external_config") {
# enable emulation until highway aix support is ready.
defines += [ "HWY_BROKEN_EMU128=0" ]
}
+ if (target_cpu == "riscv64") {
+ defines += [ "HWY_BROKEN_TARGETS=HWY_RVV" ]
+ }
}
source_set("libhwy") {