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

Merged
merged 44 commits into from
Dec 23, 2024
Merged

Conversation

eschnett
Copy link
Contributor

@eschnett eschnett commented Apr 9, 2024

No description provided.

src/Runner.jl Outdated Show resolved Hide resolved
Project.toml Outdated Show resolved Hide resolved
src/Rootfs.jl Outdated Show resolved Hide resolved
src/Runner.jl Outdated Show resolved Hide resolved
src/Runner.jl Outdated Show resolved Hide resolved
src/Runner.jl Outdated Show resolved Hide resolved
src/Rootfs.jl Show resolved Hide resolved
src/Rootfs.jl Outdated Show resolved Hide resolved
src/Rootfs.jl Show resolved Hide resolved
@eschnett
Copy link
Contributor Author

Question: Is this

    # We have experimental support for some platforms, allow easily including them
    if experimental
        append!(standard_platforms, [
            Platform("riscv64", "linux"),
            Platform("riscv64", "linux"; libc="musl"),
        ])
    end

reasonable? That is, do we tag this platform as "experimental", and do we include a musl build?

For context: Musl is much easier to install than Glibc, and "historically" speaking, musl was working for me before glibc did. We should acknowledge this.

@giordano
Copy link
Member

I don't think we're going to use "experimental" anymore, in hindsight it was a bit cumbersome.

About musl, we could perhaps have it, but in practice Julia has lots of troubles running on musl (we can't even compile it for i686, and other architectures like x86_64 crash continuously) that I'm not so sure it's worth the effort adding it.

src/Platforms.jl Outdated Show resolved Hide resolved
@giordano
Copy link
Member

I can confirm simple executables built on this PR with

$ julia +1.7 -e 'using BinaryBuilderBase; BinaryBuilderBase.runshell(Platform("riscv64", "linux"))'
sandbox:${WORKSPACE} # echo -e '#include <stdio.h>\nint main(void) { printf("Hello world!\\n"); return 0; }' | gcc -x c - -o hello-gcc
sandbox:${WORKSPACE} # echo -e '#include <stdio.h>\nint main(void) { printf("Hello world!\\n"); return 0; }' | clang -x c - -o hello-clang

both work successfully on RISC-V:

$ ./hello-clang 
Hello world!
$ ./hello-gcc
Hello world!

🥳

src/Rootfs.jl Outdated Show resolved Hide resolved
@giordano
Copy link
Member

I think this is basically good to go from my point of view as soon as JuliaPackaging/BinaryBuilder.jl#1355 (comment) is worked out (I don't have strong opinions about that).

@eschnett
Copy link
Contributor Author

We haven't found any evidence for page sizes other than 4 kB, so let's go with the current state.

@giordano giordano merged commit a548ba2 into JuliaPackaging:master Dec 23, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants