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

WIP: Rust 1.61 #15

Closed
wants to merge 2 commits into from
Closed

WIP: Rust 1.61 #15

wants to merge 2 commits into from

Conversation

rubdos
Copy link
Contributor

@rubdos rubdos commented Jun 23, 2022

TODO list:

  • Rebase patches for Rust 1.61
  • Get LLVM 12+

@Thaodan
Copy link

Thaodan commented Jun 23, 2022

Are there any new requirements regarding LLVM 12 plus? I think it would make sense to also update LLVM at the same time.

@rubdos
Copy link
Contributor Author

rubdos commented Jun 23, 2022

Are there any new requirements regarding LLVM 12 plus? I think it would make sense to also update LLVM at the same time.

I'm not sure, I have not looked at it. I rebased the patches and waited for errors to pop up. Rust claims it needs LLVM 12, so that's next to try!

@rubdos
Copy link
Contributor Author

rubdos commented Jun 24, 2022

Another observation. I tried LLVM 14.0.5 and 12.0.1, and both require CMake 3.13.4 or later.

Seems like https://github.com/sailfishos/cmake has the right version, so I'll retry with a more up-to-date sdk.

@rubdos rubdos mentioned this pull request Jun 24, 2022
3 tasks
@rubdos
Copy link
Contributor Author

rubdos commented Jun 25, 2022

FWIW, using sailfishos/llvm#1 I have a working Rust compile that can compile Whisperfish. I'll start dog feeding this compiler while I finish sailfishos/llvm#1: clang still needs some massaging.

@rubdos
Copy link
Contributor Author

rubdos commented Jun 25, 2022

The Aarch compiler seems a bit broken on certain crates. Excerpt:

  = note: /srv/mer/toolings/SailfishOS-4.4.0.58/opt/cross/bin/aarch64-meego-linux-gnu-ld: /usr/lib/rustlib/aarch64-unknown-linux-gnu/lib/libstd-9f7aba56fd08eb25.rlib(std-9f7aba56fd08eb25.std.923c915b-cgu.0.rcgu.o): in function `core::sync::atomic::atomic_sub':
          /home/rsmet/rpmbuild/BUILD/rustc-1.61.0-src/library/core/src/sync/atomic.rs:2618: undefined reference to `__aarch64_ldadd8_rel'
          /srv/mer/toolings/SailfishOS-4.4.0.58/opt/cross/bin/aarch64-meego-linux-gnu-ld: /home/rsmet/rpmbuild/BUILD/rustc-1.61.0-src/library/core/src/sync/atomic.rs:2618: undefined reference to `__aarch64_ldadd8_rel'
          /srv/mer/toolings/SailfishOS-4.4.0.58/opt/cross/bin/aarch64-meego-linux-gnu-ld: /home/rsmet/rpmbuild/BUILD/rustc-1.61.0-src/library/core/src/sync/atomic.rs:2618: undefined reference to `__aarch64_ldadd8_rel'
          /srv/mer/toolings/SailfishOS-4.4.0.58/opt/cross/bin/aarch64-meego-linux-gnu-ld: /home/rsmet/rpmbuild/BUILD/rustc-1.61.0-src/library/core/src/sync/atomic.rs:2618: undefined reference to `__aarch64_ldadd8_rel'

I might need to patch rustc in here to just turn the outline-atomics off, because disabling it with RUSTFLAGS as per the internet seems not to work.

This should be fixed whenever Sailfish OS gets gcc 9.3.1 or higher.

@mlehtima
Copy link
Contributor

I managed to get rust aarch64 compiler to work so I will be probably making a new PR later where I will try to update to even newer rust.

@mlehtima
Copy link
Contributor

mlehtima commented Feb 6, 2023

Changes merged in #18. Closing this PR.

@mlehtima mlehtima closed this Feb 6, 2023
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.

3 participants