From b48427e58270fde19503659b006a03baf654a898 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 31 Aug 2024 23:30:51 +0800 Subject: [PATCH] Fix implementation of lxstat64 --- ...006-add-syscall-fallback-for-stat-at.patch | 21 +++++++------------ .../glibc/0007-add-more-pthread-symbols.patch | 2 +- ...ove-clone3-for-compatibility-with-qq.patch | 2 +- .../glibc/0009-prepend-trusted-dirs.patch | 2 +- .../glibc/0010-Add-___brk_addr-symbol.patch | 2 +- ...glist-errlist-add-compact-statements.patch | 2 +- spec | 2 +- spec.main | 2 +- 8 files changed, 15 insertions(+), 20 deletions(-) diff --git a/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch b/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch index e54fdd2..ecb1a92 100644 --- a/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch +++ b/autobuild/patches/glibc/0006-add-syscall-fallback-for-stat-at.patch @@ -1,4 +1,4 @@ -From cbcb63ad1303fd9659afe949b71f979f78c1f7fd Mon Sep 17 00:00:00 2001 +From 5e0568cf465ccaba4805f976295e3052fc9d2417 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 15:51:49 +0800 Subject: [PATCH 06/11] add syscall fallback for *stat(at)? @@ -6,12 +6,12 @@ Subject: [PATCH 06/11] add syscall fallback for *stat(at)? --- sysdeps/unix/sysv/linux/loongarch/fstat64.c | 5 ++ sysdeps/unix/sysv/linux/loongarch/fstatat64.c | 13 ++++ - sysdeps/unix/sysv/linux/loongarch/fxstat64.c | 67 ++++++++++++++++ - .../unix/sysv/linux/loongarch/fxstatat64.c | 61 +++++++++++++++ - sysdeps/unix/sysv/linux/loongarch/lxstat64.c | 77 +++++++++++++++++++ + sysdeps/unix/sysv/linux/loongarch/fxstat64.c | 67 +++++++++++++++++ + .../unix/sysv/linux/loongarch/fxstatat64.c | 61 ++++++++++++++++ + sysdeps/unix/sysv/linux/loongarch/lxstat64.c | 72 +++++++++++++++++++ .../unix/sysv/linux/loongarch/ow_syscall_nr.h | 2 + - sysdeps/unix/sysv/linux/loongarch/xstat64.c | 71 +++++++++++++++++ - 7 files changed, 296 insertions(+) + sysdeps/unix/sysv/linux/loongarch/xstat64.c | 71 ++++++++++++++++++ + 7 files changed, 291 insertions(+) create mode 100644 sysdeps/unix/sysv/linux/loongarch/fstat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/fstatat64.c create mode 100644 sysdeps/unix/sysv/linux/loongarch/fxstat64.c @@ -192,10 +192,10 @@ index 00000000..720f12a0 +#endif /* LIB_COMPAT(libc, GLIBC_2_4, GLIBC_2_33) */ diff --git a/sysdeps/unix/sysv/linux/loongarch/lxstat64.c b/sysdeps/unix/sysv/linux/loongarch/lxstat64.c new file mode 100644 -index 00000000..ab561ce0 +index 00000000..51bd906b --- /dev/null +++ b/sysdeps/unix/sysv/linux/loongarch/lxstat64.c -@@ -0,0 +1,77 @@ +@@ -0,0 +1,72 @@ +/* lxstat64 using Linux lstat64 system call. + Copyright (C) 1991-2023 Free Software Foundation, Inc. + This file is part of the GNU C Library. @@ -232,11 +232,6 @@ index 00000000..ab561ce0 +int +___lxstat64 (int vers, const char *name, struct stat64 *buf) +{ -+ /* New kABIs which uses generic 64-bit Linux ABI, e.g. aarch64, riscv64. */ -+ if (vers == _STAT_VER_KERNEL) -+ return INLINE_SYSCALL_CALL (newfstatat, AT_FDCWD, name, buf, -+ AT_SYMLINK_NOFOLLOW); -+ + /* New 32-bit kABIs with only 64-bit time_t support, e.g. arc, riscv32. */ + if (vers == _STAT_VER_KERNEL) + { diff --git a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch index 15eaa86..e7f642c 100644 --- a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch +++ b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch @@ -1,4 +1,4 @@ -From f74c451e4fb9d7ef418b8cd43851ffac5514fdb6 Mon Sep 17 00:00:00 2001 +From e1d3befc02ba675cb50e0cd32e8e7cbbc3349f31 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 08:41:15 +0800 Subject: [PATCH 07/11] add more pthread symbols diff --git a/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch b/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch index 347b9ea..fcb822b 100644 --- a/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch +++ b/autobuild/patches/glibc/0008-remove-clone3-for-compatibility-with-qq.patch @@ -1,4 +1,4 @@ -From 7c98d8be6d041f2d2f54d3a1e7bdfc08cde3d395 Mon Sep 17 00:00:00 2001 +From 421353e4b8fd09656d1c44a909cb373c0aee6677 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 16:51:44 +0800 Subject: [PATCH 08/11] remove clone3 for compatibility with qq diff --git a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch index 7a70d33..fd91374 100644 --- a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch +++ b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch @@ -1,4 +1,4 @@ -From abef07d42f0fa8821e55a9267dc693c6170c165f Mon Sep 17 00:00:00 2001 +From 094b4125ae653c22b3d3bd0720038eeca33d31cb Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 13:28:41 +0800 Subject: [PATCH 09/11] prepend trusted-dirs diff --git a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch index 6534c3c..a7c9498 100644 --- a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch +++ b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch @@ -1,4 +1,4 @@ -From 0bfa47d45fc9d00546a9605ed93e109f24fcdea0 Mon Sep 17 00:00:00 2001 +From 051d56a4a93f57c9aba701a16454d85595bb0b77 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Mon, 15 Jan 2024 04:16:47 +0800 Subject: [PATCH 10/11] Add ___brk_addr symbol diff --git a/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch b/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch index b41ee40..ab47c64 100644 --- a/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch +++ b/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch @@ -1,4 +1,4 @@ -From be2d1626f981e7a3cbb749af3463131bc5249f56 Mon Sep 17 00:00:00 2001 +From c76576319449b3d5573c6e34a69c415e45f1181c Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 10 Mar 2024 02:54:28 +0800 Subject: [PATCH 11/11] siglist/errlist: add compact statements diff --git a/spec b/spec index 887383f..5f8ec8f 100644 --- a/spec +++ b/spec @@ -1,5 +1,5 @@ # AUTOGENERATED FILE from spec.main using genspec -VER=0.1.6~pre1 +VER=0.1.6~pre2 _mirror="http://pkg.loongnix.cn/loongnix" __GLIBC_VER=2.40 __LIBXCRYPT_VER=4.4.36 diff --git a/spec.main b/spec.main index 5075ad0..ad45dfb 100644 --- a/spec.main +++ b/spec.main @@ -1,4 +1,4 @@ -VER=0.1.6~pre1 +VER=0.1.6~pre2 _mirror="http://pkg.loongnix.cn/loongnix" __GLIBC_VER=2.40 __LIBXCRYPT_VER=4.4.36