================
@@ -147,6 +147,12 @@ void
HostInfoLinux::ComputeHostArchitectureSupport(ArchSpec &arch_32,
if (arch_32.IsValid()) {
if (arch_32.GetTriple().getVendor() == llvm::Triple::UnknownVendor)
arch_32.GetTriple().setVendorName(llvm::StringRef());
+ // For Linux/AArch64, the environment components of triples for 64- and
+ // 32-bit targets do not match, for example, "aarch64--linux-gnu" and
+ // "arm--linux-eabihf". Clear the borrowed environment.
+ if (arch_64.IsValid() && arch_64.GetTriple().isAArch64() &&
+ arch_64.GetTriple().getEnvironment() == llvm::Triple::GNU)
+ arch_32.GetTriple().setEnvironment(llvm::Triple::UnknownEnvironment);
----------------
igorkudrin wrote:
Do you mean something like this (generated with the help of ChatGPT):
```
// The supported 32-bit architecture is derived from the host triple by
// replacing only the architecture component, preserving the host's
// environment (e.g. "gnu" from "aarch64-unknown-linux-gnu"). Native Arm32
// targets commonly use environments such as "gnueabihf" or "musleabi",
// causing the triples to compare as incompatible. These environment
// differences describe the target ABI or C library and are not relevant when
// determining whether a Linux/AArch64 host can support Arm32 targets, so
// clear the environment before matching.
```
https://github.com/llvm/llvm-project/pull/211692
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits