From patchwork Mon Sep 1 22:42:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 69358 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 5A375CA1002 for ; Mon, 1 Sep 2025 22:42:53 +0000 (UTC) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mx.groups.io with SMTP id smtpd.web11.64473.1756766568985574652 for ; Mon, 01 Sep 2025 15:42:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Yf4/jR3z; spf=pass (domain: gmail.com, ip: 209.85.210.180, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-77256200f1bso1144568b3a.3 for ; Mon, 01 Sep 2025 15:42:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756766568; x=1757371368; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=VaeYK5HKqqU4d2beDHEIyqOSnOdOXNfkgEHNSlM5+z4=; b=Yf4/jR3zIh1I/4cHqMX0e4ehwx7Xx5CXMp1iFIVF3C6KfNkw45jE454Umc/C4qezUW 3hOHd3shHgTUcx8aKtPxvAx67ueCPbusz2zw4S9y8UcDt6fLMPIfclnzzVLld3OfNjOg Pnqi6mbWhUIqi0ktB+qnauf/80ZtLutMpqqqt5cLChm6sGCnTDFI1mk0La3P5ChRyidl Z8IOVY5iptAeVKvT3hQsIQbtfgMwhROLk8CIcacS1C0IYEGbZohxmWT640nIXdOS1c6N lyoBV/UNQMyb/Gwzx7Qkhwe3g2VBPdAOnkK1Rh7B8ke3bwJ3UJJW+ZOPk77kg6fPkoJ9 UeJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756766568; x=1757371368; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=VaeYK5HKqqU4d2beDHEIyqOSnOdOXNfkgEHNSlM5+z4=; b=GyKYdayK5NfKLSa2BX/YzEMoA2durpvk07sjiQpTwxOdCRqQ32DXNkHT2NWD8gz2DZ BFN/rgtjxEUNFzK+bIMhCrC+UJ2znBOzfXdlRL6yN5gIHGBpErry1Z/4e44U4mCZSUU3 FAoFFnhvWEVikR0KXCjcxJTr0hj/QG6xXlId4m2n/M7gK0io9fyIdfrqGVBt04immmmf G5GrSdtAYJy9eHsCWkX6qHpRxum8vp84I0SKTSxxi07GXgEmdUynvm/vt43qjbrWDw/Z D+bSpDe4znQZeh7hdvubbzRJ7EtyKmNwR+Zd4tisY/uDXDqSWnC23xLXZNpUS4BdhxP4 zT4Q== X-Gm-Message-State: AOJu0Yxpsw/8Hvzkb2yaunJ2fJJHH3FRGg1xkEi+URJRH1nFLOZU4y+i JNA+BtnUqJ2PVEOBjLX18pL8Y0C3lfnQApRq4sCNxIST63E7iholV5r7vYhj7lFE X-Gm-Gg: ASbGncu2vp0REh7Db8RJCqC3uUAsyx8YF57QU3yUl9rWyFbE/8sDNz0Xvp4A7aCuq2/ TwcOwCUhofqXGE/VPfG6BTNX/M7TX6eGwlpE3551X9hzf3Cjg6wbVRz5Cl8jIKhsSFA5kBLCNOG wH2r/kFNHM0VF7//wFXtoikSR0lpyPMH4KpuUIlbWaRVXkfr5NcjMSZeP97kB6cTXjZp6ccs+wq 709pHU1MmdkvIhhkWcZ9A2JhR1IhB/o/Gg4qyrEvje/q8VS76EfkayWleV5ykOMYrzKN/g+e+He C9Yan/8I0gTy3KHJV16Au6RLoH4X+tFA1XYgLTyeyQSYSm7h5TlC+ygCmoCJ4MEFaT4pOCq3SJ/ y70ljaf9Qlyek1hda0N03/PCRR4JuacB5xfxwiNctXPcZ+vEyTUQ2bqMOtPU7/FrW0zr4ASfy/Q qcnZruPkH3upaHyOxYtlpWvi5kFFzZjYQvqJsQEOHWS2XK0nfk/y8= X-Google-Smtp-Source: AGHT+IHDknU1j1u1kAohFZpiYtAxjEx0bSr3BCljjwFHVovfOYfoVPimwXGgRSNqYLH0POX5x9W4Nw== X-Received: by 2002:a05:6a00:bd90:b0:771:ead8:dcdb with SMTP id d2e1a72fcca58-7723e258689mr10020807b3a.8.1756766567972; Mon, 01 Sep 2025 15:42:47 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::c2de]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4beb72sm11648240b3a.61.2025.09.01.15.42.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 15:42:46 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 1/5] bpftrace: Upgrade to 0.23.5 release Date: Mon, 1 Sep 2025 15:42:39 -0700 Message-ID: <20250901224244.1913647-1-raj.khem@gmail.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 01 Sep 2025 22:42:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/119162 Drop backported patch Signed-off-by: Khem Raj --- ...-failures-due-to-missing-location.hh.patch | 54 ------------------- ...{bpftrace_0.23.0.bb => bpftrace_0.23.5.bb} | 5 +- 2 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Fix-build-failures-due-to-missing-location.hh.patch rename meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/{bpftrace_0.23.0.bb => bpftrace_0.23.5.bb} (94%) diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Fix-build-failures-due-to-missing-location.hh.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Fix-build-failures-due-to-missing-location.hh.patch deleted file mode 100644 index 1c2ae33238..0000000000 --- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Fix-build-failures-due-to-missing-location.hh.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 24421ba92c69f1abaadaff01270621917616a2b8 Mon Sep 17 00:00:00 2001 -From: Changqing Li -Date: Thu, 17 Apr 2025 10:38:50 +0800 -Subject: [PATCH] Fix build failures due to missing location.hh - -ast/location.h does `#include "location.hh"` and location.hh is -generated by the parser so any CMake target whose source includes -ast/location.h needs to have a dependency on the `parser` target, -otherwise the compilation may fail due to incorrect ordering of build -targets. This also applies to targets which include ast/location.h -transitively via other headers. - -To avoid such errors, do 2 things: -- drop includes of ast/location.h where unused -- for CMake targets including ast/location.h, add an explicit dependency - on the `parser` target - -Signed-off-by: Viktor Malik - -Upstream-Status: Backport [https://github.com/bpftrace/bpftrace/commit/743cb9c88c25fb9737d714f4d4ac853f05bb6481] - -Signed-off-by: Changqing Li ---- - src/CMakeLists.txt | 1 + - src/ast/CMakeLists.txt | 1 + - 2 files changed, 2 insertions(+) - -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e04ee429..13a51040 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -21,6 +21,7 @@ add_library(compiler_core STATIC - struct.cpp - types.cpp - ) -+add_dependencies(compiler_core parser) - - add_library(runtime STATIC - attached_probe.cpp -diff --git a/src/ast/CMakeLists.txt b/src/ast/CMakeLists.txt -index 92231f85..7230cf71 100644 ---- a/src/ast/CMakeLists.txt -+++ b/src/ast/CMakeLists.txt -@@ -22,6 +22,7 @@ add_library(ast STATIC - passes/return_path_analyser.cpp - ) - -+add_dependencies(ast parser) - target_compile_definitions(ast PRIVATE ${BPFTRACE_FLAGS}) - target_link_libraries(ast PUBLIC ast_defs arch compiler_core parser) - --- -2.34.1 - diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb similarity index 94% rename from meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb rename to meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb index c8ccf4c83f..1b2f8ab0e4 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.0.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb @@ -16,14 +16,11 @@ DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-nativ RDEPENDS:${PN} += "bash python3 xz" -PV .= "+git" - SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.23.x;protocol=https \ file://run-ptest \ file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \ - file://0001-Fix-build-failures-due-to-missing-location.hh.patch \ " -SRCREV = "01e806d24c61f996f1809e1e991646311499db4f" +SRCREV = "e48ccc66c9971515648b63699bc4b1490c388d85" inherit bash-completion cmake ptest pkgconfig From patchwork Mon Sep 1 22:42:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 69357 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 5C511CA1007 for ; Mon, 1 Sep 2025 22:42:53 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web10.64705.1756766570249515517 for ; Mon, 01 Sep 2025 15:42:50 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PX4eSja0; spf=pass (domain: gmail.com, ip: 209.85.210.174, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7723cf6e4b6so1706366b3a.3 for ; Mon, 01 Sep 2025 15:42:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756766569; x=1757371369; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=S0aI6V8tH7pbzgvY2x6qHCxOSN2OREofmhrWugsWlMY=; b=PX4eSja0mv3eaS7yJxGw6mK44n4CKKvL9VcRucMxkqDiAbnDYduKKWaZbm9IjiuuD2 6ObmCM0wwCEGnDGu3upK546fxn9krbPB6VVhcz9t07PGtASdWkOYLHketA4SoUiC7/Jv c/bXyjy7ZYBvh6+hUgUqSz5r0S4Q4ZlkHONucTaoGjgZPjU3joQyLQXkij5RRaFBA7nM 6SgoXzZocTpC/zGQYPxMu3TGeS/ncIHA6XiwV1SEIwSepFxrVyGD+KUbMlo+0GD5X4fM kjAKLX/2PsyvZ+qSDTu3m0Oq8SbeXdbxhnhWTQWL1l13q9QS0fbdbpC76I7ePBULofSa fT2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756766569; x=1757371369; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=S0aI6V8tH7pbzgvY2x6qHCxOSN2OREofmhrWugsWlMY=; b=KvoRc9HYtIHjRAYC8uJIp2zGi1T0zcqfUWgetMi5XtRxGRq9q+Eb+95FwZ2AcI8YAl QhWIDc9Rk4xo5+bs8riskhPgibYLo1/A6bhVBGt1OXK/nEPwOwZvmtYJes6uRCEloXNM eQ52uAW+mM4vrTtSiH9R5FgK6iekjfWjn8iomr5ce3zdeR/I+bac54UKjwlLHwJygZEL AoaScH3FMuSGtuHiIfk1gsRgzrzIIeZSZKxyTX8EOPkOEd5+4UY6yLaVZECMohx0PaMh mRlJ+8yVDOvQsBOswVKs5gZvXCTrV0uWvN3FEKrPw7HiKb67oNCTsZS6t2u+UsE0lAH7 0KTQ== X-Gm-Message-State: AOJu0Yz8ycirh141bm9ROdKI0LQoKJ7uUBq2D8M+wUF9JW5fjvxuii24 FN2mMKo6ARIOwSlLLY84QsHxGUTUnUGSU2zVgTRCZ3TuTSBxctWHpgHH4/Wm0xFy X-Gm-Gg: ASbGncuR6gP3KVNm8e6omed5vMixXbcT/Fo+eA9hBNI7MDlFeGG9XYvkg6Vg1+VRxK9 LaZKPCabI3+sNf4I1OboNB8AL5YkFU7hWjnW3qbvZ8ycSH4a2lqriCsqu1uJwjOoVz5T2iShsJm CYjzEuzhjFqSyyIJ9ebVGdA8jqJ+tyJkNK8T9+uIhpFgcstPWqyL9W4xzGxCsxM2bhEyWviYJ6n UQqsldjpcyOHBZUmPH9ULkiqrBD/JJWK9jV8xg0IGXmvRTeA+eJu1Crj5A/usr3Kj6Gb8ESKOql 8laMkA6tjlxxnKRd2OCm397iDBxS1v5ha5/RMQsdwfezu3AnLAylSPUER4EwcQ7QK6DXHual+yf eVR/iBgu+SQjE+syvBpEOIjXEfgIHllOU/U5ijJ//aC4ZQhnVu9LZITaUJ0GTqHEilO4QnNcptT ZwmP2/WGYpa7gCnV1tVRa8nzdvl53oBpq+z28JL/U5GmHLJZ6Wr4c= X-Google-Smtp-Source: AGHT+IG2gQaa4qWodr4UABNOOS94X6XKl/tNf9qhZHBlRkTxwU+1YHxpZsTIRmTwUlutwLZ8JAPYZA== X-Received: by 2002:a05:6a21:7988:b0:243:f86b:3856 with SMTP id adf61e73a8af0-243f87ac36bmr2949667637.38.1756766569269; Mon, 01 Sep 2025 15:42:49 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::c2de]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4beb72sm11648240b3a.61.2025.09.01.15.42.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 15:42:48 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 2/5] bpftrace: Upgrade to 0.24.0 Date: Mon, 1 Sep 2025 15:42:40 -0700 Message-ID: <20250901224244.1913647-2-raj.khem@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250901224244.1913647-1-raj.khem@gmail.com> References: <20250901224244.1913647-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 01 Sep 2025 22:42:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/119163 Fix build with clang-21 and libc++ Signed-off-by: Khem Raj --- ...01-Include-missing-c-runtime-headers.patch | 39 ++++++++++ ...-supported-clang-version-to-clang-21.patch | 24 ++++++ ....txt-allow-to-set-BISON_FLAGS-like-l.patch | 11 +-- ...-when-using-libc-casting-ns-to-syste.patch | 54 +++++++++++++ ...-Clang-LLVM-21-DiagnosticOptions-API.patch | 78 +++++++++++++++++++ ...{bpftrace_0.23.5.bb => bpftrace_0.24.0.bb} | 9 ++- 6 files changed, 208 insertions(+), 7 deletions(-) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Include-missing-c-runtime-headers.patch create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Raise-max-supported-clang-version-to-clang-21.patch create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-chrono-Fix-build-when-using-libc-casting-ns-to-syste.patch create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-ast-Adapt-to-Clang-LLVM-21-DiagnosticOptions-API.patch rename meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/{bpftrace_0.23.5.bb => bpftrace_0.24.0.bb} (82%) diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Include-missing-c-runtime-headers.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Include-missing-c-runtime-headers.patch new file mode 100644 index 0000000000..d3009fa295 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-Include-missing-c-runtime-headers.patch @@ -0,0 +1,39 @@ +From ead4dc45e35fc6c3770ef4021720e0e6a5b60674 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 31 Aug 2025 15:23:27 -0700 +Subject: [PATCH 1/3] Include missing c++ runtime headers + +These headers are required and found to fail builds +when using llvm/libc++ instead of libstdc++ on linux + +Upstream-Status: Submitted [https://github.com/bpftrace/bpftrace/pull/4526] +Signed-off-by: Khem Raj +--- + src/util/bpf_names.cpp | 1 + + tests/opaque.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/util/bpf_names.cpp b/src/util/bpf_names.cpp +index 68525bfc..ab8f6f2f 100644 +--- a/src/util/bpf_names.cpp ++++ b/src/util/bpf_names.cpp +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include // for std::ostringstream + + #include "util/bpf_names.h" + +diff --git a/tests/opaque.cpp b/tests/opaque.cpp +index a030a05d..034888d3 100644 +--- a/tests/opaque.cpp ++++ b/tests/opaque.cpp +@@ -1,6 +1,7 @@ + #include "util/opaque.h" + #include "gtest/gtest.h" + #include ++#include // for std::numbers + #include + #include + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Raise-max-supported-clang-version-to-clang-21.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Raise-max-supported-clang-version-to-clang-21.patch new file mode 100644 index 0000000000..3fb8d131b6 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-cmake-Raise-max-supported-clang-version-to-clang-21.patch @@ -0,0 +1,24 @@ +From 7bd8ec690ad587e7f180bcd061a6205b28d86260 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 31 Aug 2025 09:50:35 -0700 +Subject: [PATCH] cmake: Raise max supported clang version to clang-21 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 025fa738..a0f16dd1 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -172,7 +172,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") + # releases. + set(MAX_LLVM_MAJOR 999) + else() +- set(MAX_LLVM_MAJOR 20) ++ set(MAX_LLVM_MAJOR 21) + endif() + + if((${LLVM_VERSION_MAJOR} VERSION_LESS ${MIN_LLVM_MAJOR}) OR (${LLVM_VERSION_MAJOR} VERSION_GREATER ${MAX_LLVM_MAJOR})) diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch index 4f0ebbf564..c9e1749dd5 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch @@ -12,7 +12,7 @@ Upstream-Status: Pending --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -100,16 +100,20 @@ include_directories(SYSTEM ${LIBCEREAL_I +@@ -108,16 +108,21 @@ include_directories(SYSTEM ${LIBCEREAL_I find_package(BISON REQUIRED) find_package(FLEX REQUIRED) @@ -20,15 +20,16 @@ Upstream-Status: Pending +# avoid buildpaths in generated #line statements and allow to pass --file-prefix-map=OLD=NEW +set(BISON_FLAGS "${BISON_FLAGS} -l") +set(FLEX_FLAGS "${FLEX_FLAGS} -L") ++ # `parser_class_name` is deprecated and generates warnings in bison >= 3.3. # But `api.parser.class` is not supported in bison < 3.3. So we must inject # the %define based on the bison version here. if(${BISON_VERSION} VERSION_GREATER_EQUAL 3.3) -- set(BISON_FLAGS "-Dapi.parser.class={Parser}") -+ set(BISON_FLAGS "${BISON_FLAGS} -Dapi.parser.class={Parser}") +- set(BISON_FLAGS "-Dapi.parser.class={Parser} -Wcounterexamples") ++ set(BISON_FLAGS "${BISON_FLAGS} -Dapi.parser.class={Parser} -Wcounterexamples") else() -- set(BISON_FLAGS "-Dparser_class_name={Parser}") -+ set(BISON_FLAGS "${BISON_FLAGS} -Dparser_class_name={Parser}") +- set(BISON_FLAGS "-Dparser_class_name={Parser} -Wcounterexamples") ++ set(BISON_FLAGS "${BISON_FLAGS} -Dparser_class_name={Parser} -Wcounterexamples") endif() bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS ${BISON_FLAGS} VERBOSE) -flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc) diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-chrono-Fix-build-when-using-libc-casting-ns-to-syste.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-chrono-Fix-build-when-using-libc-casting-ns-to-syste.patch new file mode 100644 index 0000000000..140cc12add --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0002-chrono-Fix-build-when-using-libc-casting-ns-to-syste.patch @@ -0,0 +1,54 @@ +From 381047c14dfbc3b89a5e87404cb7cf886f10c119 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 31 Aug 2025 15:26:36 -0700 +Subject: [PATCH 2/3] chrono: Fix build when using libc++ casting ns to + system_clock::duration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +libc++ from LLVM/Clang 21 release requires that time_point::operator+= +receive the exact duration type of the time_point. On many Linux configs, +system_clock::duration is microseconds, so doing: + + t += std::chrono::nanoseconds(...); + +fails with: + error: no viable overloaded '+=' + note: candidate function not viable: no known conversion from + 'duration<..., nano>' to 'const duration<..., micro>' for 1st argument + +Cast the nanoseconds to system_clock::duration via duration_cast before +adding them. This builds with Clang 21 + libc++ and remains compatible +with libstdc++. Semantics are unchanged except for truncation to the +clock’s native resolution (which already applies). + +No functional change intended. + +Upstream-Status: Submitted [https://github.com/bpftrace/bpftrace/pull/4526] + +Signed-off-by: Khem Raj +--- + src/bpftrace.cpp | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/src/bpftrace.cpp b/src/bpftrace.cpp +index a49a3efe..485267e0 100644 +--- a/src/bpftrace.cpp ++++ b/src/bpftrace.cpp +@@ -992,11 +992,13 @@ std::chrono::time_point BPFtrace::resolve_timestamp( + << "Cannot resolve timestamp due to failed boot time calculation"; + } else { + t += std::chrono::seconds(boottime_->tv_sec); +- t += std::chrono::nanoseconds(boottime_->tv_nsec); ++ t += std::chrono::duration_cast( ++ std::chrono::nanoseconds(boottime_->tv_nsec)); + } + } + +- t += std::chrono::nanoseconds(nsecs); ++ t += std::chrono::duration_cast( ++ std::chrono::nanoseconds(nsecs)); + return t; + } + diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-ast-Adapt-to-Clang-LLVM-21-DiagnosticOptions-API.patch b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-ast-Adapt-to-Clang-LLVM-21-DiagnosticOptions-API.patch new file mode 100644 index 0000000000..e5ae0219f7 --- /dev/null +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0003-ast-Adapt-to-Clang-LLVM-21-DiagnosticOptions-API.patch @@ -0,0 +1,78 @@ +From 9771348249981680c2b893a435099673e79997c4 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 31 Aug 2025 15:29:26 -0700 +Subject: [PATCH 3/3] ast: Adapt to Clang/LLVM 21 DiagnosticOptions API +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Clang 21 removed intrusive ref-counting from DiagnosticOptions and +switched consumers to take a DiagnosticOptions&. Building bpftrace +with clang-21/libc++ failed with errors like: + + IntrusiveRefCntPtr.h:163: error: no member named 'Retain' in + 'clang::DiagnosticOptions' + Diagnostic.h:578: no known conversion from + 'IntrusiveRefCntPtr' to + 'DiagnosticOptions&' + +Update the frontend glue: +- For LLVM >= 21, construct a real DiagnosticOptions object and pass + it by reference to TextDiagnosticPrinter and DiagnosticsEngine + (no IntrusiveRefCntPtr). Keep it alive via shared_ptr to satisfy + DiagnosticsEngine’s reference lifetime. +- Replace ci.setInvocation(inv) with + ci.getInvocation() = *inv; which is stable across modern Clang. + +Retain the old code path for LLVM < 21 via #if guards. + +This fixes builds with clang-21/libc++ while keeping compatibility +with older LLVM releases. + +No functional change intended. + +Upstream-Status: Submitted [https://github.com/bpftrace/bpftrace/pull/4526] + +Signed-off-by: Khem Raj +--- + src/ast/passes/clang_build.cpp | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +diff --git a/src/ast/passes/clang_build.cpp b/src/ast/passes/clang_build.cpp +index fa5b2add..3debc350 100644 +--- a/src/ast/passes/clang_build.cpp ++++ b/src/ast/passes/clang_build.cpp +@@ -78,12 +78,21 @@ static Result<> build(CompileContext &ctx, + // a string, which we can then capture and associate with the import. + std::string errstr; + llvm::raw_string_ostream err(errstr); ++#if LLVM_VERSION_MAJOR < 21 + auto diagOpts = llvm::makeIntrusiveRefCnt(); + auto diags = std::make_unique( + llvm::makeIntrusiveRefCnt(), + diagOpts, + new clang::TextDiagnosticPrinter(err, diagOpts.get())); +- ++#else ++ // Clang 21: DiagnosticOptions is NOT intrusive-refcounted anymore. ++ // Keep it alive for the program lifetime (or store it on a longer-lived object). ++ static std::shared_ptr diagOpts = ++ std::make_shared(); ++ llvm::IntrusiveRefCntPtr diagID(new clang::DiagnosticIDs()); ++ auto client = std::make_unique(err, *diagOpts); ++ auto diags = std::make_unique(diagID, *diagOpts, client.release()); ++#endif + // We create a temporary memfd that we can use to store the output, + // since the ClangDriver API is framed in terms of filenames. Perhaps + // we could use the internals here, but that carries other risks. +@@ -122,7 +131,9 @@ static Result<> build(CompileContext &ctx, + inv->getCodeGenOpts().DebugColumnInfo = true; + + clang::CompilerInstance ci; +- ci.setInvocation(inv); ++ // Cross-version friendly: assign into the existing invocation ++ // (works across modern Clang majors, including 21) ++ ci.getInvocation() = *inv; + ci.setDiagnostics(diags.release()); + ci.setFileManager(new clang::FileManager(clang::FileSystemOptions(), vfs)); + ci.createSourceManager(ci.getFileManager()); diff --git a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.24.0.bb similarity index 82% rename from meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb rename to meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.24.0.bb index 1b2f8ab0e4..7e9cbf485e 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.23.5.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.24.0.bb @@ -7,6 +7,7 @@ DEPENDS += "bison-native \ flex-native \ gzip-native \ elfutils \ + bpftool-native \ bcc \ systemtap \ libcereal \ @@ -16,11 +17,15 @@ DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'pahole-native llvm-nativ RDEPENDS:${PN} += "bash python3 xz" -SRC_URI = "git://github.com/iovisor/bpftrace;branch=release/0.23.x;protocol=https \ +SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ file://run-ptest \ + file://0001-cmake-Raise-max-supported-clang-version-to-clang-21.patch \ file://0002-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \ + file://0001-Include-missing-c-runtime-headers.patch \ + file://0002-chrono-Fix-build-when-using-libc-casting-ns-to-syste.patch \ + file://0003-ast-Adapt-to-Clang-LLVM-21-DiagnosticOptions-API.patch \ " -SRCREV = "e48ccc66c9971515648b63699bc4b1490c388d85" +SRCREV = "3b78184eed28501ab4bbb55e45c4172538999da1" inherit bash-completion cmake ptest pkgconfig From patchwork Mon Sep 1 22:42:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 69356 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 5BEA4CA100C for ; Mon, 1 Sep 2025 22:42:53 +0000 (UTC) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mx.groups.io with SMTP id smtpd.web10.64706.1756766571434614038 for ; Mon, 01 Sep 2025 15:42:51 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=lmNKX8/h; spf=pass (domain: gmail.com, ip: 209.85.210.177, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-7720f23123dso4451721b3a.2 for ; Mon, 01 Sep 2025 15:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756766570; x=1757371370; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=398Uv6OE9TUnATTYZqPT+rdD+rKb3U62w+LjtFOHBMo=; b=lmNKX8/hqWu7+XsYbktzx5TXrNELPFfDkTyLJemcs2JWl747Dc8VwRrnqgJ9H/ji5o uSWxLJsKX0e4iseBk7QzUG2Rm6IrIZGN0WN8LGEic1gZB6F7YPVD5pD1bxztG4uGpOz0 LLrcEQyhTRlESFnUmbDjnKLQN7QlBEtgV3Tby+KNbVb/ya2hBK3Fb0FCcBzg6o1G9JA1 s6fB2uXdud5JDNySCvSuHDIUzI8Y1kzddmGzJgs+QvooLKuj7Oh8O+mnMN05huyUPBxR X421jsWzZ5K9HU3kGdSGcwwYyozAWQDl70FmjGAzg88gvmG/f84/Rn2b7rdVWwgGaUsV ryqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756766570; x=1757371370; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=398Uv6OE9TUnATTYZqPT+rdD+rKb3U62w+LjtFOHBMo=; b=qvP+wKDoJGJ23DE3uzO0EQudnIIOmuWcE8O8fffxMXHAMNKDu2bWGqwivb6vo58mFM bgKTM0/ra0yTzlan1cmGdINBWgwAjueugeNNyIzRIOX4vS8emzY6xjQ4yv+HFvcENIdQ pEptsiPNSWZG0dPJeVPzC1VrQezrgIu+53kuj+7Y+BunkHKcTwGIriXs6KnX9Q/MkHfG RNQeWPvijs3KSvf2OMGIHcNfZUMec84qf3utfqaUdjYGiYbFRlVRVQe/M/NxnMBXamrz eM6Blhout+eo8hnaw3GerjmuV2eGAfsP2beM6NFWY7lAbbS29f9rpXjkGv24NPc1n2cF wdpQ== X-Gm-Message-State: AOJu0YxEo9GrcsVrGbUwHJYypF/RJLr5KEP7xNNN7n0m/FdWZUQScsk2 aQCbVRl+vafe19DQVHhnUNcoNvbjwL1aJmJkueyKl3uBBGWTMCR1ftce20qIhEVp X-Gm-Gg: ASbGncs+SRII8kcMN3zw9FJs9QBxNFkfEzuBCQvS6Bdt1GoWRGr8Zb/D917MWOV8JLc vdoo9YLez5fs2HDaCs+Kap9z99ftJo3pgXOIXQtbsSVkRgGT0uqyVC2lGAxqY8o6bPJkcK1mxkz 9aXb++lJbufYnts3Jr1tjg+G8u14J3T/O8q09vjq1yLUbOiD2M/R3TlYs0qCDjXnlz84SmVgGGf nlp7NFWwY9q6QKbRlPtvXZsN0hr6gkScNubK8ztMMBs0s0D9QBbyF1ktJu0sT9KHe66YvJd07Mk vIVhYOYx1lG/M7tnND5SzImi2IH7uhlX9XQgGD56Pds8jcKr4MuPnbjf/cHbAvknFn5XgR4JAA1 HW15Y/Nfy6HRYu/gA/Ms377fR22Bl9b6sC4aIGmysodrWVH5NJDJSTbmw0zeCTi4I0jij0ngFyg bCtDzOLKtdMLv7oCX8KORbynHW+UYkK/tN8VaFO5E5 X-Google-Smtp-Source: AGHT+IHMDrmdp3AFP9YTH48gB0s0J1/HWdKEjtSfhqFxdoGhg+43cEOzv62L+x5lnV6dp96w7e7tfA== X-Received: by 2002:a05:6a00:198f:b0:772:6493:7e67 with SMTP id d2e1a72fcca58-77264938010mr3051841b3a.3.1756766570502; Mon, 01 Sep 2025 15:42:50 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::c2de]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4beb72sm11648240b3a.61.2025.09.01.15.42.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 15:42:49 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-oe][PATCH 3/5] libjxl: Upgrade to 0.11.1 Date: Mon, 1 Sep 2025 15:42:41 -0700 Message-ID: <20250901224244.1913647-3-raj.khem@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250901224244.1913647-1-raj.khem@gmail.com> References: <20250901224244.1913647-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 01 Sep 2025 22:42:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/119164 Use -fno-integrated-as with clang on arm architecture Signed-off-by: Khem Raj --- .../libjxl/{libjxl_0.10.3.bb => libjxl_0.11.1.bb} | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) rename meta-oe/recipes-multimedia/libjxl/{libjxl_0.10.3.bb => libjxl_0.11.1.bb} (90%) diff --git a/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb b/meta-oe/recipes-multimedia/libjxl/libjxl_0.11.1.bb similarity index 90% rename from meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb rename to meta-oe/recipes-multimedia/libjxl/libjxl_0.11.1.bb index 2405126e5c..7b0a6db9fb 100644 --- a/meta-oe/recipes-multimedia/libjxl/libjxl_0.10.3.bb +++ b/meta-oe/recipes-multimedia/libjxl/libjxl_0.11.1.bb @@ -12,7 +12,7 @@ SRC_URI = "gitsm://github.com/libjxl/libjxl.git;protocol=https;nobranch=1 \ file://0001-cmake-Do-not-use-mrelax-all-with-clang-on-RISCV64.patch \ " -SRCREV = "4a3b22d2600f92d8706fb72d85d52bfee2acbd54" +SRCREV = "794a5dcf0d54f9f0b20d288a12e87afb91d20dfc" EXTRA_OECMAKE = " \ -DCMAKE_BUILD_TYPE=Release \ @@ -43,4 +43,8 @@ PACKAGECONFIG[gimp] = "-DJPEGXL_ENABLE_PLUGIN_GIMP210=ON,-DJPEGXL_ENABLE_PLUGIN_ PACKAGECONFIG[mime] = "-DJPEGXL_ENABLE_PLUGIN_MIME=ON,-DJPEGXL_ENABLE_PLUGIN_MIME=OFF" PACKAGECONFIG[sizeless-vectors] = "-DJPEGXL_ENABLE_SIZELESS_VECTORS=ON,-DJPEGXL_ENABLE_SIZELESS_VECTORS=OFF" +# lcms/src/cmsps2.c +# error: out of range pc-relative fixup value +CFLAGS:append:toolchain-clang:arm = " -fno-integrated-as" + FILES:${PN} += "${libdir}/gdk-pixbuf-2.0 ${datadir}" From patchwork Mon Sep 1 22:42:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 69355 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 69006CA100D for ; Mon, 1 Sep 2025 22:42:53 +0000 (UTC) Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) by mx.groups.io with SMTP id smtpd.web10.64708.1756766572709758636 for ; Mon, 01 Sep 2025 15:42:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=dCLU1RGj; spf=pass (domain: gmail.com, ip: 209.85.210.174, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-7726c7ff7e5so390733b3a.3 for ; Mon, 01 Sep 2025 15:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756766572; x=1757371372; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TvGlcZiTYn+1La1i5ZpD6oXEWXstZYLi9UOcqntqFKw=; b=dCLU1RGjp33XzdkrR3sxWDJFFCGgLdIHisB2dyKNB/H+HHmzJnuLPfzLpIitjiqxtX lO/3t1nTEK8/6vrTjL53MHfWx4iFZ6VDEQlRmFy7vUdEHUN7nZszder2UFyF/PDF+0bu qGe9TwswDkfptiWUaZol0FMXGe7G4gAWj0yZ0m0kwbFpZMe602E/k0lQx927Mg/MlX7I UlrhfTwBbaCw4cB6wlO/poJsqfaK/3szjCq2FJJ2O4TDMgZ3xntESWBZl4riwfufFqiZ OO69NGuREA3FpeGeveFIqXIZ+LLU7XylZJ1n+6L7F3l4l5LC5ORdN1+bJFM9T0YpxChn Vclg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756766572; x=1757371372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TvGlcZiTYn+1La1i5ZpD6oXEWXstZYLi9UOcqntqFKw=; b=GaNjOq0OmTW+aLoh1HNjtUaOF/8oUqKsHcMTY+UQM81vBgb3QbE39wZB052Q1nzD3G ihud7m+A87zR2x55DsZBd5D3nFTk7cxaoYG3GXHbO9sNXDc5nBKlHz32FxmHksmMiMU+ nJz4VFbqFJIvc016zTi41O5ulOzrcpcBtoiFC/Od8sJ6Djtg0i8vOt68SnrMLTB04kBm WJ1O/x658E+rOPYRWrU4ICxeCSbxyQSUwwvYPxFsAVGgu/EXJMYaFT8VzYa+2zuqtzSV v4R70V+yZzZNVuBgNs+taJ6lox4m1tD5RV484Q9qrmRG8Pu8GnD77OdgSkNc48XHa9yg 7sBg== X-Gm-Message-State: AOJu0YwiPGnie2rGhl28QLToAn4acZBeLoQwGoatraP1yRbma3L4WGSK RtlOox/uVkggZYHSSKif1J3ihxveHRjHTaeo5PPqigJMRQdWHcPRkpGOOeC42VTd X-Gm-Gg: ASbGncu4ly4vAKtSJyUtvvHPdCoPl0Wd9qGHX3hChoDLnq3X66iw4l59Xocb6M+nnnr 3hZESvKTeihwcOJAtXQQn+0KEdHM71XkZIyxP0NBPn7uEfdOyqSIjR7naSKhX3JHU5z9FNpJaZQ 2emY5vTdM6mesjvKMNe+7m0oYbYzFM93B8nOayxX9ww3Zg98GrLgtkk6Z6iaZx2Zi4KoGIzeITW MY3r2kJDiqNfvBG03tVQtyTtLVRsVRqdkb5gjbIcnKR330omhxTzdkG0n+re7nG8CMxwZf0YRVi H0BbQzBX73HUatjRp37SXTb37TyDR3oEHxQzLxMPWgPPGh7S3/qktSM8r+FH/CXquabRydNRapC cy7IRy3e8MNWYHjIBSL16I+dNdgMmuLrsBm8Fx/ctF9ltQPOv/rFXv7NX9qP+XjjEnPwM3eBoHE DQ9n9XOY+Tuz7dEg5QA1CEh+DXhoB+iu4ozYRtKIWd X-Google-Smtp-Source: AGHT+IFjSih5vYjuDZ7hW8Yuk8ziD1VSQq76N01HoyoXK5Ts9qaDo1MX80ukLnKVzZ5k8r7bitlOCA== X-Received: by 2002:a05:6a20:3d82:b0:240:20d:47ca with SMTP id adf61e73a8af0-243d6dd0165mr14789088637.10.1756766571698; Mon, 01 Sep 2025 15:42:51 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::c2de]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4beb72sm11648240b3a.61.2025.09.01.15.42.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 15:42:50 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-initramfs][PATCH 4/5] klibc: Upgrade to 2.0.14 Date: Mon, 1 Sep 2025 15:42:42 -0700 Message-ID: <20250901224244.1913647-4-raj.khem@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250901224244.1913647-1-raj.khem@gmail.com> References: <20250901224244.1913647-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 01 Sep 2025 22:42:53 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/119165 Backport couple of clang related fixes from upstream Signed-off-by: Khem Raj --- ...-stdint.h-Fix-build-with-newer-clang.patch | 99 +++++++++++++++++++ ...t_opts-Fix-the-mount_opts-str-length.patch | 41 ++++++++ ...c-cross_2.0.13.bb => klcc-cross_2.0.14.bb} | 0 ...2.0.13.bb => klibc-static-utils_2.0.14.bb} | 0 ...-utils_2.0.13.bb => klibc-utils_2.0.14.bb} | 0 .../recipes-devtools/klibc/klibc.inc | 4 +- .../{klibc_2.0.13.bb => klibc_2.0.14.bb} | 0 7 files changed, 143 insertions(+), 1 deletion(-) create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-stdint.h-Fix-build-with-newer-clang.patch create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0002-mount_opts-Fix-the-mount_opts-str-length.patch rename meta-initramfs/recipes-devtools/klibc/{klcc-cross_2.0.13.bb => klcc-cross_2.0.14.bb} (100%) rename meta-initramfs/recipes-devtools/klibc/{klibc-static-utils_2.0.13.bb => klibc-static-utils_2.0.14.bb} (100%) rename meta-initramfs/recipes-devtools/klibc/{klibc-utils_2.0.13.bb => klibc-utils_2.0.14.bb} (100%) rename meta-initramfs/recipes-devtools/klibc/{klibc_2.0.13.bb => klibc_2.0.14.bb} (100%) diff --git a/meta-initramfs/recipes-devtools/klibc/files/0001-stdint.h-Fix-build-with-newer-clang.patch b/meta-initramfs/recipes-devtools/klibc/files/0001-stdint.h-Fix-build-with-newer-clang.patch new file mode 100644 index 0000000000..82d02f9fb3 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/files/0001-stdint.h-Fix-build-with-newer-clang.patch @@ -0,0 +1,99 @@ +From 84bfb7a85900446e3cc96a103601052781627043 Mon Sep 17 00:00:00 2001 +From: Florent Revest +Date: Mon, 14 Jul 2025 19:25:04 +0200 +Subject: [PATCH 1/2] stdint.h: Fix build with newer clang + +Recent versions of Clang introduced definitions for __*INT64_C: +https://github.com/llvm/llvm-project/commit/33ad474c45e6d7a0de7bc75e15e27cf6cb9ff895 + +This results in these build errors: + +usr/include/bits64/bitsize/stdint.h:27:9: error: '__INT64_C' macro redefined [-Werror,-Wmacro-redefined] + 27 | #define __INT64_C(c) c ## L + | ^ +:194:9: note: previous definition is here + 194 | #define __INT64_C(c) c##L + | ^ + +Renaming these macros to something more unique avoids the errors. + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=1d27e1732f1326eaf98f4624100f83232d843616] +Signed-off-by: Florent Revest +Signed-off-by: Ben Hutchings +Signed-off-by: Khem Raj +--- + usr/include/bits32/bitsize/stdint.h | 4 ++-- + usr/include/bits64/bitsize/stdint.h | 4 ++-- + usr/include/stdint.h | 10 +++++----- + 3 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/usr/include/bits32/bitsize/stdint.h b/usr/include/bits32/bitsize/stdint.h +index 8e444b6..147090b 100644 +--- a/usr/include/bits32/bitsize/stdint.h ++++ b/usr/include/bits32/bitsize/stdint.h +@@ -24,8 +24,8 @@ typedef unsigned int uint_fast32_t; + typedef int intptr_t; + typedef unsigned int uintptr_t; + +-#define __INT64_C(c) c ## LL +-#define __UINT64_C(c) c ## ULL ++#define __KLIBC_INT64_C(c) c ## LL ++#define __KLIBC_UINT64_C(c) c ## ULL + + #define __PRI64_RANK "ll" + #define __PRIFAST_RANK "" +diff --git a/usr/include/bits64/bitsize/stdint.h b/usr/include/bits64/bitsize/stdint.h +index 988e639..5bc64bf 100644 +--- a/usr/include/bits64/bitsize/stdint.h ++++ b/usr/include/bits64/bitsize/stdint.h +@@ -24,8 +24,8 @@ typedef unsigned long int uint_fast32_t; + typedef long int intptr_t; + typedef unsigned long int uintptr_t; + +-#define __INT64_C(c) c ## L +-#define __UINT64_C(c) c ## UL ++#define __KLIBC_INT64_C(c) c ## L ++#define __KLIBC_UINT64_C(c) c ## UL + + #define __PRI64_RANK "l" + #define __PRIFAST_RANK "l" +diff --git a/usr/include/stdint.h b/usr/include/stdint.h +index f64f027..6cda583 100644 +--- a/usr/include/stdint.h ++++ b/usr/include/stdint.h +@@ -31,17 +31,17 @@ typedef uint64_t uintmax_t; + #define INT8_MIN (-128) + #define INT16_MIN (-32768) + #define INT32_MIN (-2147483647-1) +-#define INT64_MIN (__INT64_C(-9223372036854775807)-1) ++#define INT64_MIN (__KLIBC_INT64_C(-9223372036854775807)-1) + + #define INT8_MAX (127) + #define INT16_MAX (32767) + #define INT32_MAX (2147483647) +-#define INT64_MAX (__INT64_C(9223372036854775807)) ++#define INT64_MAX (__KLIBC_INT64_C(9223372036854775807)) + + #define UINT8_MAX (255U) + #define UINT16_MAX (65535U) + #define UINT32_MAX (4294967295U) +-#define UINT64_MAX (__UINT64_C(18446744073709551615)) ++#define UINT64_MAX (__KLIBC_UINT64_C(18446744073709551615)) + + #define INT_LEAST8_MIN INT8_MIN + #define INT_LEAST16_MIN INT16_MIN +@@ -80,12 +80,12 @@ typedef uint64_t uintmax_t; + #define INT8_C(c) c + #define INT16_C(c) c + #define INT32_C(c) c +-#define INT64_C(c) __INT64_C(c) ++#define INT64_C(c) __KLIBC_INT64_C(c) + + #define UINT8_C(c) c ## U + #define UINT16_C(c) c ## U + #define UINT32_C(c) c ## U +-#define UINT64_C(c) __UINT64_C(c) ++#define UINT64_C(c) __KLIBC_UINT64_C(c) + + #define INT_LEAST8_C(c) INT8_C(c) + #define INT_LEAST16_C(c) INT16_C(c) diff --git a/meta-initramfs/recipes-devtools/klibc/files/0002-mount_opts-Fix-the-mount_opts-str-length.patch b/meta-initramfs/recipes-devtools/klibc/files/0002-mount_opts-Fix-the-mount_opts-str-length.patch new file mode 100644 index 0000000000..ad1f7f03a8 --- /dev/null +++ b/meta-initramfs/recipes-devtools/klibc/files/0002-mount_opts-Fix-the-mount_opts-str-length.patch @@ -0,0 +1,41 @@ +From eaecc37c86fff0ff951e1930abdb9e51364c2d14 Mon Sep 17 00:00:00 2001 +From: Florent Revest +Date: Thu, 10 Jul 2025 19:39:11 +0200 +Subject: [PATCH 2/2] mount_opts: Fix the mount_opts str length + +Newer versions of LLVM report: + +usr/utils/mount_opts.c:20:3: error: initializer-string for character array is too long, array size is 8 but initializer has size 9 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization] + 20 | {"diratime", MS_NODIRATIME, 0, MS_NODIRATIME}, + | ^~~~~~~~~~ + +This is indeed a bit odd. "diratime" is 9 bytes long with the \0 +terminator but placed into a struct that uses a static length of 8 bytes +for that buffer. I suppose this can cause all sorts of undefined +behaviors in theory but that in practice this never caused anything bad +because the next field is an unsigned long containing 2048 so the upper +bytes are 0 and act as string terminators by chance. + +Anyway, fixing this helps unblock builds with newer toolchains. + +Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=f7d9399d1035d2a70067fa6995db7ea02ed0c311] +Signed-off-by: Florent Revest +Signed-off-by: Ben Hutchings +Signed-off-by: Khem Raj +--- + usr/utils/mount_opts.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/usr/utils/mount_opts.h b/usr/utils/mount_opts.h +index cf47cae..5195c88 100644 +--- a/usr/utils/mount_opts.h ++++ b/usr/utils/mount_opts.h +@@ -2,7 +2,7 @@ + #define UTILS_MOUNT_OPTS_H + + struct mount_opts { +- const char str[8]; ++ const char str[9]; + unsigned long rwmask; + unsigned long rwset; + unsigned long rwnoset; diff --git a/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.13.bb b/meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.14.bb similarity index 100% rename from meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.13.bb rename to meta-initramfs/recipes-devtools/klibc/klcc-cross_2.0.14.bb diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.13.bb b/meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.14.bb similarity index 100% rename from meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.13.bb rename to meta-initramfs/recipes-devtools/klibc/klibc-static-utils_2.0.14.bb diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.13.bb b/meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.14.bb similarity index 100% rename from meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.13.bb rename to meta-initramfs/recipes-devtools/klibc/klibc-utils_2.0.14.bb diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 2af53b18e3..26d4ebc72c 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc @@ -20,6 +20,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/libs/klibc/2.0/klibc-${PV}.tar.xz \ file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \ file://cross-clang.patch \ file://0001-workaround-for-overlapping-sections-in-binary.patch \ + file://0001-stdint.h-Fix-build-with-newer-clang.patch \ + file://0002-mount_opts-Fix-the-mount_opts-str-length.patch \ " ARMPATCHES ?= "" @@ -27,7 +29,7 @@ ARMPATCHES ?= "" ARMPATCHES:arm = " \ file://armv4-fix-v4bx.patch \ " -SRC_URI[sha256sum] = "d673a294f742d59368222ff5c38462d81098c55063799de6fb8a7ba3d4af0436" +SRC_URI[sha256sum] = "281bfb683e196818412af70b8968b7726475a80ff1c4bd67119e6bf5059f9075" S = "${UNPACKDIR}/klibc-${PV}" diff --git a/meta-initramfs/recipes-devtools/klibc/klibc_2.0.13.bb b/meta-initramfs/recipes-devtools/klibc/klibc_2.0.14.bb similarity index 100% rename from meta-initramfs/recipes-devtools/klibc/klibc_2.0.13.bb rename to meta-initramfs/recipes-devtools/klibc/klibc_2.0.14.bb From patchwork Mon Sep 1 22:42:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 69359 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 53A12CA1007 for ; Mon, 1 Sep 2025 22:43:03 +0000 (UTC) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by mx.groups.io with SMTP id smtpd.web10.64710.1756766573820958024 for ; Mon, 01 Sep 2025 15:42:53 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=BQrSY8vg; spf=pass (domain: gmail.com, ip: 209.85.210.170, mailfrom: raj.khem@gmail.com) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-77251d7cca6so1356354b3a.3 for ; Mon, 01 Sep 2025 15:42:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756766573; x=1757371373; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vOWgFb/WWm5aqPKPqeahtibCrykRRLWNiN5hf/hcEh8=; b=BQrSY8vg/ae6nUG/Eim1FL1K7pAxpG/mJnEB/CeI2EAW6r4SHdcQNcvR7nywVXqoBL rJPo5G8JjIbYhmj7s69UgBAWweIV8IGtAZe7p2uyBXfkZ43GUZWHED0xX0OlW21fYXaZ L8+0jdo+g0W4IPPBUV5bkxa0G3JZRAptVDA2xqgZsvHb5EnvyXEOd+X047+LS3BClqli EC4azZT/hgBcrB1pc11BzpDCGm7w72zzGN+oPi9SvN9Vimk6Axctm/sdu29kL78EGCsC ay6m2MSzynhzJJuQlOz9lv+X6l5FggyNOgJl6oOE5t6sjyM+W0vMZUuNhJP7pUwtBpsA QFQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756766573; x=1757371373; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vOWgFb/WWm5aqPKPqeahtibCrykRRLWNiN5hf/hcEh8=; b=SgY7kmtsQzteK982HfUmbH20tUU1RYTpYleRArM4vIxmfOEFo6D/rVJJXDKrc/+xsF x8rJSJalpCCwL/SXJxSeVRiiBto9VSfE8/AFGXfcVhKbBEcpKMKwHbRCrdKrDFKV5KF/ vfSV8VJeOufCCgjeZolhOiKPXipB5ZH/KO/Otmio1Qlo+cpBLmGOf7uSl3UA7lubGt4j JkoV8UxdpGe2rwV19K1Fzj7lNmAsqy0RHWaqyIwkFXGrnM128eUREVBOGG8gp9UKHh5p KGzPKvYf/eC0Ru68csNO7ZRpSIEwF0PeGaKywJGpzibhIDykk3SJYjtUMSc2Cn/PqBrs JO8g== X-Gm-Message-State: AOJu0Yx53a9vl2vetdl9rZNzSROq9bS4sF+mluljNA5X5FtHG+HRgfVO WDjvz8pE/5vKhqg94QVBgQFdeIW02vZaSMIUaT2UYB2LBje5VwErpvGS3GXqS5cj X-Gm-Gg: ASbGncs3uEA86VlVfQW6uYxmzK8/WyWfrWi1sTELnWqNM4a7NY/rJ5c+F5hWmSELoC6 yvpqUcSqrGYShNiLAYP9HMZdbW9LUWVcDMRdABGhL//Dnf8vy/WOk0wU/wP7jHwEne36F6pv2iv T8kdlXifelv3FS/GvoLBBTpMbvCrS5Gt9rwuhEaDGsv16SiCJ4nWZsfWflD8mn6afvVg+ZseL50 u9wuqtcGsbs9/ZTe9R/K98V1KBeZkTcHsN/JS2FCJszL3f1hJ2uvl6kYOXX4m0/8G14E+8J44AH oVEIbNmM/mnl0i7QBZMgpPjEEBDP0MTHqy7yb/f998ZgFUDJWJVVbjKgXeLePWJwxcOOhroHr3O dWya6cyVWXq/hnM12jhPZJpyqn8prdc9Hcm3ydHDKZKCkVbkbTtjWDNpc/hv7t65CQxU7ygYHHk bhCS55YQF0NO3WREGKXeLhOAsPu9fPqodWxR9hbL1N X-Google-Smtp-Source: AGHT+IGy3Z5+s/WIpmYqPKdgg0RpVE3GSrPbGjvfhSK28EsaFtatM3UT0TZ0LtcX3GydVfa6h6JH4Q== X-Received: by 2002:a05:6a00:4f85:b0:772:5e09:6933 with SMTP id d2e1a72fcca58-7725e097053mr4993584b3a.9.1756766572909; Mon, 01 Sep 2025 15:42:52 -0700 (PDT) Received: from apollo.tail3ccdd3.ts.net ([2601:646:8201:fd20::c2de]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7722a4beb72sm11648240b3a.61.2025.09.01.15.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Sep 2025 15:42:52 -0700 (PDT) From: Khem Raj To: openembedded-devel@lists.openembedded.org Cc: Khem Raj Subject: [meta-initramfs][PATCH 5/5] klibc: Do not let clang generate wcslen builtin Date: Mon, 1 Sep 2025 15:42:43 -0700 Message-ID: <20250901224244.1913647-5-raj.khem@gmail.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20250901224244.1913647-1-raj.khem@gmail.com> References: <20250901224244.1913647-1-raj.khem@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 01 Sep 2025 22:43:03 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/119166 clang-21 decides to emit wcslen call on arm architecture klibc does not provide widechar support so it should not be used. Fixes | arm-yoe-linux-gnueabi-ld.bfd: usr/kinit/do_mounts_md.o: in function `md_run': | /usr/src/debug/klibc/2.0.14/usr/kinit/do_mounts_md.c:294:(.text+0x5d6): undefined reference to `wcslen' Signed-off-by: Khem Raj --- meta-initramfs/recipes-devtools/klibc/klibc.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-initramfs/recipes-devtools/klibc/klibc.inc b/meta-initramfs/recipes-devtools/klibc/klibc.inc index 26d4ebc72c..4e8710f7bb 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc.inc +++ b/meta-initramfs/recipes-devtools/klibc/klibc.inc @@ -35,7 +35,7 @@ S = "${UNPACKDIR}/klibc-${PV}" OPTFLAGS = "${TUNE_CCARGS} -Os -fcommon" OPTFLAGS:append = " ${DEBUG_PREFIX_MAP}" -OPTFLAGS:append:toolchain-clang = " -fno-builtin-bcmp" +OPTFLAGS:append:toolchain-clang = " -fno-builtin-bcmp -fno-builtin-wcslen" OPTFLAGS:append:toolchain-clang:mipsarch = " -no-integrated-as" PARALLEL_MAKE = ""