Skip to content

Commit

Permalink
Support riscv64 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Apr 9, 2024
1 parent b1d6c16 commit 923b802
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Rootfs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -735,6 +735,7 @@ function supported_platforms(;exclude::Union{Vector{<:Platform},Function}=Return
# We have experimental support for some platforms, allow easily including them
if experimental
append!(standard_platforms, [
Platform("riscv64", "linux"),
])
end
return exclude_platforms!(standard_platforms,exclude)
Expand Down
6 changes: 4 additions & 2 deletions src/Runner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const default_host_platform = Platform("x86_64", "linux"; libc="musl", cxxstring
function nbits(p::AbstractPlatform)
if arch(p) in ("i686", "armv6l", "armv7l")
return 32
elseif arch(p) in ("x86_64", "aarch64", "powerpc64le")
elseif arch(p) in ("x86_64", "aarch64", "powerpc64le", "riscv64")
return 64
else
error("Unknown bitwidth for architecture $(arch(p))")
Expand All @@ -32,6 +32,8 @@ function proc_family(p::AbstractPlatform)
return "arm"
elseif arch(p) == "powerpc64le"
return "power"
elseif arch(p) == "riscv64"
return "riscv"
else
error("Unknown processor family for architecture $(arch(p))")
end
Expand Down Expand Up @@ -1288,7 +1290,7 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
mapping["GNU_LIBC_VERSION"] = "glibc 2.12.2"
elseif arch(platform) in ("armv7l", "aarch64")
mapping["GNU_LIBC_VERSION"] = "glibc 2.19"
elseif arch(platform) === "powerpc64le"
elseif arch(platform) in ("powerpc64le", "riscv64")
mapping["GNU_LIBC_VERSION"] = "glibc 2.17"
end
end
Expand Down

0 comments on commit 923b802

Please sign in to comment.