public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
To: caiyinyu <caiyinyu@loongson.cn>, libc-alpha@sourceware.org
Cc: Xi Ruoyao <xry111@xry111.site>
Subject: Re: [PATCH] LoongArch: Ensure consistency with kernel by using union for struct members in mcontext_t and ucontext_t.
Date: Tue, 4 Apr 2023 18:38:27 +0100	[thread overview]
Message-ID: <ZCxgkznMvdobq/Bs@arm.com> (raw)
In-Reply-To: <20230403120153.3332463-1-caiyinyu@loongson.cn>

The 04/03/2023 20:01, caiyinyu wrote:
> During the construction of the LoongArch Alpine system,
> we found that there is an inconsistency in the member
> names of mcontext_t and ucontext_t between musl and glibc,
> which can cause compilation errors. After testing, we decided
> to use union to keep these member names consistency.

there is no musl api compat requirement at the moment (the musl
loongarch port is not committed yet so surely that can be
changed to be consistent).

there is an api difference between glibc and linux uapi headers.
i personally don't think this is an issue. (the c abi must match
but struct sigcontext and mcontext_t are not used interchangably
in code. the c++ mangling abi is different even after your patch)

there is also a difference in ucontext compared to other targets:
they have uc_flags field while loongarch has  __uc_flags. i don't
know if this may cause a portability issue.

in any case the commit message does not do a good job describing
the reasoning.

  reply	other threads:[~2023-04-04 17:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03 12:01 caiyinyu
2023-04-04 17:38 ` Szabolcs Nagy [this message]
2023-04-06  9:59   ` caiyinyu
2023-04-06 11:02     ` Szabolcs Nagy

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=ZCxgkznMvdobq/Bs@arm.com \
    --to=szabolcs.nagy@arm.com \
    --cc=caiyinyu@loongson.cn \
    --cc=libc-alpha@sourceware.org \
    --cc=xry111@xry111.site \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).