Skip to content

Commit

Permalink
liblol: upgrade glibc to 2.40
Browse files Browse the repository at this point in the history
  • Loading branch information
shankerwangmiao committed Jul 27, 2024
1 parent d1a2573 commit 5c3a4d7
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 63 deletions.
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +-
Expand All @@ -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)
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions autobuild/patches/glibc/0002-add-sigset-ops.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +++++++++++++
Expand Down
4 changes: 2 additions & 2 deletions autobuild/patches/glibc/0003-add-signal-functions.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +++++++++++++++++++
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +-
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 ++
Expand Down
4 changes: 2 additions & 2 deletions autobuild/patches/glibc/0007-add-more-pthread-symbols.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 ++--
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 ++++++++
Expand Down
18 changes: 9 additions & 9 deletions autobuild/patches/glibc/0009-prepend-trusted-dirs.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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
---
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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 **)
Expand All @@ -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;
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions autobuild/patches/glibc/0010-Add-___brk_addr-symbol.patch
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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 +++++++++
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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
---
Expand Down
3 changes: 1 addition & 2 deletions autobuild/patches/glibc/series
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions spec
Original file line number Diff line number Diff line change
@@ -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="\
Expand All @@ -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 \
"
6 changes: 3 additions & 3 deletions spec.main
Original file line number Diff line number Diff line change
@@ -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="\
Expand All @@ -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 \
"

0 comments on commit 5c3a4d7

Please sign in to comment.