From 4f01612e0009c926fb83f587478f976ba59fb2c1 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Mon, 6 Feb 2023 10:45:03 +1300 Subject: [PATCH] glibc: Add glibc-2.37 https://sourceware.org/pipermail/libc-announce/2023/000035.html Add the new version carry through 2 patches that are not upstream. Fixes #1885 Signed-off-by: Chris Packham --- packages/glibc/2.37/0000-typedef-caddr.patch | 17 +++++ .../glibc/2.37/0001-Add-ARC700-support.patch | 73 +++++++++++++++++++ packages/glibc/2.37/chksum | 12 +++ packages/glibc/2.37/version.desc | 0 4 files changed, 102 insertions(+) create mode 100644 packages/glibc/2.37/0000-typedef-caddr.patch create mode 100644 packages/glibc/2.37/0001-Add-ARC700-support.patch create mode 100644 packages/glibc/2.37/chksum create mode 100644 packages/glibc/2.37/version.desc diff --git a/packages/glibc/2.37/0000-typedef-caddr.patch b/packages/glibc/2.37/0000-typedef-caddr.patch new file mode 100644 index 00000000..a328da1c --- /dev/null +++ b/packages/glibc/2.37/0000-typedef-caddr.patch @@ -0,0 +1,17 @@ +--- + posix/sys/types.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/posix/sys/types.h ++++ b/posix/sys/types.h +@@ -112,7 +112,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif diff --git a/packages/glibc/2.37/0001-Add-ARC700-support.patch b/packages/glibc/2.37/0001-Add-ARC700-support.patch new file mode 100644 index 00000000..4b16aa03 --- /dev/null +++ b/packages/glibc/2.37/0001-Add-ARC700-support.patch @@ -0,0 +1,73 @@ +From 6349ae7c3d96c8d00179e290d1ccf8a2d8438cc8 Mon Sep 17 00:00:00 2001 +From: Rosen Penev +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 +Signed-off-by: Alexey Brodkin +--- + 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 + + # undef INTERNAL_SYSCALL_NCS + # define INTERNAL_SYSCALL_NCS(number, nr_args, args...) \ diff --git a/packages/glibc/2.37/chksum b/packages/glibc/2.37/chksum new file mode 100644 index 00000000..130b67ba --- /dev/null +++ b/packages/glibc/2.37/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.37.tar.xz e89cf3dcb64939d29f04b4ceead5cc4e +sha1 glibc-2.37.tar.xz 3b85fa6230dfbf34c3ab5af3b59d65bd68601579 +sha256 glibc-2.37.tar.xz 2257eff111a1815d74f46856daaf40b019c1e553156c69d48ba0cbfc1bb91a43 +sha512 glibc-2.37.tar.xz 4fc5932f206bb1b8b54828a28af1a681616b838bbab60c81c82155f3629cbfe1301d271af65511ed917f4c6949a025429221fe6035753282f15346919f15b90c +md5 glibc-2.37.tar.bz2 35e1dbd6014a1d0ba72d9f79330fddab +sha1 glibc-2.37.tar.bz2 964323aaac1070d0a9798fe4c66c23bacd774964 +sha256 glibc-2.37.tar.bz2 0a4d981f86842952273a35403390b83fb8f118f9f9e399dcdbe1df2467fb1d02 +sha512 glibc-2.37.tar.bz2 03ed89611fb781c1890f5bb1f427108e6cea8992d3c903995c54a54f73ae068b7e3b10d8b42486cc82f7268852606a41a5d253f695e7bc6fafa88062885878c2 +md5 glibc-2.37.tar.gz 2abee1e60398831e38045014b8946cb6 +sha1 glibc-2.37.tar.gz bd6b82d8a61f4857dbaa5973d0a6e644562bcd38 +sha256 glibc-2.37.tar.gz 811f19f9200118ff94ede28a6e12307584152cdcbf3d366cd729ea2f855db255 +sha512 glibc-2.37.tar.gz 9cfd8b3ce87710623736b305ff836040112263439278d4ff19b0d332c0193d3bb123dcda2c584215fe2f5c9c81d5b0c4104ea9904d6b7a7ff161a6ce254d6773 diff --git a/packages/glibc/2.37/version.desc b/packages/glibc/2.37/version.desc new file mode 100644 index 00000000..e69de29b