On Thu, May 09, 2019 at 02:43:54PM +0100, Richard Purdie wrote: > On Thu, 2019-05-09 at 08:08 -0400, Paul Barker wrote: >... > > So alpine fixes this by patching the linux headers: > > https://git.alpinelinux.org/aports/tree/main/linux-headers/fix-aarch64-asm-ptrace.patch > > > > I think that should be acceptable here if we just do it when building > > with musl libc. > > > > Any thoughts on that before I work up a v2 patch? > > This really needs to get fixed upstream. I don't mind a patch but only > if its gone upstream, we don't want to be carrying patches to libc- > headers.
The root problem is that musl upstream has the opinion that the kernel headers are unfixably broken, and therefore the musl headers contain own definitions of structs that are part of the kernel<->userspace ABI: https://wiki.musl-libc.org/faq.html#Q:-Why-am-I-getting- The kernel headers were in a bad state 20 years ago, but are pretty usable today - which doesn't help since musl won't even try to be cooperative and work towards using everything from the kernel headers that belongs there. And the lack of a __MUSL__ define makes it impossible to work around all this musl-specific breakage in an upstreamable way in the kernel headers. There are actually workarounds for musl in the upstream kernel headers, but they can break depending on the #include order. The FAQ above suggests using the patched headers from sabotage linux, but they are from kernel 3.12. > Cheers, > > Richard cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core