From c206f2fc3e7bc6819dfbb99f271ab08aa8f4301d Mon Sep 17 00:00:00 2001 From: Hans-Christian Noren Egtvedt Date: Thu, 3 Feb 2022 22:10:41 +0100 Subject: [PATCH] packages/glibc: add glibc version 2.35 Copied patches from glibc version 2.34, they still apply clean and I assume they still are relevant. Signed-off-by: Hans-Christian Noren Egtvedt [cp add __convert_scm_timestamps patch] Signed-off-by: Chris Packham --- packages/glibc/2.35/0000-typedef-caddr.patch | 17 ++++ .../glibc/2.35/0001-Add-ARC700-support.patch | 82 +++++++++++++++++++ ...ng-__convert_scm_timestamps-BZ-28860.patch | 34 ++++++++ packages/glibc/2.35/chksum | 12 +++ packages/glibc/2.35/version.desc | 1 + 5 files changed, 146 insertions(+) create mode 100644 packages/glibc/2.35/0000-typedef-caddr.patch create mode 100644 packages/glibc/2.35/0001-Add-ARC700-support.patch create mode 100644 packages/glibc/2.35/0002-linux-Fix-missing-__convert_scm_timestamps-BZ-28860.patch create mode 100644 packages/glibc/2.35/chksum create mode 100644 packages/glibc/2.35/version.desc diff --git a/packages/glibc/2.35/0000-typedef-caddr.patch b/packages/glibc/2.35/0000-typedef-caddr.patch new file mode 100644 index 00000000..451884c3 --- /dev/null +++ b/packages/glibc/2.35/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 @@ typedef __ssize_t ssize_t; + #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.35/0001-Add-ARC700-support.patch b/packages/glibc/2.35/0001-Add-ARC700-support.patch new file mode 100644 index 00000000..23c94a70 --- /dev/null +++ b/packages/glibc/2.35/0001-Add-ARC700-support.patch @@ -0,0 +1,82 @@ +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(+) + +diff --git a/sysdeps/arc/atomic-machine.h b/sysdeps/arc/atomic-machine.h +index 1c8638bb44..bde66ae137 100644 +--- a/sysdeps/arc/atomic-machine.h ++++ b/sysdeps/arc/atomic-machine.h +@@ -64,6 +64,10 @@ typedef uintmax_t uatomic_max_t; + __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 */ +diff --git a/sysdeps/unix/sysv/linux/arc/syscall.S b/sysdeps/unix/sysv/linux/arc/syscall.S +index 6227dbf499..0609dbeeba 100644 +--- a/sysdeps/unix/sysv/linux/arc/syscall.S ++++ b/sysdeps/unix/sysv/linux/arc/syscall.S +@@ -24,8 +24,13 @@ ENTRY (syscall) + 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) +diff --git a/sysdeps/unix/sysv/linux/arc/sysdep.h b/sysdeps/unix/sysv/linux/arc/sysdep.h +index 8465a2f623..3faff27b1c 100644 +--- a/sysdeps/unix/sysv/linux/arc/sysdep.h ++++ b/sysdeps/unix/sysv/linux/arc/sysdep.h +@@ -128,7 +128,11 @@ L (call_syscall_err): ASM_LINE_SEP \ + 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 @@ extern long int __syscall_error (long int); + 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...) \ +-- +2.16.2 + diff --git a/packages/glibc/2.35/0002-linux-Fix-missing-__convert_scm_timestamps-BZ-28860.patch b/packages/glibc/2.35/0002-linux-Fix-missing-__convert_scm_timestamps-BZ-28860.patch new file mode 100644 index 00000000..30cd1c49 --- /dev/null +++ b/packages/glibc/2.35/0002-linux-Fix-missing-__convert_scm_timestamps-BZ-28860.patch @@ -0,0 +1,34 @@ +From 798d716df71fb23dc89d1d5dba1fc26a1b5c0024 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Thu, 3 Feb 2022 16:52:52 -0300 +Subject: [PATCH] linux: Fix missing __convert_scm_timestamps (BZ #28860) + +Commit 948ce73b31 made recvmsg/recvmmsg to always call +__convert_scm_timestamps for 64 bit time_t symbol, so adjust it to +always build it for __TIMESIZE != 64. + +It fixes build for architecture with 32 bit time_t support when +configured with minimum kernel of 5.1. +--- + sysdeps/unix/sysv/linux/convert_scm_timestamps.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c +index 82171bf325..dfc8c2beff 100644 +--- a/sysdeps/unix/sysv/linux/convert_scm_timestamps.c ++++ b/sysdeps/unix/sysv/linux/convert_scm_timestamps.c +@@ -16,9 +16,9 @@ + License along with the GNU C Library; if not, see + . */ + +-#include ++#include + +-#ifndef __ASSUME_TIME64_SYSCALLS ++#if __TIMESIZE != 64 + # include + # include + # include +-- +2.35.1 + diff --git a/packages/glibc/2.35/chksum b/packages/glibc/2.35/chksum new file mode 100644 index 00000000..912eb0f4 --- /dev/null +++ b/packages/glibc/2.35/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.35.tar.bz2 057173a3db5b68e281996f3bee51f221 +sha1 glibc-2.35.tar.bz2 b6136f132c31e6f37097da3118caad905e494d77 +sha256 glibc-2.35.tar.bz2 d350dda6cbd14b33ee6b9741e2c649b746c7fe64b623b7703bdda232ff3e90dc +sha512 glibc-2.35.tar.bz2 565e97f28d45ff8d02be717ee25ad405d2cda8052880dd22cab76c91d759151de0d5eb5124b807ddac57f69ce8eaf8d72c863c0bbc2a2fbfc154fad321adac3a +md5 glibc-2.35.tar.gz 3c80dbf55ddeeab19eb9b93c67ebff01 +sha1 glibc-2.35.tar.gz 8429412cd99c8a179b0d82d982c69ce5a7cb18ba +sha256 glibc-2.35.tar.gz 3e8e0c6195da8dfbd31d77c56fb8d99576fb855fafd47a9e0a895e51fd5942d4 +sha512 glibc-2.35.tar.gz 45bf782aeda508e17fd51b45cf5ad96bd1067cf96b758b5c2d5def681af713df15e75c253d9c85de047f0a1dd22cf4f2239d70ae392cdb9291092e6570734d43 +md5 glibc-2.35.tar.xz dd571c67d85d89d7f60b854a4e207423 +sha1 glibc-2.35.tar.xz 7e2d857e427780a50133447f34dd84ab40fa4069 +sha256 glibc-2.35.tar.xz 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e +sha512 glibc-2.35.tar.xz e7336ce27561be5d7c217832a1136fb327e057bd8d3f92925b35c97e3e9f9e486948b5a1e03e5e4090772ef06437a074d10b82e68f17f1ad8f22077ee39e1b66 diff --git a/packages/glibc/2.35/version.desc b/packages/glibc/2.35/version.desc new file mode 100644 index 00000000..7bb47609 --- /dev/null +++ b/packages/glibc/2.35/version.desc @@ -0,0 +1 @@ +# Released 3 Feb 2022