blob: f34079afc286a24e0c442a41d50965224768d210 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From f076c8268225f64e4f4b988bd98009ad65b826a4 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 19 May 2021 17:56:03 -0700
Subject: [PATCH] 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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
clang/lib/Driver/ToolChains/Linux.cpp | 3 +++
1 file changed, 3 insertions(+)
diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
index 27951858fb5d..aac45650f97b 100644
--- a/clang/lib/Driver/ToolChains/Linux.cpp
+++ b/clang/lib/Driver/ToolChains/Linux.cpp
@@ -657,6 +657,9 @@ void Linux::addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
GCCInstallation.getTriple().getArch() == llvm::Triple::x86
? "i386-linux-gnu"
: TripleStr;
+ // OpenEmbedded does not hardcode the triple to i386-linux-gnu like debian
+ if (GCCInstallation.getTriple().getVendor() == llvm::Triple::OpenEmbedded)
+ DebianMultiarch = TripleStr;
// Try generic GCC detection first.
if (Generic_GCC::addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args,
|