From patchwork Tue Jun 23 12:08:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 90705 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE223CDB47F for ; Tue, 23 Jun 2026 12:08:44 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.19191.1782216518096056096 for ; Tue, 23 Jun 2026 05:08:39 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=JkcNckrR; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id C963CC6B38C; Tue, 23 Jun 2026 12:08:43 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 48847601C2; Tue, 23 Jun 2026 12:08:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 61683106C843D; Tue, 23 Jun 2026 14:08:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782216515; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=Xb2VD8YyWK7FfjEUxoQmBNrfjaMNb/nq8kLtalv/OPc=; b=JkcNckrRCH372DYcPa+qjthURyo59k54cNEzLfBlybVJLrRq4gFFNn1EgKvsd3xokiNbMD lg9O4jg4hpAlLbBCYU34QZx9GNV0JiUoBYHTF1w9cB8IRWQB4Jj9k7fI091cPsZEQKwJkU RsTyqfbPXOMnQtgMGZOeswM0DqDpH9UAaawQn35pNvdqpW7sSpOem5VrYQ+vx9GdntQsRQ i2jfV99YNLai3YEsLqE46ObZ6PzvYRzb44iW5ii2OV+XvzEH5LniX+89cEuQEbucubhal3 V6t1D8HGB3sH9JEQihcpPhx3Qu0GFzI3swz4We5F/TVX6dxDZTGcemR332owUw== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [PATCH v2 1/5] llvm-project-source.inc: fix string replacements in do_preconfigure Date: Tue, 23 Jun 2026 14:08:14 +0200 Message-ID: <20260623120818.110754-2-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> References: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Jun 2026 12:08:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/239360 Both CLANG_EXTRA_OE_DISTRO_CASE and CLANG_EXTRA_OE_DISTRO_TRIPLE are added by the same patch: 0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch and they are supposed to be replaced by a couple of sed commands in do_preconfigure. However, sed looks for CLANG_EXTRA_OE_DISTRO_CASES (and CLANG_EXTRA_OE_DISTRO_TRIPLES) and since none is found, the code is left with the dangling comment like so: @ clang/lib/Driver/ToolChains/Linux.cpp 82 if (TargetEnvironment == llvm::Triple::GNUX32) 83 return "x86_64-linux-gnux32"; 84 //CLANG_EXTRA_OE_DISTRO_TRIPLE 85 return "x86_64-linux-gnu"; Fix that by removing the 'S' in the end of ..._CASES and ..._TRIPLES. Another way to fix this would be to directly change the patch, but simply changing do_preconfigure feels cleaner. Signed-off-by: João Marcos Costa --- meta/recipes-devtools/clang/llvm-project-source.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/recipes-devtools/clang/llvm-project-source.inc b/meta/recipes-devtools/clang/llvm-project-source.inc index ba6cbf9a8d..6540d1cc7c 100644 --- a/meta/recipes-devtools/clang/llvm-project-source.inc +++ b/meta/recipes-devtools/clang/llvm-project-source.inc @@ -82,9 +82,9 @@ python do_preconfigure() { subprocess.check_output(cmd, stderr=subprocess.STDOUT) cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CHECK#%s#g' % check, source + '/clang/include/clang/Driver/Distro.h'] subprocess.check_output(cmd, stderr=subprocess.STDOUT) - cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_TRIPLES#%s#g' % triple, source + '/clang/lib/Driver/ToolChains/Linux.cpp'] + cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_TRIPLE#%s#g' % triple, source + '/clang/lib/Driver/ToolChains/Linux.cpp'] subprocess.check_output(cmd, stderr=subprocess.STDOUT) - cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CASES#%s#g' % case, source + '/clang/lib/Driver/Distro.cpp'] + cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CASE#%s#g' % case, source + '/clang/lib/Driver/Distro.cpp'] subprocess.check_output(cmd, stderr=subprocess.STDOUT) } From patchwork Tue Jun 23 12:08:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 90706 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9117DCDB47C for ; Tue, 23 Jun 2026 12:08:44 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.19594.1782216519930192154 for ; Tue, 23 Jun 2026 05:08:40 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=fC/hGRnH; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id CD280C6B385 for ; Tue, 23 Jun 2026 12:08:45 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 449FE601C2; Tue, 23 Jun 2026 12:08:38 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 59722106C8415; Tue, 23 Jun 2026 14:08:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782216517; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ZGoDJ/mcr/ESuARz2QuztDQqnBFVi25sDpq0+1/EISk=; b=fC/hGRnHcZa69ooy3ho+92p+UdgWve7lWOyFpuWmg2Nevieh2OP+Hc7/ZdXZT4u4ML4nZa r9tKEEtpaLKNGe2Ff/NmaJElaklCNYI9C7T/I51QFijiaBXL9mdSyQ81YNL+ON95SXjmZ6 p1Cz7JPNHVms7GtB9q+IqEtEPiCqLAusYHRTV2W0se0UuXaHBOP8MfgAE7x8jlvs8fN77J nBFCzUhNLoLAjE1hHr10FDIUU+lZqSzMbCLJIiEz6kFpFUvhFSe7+JC8vdmkpalz+iNv7S DTE1GaWfRUvdwuIiNuT5DpMFQHX88KsiYARoIBQcOdKSbStuHhlgTZiS4tWfCA== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [PATCH v2 2/5] llvm-project-source.inc: fix end of line in triple variable Date: Tue, 23 Jun 2026 14:08:15 +0200 Message-ID: <20260623120818.110754-3-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> References: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Jun 2026 12:08:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/239361 After the return statement, a "," is present while a ";" is expected. This leads to something like: ...return "x86_64-poky-linux", Fix this syntax error by replacing "," with a ";". Signed-off-by: João Marcos Costa --- meta/recipes-devtools/clang/llvm-project-source.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/clang/llvm-project-source.inc b/meta/recipes-devtools/clang/llvm-project-source.inc index 6540d1cc7c..85b5ef06dc 100644 --- a/meta/recipes-devtools/clang/llvm-project-source.inc +++ b/meta/recipes-devtools/clang/llvm-project-source.inc @@ -71,7 +71,7 @@ python do_preconfigure() { distro_id = distro.split(":")[0].replace('-','_') distro_triple = distro.split(":")[1] case += '\\n .Case("' + distro_id + '", Distro::' + distro_id.upper() + ')' - triple += '\\n if (Distro.Is' + distro_id.upper() + '())\\n return "x86_64-' + distro_triple + '-linux",' + triple += '\\n if (Distro.Is' + distro_id.upper() + '())\\n return "x86_64-' + distro_triple + '-linux";' name += '\\n '+ distro_id.upper() + ',' check += '\\nbool Is' + distro_id.upper() + '() const { return DistroVal == ' + distro_id.upper() + '; }' oe_names += distro_id.upper() + ' ||' From patchwork Tue Jun 23 12:08:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 90704 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D8A2CDB479 for ; Tue, 23 Jun 2026 12:08:44 +0000 (UTC) Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.19595.1782216521975713887 for ; Tue, 23 Jun 2026 05:08:42 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=xNVFn832; spf=pass (domain: bootlin.com, ip: 185.171.202.116, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id DAAF9C6B385; Tue, 23 Jun 2026 12:08:47 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 55442601C2; Tue, 23 Jun 2026 12:08:40 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 45EDB106C83D2; Tue, 23 Jun 2026 14:08:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782216519; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=/KFx5Ml7LoYLZjYto6yvCt15J+C+Hg2Hgz4Bv5lKBKk=; b=xNVFn832obmDzaqxSkNw+kFPXpuL0IiHSaSPTrwWf+oYEANO58xjxTeH7HFiWK/S5j4F6d zgLYpiY+nPOiJ21KKd3KsbkOvS2gEBJltwhONwOKg3cxaevoAQXSBNlUMsnpmgeGQOVCmC eYn2x2D5aen3vee+ZHqiZg+k5dMhzxLF0KTS0D6Uzykw+ZZSS0RSlLvj+Aub3DxAUIkncW HobSC2UlpUZo1xK7+K+TFUJPbdp/ILRb+0F0DsiHFfeJYEUrWmnxmig0PP2GQsCAFbUYyW 0dSdZAN6qzNzTGEw7aySwoYevSHQEPZJAAWG204CNV0cmHUKGcmW6PMue0N3Gw== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [PATCH v2 3/5] clang/llvm: add missing instance of Distro class in Linux.cpp Date: Tue, 23 Jun 2026 14:08:16 +0200 Message-ID: <20260623120818.110754-4-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> References: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Jun 2026 12:08:44 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/239362 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 --- ...t-anchor-for-adding-OE-distro-vendor.patch | 35 ++++++++++++++----- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/meta/recipes-devtools/clang/clang/0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch b/meta/recipes-devtools/clang/clang/0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch index c36d2973e6..674a3b264e 100644 --- a/meta/recipes-devtools/clang/clang/0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch +++ b/meta/recipes-devtools/clang/clang/0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch @@ -1,7 +1,10 @@ -From b14d66e6250566fb0b7786af92e3e83bade51c90 Mon Sep 17 00:00:00 2001 +From 259d8eb2ed82c9248387a3cbb1befee358ecbb8e Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Mon, 25 Jan 2021 16:14:35 +0800 Subject: [PATCH] llvm/clang: Insert anchor for adding OE distro vendor names +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit This helps in making right detection for OE built gcc toolchains @@ -82,22 +85,25 @@ b59da142f2b0:$ /path/to/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot programs: =/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin libraries: =/build/tmp-glibc/work/x84_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/lib/clang/13.0.1:/usr/lib/x86_64-wrs-linux/10.2.0://lib/x86_64-wrs-linux://usr/lib/x86_64-wrs-linux:/build/tmp-glibc/work/x86_64-linux/compiler-rt-native/13.0.1-r0/recipe-sysroot-native/usr/bin/../lib://lib://usr/lib +[JM: add missing instance of Distro class in getMultiarchTriple(), at Linux.cpp] + Upstream-Status: Inappropriate [oe specific] Signed-off-by: Martin Jansa Signed-off-by: Hongxu Jia Signed-off-by: Changqing Li Signed-off-by: Khem Raj +Signed-off-by: João Marcos Costa --- clang/include/clang/Driver/Distro.h | 2 ++ clang/lib/Driver/Distro.cpp | 1 + clang/lib/Driver/ToolChains/Gnu.cpp | 1 + - clang/lib/Driver/ToolChains/Linux.cpp | 1 + + clang/lib/Driver/ToolChains/Linux.cpp | 2 ++ llvm/lib/TargetParser/Triple.cpp | 2 +- - 5 files changed, 6 insertions(+), 1 deletion(-) + 5 files changed, 7 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h -index 0e17b30eb7e8..b449a62dc299 100644 +index 0e17b30eb..b449a62dc 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h @@ -45,6 +45,7 @@ public: @@ -117,7 +123,7 @@ index 0e17b30eb7e8..b449a62dc299 100644 }; diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp -index df10458d092d..61dc127a4574 100644 +index df10458d0..61dc127a4 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { @@ -129,7 +135,7 @@ index df10458d092d..61dc127a4574 100644 return Version; } diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp -index c80980a7fb09..80fd8058bd98 100644 +index c80980a7f..80fd8058b 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -2370,6 +2370,7 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes( @@ -141,10 +147,18 @@ index c80980a7fb09..80fd8058bd98 100644 static const char *const X32Triples[] = {"x86_64-linux-gnux32", "x86_64-pc-linux-gnux32"}; diff --git a/clang/lib/Driver/ToolChains/Linux.cpp b/clang/lib/Driver/ToolChains/Linux.cpp -index 7b608a84a66e..4a0adedce09a 100644 +index 7b608a84a..585a86a2d 100644 --- a/clang/lib/Driver/ToolChains/Linux.cpp +++ b/clang/lib/Driver/ToolChains/Linux.cpp -@@ -81,6 +81,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, +@@ -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. +@@ -81,6 +82,7 @@ std::string Linux::getMultiarchTriple(const Driver &D, return "x86_64-linux-android"; if (TargetEnvironment == llvm::Triple::GNUX32) return "x86_64-linux-gnux32"; @@ -153,7 +167,7 @@ index 7b608a84a66e..4a0adedce09a 100644 case llvm::Triple::aarch64: if (IsAndroid) diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp -index a4f9dd42c0fe..86b74451ec0d 100644 +index a4f9dd42c..86b74451e 100644 --- a/llvm/lib/TargetParser/Triple.cpp +++ b/llvm/lib/TargetParser/Triple.cpp @@ -702,7 +702,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) { @@ -165,3 +179,6 @@ index a4f9dd42c0fe..86b74451ec0d 100644 .Default(Triple::UnknownVendor); } +-- +2.39.5 + From patchwork Tue Jun 23 12:08:17 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 90708 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF1E9CDB46F for ; Tue, 23 Jun 2026 12:08:54 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.19596.1782216524855841546 for ; Tue, 23 Jun 2026 05:08:45 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=zsQTRTSZ; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 9FE931A0871 for ; Tue, 23 Jun 2026 12:08:42 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 31183601C2; Tue, 23 Jun 2026 12:08:42 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 41F1A106C8477; Tue, 23 Jun 2026 14:08:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782216521; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=KRLjpp+kDsjxmkVVsFzU8HdHlA281PXgWCG13xuHtVI=; b=zsQTRTSZe7/Pbdpa61eLBWchNPGGn5Q/DOMOSkavm4ktD4f2o5Dm75uYxa9YO2clxo73Mn RnhyuEUWw5/pOG62uNMt7L41gj9genrwgONyaCtJhCFpciKyY/d6z412O4os7wvcxfWzIa xSM3yYFeb3o0F/fdARylbWOR/zfZjdpdSQFUJCTTs6sSrgCS45lq2HyJ+u6WABQtfBx/5h 4zc06VbbApSUQCcIEmph38u8Y0/jr2GF1VLywuN0IbCIV1OXmr5b68yGrO3AG2kAdYfDPG LG34Prjf0Wt2s6U1n1b6tm2eEqWhtyzOe/ZgcapZycKtAQMPys3Wxl52RLF2vw== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [PATCH v2 4/5] llvm-project-source.inc: add vardeps to do_preconfigure Date: Tue, 23 Jun 2026 14:08:17 +0200 Message-ID: <20260623120818.110754-5-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> References: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Jun 2026 12:08:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/239363 The task's signature should change if CLANG_EXTRA_OE_DISTRO and/or CLANG_EXTRA_OE_VENDORS, considering the couple of for loops in do_preconfigure iterate over their values. By adding them to 'vardeps', bitbake will correctly detect if do_preconfigure needs to be executed. Signed-off-by: João Marcos Costa --- meta/recipes-devtools/clang/llvm-project-source.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/clang/llvm-project-source.inc b/meta/recipes-devtools/clang/llvm-project-source.inc index 85b5ef06dc..84d4bae0ab 100644 --- a/meta/recipes-devtools/clang/llvm-project-source.inc +++ b/meta/recipes-devtools/clang/llvm-project-source.inc @@ -90,4 +90,5 @@ python do_preconfigure() { do_patch[vardepsexclude] += "MULTILIBS MULTILIB_VARIANTS" addtask do_preconfigure after do_patch +do_preconfigure[vardeps] += "CLANG_EXTRA_OE_DISTRO CLANG_EXTRA_OE_VENDORS" do_create_spdx[depends] += "${PN}:do_preconfigure" From patchwork Tue Jun 23 12:08:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= X-Patchwork-Id: 90707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0F43CD98F2 for ; Tue, 23 Jun 2026 12:08:54 +0000 (UTC) Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.19192.1782216528009777806 for ; Tue, 23 Jun 2026 05:08:48 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@bootlin.com header.s=dkim header.b=uwImvUK1; spf=pass (domain: bootlin.com, ip: 185.246.84.56, mailfrom: joaomarcos.costa@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 39DC21A0871 for ; Tue, 23 Jun 2026 12:08:46 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 0EED3601C2; Tue, 23 Jun 2026 12:08:46 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B1D3C106C8472; Tue, 23 Jun 2026 14:08:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1782216524; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=GyOE0DlGbQbJncPZBqH0tnOEROkeWIL0j0/My/DhhH4=; b=uwImvUK1WmQw7AXh7FvtqZiRoMPmYs4tARRTNfnDlEh5MmTW0WV2clHXRD7L5lvCpXMAu2 vL8CLvOU0Ch8GR10mSzwwL3w00xPmu6vMDb4zWezE/MTgb5PvER9ciwi0XT7DPQ7tnOToW ZLN4MjLRIF1HJgWVssa2LDQHYpFmSyAonsjeD4ULh5vGX9tUgs0FZwhUkOHBW0Y/5LZFiD KlxXsnZY30sclf9K+rymTHPUdftvA+17xOh06H+7c3FL36FCvhotHkscObnQkZeTCfc/vc CMQUPphdYvaNLU+q3Rn8Mv/ruWa0LZzEDxJWtGbKitAHr5UKhuXw3lk9P0OXgA== From: =?utf-8?q?Jo=C3=A3o_Marcos_Costa?= To: openembedded-core@lists.openembedded.org Cc: thomas.petazzoni@bootlin.com, raj.khem@gmail.com, =?utf-8?q?Jo=C3=A3o_Ma?= =?utf-8?q?rcos_Costa?= Subject: [PATCH v2 5/5] llvm-project-source.inc: add vardeps to do_unpack Date: Tue, 23 Jun 2026 14:08:18 +0200 Message-ID: <20260623120818.110754-6-joaomarcos.costa@bootlin.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> References: <20260623120818.110754-1-joaomarcos.costa@bootlin.com> MIME-Version: 1.0 X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Tue, 23 Jun 2026 12:08:54 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/239364 The do_preconfigure task performs some string replacements, and the patterns searched by sed are no longer there if they were replaced during a previous (successful) execution. This means we need to unpack the sources again, and apply the patches, before running do_preconfigure again. Regarding do_patch, it is already handled by the addtask line. However, even if we define a dependency (e.g. with deptask flag) between do_preconfigure and do_unpack, bitbake will not reexecute do_unpack because the stamp is still there. The only workaround I see - not so elegant, yes - is to make sure do_unpack's signature also depends on CLANG_EXTRA_OE_DISTRO and CLANG_EXTRA_OE_VENDORS. Signed-off-by: João Marcos Costa --- meta/recipes-devtools/clang/llvm-project-source.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-devtools/clang/llvm-project-source.inc b/meta/recipes-devtools/clang/llvm-project-source.inc index 84d4bae0ab..7cc4e1a9f0 100644 --- a/meta/recipes-devtools/clang/llvm-project-source.inc +++ b/meta/recipes-devtools/clang/llvm-project-source.inc @@ -91,4 +91,5 @@ python do_preconfigure() { do_patch[vardepsexclude] += "MULTILIBS MULTILIB_VARIANTS" addtask do_preconfigure after do_patch do_preconfigure[vardeps] += "CLANG_EXTRA_OE_DISTRO CLANG_EXTRA_OE_VENDORS" +do_unpack[vardeps] += "CLANG_EXTRA_OE_DISTRO CLANG_EXTRA_OE_VENDORS" do_create_spdx[depends] += "${PN}:do_preconfigure"