summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2021-05-19 17:59:09 -0700
committerKhem Raj <raj.khem@gmail.com>2023-09-08 09:08:54 -0700
commita01c3d56bf9aa2668e068126fa58d0f0a74d81e0 (patch)
treea1caa46889a62a7a92970a643fa912f17af1525e
parent45d39ab0c1072ed82bde9ddc02b482bb124af7dc (diff)
downloadmeta-clang-a01c3d56bf9aa2668e068126fa58d0f0a74d81e0.tar.gz
clang: Fix x86 tuple for include search paths
This ensures that search path for c++ headers is using right directory structure as per Openembedded gcc and sysroot install e.g. ignoring nonexistent directory "/mnt/b/yoe/master/build/tmp/work/core2-32-yoe-linux-musl/compiler-rt/13.0.0-r0/recipe-sysroot/usr/lib/i686-yoe-linux-musl/11.1.0/../../../include/ c++/11.1.0/i386-linux-gnu" Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 6ecc0989f152811b8e042d0eb0c94db24c023543)
-rw-r--r--recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch25
-rw-r--r--recipes-devtools/clang/common.inc1
2 files changed, 26 insertions, 0 deletions
diff --git a/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch
new file mode 100644
index 0000000..2e6527f
--- /dev/null
+++ b/recipes-devtools/clang/clang/0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch
@@ -0,0 +1,25 @@
1From 923e1a9142f88b4970a3a860b6e41bf74dea4091 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 May 2021 17:56:03 -0700
4Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros
5
6OpenEmbedded does not hardcode mutli-arch like debian therefore ensure
7that it still uses the proper tuple
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11 clang/lib/Driver/ToolChains/Linux.cpp | 3 +++
12 1 file changed, 3 insertions(+)
13
14--- a/clang/lib/Driver/ToolChains/Linux.cpp
15+++ b/clang/lib/Driver/ToolChains/Linux.cpp
16@@ -622,6 +622,9 @@ void Linux::addLibStdCxxIncludePaths(con
17 GCCInstallation.getTriple().getArch() == llvm::Triple::x86
18 ? "i386-linux-gnu"
19 : TripleStr;
20+ // OpenEmbedded does not hardcode the triple to i386-linux-gnu like debian
21+ if (GCCInstallation.getTriple().getVendor() == llvm::Triple::OpenEmbedded)
22+ DebianMultiarch = TripleStr;
23
24 // Try generic GCC detection first.
25 if (Generic_GCC::addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args,
diff --git a/recipes-devtools/clang/common.inc b/recipes-devtools/clang/common.inc
index 69bb40a..e37c459 100644
--- a/recipes-devtools/clang/common.inc
+++ b/recipes-devtools/clang/common.inc
@@ -38,6 +38,7 @@ SRC_URI = "\
38 file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \ 38 file://0027-compiler-rt-Use-mcr-based-barrier-on-armv6.patch \
39 file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \ 39 file://0028-clang-Switch-defaults-to-dwarf-5-debug-info-on-Linux.patch \
40 file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \ 40 file://0029-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch \
41 file://0030-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch \
41 file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \ 42 file://0033-compiler-rt-Link-scudo-with-SANITIZER_CXX_ABI_LIBRAR.patch \
42 file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \ 43 file://0034-CMake-Installable-find-modules-for-terminfo-and-libf.patch \
43 file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \ 44 file://0035-llvm-Do-not-use-standard-search-paths-in-find_librar.patch \