Rollup merge of #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](https://github.com/rust-lang/cc-rs/issues/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
This commit is contained in:
Matthias Krüger 2025-03-29 21:08:11 +01:00 committed by GitHub
commit 2b0c2f7904
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@ use crate::spec::{FloatAbi, Target, TargetMetadata, TargetOptions, base};
pub(crate) fn target() -> Target {
Target {
llvm_target: "armv5te-unknown-linux-uclibcgnueabi".into(),
llvm_target: "armv5te-unknown-linux-gnueabi".into(),
metadata: TargetMetadata {
description: Some("Armv5TE Linux with uClibc".into()),
tier: Some(3),

View file

@ -4,7 +4,7 @@ use crate::spec::{Target, TargetMetadata, TargetOptions, base};
pub(crate) fn target() -> Target {
Target {
llvm_target: "mips-unknown-linux-uclibc".into(),
llvm_target: "mips-unknown-linux-gnu".into(),
metadata: TargetMetadata {
description: Some("MIPS Linux with uClibc".into()),
tier: Some(3),

View file

@ -2,7 +2,7 @@ use crate::spec::{Target, TargetMetadata, TargetOptions, base};
pub(crate) fn target() -> Target {
Target {
llvm_target: "mipsel-unknown-linux-uclibc".into(),
llvm_target: "mipsel-unknown-linux-gnu".into(),
metadata: TargetMetadata {
description: Some("MIPS (LE) Linux with uClibc".into()),
tier: Some(3),

View file

@ -8,7 +8,7 @@ pub(crate) fn target() -> Target {
base.panic_strategy = PanicStrategy::Abort;
Target {
llvm_target: "x86_64-unknown-l4re-uclibc".into(),
llvm_target: "x86_64-unknown-l4re-gnu".into(),
metadata: TargetMetadata {
description: None,
tier: Some(3),