package/uclibc: add missing sys/auxv.h for static builds
PATCH 1/1 package/uclibc: add missing sys/auxv.h for static builds
getauxval() works fine for static builds. This was already fixed a while ago, see the commit message of the patch for more details.
Fixes:
- https://autobuild.buildroot.net/results/f03/f03380ef48cea232e4958084eae419d5516f4ef4
--- ...l-sys-auxv.h-for-static-builds-again.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patch
package/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patch new file +57 -0
@@ -0,0 +1,57 @@ +From 6dc9f06a0330f11171f76f4b831724c02642f11f Mon Sep 17 00:00:00 2001 +From: ramin <[email protected]> +Date: Mon, 12 Oct 2026 16:30:56 +0200 +Subject: [PATCH] buildsys: install sys/auxv.h for static builds again + +getauxval() has not needed ld.so since 227b7c825 and 737a0edf4 ("Make +getauxval work with static linking", "Support non-cached entries in +getauxval", v1.0.52): _dl_auxvt and _dl_auxv_start are defined in +libc/misc/elf/dl-support.c for the static libc, and __uClibc_main calls +_dl_aux_init() on that path too. The static libc.a carries getauxval, +__getauxval, _dl_aux_init, _dl_auxvt and _dl_auxv_start. + +Its header is still withheld, though. df81bd1e2 ("getauxval: remove +header for static builds") put sys/auxv.h next to dlfcn.h in the +HEADERS_RM line that applies when HAVE_SHARED is unset, as a way around +the link error of the day -- a package that probed for getauxval would +not find a declaration and would take its fallback path. That error is +gone and the workaround outlived it: a static sysroot installs 70 of the +71 headers in include/sys, and the one missing is auxv.h. + +So a static configuration of, say, openssl fails with "sys/auxv.h: No +such file or directory", which reads like a missing feature rather than +a withheld declaration. + +Measured on riscv64 with a static configuration and gcc 10.5.0: with the +header installed, a +statically linked program answers AT_PAGESZ as 4096, matching +sysconf(_SC_PAGESIZE), returns every entry of /proc/self/auxv unchanged, +and reports ENOENT for a type that was not passed -- both for a type +inside the cached range and for one above it, which takes the search +over the whole vector. + +dlfcn.h and bits/dlfcn.h stay removed. + +Upstream: https://gogs.waldemar-brodkorb.de/oss/uclibc-ng/commit/6dc9f06a0330f11171f76f4b831724c02642f11f +Signed-off-by: Ramin Moussavi <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 3b28fbf60..72865863d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -257,7 +257,7 @@ HEADERS_RM- := \ + ifeq ($(UCLIBC_STRICT_HEADERS),y) + HEADERS_RM- += sgtty.h + endif +-HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h sys/auxv.h ++HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h + HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT) += thread_db.h + HEADERS_RM-$(UCLIBC_HAS_ARGP) += argp.h + HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h +-- +2.47.3 +
Signature · 6 lines
2.47.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Petazzoni via buildroot
AppliedQuoted 7 lines · Waldemar Brodkorb
getauxval()works fine for static builds. This was already fixed a while ago, see the commit message of the patch for more details.Fixes:
- https://autobuild.buildroot.net/results/f03/f03380ef48cea232e4958084eae419d5516f4ef4Signed-off-by Waldemar Brodkorb <[email protected]>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Raphaël Mélotte via buildroot
AppliedIn reply of:
Quoted 7 lines
getauxval()works fine for static builds. This was already fixed a while ago, see the commit message of the patch for more details.Fixes:
- https://autobuild.buildroot.net/results/f03/f03380ef48cea232e4958084eae419d5516f4ef4Signed-off-by Waldemar Brodkorb <[email protected]>
Applied to 2025.02.x, 2026.08.x. Thanks
Quoted 58 lines
--- ...l-sys-auxv.h-for-static-builds-again.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patchpackage/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patch new file +47
-0@@ -0,0 +1,57 @@ +From 6dc9f06a0330f11171f76f4b831724c02642f11f Mon Sep 17 00:00:00 2001 +From: ramin <[email protected]> +Date: Mon, 12 Oct 2026 16:30:56 +0200 +Subject: [PATCH] buildsys: install sys/auxv.h for static builds again + +getauxval() has not needed ld.so since 227b7c825 and 737a0edf4 ("Make +getauxval work with static linking", "Support non-cached entries in +getauxval", v1.0.52): _dl_auxvt and _dl_auxv_start are defined in +libc/misc/elf/dl-support.c for the static libc, and __uClibc_main calls +_dl_aux_init() on that path too. The static libc.a carries getauxval, +__getauxval, _dl_aux_init, _dl_auxvt and _dl_auxv_start. + +Its header is still withheld, though. df81bd1e2 ("getauxval: remove +header for static builds") put sys/auxv.h next to dlfcn.h in the +HEADERS_RM line that applies when HAVE_SHARED is unset, as a way around +the link error of the day -- a package that probed for getauxval would +not find a declaration and would take its fallback path. That error is +gone and the workaround outlived it: a static sysroot installs 70 of the +71 headers in include/sys, and the one missing is auxv.h. + +So a static configuration of, say, openssl fails with "sys/auxv.h: No +such file or directory", which reads like a missing feature rather than +a withheld declaration. + +Measured on riscv64 with a static configuration and gcc 10.5.0: with the +header installed, a +statically linked program answers AT_PAGESZ as 4096, matching +sysconf(_SC_PAGESIZE), returns every entry of /proc/self/auxv unchanged, +and reports ENOENT for a type that was not passed -- both for a type +inside the cached range and for one above it, which takes the search +over the whole vector. + +dlfcn.h and bits/dlfcn.h stay removed. + +Upstream: https://gogs.waldemar-brodkorb.de/oss/uclibc-ng/commit/6dc9f06a0330f11171f76f4b831724c02642f11f +Signed-off-by: Ramin Moussavi <[email protected]> +Signed-off-by: Waldemar Brodkorb <[email protected]> +--- + Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile.in b/Makefile.in +index 3b28fbf60..72865863d 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -257,7 +257,7 @@ HEADERS_RM- := \ + ifeq ($(UCLIBC_STRICT_HEADERS),y)
package/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patch line 57
Quoted 10 lines
package/uclibc/0006-buildsys-install-sys-auxv.h-for-static-builds-again.patch new file +10
-0+ HEADERS_RM- += sgtty.h + endif +-HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h sys/auxv.h ++HEADERS_RM-$(HAVE_SHARED) += dlfcn.h bits/dlfcn.h + HEADERS_RM-$(PTHREADS_DEBUG_SUPPORT) += thread_db.h + HEADERS_RM-$(UCLIBC_HAS_ARGP) += argp.h + HEADERS_RM-$(UCLIBC_HAS_BSD_ERR) += err.h +-- +2.47.3 +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot