aboutsummaryrefslogtreecommitdiff
path: root/packages/glibc
diff options
context:
space:
mode:
Diffstat (limited to 'packages/glibc')
-rw-r--r--packages/glibc/2.17/0070-x86_64-Correct-THREAD_SETMEM-THREAD_SETMEM_NC-for.patch60
-rw-r--r--packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch62
-rw-r--r--packages/glibc/2.39/0000-Add-ARC700-support.patch73
-rw-r--r--packages/glibc/2.39/0001-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch49
-rw-r--r--packages/glibc/2.39/chksum12
-rw-r--r--packages/glibc/2.39/version.desc0
-rw-r--r--packages/glibc/2.40/0000-Add-ARC700-support.patch73
-rw-r--r--packages/glibc/2.40/chksum12
-rw-r--r--packages/glibc/2.40/version.desc0
-rw-r--r--packages/glibc/2.41/0000-Add-ARC700-support.patch92
-rw-r--r--packages/glibc/2.41/chksum12
-rw-r--r--packages/glibc/2.41/version.desc0
-rw-r--r--packages/glibc/package.desc2
18 files changed, 756 insertions, 1 deletions
diff --git a/packages/glibc/2.17/0070-x86_64-Correct-THREAD_SETMEM-THREAD_SETMEM_NC-for.patch b/packages/glibc/2.17/0070-x86_64-Correct-THREAD_SETMEM-THREAD_SETMEM_NC-for.patch
new file mode 100644
index 00000000..21be8e6c
--- /dev/null
+++ b/packages/glibc/2.17/0070-x86_64-Correct-THREAD_SETMEM-THREAD_SETMEM_NC-for.patch
@@ -0,0 +1,60 @@
+From e812eaa1ce27f2a7d07f75b2306c263b53d35816 Mon Sep 17 00:00:00 2001
+From: Artem Panfilov <artem.panfilov@nokia.com>
+Date: Wed, 31 Jan 2024 16:02:06 +0200
+Subject: [PATCH] x86_64: Correct THREAD_SETMEM/THREAD_SETMEM_NC for movq [BZ
+ #27591]
+
+config/i386/constraints.md in GCC has
+
+(define_constraint "e"
+ "32-bit signed integer constant, or a symbolic reference known
+ to fit that range (for immediate operands in sign-extending x86-64
+ instructions)."
+ (match_operand 0 "x86_64_immediate_operand"))
+
+Since movq takes a signed 32-bit immediate or a register source operand,
+use "er", instead of "nr"/"ir", constraint for 32-bit signed integer
+constant or register on movq.
+
+Note: this patch is backported from:
+https://github.com/bminor/glibc/commit/b1ec623ed50bb8c7b9b6333fa350c3866dbde87f
+
+Reviewed-by: Carlos O'Donell <carlos@redhat.com>
+Signed-off-by: Artem Panfilov <artem.panfilov@nokia.com>
+---
+ nptl/sysdeps/x86_64/tls.h | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/nptl/sysdeps/x86_64/tls.h b/nptl/sysdeps/x86_64/tls.h
+index f3b76495b3..ec14b70b6f 100644
+--- a/nptl/sysdeps/x86_64/tls.h
++++ b/nptl/sysdeps/x86_64/tls.h
+@@ -263,8 +263,11 @@ typedef struct
+ 4 or 8. */ \
+ abort (); \
+ \
++ /* Since movq takes a signed 32-bit immediate or a register source \
++ operand, use "er" constraint for 32-bit signed integer constant \
++ or register. */ \
+ asm volatile ("movq %q0,%%fs:%P1" : \
+- : IMM_MODE ((uint64_t) cast_to_integer (value)), \
++ : "er" ((uint64_t) cast_to_integer (value)), \
+ "i" (offsetof (struct pthread, member))); \
+ }})
+
+@@ -288,8 +291,11 @@ typedef struct
+ 4 or 8. */ \
+ abort (); \
+ \
++ /* Since movq takes a signed 32-bit immediate or a register source \
++ operand, use "er" constraint for 32-bit signed integer constant \
++ or register. */ \
+ asm volatile ("movq %q0,%%fs:%P1(,%q2,8)" : \
+- : IMM_MODE ((uint64_t) cast_to_integer (value)), \
++ : "er" ((uint64_t) cast_to_integer (value)), \
+ "i" (offsetof (struct pthread, member[0])), \
+ "r" (idx)); \
+ }})
+--
+2.39.2
+
diff --git a/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..a73f2588
--- /dev/null
+++ b/packages/glibc/2.29/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From 0f562f885b72250007c05a008b1ebafdf7ce41b1 Mon Sep 17 00:00:00 2001
+Message-ID: <0f562f885b72250007c05a008b1ebafdf7ce41b1.1743754721.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 38a93b78e8..435e25d044 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index a494b100be..f0dce4fbad 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..5867ded8
--- /dev/null
+++ b/packages/glibc/2.30/0005-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From b88a116d880eebf8b0ff52146ddd5c8120d55545 Mon Sep 17 00:00:00 2001
+Message-ID: <b88a116d880eebf8b0ff52146ddd5c8120d55545.1743754811.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 38a93b78e8..435e25d044 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index a494b100be..f0dce4fbad 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..97147973
--- /dev/null
+++ b/packages/glibc/2.31/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From 4423c20665378a30bb75828b041835b8b75995db Mon Sep 17 00:00:00 2001
+Message-ID: <4423c20665378a30bb75828b041835b8b75995db.1743754847.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 2cf31deeb4..3e61597b7a 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index fb9937517d..e7f1e6481b 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..c366cb59
--- /dev/null
+++ b/packages/glibc/2.32/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From 855529f1a6bf492ec169c2dbd1bd29ed668352e6 Mon Sep 17 00:00:00 2001
+Message-ID: <855529f1a6bf492ec169c2dbd1bd29ed668352e6.1743754974.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 2cf31deeb4..3e61597b7a 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index fb9937517d..e7f1e6481b 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..b81d975e
--- /dev/null
+++ b/packages/glibc/2.33/0004-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From 57e68a67fc6185b5952c62683274045561e5c880 Mon Sep 17 00:00:00 2001
+Message-ID: <57e68a67fc6185b5952c62683274045561e5c880.1743754995.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 0b92016b31..bec7ff80f4 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index 9510518750..e44a68aad4 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch b/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
new file mode 100644
index 00000000..ded830e9
--- /dev/null
+++ b/packages/glibc/2.34/0003-riscv-Fix-incorrect-jal-with-HIDDEN_JUMPTARGET.patch
@@ -0,0 +1,62 @@
+From 4ccc5a45723f2051aa823ed72b88cb1ae1683a60 Mon Sep 17 00:00:00 2001
+Message-ID: <4ccc5a45723f2051aa823ed72b88cb1ae1683a60.1743755185.git.rsworktech@outlook.com>
+From: Fangrui Song <maskray@google.com>
+Date: Thu, 28 Oct 2021 11:39:49 -0700
+Subject: [PATCH] riscv: Fix incorrect jal with HIDDEN_JUMPTARGET
+
+A non-local STV_DEFAULT defined symbol is by default preemptible in a
+shared object. j/jal cannot target a preemptible symbol. On other
+architectures, such a jump instruction either causes PLT [BZ #18822], or
+if short-ranged, sometimes rejected by the linker (but not by GNU ld's
+riscv port [ld PR/28509]).
+
+Use HIDDEN_JUMPTARGET to target a non-preemptible symbol instead.
+
+With this patch, ld.so and libc.so can be linked with LLD if source
+files are compiled/assembled with -mno-relax/-Wa,-mno-relax.
+
+Acked-by: Palmer Dabbelt <palmer@dabbelt.com>
+Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
+---
+ sysdeps/riscv/setjmp.S | 2 +-
+ sysdeps/unix/sysv/linux/riscv/setcontext.S | 5 +++--
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/riscv/setjmp.S b/sysdeps/riscv/setjmp.S
+index 0b92016b31..bec7ff80f4 100644
+--- a/sysdeps/riscv/setjmp.S
++++ b/sysdeps/riscv/setjmp.S
+@@ -21,7 +21,7 @@
+
+ ENTRY (_setjmp)
+ li a1, 0
+- j __sigsetjmp
++ j HIDDEN_JUMPTARGET (__sigsetjmp)
+ END (_setjmp)
+ ENTRY (setjmp)
+ li a1, 1
+diff --git a/sysdeps/unix/sysv/linux/riscv/setcontext.S b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+index 9510518750..e44a68aad4 100644
+--- a/sysdeps/unix/sysv/linux/riscv/setcontext.S
++++ b/sysdeps/unix/sysv/linux/riscv/setcontext.S
+@@ -95,6 +95,7 @@ LEAF (__setcontext)
+ 99: j __syscall_error
+
+ END (__setcontext)
++libc_hidden_def (__setcontext)
+ weak_alias (__setcontext, setcontext)
+
+ LEAF (__start_context)
+@@ -108,7 +109,7 @@ LEAF (__start_context)
+ /* Invoke subsequent context if present, else exit(0). */
+ mv a0, s2
+ beqz s2, 1f
+- jal __setcontext
+-1: j exit
++ jal HIDDEN_JUMPTARGET (__setcontext)
++1: j HIDDEN_JUMPTARGET (exit)
+
+ END (__start_context)
+--
+2.49.0
+
diff --git a/packages/glibc/2.39/0000-Add-ARC700-support.patch b/packages/glibc/2.39/0000-Add-ARC700-support.patch
new file mode 100644
index 00000000..dce7814e
--- /dev/null
+++ b/packages/glibc/2.39/0000-Add-ARC700-support.patch
@@ -0,0 +1,73 @@
+From 19b9ec56fecfa50746660b535c78f8d3bfa4c6ec Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 13 Feb 2021 17:08:21 +0300
+Subject: [PATCH 1/2] Add ARC700 support
+
+glibc does not officially support ARC700 so this adds the missing
+pieces. I looked at uClibc-ng and a patch by Synopsis for glibc.
+
+[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ sysdeps/arc/atomic-machine.h | 4 ++++
+ sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++
+ sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++
+ 3 files changed, 17 insertions(+)
+
+--- a/sysdeps/arc/atomic-machine.h
++++ b/sysdeps/arc/atomic-machine.h
+@@ -52,6 +52,10 @@
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __ATOMIC_ACQUIRE)
+
++#ifdef __ARC700__
++#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); })
++#else
+ #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); })
++#endif
+
+ #endif /* _ARC_BITS_ATOMIC_H */
+--- a/sysdeps/unix/sysv/linux/arc/syscall.S
++++ b/sysdeps/unix/sysv/linux/arc/syscall.S
+@@ -24,8 +24,13 @@
+ mov_s r1, r2
+ mov_s r2, r3
+ mov_s r3, r4
++#ifdef __ARC700__
++ mov r4, r5
++ mov r5, r6
++#else
+ mov_s r4, r5
+ mov_s r5, r6
++#endif
+
+ ARC_TRAP_INSN
+ brhi r0, -4096, L (call_syscall_err)
+--- a/sysdeps/unix/sysv/linux/arc/sysdep.h
++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
+@@ -130,7 +130,11 @@
+ mov r8, __NR_##syscall_name ASM_LINE_SEP \
+ ARC_TRAP_INSN ASM_LINE_SEP
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN trap0
++# else
+ # define ARC_TRAP_INSN trap_s 0
++# endif
+
+ #else /* !__ASSEMBLER__ */
+
+@@ -139,7 +143,11 @@
+ hidden_proto (__syscall_error)
+ # endif
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN "trap0 \n\t"
++# else
+ # define ARC_TRAP_INSN "trap_s 0 \n\t"
++#endif
+
+ # define HAVE_CLONE3_WRAPPER 1
+
diff --git a/packages/glibc/2.39/0001-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch b/packages/glibc/2.39/0001-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch
new file mode 100644
index 00000000..24c925b0
--- /dev/null
+++ b/packages/glibc/2.39/0001-aarch64-configure-Pass-mcpu-along-with-march-to-dete.patch
@@ -0,0 +1,49 @@
+From 68d57fd288c47c3cec7b94e2b4f863e6b216d69d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 4 Aug 2023 09:34:50 -0700
+Subject: [PATCH 2/2] aarch64/configure: Pass -mcpu along with -march to detect
+ sve support
+
+SVE support logic in configure is rightly passing -march=<arch>+sve to
+compiler to override whatever user might have passed via environment,
+however GCC does not do as intended when -mcpu is part of environment
+compiler flags, then it overrides the -march computed from -mcpu and
+igonores other -march values so this test fails for lot of aarch64
+machines which pass -mcpu that does not support sve. This is seemingly a
+bug in GCC [1], until that is fixed we preempt -mcpu along with -march
+in the configure test itself. It does not change functionality and yet
+lets us through the GCC inconsistency.
+
+[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110901
+
+Upstream-Status: Inappropriate [Workaround for a GCC issue]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ sysdeps/aarch64/configure | 2 +-
+ sysdeps/aarch64/configure.ac | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/sysdeps/aarch64/configure
++++ b/sysdeps/aarch64/configure
+@@ -327,7 +327,7 @@
+ cat > conftest.s <<\EOF
+ ptrue p0.b
+ EOF
+-if { ac_try='${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&5'
++if { ac_try='${CC-cc} -c -mcpu=generic+sve -march=armv8.2-a+sve conftest.s 1>&5'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+--- a/sysdeps/aarch64/configure.ac
++++ b/sysdeps/aarch64/configure.ac
+@@ -92,7 +92,7 @@
+ cat > conftest.s <<\EOF
+ ptrue p0.b
+ EOF
+-if AC_TRY_COMMAND(${CC-cc} -c -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then
++if AC_TRY_COMMAND(${CC-cc} -c -mcpu=generic+sve -march=armv8.2-a+sve conftest.s 1>&AS_MESSAGE_LOG_FD); then
+ libc_cv_aarch64_sve_asm=yes
+ else
+ libc_cv_aarch64_sve_asm=no
diff --git a/packages/glibc/2.39/chksum b/packages/glibc/2.39/chksum
new file mode 100644
index 00000000..d0a7467a
--- /dev/null
+++ b/packages/glibc/2.39/chksum
@@ -0,0 +1,12 @@
+md5 glibc-2.39.tar.xz be81e87f72b5ea2c0ffe2bedfeb680c6
+sha1 glibc-2.39.tar.xz 4b043eaba31efbdfc92c85d062e975141870295e
+sha256 glibc-2.39.tar.xz f77bd47cf8170c57365ae7bf86696c118adb3b120d3259c64c502d3dc1e2d926
+sha512 glibc-2.39.tar.xz 818f58172a52815b4338ea9f2a69ecaa3335492b9f8f64cbf8afb24c0d737982341968ecd79631cae3d3074ab0ae4bc6056fc4ba3ffe790849dc374835cd57e2
+md5 glibc-2.39.tar.bz2 2d1ce35f33fb178656c5476e2eb1bf77
+sha1 glibc-2.39.tar.bz2 36d07dbe46565d335ca8ee703d67b6ddc932adf2
+sha256 glibc-2.39.tar.bz2 fb15f9330b046fd6289b6ed77e0e16ed82031be8cc2d2b002f0b7cb7a693ada3
+sha512 glibc-2.39.tar.bz2 bbb1d5f2da5315a04ffc329a4b237a2bd03dd9677d19b7874ce4a8131b92511c44090d033256c41d76f5d5cbcc76e931223066d43a0c71a5e77a6264ddf05fa9
+md5 glibc-2.39.tar.gz 29e8ed9802e410a85750530cd3daf4d9
+sha1 glibc-2.39.tar.gz e3a8c54877bac53ba0defafe9c3e5202789733cf
+sha256 glibc-2.39.tar.gz 97f84f3b7588cd54093a6f6389b0c1a81e70d99708d74963a2e3eab7c7dc942d
+sha512 glibc-2.39.tar.gz ba07187610f660236ba4fbff06420f01ce5aa0138c9b5f0ee7ad6a8c2a178bf899a65a097a769d890813e50942c0c9f793ca8a63a2d13bfcef6e21a12486af3a
diff --git a/packages/glibc/2.39/version.desc b/packages/glibc/2.39/version.desc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/packages/glibc/2.39/version.desc
diff --git a/packages/glibc/2.40/0000-Add-ARC700-support.patch b/packages/glibc/2.40/0000-Add-ARC700-support.patch
new file mode 100644
index 00000000..c2fe01ef
--- /dev/null
+++ b/packages/glibc/2.40/0000-Add-ARC700-support.patch
@@ -0,0 +1,73 @@
+From 532fad624fcf09744fc79f301f4f1e50e26f3859 Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 13 Feb 2021 17:08:21 +0300
+Subject: [PATCH] Add ARC700 support
+
+glibc does not officially support ARC700 so this adds the missing
+pieces. I looked at uClibc-ng and a patch by Synopsis for glibc.
+
+[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ sysdeps/arc/atomic-machine.h | 4 ++++
+ sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++
+ sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++
+ 3 files changed, 17 insertions(+)
+
+--- a/sysdeps/arc/atomic-machine.h
++++ b/sysdeps/arc/atomic-machine.h
+@@ -52,6 +52,10 @@
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __ATOMIC_ACQUIRE)
+
++#ifdef __ARC700__
++#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); })
++#else
+ #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); })
++#endif
+
+ #endif /* _ARC_BITS_ATOMIC_H */
+--- a/sysdeps/unix/sysv/linux/arc/syscall.S
++++ b/sysdeps/unix/sysv/linux/arc/syscall.S
+@@ -24,8 +24,13 @@
+ mov_s r1, r2
+ mov_s r2, r3
+ mov_s r3, r4
++#ifdef __ARC700__
++ mov r4, r5
++ mov r5, r6
++#else
+ mov_s r4, r5
+ mov_s r5, r6
++#endif
+
+ ARC_TRAP_INSN
+ brhi r0, -4096, L (call_syscall_err)
+--- a/sysdeps/unix/sysv/linux/arc/sysdep.h
++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
+@@ -130,7 +130,11 @@
+ mov r8, __NR_##syscall_name ASM_LINE_SEP \
+ ARC_TRAP_INSN ASM_LINE_SEP
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN trap0
++# else
+ # define ARC_TRAP_INSN trap_s 0
++# endif
+
+ #else /* !__ASSEMBLER__ */
+
+@@ -139,7 +143,11 @@
+ hidden_proto (__syscall_error)
+ # endif
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN "trap0 \n\t"
++# else
+ # define ARC_TRAP_INSN "trap_s 0 \n\t"
++#endif
+
+ # define HAVE_CLONE3_WRAPPER 1
+
diff --git a/packages/glibc/2.40/chksum b/packages/glibc/2.40/chksum
new file mode 100644
index 00000000..a573ee9b
--- /dev/null
+++ b/packages/glibc/2.40/chksum
@@ -0,0 +1,12 @@
+md5 glibc-2.40.tar.xz b390feef233022114950317f10c4fa97
+sha1 glibc-2.40.tar.xz 123a611ac9e65504d88671b9671413475d377647
+sha256 glibc-2.40.tar.xz 19a890175e9263d748f627993de6f4b1af9cd21e03f080e4bfb3a1fac10205a2
+sha512 glibc-2.40.tar.xz 33caf91dbfddde6480b7cdf7a68b36aff8c522bfee56160af26af297f1b768668edb08bc4e1a7ff61c64721e3c1d49c347a5dd01c5edd3b914ee6479c8b27885
+md5 glibc-2.40.tar.bz2 1497c095878280da7c596494c441ea1d
+sha1 glibc-2.40.tar.bz2 831f7c06fd85ae8a0aa54bd6a8f8bb8519cf0046
+sha256 glibc-2.40.tar.bz2 9b368ce57f3e0aff7a4bfecfc237879bfc698f7a58f73dc6676a20b6d3b4e76d
+sha512 glibc-2.40.tar.bz2 46bbc70b01da4c467244ab3de99785ac2646dc75a4e8407e78b3cb2d6f37c22131a6bf91b5192290ec781f779384d197e5c64f75a46848a951ef6a4f7bb8df64
+md5 glibc-2.40.tar.gz a7c59bb17b4cf9c077608f97e5df25dc
+sha1 glibc-2.40.tar.gz e99207f768cadf88ef5894ef734d7c8ea89cfe21
+sha256 glibc-2.40.tar.gz 2abc038f5022949cb67e996c3cae0e7764f99b009f0b9b7fd954dfc6577b599e
+sha512 glibc-2.40.tar.gz 55cc305b4caa0821f95a74b23b495926e60b51bc335c9212623514b49a48cb8f175e7308f3b3b337cb1b27a742d9143db1eac5261cf163103b0004b2bc90e364
diff --git a/packages/glibc/2.40/version.desc b/packages/glibc/2.40/version.desc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/packages/glibc/2.40/version.desc
diff --git a/packages/glibc/2.41/0000-Add-ARC700-support.patch b/packages/glibc/2.41/0000-Add-ARC700-support.patch
new file mode 100644
index 00000000..1b93a94c
--- /dev/null
+++ b/packages/glibc/2.41/0000-Add-ARC700-support.patch
@@ -0,0 +1,92 @@
+From 36449920c501177b61c6fdc1f72875ca41084a8e Mon Sep 17 00:00:00 2001
+From: Rosen Penev <rosenp@gmail.com>
+Date: Sat, 13 Feb 2021 17:08:21 +0300
+Subject: [PATCH] Add ARC700 support
+
+glibc does not officially support ARC700 so this adds the missing
+pieces. I looked at uClibc-ng and a patch by Synopsis for glibc.
+
+[Alexey] Taken from https://github.com/openwrt/openwrt/commit/33646a51abcf15ff5c5363848287e1ed778b7467
+
+Signed-off-by: Rosen Penev <rosenp@gmail.com>
+Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
+---
+ sysdeps/arc/atomic-machine.h | 4 ++++
+ sysdeps/unix/sysv/linux/arc/syscall.S | 5 +++++
+ sysdeps/unix/sysv/linux/arc/syscall_cancel.S | 6 ++++++
+ sysdeps/unix/sysv/linux/arc/sysdep.h | 8 ++++++++
+ 4 files changed, 23 insertions(+)
+
+--- a/sysdeps/arc/atomic-machine.h
++++ b/sysdeps/arc/atomic-machine.h
+@@ -52,6 +52,10 @@
+ __atomic_val_bysize (__arch_compare_and_exchange_val, int, \
+ mem, new, old, __ATOMIC_ACQUIRE)
+
++#ifdef __ARC700__
++#define atomic_full_barrier() ({ asm volatile ("sync":::"memory"); })
++#else
+ #define atomic_full_barrier() ({ asm volatile ("dmb 3":::"memory"); })
++#endif
+
+ #endif /* _ARC_BITS_ATOMIC_H */
+--- a/sysdeps/unix/sysv/linux/arc/syscall.S
++++ b/sysdeps/unix/sysv/linux/arc/syscall.S
+@@ -24,8 +24,13 @@
+ mov_s r1, r2
+ mov_s r2, r3
+ mov_s r3, r4
++#ifdef __ARC700__
++ mov r4, r5
++ mov r5, r6
++#else
+ mov_s r4, r5
+ mov_s r5, r6
++#endif
+
+ ARC_TRAP_INSN
+ brhi r0, -4096, L (call_syscall_err)
+--- a/sysdeps/unix/sysv/linux/arc/syscall_cancel.S
++++ b/sysdeps/unix/sysv/linux/arc/syscall_cancel.S
+@@ -38,9 +38,15 @@
+ mov_s r0, r2
+ mov_s r1, r3
+ mov_s r2, r4
++#ifdef __ARC700__
++ mov r3, r5
++ mov r4, r6
++ mov r5, r7
++#else
+ mov_s r3, r5
+ mov_s r4, r6
+ mov_s r5, r7
++#endif
+ trap_s 0
+
+ .globl __syscall_cancel_arch_end
+--- a/sysdeps/unix/sysv/linux/arc/sysdep.h
++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h
+@@ -130,7 +130,11 @@
+ mov r8, __NR_##syscall_name ASM_LINE_SEP \
+ ARC_TRAP_INSN ASM_LINE_SEP
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN trap0
++# else
+ # define ARC_TRAP_INSN trap_s 0
++# endif
+
+ #else /* !__ASSEMBLER__ */
+
+@@ -139,7 +143,11 @@
+ hidden_proto (__syscall_error)
+ # endif
+
++# ifdef __ARC700__
++# define ARC_TRAP_INSN "trap0 \n\t"
++# else
+ # define ARC_TRAP_INSN "trap_s 0 \n\t"
++#endif
+
+ # define HAVE_CLONE3_WRAPPER 1
+
diff --git a/packages/glibc/2.41/chksum b/packages/glibc/2.41/chksum
new file mode 100644
index 00000000..b2eae604
--- /dev/null
+++ b/packages/glibc/2.41/chksum
@@ -0,0 +1,12 @@
+md5 glibc-2.41.tar.xz 19862601af60f73ac69e067d3e9267d4
+sha1 glibc-2.41.tar.xz 51151d596f4ca800e3220825f6ac07e5e9bc5d23
+sha256 glibc-2.41.tar.xz a5a26b22f545d6b7d7b3dd828e11e428f24f4fac43c934fb071b6a7d0828e901
+sha512 glibc-2.41.tar.xz 894a3e5a796bc13df30c26a5bfbe4d60b5dbdaac54e7763432235124b547070c7dda88c50584536870cab79183d8cad73a3ac6ed09bfe54fa8482aad07253169
+md5 glibc-2.41.tar.bz2 b696289e331b03d4920f01a5e40a1b19
+sha1 glibc-2.41.tar.bz2 f183c3fbd185b143ffec1e3ae3ee56badb914775
+sha256 glibc-2.41.tar.bz2 13cffc682feef721d575250bd4845f92950d3aab23c471279c0f70e497b08442
+sha512 glibc-2.41.tar.bz2 0c8a4493e2b3abc15d20d7d52e387656db8b619774cd555ce9b20709cee42526b68375884f92f9acb6e9a86ce82a8cb62141f78f92bd29db8d94fa413c81510f
+md5 glibc-2.41.tar.gz 74e52947360bba6654272f6bdb90a1d9
+sha1 glibc-2.41.tar.gz 093600f3c3b15dd2d2cf488163fb3dfdc2d95b1e
+sha256 glibc-2.41.tar.gz c7be6e25eeaf4b956f5d4d56a04d23e4db453fc07760f872903bb61a49519b80
+sha512 glibc-2.41.tar.gz 85943f8b0e0298d1db11da3c92d77364acd0d74f374651adc0289df9ba8a55230acded6ed5bac726be715318b8e879eb96daf5edb28239caa13a217f4f752898
diff --git a/packages/glibc/2.41/version.desc b/packages/glibc/2.41/version.desc
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/packages/glibc/2.41/version.desc
diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc
index 775f9d4b..aad2e887 100644
--- a/packages/glibc/package.desc
+++ b/packages/glibc/package.desc
@@ -3,6 +3,6 @@ repository='git git://sourceware.org/git/glibc.git'
mirrors='$(CT_Mirrors GNU glibc)'
# Cannot use MAJOR.MINOR as the relevant part because of 2.12: 2.12.2 was the most recent
# bugfix release, but it didn't have glibc-ports released alongside it.
-milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.34 2.36 2.37 2.38'
+milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.28 2.29 2.30 2.31 2.32 2.34 2.36 2.37 2.38 2.41'
archive_formats='.tar.xz .tar.bz2 .tar.gz'
signature_format='packed/.sig'