Skip to content

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Mar 12, 2025

uclibc is not an environment understood by LLVM, it is only a concept in Clang that can be selected with -muclibc (it affects which dynamic linker is passed to the static linker's -dynamic-linker flag).

In fact, using uclibcgnueabi/uclibc is actively harmful, as it prevents LLVM from seeing that the target is gnu-like; we should use gnueabi/gnu directly instead.

Motivation: To make it easier to verify that cc-rs' conversion from rustc to Clang/LLVM triples is correct.

There are no target maintainers for these targets. So I'll CC @lancethepants and @skrap who maintain the related armv7-unknown-linux-uclibceabi and armv7-unknown-linux-uclibceabihf (both of which already pass -gnu instead of -uclibc) in case they have any insights.

r? jieyouxu

`uclibc` is not an environment understood by LLVM, it is only a concept
in Clang that can be selected with `-muclibc` (it affects which dynamic
linker is passed to the static linker's `-dynamic-linker` flag).

In fact, using `uclibcgnueabi`/`uclibc` is actively harmful, as it
prevents LLVM from seeing that the target is gnu-like; we should use
`gnueabi`/`gnu` directly instead.
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2025

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

@jieyouxu
Copy link
Member

jieyouxu commented Mar 12, 2025

Yeah, that seems reasonable. I'll wait for the pinged target maintainers for related targets to have a chance to chime in, otherwise I'll approve it in a few days considering there's no listed target maintainers.

Please ping me next Wednesday (2025-03-19) to r+ this, I'll mark this as S-blocked before then to not have it show up in my review queue (since it's not yet actionable for me).

@rustbot blocked (until 2025-03-19 to give some time for related target maintainers to chime in if they want to)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 12, 2025
@lancethepants
Copy link
Contributor

Looks reasonable to me.

@skrap
Copy link
Contributor

skrap commented Mar 14, 2025

Seems ok to me! Thanks for the tag.

@jieyouxu
Copy link
Member

Okay that seems like enough time, thanks for the feedback @lancethepants and @skrap!

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Mar 29, 2025

📌 Commit eab700a has been approved by jieyouxu

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-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 29, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Mar 29, 2025
…ouxu

Fix `uclibc` LLVM target triples

`uclibc` is not an environment understood by LLVM, it is only a concept in Clang that can be selected with `-muclibc` (it affects which dynamic linker is passed to the static linker's `-dynamic-linker` flag).

In fact, using `uclibcgnueabi`/`uclibc` is actively harmful, as it prevents LLVM from seeing that the target is gnu-like; we should use `gnueabi`/`gnu` directly instead.

Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](rust-lang/cc-rs#1431) is correct.

**There are no target maintainers for these targets.** So I'll CC `@lancethepants` and `@skrap` who maintain the related `armv7-unknown-linux-uclibceabi` and `armv7-unknown-linux-uclibceabihf` (both of which already pass `-gnu` instead of `-uclibc`) in case they have any insights.

r? jieyouxu
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#137928 (stabilize const_cell)
 - rust-lang#138431 (Fix `uclibc` LLVM target triples)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#139060 (replace commit placeholder in vendor status with actual commit)
 - rust-lang#139081 (std: deduplicate `errno` accesses)
 - rust-lang#139100 (compiletest: Support matching diagnostics on lines below)
 - rust-lang#139105 (`BackendRepr::is_signed`: comment why this may panics)
 - rust-lang#139106 (Mark .pp files as Rust)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 29, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137928 (stabilize const_cell)
 - rust-lang#138431 (Fix `uclibc` LLVM target triples)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#139081 (std: deduplicate `errno` accesses)
 - rust-lang#139100 (compiletest: Support matching diagnostics on lines below)
 - rust-lang#139105 (`BackendRepr::is_signed`: comment why this may panics)
 - rust-lang#139106 (Mark .pp files as Rust)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 2b0c2f7 into rust-lang:master Mar 30, 2025
6 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Mar 30, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Mar 30, 2025
Rollup merge of rust-lang#138431 - madsmtm:uclibc-llvm-target, r=jieyouxu

Fix `uclibc` LLVM target triples

`uclibc` is not an environment understood by LLVM, it is only a concept in Clang that can be selected with `-muclibc` (it affects which dynamic linker is passed to the static linker's `-dynamic-linker` flag).

In fact, using `uclibcgnueabi`/`uclibc` is actively harmful, as it prevents LLVM from seeing that the target is gnu-like; we should use `gnueabi`/`gnu` directly instead.

Motivation: To make it easier to verify that [`cc-rs`' conversion from `rustc` to Clang/LLVM triples](rust-lang/cc-rs#1431) is correct.

**There are no target maintainers for these targets.** So I'll CC ``@lancethepants`` and ``@skrap`` who maintain the related `armv7-unknown-linux-uclibceabi` and `armv7-unknown-linux-uclibceabihf` (both of which already pass `-gnu` instead of `-uclibc`) in case they have any insights.

r? jieyouxu
@madsmtm madsmtm deleted the uclibc-llvm-target branch March 30, 2025 02:24
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Apr 2, 2025
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#137928 (stabilize const_cell)
 - rust-lang#138431 (Fix `uclibc` LLVM target triples)
 - rust-lang#138832 (Start using `with_native_path` in `std::sys::fs`)
 - rust-lang#139081 (std: deduplicate `errno` accesses)
 - rust-lang#139100 (compiletest: Support matching diagnostics on lines below)
 - rust-lang#139105 (`BackendRepr::is_signed`: comment why this may panics)
 - rust-lang#139106 (Mark .pp files as Rust)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

6 participants