diff options
| author | Ryan Eatmon <reatmon@ti.com> | 2026-03-16 11:49:41 -0500 |
|---|---|---|
| committer | Ryan Eatmon <reatmon@ti.com> | 2026-03-16 14:16:21 -0500 |
| commit | b92d66ad1017e935e3a25808c53a1204cf884522 (patch) | |
| tree | 114cafc91d7de0fbc7e75b10f8b398c05ffbb4f0 /meta-ti-bsp | |
| parent | a77f6ead751d663eaec9900e2e6484464f2ba9a9 (diff) | |
| download | meta-ti-b92d66ad1017e935e3a25808c53a1204cf884522.tar.gz | |
linux-ti-staging_6.12: Backport C23 compile fix from linux-stable
A recent change in oe-core [1] to glibc 2.43 has introduced a build
error with 6.12 kernels. Backport a patch [2] from linux-stable to
address this.
[1] https://git.openembedded.org/openembedded-core/commit/?id=f791d6c52870f3571e740ff7818d45bb0a717934
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.12.y&id=3dedeeecd1ae42a751721d83dc21877122cc1795
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Diffstat (limited to 'meta-ti-bsp')
| -rw-r--r-- | meta-ti-bsp/recipes-kernel/linux/files/0001-libbpf-Fix-Wdiscarded-qualifiers-under-C23.patch | 60 | ||||
| -rw-r--r-- | meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb | 2 |
2 files changed, 62 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-kernel/linux/files/0001-libbpf-Fix-Wdiscarded-qualifiers-under-C23.patch b/meta-ti-bsp/recipes-kernel/linux/files/0001-libbpf-Fix-Wdiscarded-qualifiers-under-C23.patch new file mode 100644 index 00000000..b7a81006 --- /dev/null +++ b/meta-ti-bsp/recipes-kernel/linux/files/0001-libbpf-Fix-Wdiscarded-qualifiers-under-C23.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | From 3dedeeecd1ae42a751721d83dc21877122cc1795 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> | ||
| 3 | Date: Sat, 6 Dec 2025 14:28:25 +0500 | ||
| 4 | Subject: libbpf: Fix -Wdiscarded-qualifiers under C23 | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | commit d70f79fef65810faf64dbae1f3a1b5623cdb2345 upstream. | ||
| 10 | |||
| 11 | glibc ≥ 2.42 (GCC 15) defaults to -std=gnu23, which promotes | ||
| 12 | -Wdiscarded-qualifiers to an error. | ||
| 13 | |||
| 14 | In C23, strstr() and strchr() return "const char *". | ||
| 15 | |||
| 16 | Change variable types to const char * where the pointers are never | ||
| 17 | modified (res, sym_sfx, next_path). | ||
| 18 | |||
| 19 | Suggested-by: Florian Weimer <fweimer@redhat.com> | ||
| 20 | Suggested-by: Andrii Nakryiko <andrii@kernel.org> | ||
| 21 | Signed-off-by: Mikhail Gavrilov <mikhail.v.gavrilov@gmail.com> | ||
| 22 | Link: https://lore.kernel.org/r/20251206092825.1471385-1-mikhail.v.gavrilov@gmail.com | ||
| 23 | Signed-off-by: Alexei Starovoitov <ast@kernel.org> | ||
| 24 | [ shung-hsi.yu: needed to fix kernel build failure due to libbpf since glibc | ||
| 25 | 2.43+ (which adds 'const' qualifier to strstr). 'sym_sfx' hunk dropped because | ||
| 26 | commit f8a05692de06 ("libbpf: Work around kernel inconsistently stripping | ||
| 27 | '.llvm.' suffix") is not present. ] | ||
| 28 | Signed-off-by: Shung-Hsi Yu <shung-hsi.yu@suse.com> | ||
| 29 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | ||
| 30 | |||
| 31 | Upstream-Status: Backport | ||
| 32 | --- | ||
| 33 | tools/lib/bpf/libbpf.c | 4 ++-- | ||
| 34 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 35 | |||
| 36 | diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c | ||
| 37 | index 060aecf60b76b1..7d496f0a9a30d1 100644 | ||
| 38 | --- a/tools/lib/bpf/libbpf.c | ||
| 39 | +++ b/tools/lib/bpf/libbpf.c | ||
| 40 | @@ -8174,7 +8174,7 @@ static int kallsyms_cb(unsigned long long sym_addr, char sym_type, | ||
| 41 | struct bpf_object *obj = ctx; | ||
| 42 | const struct btf_type *t; | ||
| 43 | struct extern_desc *ext; | ||
| 44 | - char *res; | ||
| 45 | + const char *res; | ||
| 46 | |||
| 47 | res = strstr(sym_name, ".llvm."); | ||
| 48 | if (sym_type == 'd' && res) | ||
| 49 | @@ -11959,7 +11959,7 @@ static int resolve_full_path(const char *file, char *result, size_t result_sz) | ||
| 50 | if (!search_paths[i]) | ||
| 51 | continue; | ||
| 52 | for (s = search_paths[i]; s != NULL; s = strchr(s, ':')) { | ||
| 53 | - char *next_path; | ||
| 54 | + const char *next_path; | ||
| 55 | int seg_len; | ||
| 56 | |||
| 57 | if (s[0] == ':') | ||
| 58 | -- | ||
| 59 | cgit 1.2.3-korg | ||
| 60 | |||
diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb index a02b90e7..c63d7532 100644 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb | |||
| @@ -24,6 +24,8 @@ BRANCH ?= "ti-linux-6.12.y" | |||
| 24 | SRCREV ?= "da3c0f0a33ac00f7138c695a16d90301cf7ec02b" | 24 | SRCREV ?= "da3c0f0a33ac00f7138c695a16d90301cf7ec02b" |
| 25 | PV = "6.12.57+git" | 25 | PV = "6.12.57+git" |
| 26 | 26 | ||
| 27 | SRC_URI += "file://0001-libbpf-Fix-Wdiscarded-qualifiers-under-C23.patch" | ||
| 28 | |||
| 27 | KERNEL_REPRODUCIBILITY_PATCHES = " \ | 29 | KERNEL_REPRODUCIBILITY_PATCHES = " \ |
| 28 | file://0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch \ | 30 | file://0001-drivers-gpu-drm-msm-registers-improve-reproducibilit.patch \ |
| 29 | " | 31 | " |
