Skip to content

Commit 7b73f77

Browse files
committed
clang: Fix x86 triple for non-debian multiarch linux distros
OpenEmbedded does not hardcode mutli-arch like debian therefore ensure that it still uses the proper tuple Upstream-Status: Pending Signed-off-by: Khem Raj <[email protected]>
1 parent f357386 commit 7b73f77

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/lib/Driver/ToolChains/Linux.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
214214
: Generic_ELF(D, Triple, Args) {
215215
GCCInstallation.TripleToDebianMultiarch = [](const llvm::Triple &T) {
216216
StringRef TripleStr = T.str();
217+
// OpenEmbedded does not hardcode the triple to i386-linux-gnu like debian
217218
StringRef DebianMultiarch =
218-
T.getArch() == llvm::Triple::x86 ? "i386-linux-gnu" : TripleStr;
219+
T.getArch() == llvm::Triple::x86 && T.getVendor() != llvm::Triple::OpenEmbedded ? "i386-linux-gnu" : TripleStr;
219220
return DebianMultiarch;
220221
};
221222

0 commit comments

Comments
 (0)