aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure1
-rw-r--r--driver.c3
-rw-r--r--targ.c4
3 files changed, 8 insertions, 0 deletions
diff --git a/configure b/configure
index 1fef818..cea7aca 100755
--- a/configure
+++ b/configure
@@ -55,6 +55,7 @@ case "$target" in
test "${DEFAULT_DYNAMIC_LINKER+set}" || case "$target" in
x86_64*) DEFAULT_DYNAMIC_LINKER=/lib/ld-musl-x86_64.so.1 ;;
aarch64*) DEFAULT_DYNAMIC_LINKER=/lib/ld-musl-aarch64.so.1 ;;
+ riscv64*) DEFAULT_DYNAMIC_LINKER=/lib/ld-musl-riscv64.so.1 ;;
*) fail "unsuported target '$target'"
esac
startfiles='"-l", ":crt1.o", "-l", ":crti.o"'
diff --git a/driver.c b/driver.c
index ea422a1..2fc7e4f 100644
--- a/driver.c
+++ b/driver.c
@@ -390,6 +390,9 @@ main(int argc, char *argv[])
} else if (hasprefix(target, "aarch64-")) {
arch = "aarch64";
qbearch = "arm64";
+ } else if (hasprefix(target, "riscv64-")) {
+ arch = "riscv64";
+ qbearch = "rv64";
} else {
fatal("unsupported target '%s'", target);
}
diff --git a/targ.c b/targ.c
index 5a2f806..d079218 100644
--- a/targ.c
+++ b/targ.c
@@ -14,6 +14,10 @@ static struct target alltargs[] = {
.name = "aarch64",
.typewchar = &typeuint,
},
+ {
+ .name = "riscv64",
+ .typewchar = &typeint,
+ },
};
void