From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 95E0E3858D37 for ; Mon, 3 Apr 2023 09:25:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95E0E3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1680513955; bh=yqe5sU1foHoZsROKX59FQYVgm9iYbRwbsNAInbn5B00=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=fZ6BDvttKM2Glflfznu7icbQ3MI0JdqL1FZXIYnxIZ9B43ix4KSTVAba9DKIXB08v xzP/XW/12kWrYbRO7wcjPy5kGLK5q4XWYaH47lkfvFrKAtVrqUpgRaynF9+2yWjTbE pxBPvIhwjB1NFNxJR49lWsajkDL4a+v+Qd2FdLyw= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id D2216663AB; Mon, 3 Apr 2023 05:25:53 -0400 (EDT) Message-ID: Subject: Re: [PATCH] LoongArch: Modify some member names in mcontext_t and ucontext_t structs to align them with the kernel. From: Xi Ruoyao To: caiyinyu , libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, Chenghua Xu , =?gb2312?Q?=CD=F5=BA=E9=BB=A2?= , lixing@loongson.cn Date: Mon, 03 Apr 2023 17:25:52 +0800 In-Reply-To: References: <20230324062510.1812367-1-caiyinyu@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.0 MIME-Version: 1.0 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,LIKELY_SPAM_FROM,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, 2023-04-03 at 17:18 +0800, caiyinyu wrote: >=20 > =E5=9C=A8 2023/4/3 =E4=B8=8B=E5=8D=884:56, Xi Ruoyao =E5=86=99=E9=81=93: > > On Fri, 2023-03-31 at 11:52 +0800, caiyinyu wrote: > >=20 > > /* snip */ > >=20 > > > Your plan caused fails in glibc conform tests. > > Let me try something... > >=20 > > > We wanted to inform you that we are aware that the proposed > > > modification[1] will affect the public API. However, since > > > LoongArch > > > Musl has not yet been released > > Then why not change the Musl instead?=C2=A0 It's not released so you > > won't > > break existing code. >=20 > This is also a viable solution, but we want to take advantage of the=20 > early development >=20 > stage to standardize the member names of mcontext_t/sigcontext in musl > and glibc2.36/37... >=20 > to match those in the kernel in order to get rid of historical > baggage, >=20 > as mentioned in the previous email. Give me several hours trying to make the anonymous union work. I see similar things in other ports' mcontext_t definition so I guess I can make it work... And please don't change Glibc 2.36/37. The reason is: If some downstream work decides get rid of historical things, the maintainer can just say "Glibc < 2.38 is not supported". Or they can use #if __GLIBC_PREREQ (2, 38) to support both releases if they want to support both old and new releases. But by backporting the change into 2.36 or 37, there will be no trivial way to support both "old" definition and "new" definition because there is no #ifdef can distinguish "patched" 2.37 and "unpatched" 2.37. And you cannot tell distro maintainers to update there Glibc headers in /usr/include because doing so is *very* dangerous. >=20 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University