new file mode 100644
@@ -0,0 +1,35 @@
+From ef7b8a5409c9a1789c6e6679a7e67e8cebe7ab6f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <joaomarcos.costa@bootlin.com>
+Date: Sun, 21 Jun 2026 17:33:10 +0000
+Subject: [PATCH] llvm/clang: Add Distro instance to getMultiarchTriple()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This instance will be used to perform the checks added by do_preconfigure
+task, such as "Distro.IsOpenEmbedded()", or "Distro.IsPOKY()".
+
+Without such instance, the compiler raises an "expected unqualified-id" error.
+
+Upstream-Status: Inappropriate [oe-core specific]
+
+Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
+---
+ clang/lib/Driver/ToolChains/Linux.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp
+index c6d6e20db..52c27f559 100644
+--- a/clang/lib/Driver/ToolChains/Linux.cpp
++++ b/clang/lib/Driver/ToolChains/Linux.cpp
+@@ -45,6 +45,7 @@ std::string Linux::getMultiarchTriple(const Driver &D,
+ bool IsAndroid = TargetTriple.isAndroid();
+ bool IsMipsR6 = TargetTriple.getSubArch() == llvm::Triple::MipsSubArch_r6;
+ bool IsMipsN32Abi = TargetTriple.getEnvironment() == llvm::Triple::GNUABIN32;
++ Distro Distro(D.getVFS(), TargetTriple);
+
+ // For most architectures, just use whatever we have rather than trying to be
+ // clever.
+--
+2.39.5
+
@@ -60,6 +60,7 @@ SRC_URI = "\
file://0039-Rename-UNUSED-and-UNKNOWN-elements-of-OffloadArch-enum.patch \
file://0040-libcxxabi-declare-__gnu_unwind_frame-in-cxa_personal.patch \
file://0041-Consolidate-and-fix-sysroot-based-compiler-rt-search.patch \
+ file://0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch \
"
# Fallback to no-PIE if not set
GCCPIE ??= ""
As in the own patch's message: This instance will be used to perform the checks added by do_preconfigure task, such as "Distro.IsOpenEmbedded()", or "Distro.IsPOKY()". Without such instance, the compiler raises an "expected unqualified-id" error. Something similar is performed by another patch, by the way: 0009-clang-Define-releative-gcc-installation-dir.patch:+ Distro Distro(D.getVFS(), TargetTriple); 0009-clang-Define-releative-gcc-installation-dir.patch:+ Distro.IsOpenEmbedded()}, Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> --- ...istro-instance-to-getMultiarchTriple.patch | 35 +++++++++++++++++++ meta/recipes-devtools/clang/common.inc | 1 + 2 files changed, 36 insertions(+) create mode 100644 meta/recipes-devtools/clang/clang/0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch