I wonder if this patch should be squashed
into 0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch since
that patch is causing to need this change.

On Mon, Jun 22, 2026 at 6:21 AM João Marcos Costa <
[email protected]> wrote:

> 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 <[email protected]>
> ---
>  ...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
>
> diff --git
> a/meta/recipes-devtools/clang/clang/0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch
> b/meta/recipes-devtools/clang/clang/0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch
> new file mode 100644
> index 0000000000..90dd51865b
> --- /dev/null
> +++
> b/meta/recipes-devtools/clang/clang/0001-llvm-clang-Add-Distro-instance-to-getMultiarchTriple.patch
> @@ -0,0 +1,35 @@
> +From ef7b8a5409c9a1789c6e6679a7e67e8cebe7ab6f Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Jo=C3=A3o=20Marcos=20Costa?= <
> [email protected]>
> +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 <[email protected]>
> +---
> + 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
> +
> diff --git a/meta/recipes-devtools/clang/common.inc
> b/meta/recipes-devtools/clang/common.inc
> index 441ea099a9..19b43d6613 100644
> --- a/meta/recipes-devtools/clang/common.inc
> +++ b/meta/recipes-devtools/clang/common.inc
> @@ -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 ??= ""
> --
> 2.47.0
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239325): 
https://lists.openembedded.org/g/openembedded-core/message/239325
Mute This Topic: https://lists.openembedded.org/mt/119923391/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to