Skip to content

Commit

Permalink
feat: add riscv64 support (#1772)
Browse files Browse the repository at this point in the history
* feat: add riscv64 support

Signed-off-by: Stewart X Addison <sxa@redhat.com>

* bug fix

Signed-off-by: Stewart X Addison <sxa@redhat.com>

* Bug fix 2

Signed-off-by: Stewart X Addison <sxa@redhat.com>

---------

Signed-off-by: Stewart X Addison <sxa@redhat.com>
  • Loading branch information
sxa authored Mar 31, 2024
1 parent eceb5c1 commit cc1b285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/main/java/dev/jbang/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ public enum OS {
}

public enum Arch {
x32, x64, aarch64, arm64, ppc64, ppc64le, s390x, unknown
x32, x64, aarch64, arm64, ppc64, ppc64le, s390x, riscv64, unknown
}

public enum Shell {
Expand Down Expand Up @@ -560,6 +560,8 @@ public static Arch getArch() {
return Arch.s390x;
} else if (arch.matches("^(arm64)$")) {
return Arch.arm64;
} else if (arch.matches("^(riscv64)$")) {
return Arch.riscv64;
} else {
verboseMsg("Unknown Arch: " + arch);
return Arch.unknown;
Expand Down
4 changes: 3 additions & 1 deletion src/main/scripts/jbang
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,9 @@ case "$(uname -m)" in
s390x)
arch=s390x;;
arm64)
arch=arm64
arch=arm64;;
riscv64)
arch=riscv64
;;
*)
## AIX gives a machine ID for `uname -m` but it only supports ppc64
Expand Down

0 comments on commit cc1b285

Please sign in to comment.