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

Fixes for 32-bit SPARC on Linux #126907

Merged
merged 5 commits into from
Jun 27, 2024
Merged

Fixes for 32-bit SPARC on Linux #126907

merged 5 commits into from
Jun 27, 2024

Conversation

glaubitz
Copy link
Contributor

This PR fixes a number of issues which previously prevented rustc from being built
successfully for 32-bit SPARC using the sparc-unknown-linux-gnu triplet.

In particular, it adds linking against libatomic where necessary, uses portable AtomicU64
for rustc_data_structures and rewrites the spec for sparc_unknown_linux_gnu to use
TargetOptions and replaces the previously used -mv8plus with the more portable
-mcpu=v9 -m32.

To make rustc build successfully, support for 32-bit SPARC needs to be added to the object
crate as well as the nix crate which I will be sending out later as well.

r? nagisa

While at it, order the list of architectures alphabetically.
While at it, order the list of architectures alphabetically.
@rustbot
Copy link
Collaborator

rustbot commented Jun 24, 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.

@rustbot rustbot added 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. labels Jun 24, 2024
@rust-log-analyzer

This comment has been minimized.

While at it, order the list of architectures alphabetically.
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

The previously -mv8plus parameter is supported by GCC only, so let's
use something that the SPARC backend in LLVM supports as well.
@nagisa
Copy link
Member

nagisa commented Jun 24, 2024

Seems reasonable enough. Thank you!

@nagisa
Copy link
Member

nagisa commented Jun 24, 2024

@bors r+

@bors
Copy link
Contributor

bors commented Jun 24, 2024

📌 Commit e57bbb3 has been approved by nagisa

It is now in the queue for this repository.

@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 Jun 24, 2024
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 25, 2024
Fixes for 32-bit SPARC on Linux

This PR fixes a number of issues which previously prevented `rustc` from being built
successfully for 32-bit SPARC using the `sparc-unknown-linux-gnu` triplet.

In particular, it adds linking against `libatomic` where necessary, uses portable `AtomicU64`
for `rustc_data_structures` and rewrites the spec for `sparc_unknown_linux_gnu` to use
`TargetOptions` and replaces the previously used `-mv8plus` with the more portable
`-mcpu=v9 -m32`.

To make `rustc` build successfully, support for 32-bit SPARC needs to be added to the `object`
crate as well as the `nix` crate which I will be sending out later as well.

r? nagisa
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 25, 2024
…mpiler-errors

Rollup of 7 pull requests

Successful merges:

 - rust-lang#126893 (Eliminate the distinction between PREC_POSTFIX and PREC_PAREN precedence level)
 - rust-lang#126907 (Fixes for 32-bit SPARC on Linux)
 - rust-lang#126932 (Tweak `FlatPat::new` to avoid a temporarily-invalid state)
 - rust-lang#126934 (fix broken build cache caused by rustdoc builds)
 - rust-lang#126943 (De-duplicate all consecutive native libs regardless of their options)
 - rust-lang#126946 (Add missing slash in `const_eval_select` doc comment)
 - rust-lang#126947 (Delegation: ast lowering refactor)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jun 27, 2024

⌛ Testing commit e57bbb3 with merge 536235f...

@bors
Copy link
Contributor

bors commented Jun 27, 2024

☀️ Test successful - checks-actions
Approved by: nagisa
Pushing 536235f to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 27, 2024
@bors bors merged commit 536235f into rust-lang:master Jun 27, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 27, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (536235f): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (primary -2.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.0% [-2.0%, -2.0%] 1
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.0% [-2.0%, -2.0%] 1

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 696.052s -> 694.809s (-0.18%)
Artifact size: 326.74 MiB -> 326.69 MiB (-0.01%)

@workingjubilee workingjubilee added the O-SPARC Target: SPARC processors label Jul 14, 2024
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-SPARC Target: SPARC processors S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants