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

Add riscv64gc-unknown-linux-gnu image #1684

Merged
merged 4 commits into from
May 3, 2020
Merged

Conversation

JohnTitor
Copy link
Member

r? @ghost

@JohnTitor
Copy link
Member Author

Seems ctest needs to add that target:

--- stderr
thread 'main' panicked at 'unknown arch/pointer width: riscv64gc-unknown-linux-gnu', /cargo/registry/src/github.com-1ecc6299db9ec823/ctest-0.2.22/src/lib.rs:1080:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Hey @gnzlbg, would you mind inviting me to ctest repo as a collaborator? Or if you have time to review, I'm happy to submit a PR!

@bors
Copy link
Contributor

bors commented Mar 15, 2020

☔ The latest upstream changes (presumably #1695) made this pull request unmergeable. Please resolve the merge conflicts.

@JohnTitor
Copy link
Member Author

JohnTitor commented Apr 30, 2020

Okay, CI is now green.
cc @msizanoen1 and @andreas-schwab, could you take a look if you have time? Looks like you're familiar with RISC-V than me :)

@@ -2657,7 +2658,7 @@ fn test_linux(target: &str) {
(struct_ == "timex" && field.starts_with("__unused")) ||
// FIXME: It now takes mode_t since glibc 2.31 on some targets.
(struct_ == "ipc_perm" && field == "mode"
&& ((x86_64 || i686 || arm) && gnu || x86_64_gnux32)
&& ((x86_64 || i686 || arm || riscv64) && gnu || x86_64_gnux32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ipc_perm now uses mode_t everywhere.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping this because it was introduced in the newest version of glibc and I'd like to wait for a while. On riscv, isn't it newer change?

@andreas-schwab
Copy link
Contributor

I have been building rust for riscv64 sucessfully for some time now, see https://build.opensuse.org/package/show/openSUSE:Factory:RISCV/rust and https://build.opensuse.org/package/show/home:Andreas_Schwab:riscv:rust/rust.

ENV CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_LINKER=riscv64-linux-gnu-gcc \
CARGO_TARGET_RISCV64GC_UNKNOWN_LINUX_GNU_RUNNER="qemu-riscv64 -L /usr/riscv64-linux-gnu" \
CC_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-gcc \
CFLAGS_riscv64gc_unknown_linux_gnu="-mabi=lp64d -fPIC" \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is only needed because rust is still using llvm9, with llvm10 the riscv64gc-unknown-linux-gnu target should use the proper defaults now.

@JohnTitor
Copy link
Member Author

This PR makes some fields private that shouldn't be public so I believe the build shouldn't be broken unless someone depends on that accidentally.

@JohnTitor
Copy link
Member Author

So, I'd like to merge this since it seems not to affect current behavior. Thanks all for reviewing!

@JohnTitor JohnTitor merged commit 2020fdd into rust-lang:master May 3, 2020
@JohnTitor JohnTitor deleted the riscv64 branch May 3, 2020 05:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants