[PATCH] LoongArch: Add fstat64 and fstatat64.

Xi Ruoyao xry111@xry111.site
Thu Sep 12 12:55:03 GMT 2024


On Thu, 2024-09-12 at 20:45 +0800, caiyinyu wrote:
> This really puts us in a difficult position.
> I don't oppose the idea of "Then they should build Glibc with
> --enable-kernel=$(THE_MINIMAL_KERNEL_VERSION_THEY_PROVIDE_A_PACKAGE)."
> However,
> as I mentioned before, we can't guarantee that downstream vendors will
> always
> compile it correctly in this way, so I still stand by my approach.

Then they are doing wrong things.  Why they have to specify a version
higher than their kernel?  This does not make any sense to me.

> I've submitted a new patch (v3) that fixes several issues:
> 
> 1. Removed !defined(__loongarch_lp64) since we currently only have a 64-bit
> implementation.
> 2. __LINUX_KERNEL_VERSION is now used to determine whether to
> apply the dynamic probing solution or the statx-only solution. This way,
> regardless of how the user configures it, the compiled glibc will be 
> able to
> run on all kernels.

No it's not true.  If you configure it with --enable-kernel=6.10.6, the
*generic* code will already omit the runtime checks for older kernels
and it will fail to work anyway.

This is how --enable-kernel is defined in Glibc.  You are altering its
meaning thus this is not a port-specific change anyway.  I'm requesting
the general maintainers to either NAK this patch or globally change the
meaning of --enable-kernel (which isn't likely to happen).

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University


More information about the Libc-alpha mailing list