123456789101112131415161718192021222324252627282930313233 |
- From a673cf3e631818ddc59a1d420f137d1bc291994f Mon Sep 17 00:00:00 2001
- From: Jun Yuan Tan <junyuan.tan@starfivetech.com>
- Date: Fri, 22 Oct 2021 12:07:35 +0800
- 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
- Rebased to LLVM 14.0.0 by Jun Yuan Tan
- Signed-off-by: Khem Raj <raj.khem@gmail.com>
- Signed-off-by: Jun Yuan Tan <junyuan.tan@starfivetech.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 2c49a2669d5a..cb6e57e4b976 100644
- --- a/clang/lib/Driver/ToolChains/Linux.cpp
- +++ b/clang/lib/Driver/ToolChains/Linux.cpp
- @@ -623,6 +623,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,
- --
- 2.33.0
|