diff mbox series

[RFC,2/4] musl: wrap the bits headers for multilib

Message ID 20261029113829.2806167-3-mark.yang@lge.com
State New
Headers show
Series musl multilib: loader path and headers | expand

Commit Message

mark.yang Oct. 29, 2026, 11:38 a.m. UTC
From: "mark.yang" <mark.yang@lge.com>

Pass every installed bits/*.h through oe_multilib_header, as
glibc-package.inc does for the glibc ones.

Unlike glibc, musl keeps all of its arch headers in bits/. Which of
them differ depends on the arch pair and the musl release, so all of
them are wrapped instead of keeping a list.

Signed-off-by: mark.yang <mark.yang@lge.com>
---
 meta/recipes-core/musl/musl_git.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index c81178c15a..b6ab5806b5 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -2,7 +2,7 @@ 
 # Released under the MIT license (see COPYING.MIT for the terms)
 
 require musl.inc
-inherit linuxloader
+inherit linuxloader multilib_header
 
 SRCREV = "c4e1bb3994c14ed5112c894d15a451bf00f0d501"
 
@@ -68,6 +68,13 @@  do_install() {
         echo "${libdir}" >> ${D}${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path
 	rm -f ${D}${bindir}/ldd ${D}${GLIBC_LDSO}
 	ln -rs ${D}${libdir}/libc.so ${D}${bindir}/ldd
+	musl_multilib_bits
+}
+
+musl_multilib_bits () {
+	for h in ${D}${includedir}/bits/*.h; do
+		oe_multilib_header bits/${h##*/}
+	done
 }
 
 FILES:${PN} += "${nonarch_base_libdir}/ld-musl-${MUSL_LDSO_ARCH}.so.1 ${sysconfdir}/ld-musl-${MUSL_LDSO_ARCH}.path"