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 base definitions for riscv64 + musl #2537

Merged
merged 5 commits into from Nov 17, 2021
Merged

Conversation

kanavin
Copy link

@kanavin kanavin commented Nov 15, 2021

This is picking up the stale MR that was closed for inactivity:
#1994

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.

Please see the contribution instructions for more information.

@Amanieu
Copy link
Member

Amanieu commented Nov 15, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 15, 2021

📌 Commit ec848bc has been approved by Amanieu

bors added a commit that referenced this pull request Nov 16, 2021
Add base definitions for riscv64 + musl

This is picking up the stale MR that was closed for inactivity:
#1994
@bors
Copy link
Contributor

bors commented Nov 16, 2021

⌛ Testing commit ec848bc with merge c001075...

@bors
Copy link
Contributor

bors commented Nov 16, 2021

💔 Test failed - checks-actions

@kanavin
Copy link
Author

kanavin commented Nov 16, 2021

broken_heart Test failed - checks-actions

Seems like the failure is not related to the MR?
https://github.com/rust-lang/libc/runs/4219812265?check_suite_focus=true

@JohnTitor
Copy link
Member

It's allow-to-fail, the actual failure is https://github.com/rust-lang/libc/runs/4220070674?check_suite_focus=true

@kanavin
Copy link
Author

kanavin commented Nov 16, 2021

It's allow-to-fail, the actual failure is https://github.com/rust-lang/libc/runs/4220070674?check_suite_focus=true

error[E0463]: can't find crate for `core`
  |
  = note: the `riscv64gc-unknown-linux-musl` target may not be installed
  = help: consider downloading the target with `rustup target add riscv64gc-unknown-linux-musl`
  = help: consider building the standard library from source with `cargo build -Zbuild-std`

I believe that is now a valid rust target, so not sure how to address the failure?

@Amanieu
Copy link
Member

Amanieu commented Nov 16, 2021

There is no pre-build std in rustup for this target. You need to add it to RUST_LINUX_NO_CORE_TARGETS instead.

@kanavin
Copy link
Author

kanavin commented Nov 16, 2021

There is no pre-build std in rustup for this target. You need to add it to RUST_LINUX_NO_CORE_TARGETS instead.

Done.

@Amanieu
Copy link
Member

Amanieu commented Nov 16, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 16, 2021

📌 Commit 8d68878 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 16, 2021

⌛ Testing commit 8d68878 with merge 968d0e7...

bors added a commit that referenced this pull request Nov 16, 2021
Add base definitions for riscv64 + musl

This is picking up the stale MR that was closed for inactivity:
#1994
@bors
Copy link
Contributor

bors commented Nov 16, 2021

💔 Test failed - checks-actions

@kanavin
Copy link
Author

kanavin commented Nov 16, 2021

I guess all of the following definitions should be dropped?

error: type alias is never used: `c_long`
  --> src/unix/linux_like/linux/musl/b64/riscv64/mod.rs:4:1
   |
4  | pub type c_long = i64;
   | ^^^^^^^^^^^^^^^^^^^^^^
   |
note: the lint level is defined here
  --> src/lib.rs:18:38
   |
18 | #![cfg_attr(libc_deny_warnings, deny(warnings))]
   |                                      ^^^^^^^^
   = note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`

error: type alias is never used: `c_ulong`
 --> src/unix/linux_like/linux/musl/b64/riscv64/mod.rs:5:1
  |
5 | pub type c_ulong = u64;
  | ^^^^^^^^^^^^^^^^^^^^^^^

error: type alias is never used: `suseconds_t`
  --> src/unix/linux_like/linux/musl/b64/riscv64/mod.rs:12:1
   |
12 | pub type suseconds_t = i64;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SOL_SOCKET`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:18:1
   |
18 | pub const SOL_SOCKET: ::c_int = 1;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_REUSEADDR`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:22:1
   |
22 | pub const SO_REUSEADDR: ::c_int = 2;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_TYPE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:23:1
   |
23 | pub const SO_TYPE: ::c_int = 3;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_ERROR`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:24:1
   |
24 | pub const SO_ERROR: ::c_int = 4;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_DONTROUTE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:25:1
   |
25 | pub const SO_DONTROUTE: ::c_int = 5;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_BROADCAST`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:26:1
   |
26 | pub const SO_BROADCAST: ::c_int = 6;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_SNDBUF`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:27:1
   |
27 | pub const SO_SNDBUF: ::c_int = 7;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_RCVBUF`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:28:1
   |
28 | pub const SO_RCVBUF: ::c_int = 8;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_KEEPALIVE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:29:1
   |
29 | pub const SO_KEEPALIVE: ::c_int = 9;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_OOBINLINE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:30:1
   |
30 | pub const SO_OOBINLINE: ::c_int = 10;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_NO_CHECK`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:31:1
   |
31 | pub const SO_NO_CHECK: ::c_int = 11;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_PRIORITY`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:32:1
   |
32 | pub const SO_PRIORITY: ::c_int = 12;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_LINGER`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:33:1
   |
33 | pub const SO_LINGER: ::c_int = 13;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_BSDCOMPAT`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:34:1
   |
34 | pub const SO_BSDCOMPAT: ::c_int = 14;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_REUSEPORT`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:35:1
   |
35 | pub const SO_REUSEPORT: ::c_int = 15;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_PASSCRED`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:36:1
   |
36 | pub const SO_PASSCRED: ::c_int = 16;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_PEERCRED`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:37:1
   |
37 | pub const SO_PEERCRED: ::c_int = 17;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_RCVLOWAT`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:38:1
   |
38 | pub const SO_RCVLOWAT: ::c_int = 18;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_SNDLOWAT`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:39:1
   |
39 | pub const SO_SNDLOWAT: ::c_int = 19;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_RCVTIMEO`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:40:1
   |
40 | pub const SO_RCVTIMEO: ::c_int = 20;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_SNDTIMEO`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:41:1
   |
41 | pub const SO_SNDTIMEO: ::c_int = 21;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_ACCEPTCONN`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:54:1
   |
54 | pub const SO_ACCEPTCONN: ::c_int = 30;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_SNDBUFFORCE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:56:1
   |
56 | pub const SO_SNDBUFFORCE: ::c_int = 32;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_RCVBUFFORCE`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:57:1
   |
57 | pub const SO_RCVBUFFORCE: ::c_int = 33;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_PROTOCOL`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:64:1
   |
64 | pub const SO_PROTOCOL: ::c_int = 38;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `SO_DOMAIN`
  --> src/unix/linux_like/linux/arch/generic/mod.rs:65:1
   |
65 | pub const SO_DOMAIN: ::c_int = 39;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCMGET`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:115:1
    |
115 | pub const TIOCMGET: ::c_ulong = 0x5415;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCMBIS`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:116:1
    |
116 | pub const TIOCMBIS: ::c_ulong = 0x5416;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCMBIC`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:117:1
    |
117 | pub const TIOCMBIC: ::c_ulong = 0x5417;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCMSET`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:118:1
    |
118 | pub const TIOCMSET: ::c_ulong = 0x5418;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_LE`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:124:1
    |
124 | pub const TIOCM_LE: ::c_int = 0x001;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_DTR`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:125:1
    |
125 | pub const TIOCM_DTR: ::c_int = 0x002;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_RTS`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:126:1
    |
126 | pub const TIOCM_RTS: ::c_int = 0x004;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_ST`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:127:1
    |
127 | pub const TIOCM_ST: ::c_int = 0x008;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_SR`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:128:1
    |
128 | pub const TIOCM_SR: ::c_int = 0x010;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_CTS`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:129:1
    |
129 | pub const TIOCM_CTS: ::c_int = 0x020;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_CAR`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:130:1
    |
130 | pub const TIOCM_CAR: ::c_int = 0x040;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_CD`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:131:1
    |
131 | pub const TIOCM_CD: ::c_int = TIOCM_CAR;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_RNG`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:132:1
    |
132 | pub const TIOCM_RNG: ::c_int = 0x080;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_RI`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:133:1
    |
133 | pub const TIOCM_RI: ::c_int = TIOCM_RNG;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: constant is never used: `TIOCM_DSR`
   --> src/unix/linux_like/linux/arch/generic/mod.rs:134:1
    |
134 | pub const TIOCM_DSR: ::c_int = 0x100;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

@Amanieu
Copy link
Member

Amanieu commented Nov 16, 2021

I'm... not exactly sure why this is failing on macos...

@kanavin
Copy link
Author

kanavin commented Nov 17, 2021

I'm... not exactly sure why this is failing on macos...

Yes, seems completely unrelated. I'll trigger a CI once more.

@kanavin
Copy link
Author

kanavin commented Nov 17, 2021

Maybe the failure was because the commits weren't rebased on latest master.

@Amanieu
Copy link
Member

Amanieu commented Nov 17, 2021

@bors r+

@bors
Copy link
Contributor

bors commented Nov 17, 2021

📌 Commit f699c8f has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Nov 17, 2021

⌛ Testing commit f699c8f with merge 83ffbee...

@bors
Copy link
Contributor

bors commented Nov 17, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing 83ffbee to master...

@bors bors merged commit 83ffbee into rust-lang:master Nov 17, 2021
@crazy-max crazy-max mentioned this pull request Sep 21, 2022
3 tasks
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.

None yet

6 participants