Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: OE Core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] strace: Fix aarch64 build with musl
Date: Thu, 9 May 2019 17:31:35 +0300	[thread overview]
Message-ID: <20190509143135.GA25228@localhost> (raw)
In-Reply-To: <74876e92becd2c2b04831dc4776faabd87fc53c9.camel@linuxfoundation.org>

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



      parent reply	other threads:[~2019-05-09 14:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-08 11:58 [PATCH 0/2] Fix strace & gdb build on aarch64/musl paul
2019-05-08 11:58 ` [PATCH 1/2] gdb: Fix aarch64 build with musl paul
2019-05-08 11:58 ` [PATCH 2/2] strace: " paul
2019-05-08 13:02   ` Adrian Bunk
2019-05-09 10:13     ` Paul Barker
2019-05-09 12:08       ` Paul Barker
2019-05-09 13:43         ` Richard Purdie
2019-05-09 13:48           ` Bruce Ashfield
2019-05-09 14:00             ` Paul Barker
2019-05-09 14:07               ` Bruce Ashfield
2019-05-09 14:10                 ` Paul Barker
2019-05-09 14:31           ` Adrian Bunk [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190509143135.GA25228@localhost \
    --to=bunk@stusta.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=richard.purdie@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox