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

Standard library support for riscv64gc-unknown-linux-gnu #66899

Merged
merged 3 commits into from
Jan 6, 2020

Conversation

msizanoen1
Copy link
Contributor

Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.

r? @alexcrichton

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 30, 2019
@msizanoen1 msizanoen1 changed the title Standard library port for riscv64gc-unknown-linux-gnu Standard library support for riscv64gc-unknown-linux-gnu Nov 30, 2019
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-6.0 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2019-11-30T12:18:55.3728773Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-11-30T12:18:56.1855873Z ##[command]git config gc.auto 0
2019-11-30T12:18:56.1858187Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-11-30T12:18:56.1859719Z ##[command]git config --get-all http.proxy
2019-11-30T12:18:56.1863131Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/66899/merge:refs/remotes/pull/66899/merge
---
2019-11-30T12:22:01.7358905Z 
2019-11-30T12:22:01.7359137Z ######################################################################## 100.0%
2019-11-30T12:22:02.0774549Z extracting /checkout/obj/build/cache/2019-11-06/cargo-beta-x86_64-unknown-linux-gnu.tar.gz
2019-11-30T12:22:02.1467530Z     Updating crates.io index
2019-11-30T12:22:09.1715736Z error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
2019-11-30T12:22:09.1743593Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-30T12:22:09.1789754Z make: *** [prepare] Error 1
2019-11-30T12:22:09.1790539Z Makefile:67: recipe for target 'prepare' failed
2019-11-30T12:22:10.1809697Z Command failed. Attempt 2/5:
2019-11-30T12:22:10.1809697Z Command failed. Attempt 2/5:
2019-11-30T12:22:10.3665068Z error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
2019-11-30T12:22:10.3681239Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-30T12:22:10.3721755Z Makefile:67: recipe for target 'prepare' failed
2019-11-30T12:22:10.3721821Z make: *** [prepare] Error 1
2019-11-30T12:22:12.3736968Z Command failed. Attempt 3/5:
2019-11-30T12:22:12.3736968Z Command failed. Attempt 3/5:
2019-11-30T12:22:12.5543169Z error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
2019-11-30T12:22:12.5556228Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-30T12:22:12.5593612Z make: *** [prepare] Error 1
2019-11-30T12:22:12.5594238Z Makefile:67: recipe for target 'prepare' failed
2019-11-30T12:22:15.5616289Z Command failed. Attempt 4/5:
2019-11-30T12:22:15.5616289Z Command failed. Attempt 4/5:
2019-11-30T12:22:15.7440508Z error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
2019-11-30T12:22:15.7446619Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-30T12:22:15.7489682Z Makefile:67: recipe for target 'prepare' failed
2019-11-30T12:22:15.7490094Z make: *** [prepare] Error 1
2019-11-30T12:22:19.7504716Z Command failed. Attempt 5/5:
2019-11-30T12:22:19.7504716Z Command failed. Attempt 5/5:
2019-11-30T12:22:19.9394611Z error: the lock file /checkout/Cargo.lock needs to be updated but --locked was passed to prevent this
2019-11-30T12:22:19.9404811Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml --locked
2019-11-30T12:22:19.9450529Z Makefile:67: recipe for target 'prepare' failed
2019-11-30T12:22:19.9450897Z make: *** [prepare] Error 1
2019-11-30T12:22:19.9453152Z The command has failed after 5 attempts.
2019-11-30T12:22:19.9455524Z == clock drift check ==
2019-11-30T12:22:19.9455524Z == clock drift check ==
2019-11-30T12:22:19.9463662Z   local time: Sat Nov 30 12:22:19 UTC 2019
2019-11-30T12:22:20.0079656Z   network time: Sat, 30 Nov 2019 12:22:20 GMT
2019-11-30T12:22:20.0082403Z == end clock drift check ==
2019-11-30T12:22:32.2303698Z 
2019-11-30T12:22:32.2406350Z ##[error]Bash exited with code '1'.
2019-11-30T12:22:32.2432338Z ##[section]Starting: Checkout
2019-11-30T12:22:32.2434627Z ==============================================================================
2019-11-30T12:22:32.2434919Z Task         : Get sources
2019-11-30T12:22:32.2434964Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Nov 30, 2019

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

@msizanoen1

This comment has been minimized.

@msizanoen1

This comment has been minimized.

@rustbot rustbot added O-riscv Target: RISC-V architecture and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 1, 2019
@msizanoen1

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 1, 2019
@msizanoen1

This comment has been minimized.

@rustbot rustbot added T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. and removed T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Dec 1, 2019
@msizanoen1

This comment has been minimized.

@rustbot rustbot added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Dec 1, 2019
@msizanoen1

This comment has been minimized.

@rustbot rustbot added the O-linux Operating system: Linux label Dec 1, 2019
@alexcrichton
Copy link
Member

@bors: r+ rollup

👍

@bors
Copy link
Contributor

bors commented Dec 2, 2019

📌 Commit 930a0a2 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 2, 2019
Centril added a commit to Centril/rust that referenced this pull request Dec 3, 2019
Standard library support for riscv64gc-unknown-linux-gnu

Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.

r? @alexcrichton
@msizanoen1
Copy link
Contributor Author

After this would be builds on CI: master...msizanoen1:riscv-ci
It is put on a separate builder so we can easily add it as a rustc host later.

@msizanoen1 msizanoen1 force-pushed the riscv-std branch 3 times, most recently from 3b1058c to 62834f8 Compare December 19, 2019 03:52
@msizanoen1
Copy link
Contributor Author

This is the result of running the x86_64-gnu container on this PR: https://dev.azure.com/rust-lang/rust/_build/results?buildId=16159&view=results (I copy pasted the x86_64-gnu Dockerfile into x86_64-gnu-llvm-7 and removed the commit after it finishes running).
The test succeed with 0 cache misses.
It's probably not cache problem.

@msizanoen1
Copy link
Contributor Author

Centril's comment says that this PR causes multiple rollups to fail and it is the same test failure (pgo-branch-weights). However it seems that there should not be any reason for the test to fail.

@msizanoen1
Copy link
Contributor Author

Updating libc is already done in #67594 so this is only porting and updating LLVM to include rust-lang/llvm-project#29 and possibly also rust-lang/cc-rs#461 (comment)

@msizanoen1
Copy link
Contributor Author

@alexcrichton Can you retry merging?

@msizanoen1
Copy link
Contributor Author

r? @Zoxc due to inactivity

@rust-highfive rust-highfive assigned Zoxc and unassigned alexcrichton Jan 1, 2020
@mati865
Copy link
Contributor

mati865 commented Jan 3, 2020

Previous CI error was spurious: #67746

@msizanoen1
Copy link
Contributor Author

@alexcrichton Can you try merging it?

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jan 6, 2020

📌 Commit d61e193 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 6, 2020
@bors
Copy link
Contributor

bors commented Jan 6, 2020

⌛ Testing commit d61e193 with merge ef92009...

bors added a commit that referenced this pull request Jan 6, 2020
Standard library support for riscv64gc-unknown-linux-gnu

Add std support for RISC-V 64-bit GNU/Linux and update libc for RISC-V support.

r? @alexcrichton
@bors
Copy link
Contributor

bors commented Jan 6, 2020

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing ef92009 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 6, 2020
@bors bors merged commit d61e193 into rust-lang:master Jan 6, 2020
@msizanoen1 msizanoen1 deleted the riscv-std branch January 8, 2020 13:15
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Mar 13, 2020
Version 1.42.0 (2020-03-12)
==========================

Language
--------
- [You can now use the slice pattern syntax with subslices.][67712] e.g.
  ```rust
  fn foo(words: &[&str]) {
      match words {
          ["Hello", "World", "!", ..] => println!("Hello World!"),
          ["Foo", "Bar", ..] => println!("Baz"),
          rest => println!("{:?}", rest),
      }
  }
  ```
- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
  that you can create an enum that has the exact layout and ABI of the type
  it contains.
- [There are some *syntax-only* changes:][67131]
   - `default` is syntactically allowed before items in `trait` definitions.
   - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
     leave out their bodies in favor of `;`.
   - Bounds on associated types in `impl`s are now syntactically allowed
     (e.g. `type Foo: Ord;`).
   - `...` (the C-variadic type) may occur syntactically directly as the type of
      any function parameter.

  These are still rejected *semantically*, so you will likely receive an error
  but these changes can be seen and parsed by procedural macros and
  conditional compilation.

Compiler
--------
- [Added tier 2* support for `armv7a-none-eabi`.][68253]
- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
- [`Option::{expect,unwrap}` and
   `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
   pointing to the location where they were called, rather than
   `core`'s internals. ][67887]

* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
---------
- [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
   to implement `Sized`.][67935]
- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
- [`Layout::new` is now `const`.][66254]
- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]


Stabilized APIs
---------------
- [`CondVar::wait_while`]
- [`CondVar::wait_timeout_while`]
- [`DebugMap::key`]
- [`DebugMap::value`]
- [`ManuallyDrop::take`]
- [`matches!`]
- [`ptr::slice_from_raw_parts_mut`]
- [`ptr::slice_from_raw_parts`]

Cargo
-----
- [You no longer need to include `extern crate proc_macro;` to be able to
  `use proc_macro;` in the `2018` edition.][cargo/7700]

Compatibility Notes
-------------------
- [`Error::description` has been deprecated, and its use will now produce a
  warning.][66919] It's recommended to use `Display`/`to_string` instead.
- [`use $crate;` inside macros is now a hard error.][37390] The compiler
  emitted forward compatibility warnings since Rust 1.14.0.
- [As previously announced, this release reduces the level of support for
  32-bit Apple targets to tier 3.][apple-32bit-drop]. This means that the
  source code is still available to build, but the targets are no longer tested
  and no release binary is distributed by the Rust project. Please refer to the
  linked blog post for more information.

[37390]: rust-lang/rust#37390
[68253]: rust-lang/rust#68253
[68348]: rust-lang/rust#68348
[67935]: rust-lang/rust#67935
[68339]: rust-lang/rust#68339
[68122]: rust-lang/rust#68122
[67712]: rust-lang/rust#67712
[67887]: rust-lang/rust#67887
[67131]: rust-lang/rust#67131
[67233]: rust-lang/rust#67233
[66899]: rust-lang/rust#66899
[66919]: rust-lang/rust#66919
[66254]: rust-lang/rust#66254
[cargo/7700]: rust-lang/cargo#7700
[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-linux Operating system: Linux O-riscv Target: RISC-V architecture S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants