Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support riscv64 platform #375

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading