package/avrdude/Config.in | 1 + package/bcc/Config.in | 1 + package/bpftool/Config.in | 1 + package/bpftrace/Config.in | 1 + package/elfutils/Config.in | 12 ++++++++++-- package/falcosecurity-libs/Config.in | 1 + package/igt-gpu-tools/Config.in | 1 + package/kexec-lite/Config.in | 1 + package/libbpf/Config.in | 1 + package/ltrace/Config.in | 1 + package/makedumpfile/Config.in | 1 + package/petitboot/Config.in | 1 + support/testing/tests/package/test_bcc.py | 1 + 13 files changed, 22 insertions(+), 2 deletions(-)
Since Buildroot commit [1] "package/elfutils: bump to version 0.192"
elfutils fails to build on Aarch64 with toolchain including Kernel older
than version 5.0. Error shows:
aarch64_initreg.c: In function 'aarch64_set_initial_registers_tid':
aarch64_initreg.c:61:24: error: storage size of 'pac_mask' isn't
known
61 | struct user_pac_mask pac_mask;
| ^~~~~~~~
elfutils 0.192 introduced a Aarch64 pointer authentication support in
upstream commit [2].
For reference, the user_pac_mask structure was introduced in Kernel
upstream commit [3], included in Kernel v5.0.
Fixes:
- e.g https://autobuild.buildroot.org/results/5156901a73be52ce8ffbf10729e6852499a300be/
- 4/6 of the failures here: https://autobuild.buildroot.org/?reason=elfutils-0.192&arch=aarch64
[1] https://gitlab.com/buildroot.org/buildroot/-/commit/5eb734766b24de5fce6e586897cd4827f8855442
[2] https://sourceware.org/git/?p=elfutils.git;a=commitdiff;h=64e3b451ad2cec8d45661b1816e3d2dc4431f3ca
[3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec6e822d1a22d0eef1d1fa260dff751dba9a4258
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20250217140332.310347-1-alex.bennee@linaro.org>
---
v3
- introduce BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS
- expand Aarch64 condition to include BE
- fix bcc test to use bleeding edge toolchain
---
package/avrdude/Config.in | 1 +
package/bcc/Config.in | 1 +
package/bpftool/Config.in | 1 +
package/bpftrace/Config.in | 1 +
package/elfutils/Config.in | 12 ++++++++++--
package/falcosecurity-libs/Config.in | 1 +
package/igt-gpu-tools/Config.in | 1 +
package/kexec-lite/Config.in | 1 +
package/libbpf/Config.in | 1 +
package/ltrace/Config.in | 1 +
package/makedumpfile/Config.in | 1 +
package/petitboot/Config.in | 1 +
support/testing/tests/package/test_bcc.py | 1 +
13 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/package/avrdude/Config.in b/package/avrdude/Config.in
index 06fee0ca7f..13a84677c2 100644
--- a/package/avrdude/Config.in
+++ b/package/avrdude/Config.in
@@ -4,6 +4,7 @@ config BR2_PACKAGE_AVRDUDE
depends on BR2_USE_WCHAR # elfutils
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LIBUSB
select BR2_PACKAGE_LIBUSB_COMPAT
diff --git a/package/bcc/Config.in b/package/bcc/Config.in
index bf46f07d93..e9d8b63a96 100644
--- a/package/bcc/Config.in
+++ b/package/bcc/Config.in
@@ -9,6 +9,7 @@ config BR2_PACKAGE_BCC
depends on BR2_USE_WCHAR # clang, python3
depends on BR2_TOOLCHAIN_HAS_THREADS # clang, python3
depends on !BR2_STATIC_LIBS # clang, python3
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_CLANG
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_FLEX # needs FlexLexer.h
diff --git a/package/bpftool/Config.in b/package/bpftool/Config.in
index 9500baf11e..15ca736501 100644
--- a/package/bpftool/Config.in
+++ b/package/bpftool/Config.in
@@ -17,6 +17,7 @@ config BR2_PACKAGE_BPFTOOL
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_BINUTILS
select BR2_PACKAGE_ELFUTILS
help
diff --git a/package/bpftrace/Config.in b/package/bpftrace/Config.in
index 8af94443ab..f21da07601 100644
--- a/package/bpftrace/Config.in
+++ b/package/bpftrace/Config.in
@@ -18,6 +18,7 @@ config BR2_PACKAGE_BPFTRACE
depends on BR2_USE_WCHAR # bcc -> clang, bcc -> python3, libbpf
depends on BR2_TOOLCHAIN_HAS_THREADS # bcc -> clang, bcc -> python3, libbpf
depends on !BR2_STATIC_LIBS # bcc -> clang, bcc -> python3, libbpf
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_BCC
select BR2_PACKAGE_BZIP2
select BR2_PACKAGE_CEREAL
diff --git a/package/elfutils/Config.in b/package/elfutils/Config.in
index c355048c6d..8fe19ef10d 100644
--- a/package/elfutils/Config.in
+++ b/package/elfutils/Config.in
@@ -1,12 +1,20 @@
-comment "elfutils needs a toolchain w/ wchar, dynamic library, threads"
+# This option ensures elfutils has recent enough kernel headers for the features it needs.
+config BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS
+ bool
+ default y
+ depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_5_0 || (!BR2_aarch64 && !BR2_aarch64_be) # user_pac_mask
+
+comment "elfutils needs a toolchain w/ wchar, dynamic library, threads, (kernel headers >= 5.0 for AArch64)"
depends on !BR2_USE_WCHAR || BR2_STATIC_LIBS \
- || !BR2_TOOLCHAIN_HAS_THREADS
+ || !BR2_TOOLCHAIN_HAS_THREADS \
+ || !BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS
config BR2_PACKAGE_ELFUTILS
bool "elfutils"
depends on BR2_USE_WCHAR
depends on !BR2_STATIC_LIBS
depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS
select BR2_PACKAGE_ZLIB
select BR2_PACKAGE_ARGP_STANDALONE if !BR2_TOOLCHAIN_USES_GLIBC
select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
diff --git a/package/falcosecurity-libs/Config.in b/package/falcosecurity-libs/Config.in
index 028a0ed28b..1a7118f04f 100644
--- a/package/falcosecurity-libs/Config.in
+++ b/package/falcosecurity-libs/Config.in
@@ -10,6 +10,7 @@ config BR2_PACKAGE_FALCOSECURITY_LIBS
depends on BR2_TOOLCHAIN_HAS_SYNC_4 || BR2_TOOLCHAIN_HAS_ATOMIC # grpc
depends on BR2_TOOLCHAIN_USES_GLIBC # tbb
depends on BR2_PACKAGE_LUAINTERPRETER_ABI_VERSION_5_1
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_C_ARES
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_GRPC
diff --git a/package/igt-gpu-tools/Config.in b/package/igt-gpu-tools/Config.in
index 184acb4cf1..7417aa9613 100644
--- a/package/igt-gpu-tools/Config.in
+++ b/package/igt-gpu-tools/Config.in
@@ -7,6 +7,7 @@ config BR2_PACKAGE_IGT_GPU_TOOLS
depends on BR2_PACKAGE_HAS_UDEV
depends on BR2_USE_WCHAR # elfutils, procps-ng
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_11 # linux/dma-buf.h
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # procps-ng
select BR2_PACKAGE_CAIRO
select BR2_PACKAGE_CAIRO_PNG
diff --git a/package/kexec-lite/Config.in b/package/kexec-lite/Config.in
index 71bd619ae4..1d15cda3d0 100644
--- a/package/kexec-lite/Config.in
+++ b/package/kexec-lite/Config.in
@@ -9,6 +9,7 @@ config BR2_PACKAGE_KEXEC_LITE
depends on !BR2_STATIC_LIBS # dtc, elfutils
depends on BR2_USE_WCHAR # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_DTC
select BR2_PACKAGE_DTC_PROGRAMS
diff --git a/package/libbpf/Config.in b/package/libbpf/Config.in
index a78392cdc8..e538526e4f 100644
--- a/package/libbpf/Config.in
+++ b/package/libbpf/Config.in
@@ -5,6 +5,7 @@ config BR2_PACKAGE_LIBBPF
depends on !BR2_STATIC_LIBS # elfutils
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_13
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_ZLIB
help
diff --git a/package/ltrace/Config.in b/package/ltrace/Config.in
index 2dc969c4f1..7f131204f8 100644
--- a/package/ltrace/Config.in
+++ b/package/ltrace/Config.in
@@ -17,6 +17,7 @@ config BR2_PACKAGE_LTRACE
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils
depends on BR2_TOOLCHAIN_USES_UCLIBC || BR2_TOOLCHAIN_USES_GLIBC
depends on BR2_PACKAGE_LTRACE_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_ELFUTILS
help
Debugging program which runs a specified command until it
diff --git a/package/makedumpfile/Config.in b/package/makedumpfile/Config.in
index 325a31d7b6..dfbc0588c4 100644
--- a/package/makedumpfile/Config.in
+++ b/package/makedumpfile/Config.in
@@ -19,6 +19,7 @@ config BR2_PACKAGE_MAKEDUMPFILE
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS # dlopen
depends on BR2_USE_WCHAR
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_BZIP2
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_XZ
diff --git a/package/petitboot/Config.in b/package/petitboot/Config.in
index 50d5a4da70..e32be4cba6 100644
--- a/package/petitboot/Config.in
+++ b/package/petitboot/Config.in
@@ -7,6 +7,7 @@ config BR2_PACKAGE_PETITBOOT
depends on BR2_TOOLCHAIN_HAS_THREADS # elfutils, kexec-lite, lvm2
depends on BR2_PACKAGE_HAS_UDEV
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_17 || !BR2_PACKAGE_KEXEC_ARCH_SUPPORTS # kexec
+ depends on BR2_PACKAGE_ELFUTILS_KERNEL_SUPPORTS # elfutils
select BR2_PACKAGE_ELFUTILS
select BR2_PACKAGE_LVM2 # devmapper
select BR2_PACKAGE_NCURSES
diff --git a/support/testing/tests/package/test_bcc.py b/support/testing/tests/package/test_bcc.py
index 51f175a5b4..bdcb722722 100644
--- a/support/testing/tests/package/test_bcc.py
+++ b/support/testing/tests/package/test_bcc.py
@@ -17,6 +17,7 @@ class TestBcc(infra.basetest.BRTest):
f"""
BR2_aarch64=y
BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
--
2.39.5
© 2016 - 2025 Red Hat, Inc.