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

Promote powerpc64le-unknown-linux-musl to tier 2 with host tools #133801

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Gelbpunkt
Copy link
Contributor

@Gelbpunkt Gelbpunkt commented Dec 3, 2024

MCP: rust-lang/compiler-team#803

I'm using crosstool-ng for building a toolchain because GCC 9 from musl-toolchain.sh has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target.

The resulting compiler works fine, built with DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux and tested on Alpine Linux in a VM and on a bare metal POWER8 machine:

qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-powerpc64le-unknown-linux-musl'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component 'miri-preview'
install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl'
install: installing component 'llvm-bitcode-linker-preview'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    rust installed.

qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs
qemu-ppc64le:~$ rustc test.rs
qemu-ppc64le:~$ ./test
hello world
qemu-ppc64le:~$ file test
test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped

try-job: dist-powerpc64le-linux

@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

r? @ehuss

rustbot has assigned @ehuss.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Dec 3, 2024
@rust-log-analyzer

This comment has been minimized.

@Gelbpunkt Gelbpunkt force-pushed the powerpc64le-unknown-linux-musl-tier-2 branch from b593b82 to a395c38 Compare December 3, 2024 16:05
@rustbot
Copy link
Collaborator

rustbot commented Dec 3, 2024

These commits modify compiler targets.
(See the Target Tier Policy.)

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

Some changes occurred in src/doc/rustc/src/platform-support

cc @Noratrieb

@ehuss
Copy link
Contributor

ehuss commented Dec 3, 2024

r? compiler

@rustbot rustbot assigned petrochenkov and unassigned ehuss Dec 3, 2024
Signed-off-by: Jens Reidel <[email protected]>
@Urgau
Copy link
Member

Urgau commented Dec 3, 2024

The compiler changes looks go to me, r=me on them.
T-bootstrap for the final review.

r? bootstrap
@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 3, 2024
…musl-tier-2, r=<try>

Promote powerpc64le-unknown-linux-musl to tier 2 with host tools

MCP: rust-lang/compiler-team#803

I'm using crosstool-ng for building a toolchain because GCC 9 from `musl-toolchain.sh` has float ABI issues (?) and can't compile LLVM, and writing a crosstool-ng config for a target feels less hacky than yet another target specific shell script. I also defined a kernel version, since there wasn't one specified before. If a lower version is desired, just let me know. I also tried to match the rust configure args with the loongarch64 musl tier 2 target.

The resulting compiler works fine, built with `DEPLOY=1 ./src/ci/docker/run.sh dist-powerpc64le-linux` and tested on Alpine Linux in a VM and on a bare metal POWER8 machine:
```
qemu-ppc64le:/tmp/rust-nightly-powerpc64le-unknown-linux-musl$ ash install.sh
install: creating uninstall script at /usr/local/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-powerpc64le-unknown-linux-musl'
install: installing component 'cargo'
install: installing component 'rustfmt-preview'
install: installing component 'rls-preview'
install: installing component 'rust-analyzer-preview'
install: installing component 'llvm-tools-preview'
install: installing component 'clippy-preview'
install: installing component 'miri-preview'
install: installing component 'rust-analysis-powerpc64le-unknown-linux-musl'
install: installing component 'llvm-bitcode-linker-preview'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    rust installed.

qemu-ppc64le:~$ echo 'fn main() { println!("hello world"); }' > test.rs
qemu-ppc64le:~$ rustc test.rs
qemu-ppc64le:~$ ./test
hello world
qemu-ppc64le:~$ file test
test: ELF 64-bit LSB executable, 64-bit PowerPC or cisco 7500, OpenPOWER ELF V2 ABI, version 1 (SYSV), statically linked, BuildID[sha1]=596ee6abf9add487ebc54fb71c2076fb6faea013, with debug_info, not stripped
```

try-job: dist-powerpc64le-linux
@bors
Copy link
Contributor

bors commented Dec 3, 2024

⌛ Trying commit 2b637c6 with merge 31943aba40270b7a5e376d970fef6b8f99c931c7...

@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

r? jieyouxu

@rustbot rustbot assigned jieyouxu and unassigned albertlarsan68 Dec 3, 2024
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks. The bootstrap bits look fine to me (r=me for bootstrap bits and a second on the compiler changes), I'll hand this off to T-infra to look at the CI changes.

@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

r? infra

@rustbot rustbot assigned Mark-Simulacrum and unassigned jieyouxu Dec 3, 2024
@rust-log-analyzer

This comment was marked as off-topic.

@Gelbpunkt
Copy link
Contributor Author

The build looks like it got stuck at some point

@jieyouxu
Copy link
Member

jieyouxu commented Dec 3, 2024

Build failure is unrelated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.