From 5c3a4d7aa09e0d023c9d813ceba820bd673fa54c Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 27 Jul 2024 10:35:36 +0800 Subject: [PATCH] liblol: upgrade glibc to 2.40 --- ...0001-add-old-world-abi-compatibility.patch | 10 ++++---- .../patches/glibc/0002-add-sigset-ops.patch | 4 ++-- .../glibc/0003-add-signal-functions.patch | 4 ++-- .../0004-add-sigaction-ucontext-compat.patch | 4 ++-- ...dd-stubs-for-signal-related-io-funcs.patch | 4 ++-- ...006-add-syscall-fallback-for-stat-at.patch | 4 ++-- .../glibc/0007-add-more-pthread-symbols.patch | 4 ++-- ...ove-clone3-for-compatibility-with-qq.patch | 4 ++-- .../glibc/0009-prepend-trusted-dirs.patch | 18 +++++++-------- .../glibc/0010-Add-___brk_addr-symbol.patch | 4 ++-- ...t-__ieee754-_-_scalb-__ieee754-_-_sc.patch | 23 ------------------- ...list-errlist-add-compact-statements.patch} | 4 ++-- autobuild/patches/glibc/series | 3 +-- spec | 6 ++--- spec.main | 6 ++--- 15 files changed, 39 insertions(+), 63 deletions(-) delete mode 100644 autobuild/patches/glibc/0011-LoongArch-Correct-__ieee754-_-_scalb-__ieee754-_-_sc.patch rename autobuild/patches/glibc/{0012-siglist-errlist-add-compact-statements.patch => 0011-siglist-errlist-add-compact-statements.patch} (92%) diff --git a/autobuild/patches/glibc/0001-add-old-world-abi-compatibility.patch b/autobuild/patches/glibc/0001-add-old-world-abi-compatibility.patch index 5b2cdf4..ecd7c60 100644 --- a/autobuild/patches/glibc/0001-add-old-world-abi-compatibility.patch +++ b/autobuild/patches/glibc/0001-add-old-world-abi-compatibility.patch @@ -1,7 +1,7 @@ -From 53b576f7062ddd9ec9f21e0aacee2503d04b349d Mon Sep 17 00:00:00 2001 +From 0e9cdfdfc8916c9672ecef98ec1b430171a518bd Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 13 Jan 2024 03:23:48 +0800 -Subject: [PATCH 01/12] add old world abi compatibility +Subject: [PATCH 01/11] add old world abi compatibility --- login/Makefile | 8 +- @@ -18,10 +18,10 @@ Subject: [PATCH 01/12] add old world abi compatibility create mode 100644 sysdeps/unix/sysv/linux/loongarch/statx_cp.c diff --git a/login/Makefile b/login/Makefile -index 1e22008a..8700e0e4 100644 +index 84563230..37ed7d54 100644 --- a/login/Makefile +++ b/login/Makefile -@@ -49,7 +49,7 @@ tests := tst-utmp tst-utmpx tst-grantpt tst-ptsname tst-getlogin tst-updwtmpx \ +@@ -53,7 +53,7 @@ CFLAGS-tst-utmp-unsigned-64.c += -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 # Empty compatibility library for old binaries. extra-libs := libutil extra-libs-others := $(extra-libs) @@ -30,7 +30,7 @@ index 1e22008a..8700e0e4 100644 libutil-routines := libutil-compat libutil-shared-only-routines := libutil-compat -@@ -57,9 +57,9 @@ libutil-shared-only-routines := libutil-compat +@@ -61,9 +61,9 @@ libutil-shared-only-routines := libutil-compat # link is not installed. install-lib-ldscripts = libutil.so $(inst_libdir)/libutil.so: diff --git a/autobuild/patches/glibc/0002-add-sigset-ops.patch b/autobuild/patches/glibc/0002-add-sigset-ops.patch index cf02894..077db2e 100644 --- a/autobuild/patches/glibc/0002-add-sigset-ops.patch +++ b/autobuild/patches/glibc/0002-add-sigset-ops.patch @@ -1,7 +1,7 @@ -From 49559626d30610925a8c9cb10862830b4d068e10 Mon Sep 17 00:00:00 2001 +From 21a31d92dbe61cf507772c1daea01f78f3c03c98 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 13 Jan 2024 05:07:19 +0800 -Subject: [PATCH 02/12] add sigset ops +Subject: [PATCH 02/11] add sigset ops --- sysdeps/unix/sysv/linux/loongarch/Makefile | 13 +++++++++++++ diff --git a/autobuild/patches/glibc/0003-add-signal-functions.patch b/autobuild/patches/glibc/0003-add-signal-functions.patch index a895d1b..1e3f995 100644 --- a/autobuild/patches/glibc/0003-add-signal-functions.patch +++ b/autobuild/patches/glibc/0003-add-signal-functions.patch @@ -1,7 +1,7 @@ -From c902ec3932bde393278eb6cfa1663ddae489d2de Mon Sep 17 00:00:00 2001 +From be5bc6d0481fab886268d6b9169b1c821c0a5d35 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 13 Jan 2024 06:35:35 +0800 -Subject: [PATCH 03/12] add signal functions +Subject: [PATCH 03/11] add signal functions --- sysdeps/loongarch/nptl/pthread_sigmask.c | 73 +++++++++++++++++++ diff --git a/autobuild/patches/glibc/0004-add-sigaction-ucontext-compat.patch b/autobuild/patches/glibc/0004-add-sigaction-ucontext-compat.patch index 3914ccf..98ae6c3 100644 --- a/autobuild/patches/glibc/0004-add-sigaction-ucontext-compat.patch +++ b/autobuild/patches/glibc/0004-add-sigaction-ucontext-compat.patch @@ -1,7 +1,7 @@ -From db6c01f21fad3c1dc4a2ae678d9eac550b0b60a0 Mon Sep 17 00:00:00 2001 +From dcd6e497af00dd929279d35297222f771d2e6c73 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 05:15:07 +0800 -Subject: [PATCH 04/12] add sigaction & ucontext compat +Subject: [PATCH 04/11] add sigaction & ucontext compat --- sysdeps/unix/sysv/linux/loongarch/Makefile | 8 +- diff --git a/autobuild/patches/glibc/0005-add-stubs-for-signal-related-io-funcs.patch b/autobuild/patches/glibc/0005-add-stubs-for-signal-related-io-funcs.patch index 5431e85..d15a6fa 100644 --- a/autobuild/patches/glibc/0005-add-stubs-for-signal-related-io-funcs.patch +++ b/autobuild/patches/glibc/0005-add-stubs-for-signal-related-io-funcs.patch @@ -1,7 +1,7 @@ -From 3d49018212d0abb652d961d53972058bf62a5ede Mon Sep 17 00:00:00 2001 +From eaf288ef4e374b5c382b392dc7187a6d7aced0f1 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sat, 13 Jan 2024 07:38:04 +0800 -Subject: [PATCH 05/12] add stubs for signal related io funcs +Subject: [PATCH 05/11] add stubs for signal related io funcs --- sysdeps/unix/sysv/linux/loongarch/epoll_pwait.c | 1 + 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 7952223..e54fdd2 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,7 +1,7 @@ -From d380fedf25fc5126942378839657aa19bebc2f1a Mon Sep 17 00:00:00 2001 +From cbcb63ad1303fd9659afe949b71f979f78c1f7fd Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 15:51:49 +0800 -Subject: [PATCH 06/12] add syscall fallback for *stat(at)? +Subject: [PATCH 06/11] add syscall fallback for *stat(at)? --- sysdeps/unix/sysv/linux/loongarch/fstat64.c | 5 ++ diff --git a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch index 3232dd9..15eaa86 100644 --- a/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch +++ b/autobuild/patches/glibc/0007-add-more-pthread-symbols.patch @@ -1,7 +1,7 @@ -From c8a09cf1ae065849fb6e20f399d5d4c3b0db76c1 Mon Sep 17 00:00:00 2001 +From f74c451e4fb9d7ef418b8cd43851ffac5514fdb6 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 08:41:15 +0800 -Subject: [PATCH 07/12] add more pthread symbols +Subject: [PATCH 07/11] add more pthread symbols --- nptl/old_pthread_cond_destroy.c | 4 ++-- 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 31020a0..347b9ea 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,7 +1,7 @@ -From d432b01607d894686c5de20590b504452190ebbe Mon Sep 17 00:00:00 2001 +From 7c98d8be6d041f2d2f54d3a1e7bdfc08cde3d395 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 16:51:44 +0800 -Subject: [PATCH 08/12] remove clone3 for compatibility with qq +Subject: [PATCH 08/11] remove clone3 for compatibility with qq --- sysdeps/unix/sysv/linux/loongarch/clone-internal.c | 8 ++++++++ diff --git a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch index 6faf6e7..7a70d33 100644 --- a/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch +++ b/autobuild/patches/glibc/0009-prepend-trusted-dirs.patch @@ -1,7 +1,7 @@ -From 46a6a56ce7546ed1a36bf447141eb60fdd85d730 Mon Sep 17 00:00:00 2001 +From abef07d42f0fa8821e55a9267dc693c6170c165f Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 14 Jan 2024 13:28:41 +0800 -Subject: [PATCH 09/12] prepend trusted-dirs +Subject: [PATCH 09/11] prepend trusted-dirs and search prepended trusted-dirs before other pathes --- @@ -10,10 +10,10 @@ and search prepended trusted-dirs before other pathes 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/elf/Makefile b/elf/Makefile -index 5d78b659..4f4ec8c2 100644 +index a3475f3f..f945a68f 100644 --- a/elf/Makefile +++ b/elf/Makefile -@@ -1359,9 +1359,10 @@ endif +@@ -1407,9 +1407,10 @@ endif $(objpfx)trusted-dirs.h: $(objpfx)trusted-dirs.st; @: $(objpfx)trusted-dirs.st: Makefile $(..)Makeconfig $(make-target-directory) @@ -26,10 +26,10 @@ index 5d78b659..4f4ec8c2 100644 touch $@ CPPFLAGS-dl-load.c += -I$(objpfx). -I$(csu-objpfx). diff --git a/elf/dl-load.c b/elf/dl-load.c -index ce8fdea3..cdea31f2 100644 +index 8a89b710..dd02ad2d 100644 --- a/elf/dl-load.c +++ b/elf/dl-load.c -@@ -123,6 +123,9 @@ static const size_t system_dirs_len[] = +@@ -112,6 +112,9 @@ static const size_t system_dirs_len[] = SYSTEM_DIRS_LEN }; #define nsystem_dirs_len array_length (system_dirs_len) @@ -39,7 +39,7 @@ index ce8fdea3..cdea31f2 100644 static bool is_trusted_path_normalize (const char *path, size_t len) -@@ -723,7 +726,7 @@ _dl_init_paths (const char *llp, const char *source, +@@ -712,7 +715,7 @@ _dl_init_paths (const char *llp, const char *source, /* First set up the rest of the default search directory entries. */ aelem = __rtld_search_dirs.dirs = (struct r_search_path_elem **) @@ -48,7 +48,7 @@ index ce8fdea3..cdea31f2 100644 if (__rtld_search_dirs.dirs == NULL) { errstring = N_("cannot create search path array"); -@@ -748,11 +751,17 @@ _dl_init_paths (const char *llp, const char *source, +@@ -737,11 +740,17 @@ _dl_init_paths (const char *llp, const char *source, pelem = GL(dl_all_dirs) = __rtld_search_dirs.dirs[0]; strp = system_dirs; idx = 0; @@ -66,7 +66,7 @@ index ce8fdea3..cdea31f2 100644 *aelem++ = pelem; pelem->what = "system search path"; -@@ -2025,9 +2034,22 @@ _dl_map_object (struct link_map *loader, const char *name, +@@ -1980,9 +1989,22 @@ _dl_map_object (struct link_map *loader, const char *name, fd = -1; diff --git a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch index 08d7058..6534c3c 100644 --- a/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch +++ b/autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch @@ -1,7 +1,7 @@ -From 8c93e0c920acff0ba3ca155954fe4afa8f5ccf49 Mon Sep 17 00:00:00 2001 +From 0bfa47d45fc9d00546a9605ed93e109f24fcdea0 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Mon, 15 Jan 2024 04:16:47 +0800 -Subject: [PATCH 10/12] Add ___brk_addr symbol +Subject: [PATCH 10/11] Add ___brk_addr symbol --- sysdeps/unix/sysv/linux/loongarch/brk.c | 9 +++++++++ diff --git a/autobuild/patches/glibc/0011-LoongArch-Correct-__ieee754-_-_scalb-__ieee754-_-_sc.patch b/autobuild/patches/glibc/0011-LoongArch-Correct-__ieee754-_-_scalb-__ieee754-_-_sc.patch deleted file mode 100644 index 823f8fb..0000000 --- a/autobuild/patches/glibc/0011-LoongArch-Correct-__ieee754-_-_scalb-__ieee754-_-_sc.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 719ec560949c06edbebef61d432332749b9647d0 Mon Sep 17 00:00:00 2001 -From: caiyinyu -Date: Mon, 11 Mar 2024 16:07:48 +0800 -Subject: [PATCH 11/12] LoongArch: Correct {__ieee754, _}_scalb -> {__ieee754, - _}_scalbf - ---- - sysdeps/loongarch/fpu/e_scalbf.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sysdeps/loongarch/fpu/e_scalbf.c b/sysdeps/loongarch/fpu/e_scalbf.c -index 9f054852..7c0395fb 100644 ---- a/sysdeps/loongarch/fpu/e_scalbf.c -+++ b/sysdeps/loongarch/fpu/e_scalbf.c -@@ -57,4 +57,4 @@ __ieee754_scalbf (float x, float fn) - - return x; - } --libm_alias_finite (__ieee754_scalb, __scalb) -+libm_alias_finite (__ieee754_scalbf, __scalbf) --- -2.43.0 - diff --git a/autobuild/patches/glibc/0012-siglist-errlist-add-compact-statements.patch b/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch similarity index 92% rename from autobuild/patches/glibc/0012-siglist-errlist-add-compact-statements.patch rename to autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch index b1a4779..b41ee40 100644 --- a/autobuild/patches/glibc/0012-siglist-errlist-add-compact-statements.patch +++ b/autobuild/patches/glibc/0011-siglist-errlist-add-compact-statements.patch @@ -1,7 +1,7 @@ -From f3550d3df435347248c5114fff23119e94fc904e Mon Sep 17 00:00:00 2001 +From be2d1626f981e7a3cbb749af3463131bc5249f56 Mon Sep 17 00:00:00 2001 From: Miao Wang Date: Sun, 10 Mar 2024 02:54:28 +0800 -Subject: [PATCH 12/12] siglist/errlist: add compact statements +Subject: [PATCH 11/11] siglist/errlist: add compact statements to make the length of symbols the same --- diff --git a/autobuild/patches/glibc/series b/autobuild/patches/glibc/series index a5d1311..b9dd46e 100644 --- a/autobuild/patches/glibc/series +++ b/autobuild/patches/glibc/series @@ -8,5 +8,4 @@ 0008-remove-clone3-for-compatibility-with-qq.patch 0009-prepend-trusted-dirs.patch 0010-Add-___brk_addr-symbol.patch -0011-LoongArch-Correct-__ieee754-_-_scalb-__ieee754-_-_sc.patch -0012-siglist-errlist-add-compact-statements.patch +0011-siglist-errlist-add-compact-statements.patch diff --git a/spec b/spec index 8bd44fd..887383f 100644 --- a/spec +++ b/spec @@ -1,7 +1,7 @@ # AUTOGENERATED FILE from spec.main using genspec -VER=0.1.5 +VER=0.1.6~pre1 _mirror="http://pkg.loongnix.cn/loongnix" -__GLIBC_VER=2.39 +__GLIBC_VER=2.40 __LIBXCRYPT_VER=4.4.36 SRCS="\ @@ -10,7 +10,7 @@ SRCS="\ file::rename=libxcrypt.tar.xz::https://github.com/besser82/libxcrypt/releases/download/v${__LIBXCRYPT_VER}/libxcrypt-${__LIBXCRYPT_VER}.tar.xz \ " CHKSUMS="\ - sha256::f77bd47cf8170c57365ae7bf86696c118adb3b120d3259c64c502d3dc1e2d926 \ + sha256::19a890175e9263d748f627993de6f4b1af9cd21e03f080e4bfb3a1fac10205a2 \ sha256::64de10e4c6b8b8379db7e87f58030f336ea747c0515f381132e810dbf84a86e7 \ sha256::e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943 \ " diff --git a/spec.main b/spec.main index f60a29a..5075ad0 100644 --- a/spec.main +++ b/spec.main @@ -1,6 +1,6 @@ -VER=0.1.5 +VER=0.1.6~pre1 _mirror="http://pkg.loongnix.cn/loongnix" -__GLIBC_VER=2.39 +__GLIBC_VER=2.40 __LIBXCRYPT_VER=4.4.36 SRCS="\ @@ -9,7 +9,7 @@ SRCS="\ file::rename=libxcrypt.tar.xz::https://github.com/besser82/libxcrypt/releases/download/v${__LIBXCRYPT_VER}/libxcrypt-${__LIBXCRYPT_VER}.tar.xz \ " CHKSUMS="\ - sha256::f77bd47cf8170c57365ae7bf86696c118adb3b120d3259c64c502d3dc1e2d926 \ + sha256::19a890175e9263d748f627993de6f4b1af9cd21e03f080e4bfb3a1fac10205a2 \ sha256::64de10e4c6b8b8379db7e87f58030f336ea747c0515f381132e810dbf84a86e7 \ sha256::e5e1f4caee0a01de2aee26e3138807d6d3ca2b8e67287966d1fefd65e1fd8943 \ "