From 5faf255006023d9329c7729bcb2b71585a966508 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Tue, 3 Aug 2021 20:52:07 +1200 Subject: packages/glibc: Add 2.34 Add glibc 2.34. Bring through patches for canadian build and ARC700. https://sourceware.org/pipermail/libc-alpha/2021-August/129718.html Signed-off-by: Chris Packham diff --git a/packages/glibc/2.34/0000-typedef-caddr.patch b/packages/glibc/2.34/0000-typedef-caddr.patch new file mode 100644 index 0000000..451884c --- /dev/null +++ b/packages/glibc/2.34/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.34/0001-Add-ARC700-support.patch b/packages/glibc/2.34/0001-Add-ARC700-support.patch new file mode 100644 index 0000000..23c94a7 --- /dev/null +++ b/packages/glibc/2.34/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.34/chksum b/packages/glibc/2.34/chksum new file mode 100644 index 0000000..eb7cef6 --- /dev/null +++ b/packages/glibc/2.34/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.34.tar.bz2 bf41ec8a4bc2a039beca97a9408f754b +sha1 glibc-2.34.tar.bz2 2aa649e08c12f40061152f2f30a64eb83d91b496 +sha256 glibc-2.34.tar.bz2 4e64bbd9a861911a9816c3738c33603daff162fcb8a71f9750bf6cf3ac1201a1 +sha512 glibc-2.34.tar.bz2 efbf5ce855620351dfacaa56e8cc1a00caf5b10cb7e943051e4737dffe5a998af33dec43df3ab37ee7237675cc44a9eb1c3fdae87f84dd4b6e0f36a786b2116b +md5 glibc-2.34.tar.gz 70696b3f0995ed0e06fc82ea32afe83c +sha1 glibc-2.34.tar.gz 171cc6552cd8d05931b53b34ffbd26bce3fc4055 +sha256 glibc-2.34.tar.gz 255b7632746b5fdd478cb7b36bebd1ec1f92c2b552ee364c940f48eb38d07f62 +sha512 glibc-2.34.tar.gz f69541514cf1fd6b2bafb6585bef477142c491ad29c36dc0b38d20c0e09e33caa5a11a28aab4244b4c6fb6d1b5d1ac92c2b2ab777ba73b43aefbf695ad66f725 +md5 glibc-2.34.tar.xz 31998b53fb39cb946e96abc310af1c89 +sha1 glibc-2.34.tar.xz 7c3b8890a6346793b6334cc5f2fea5d437d307b8 +sha256 glibc-2.34.tar.xz 44d26a1fe20b8853a48f470ead01e4279e869ac149b195dda4e44a195d981ab2 +sha512 glibc-2.34.tar.xz 15252affd9ef4523a8001db16d497f4fdcb3ddf4cde7fe80e075df0bd3cc6524dc29fbe20229dbf5f97af580556e6b1fac0de321a5fe25322bc3e72f93beb624 diff --git a/packages/glibc/2.34/version.desc b/packages/glibc/2.34/version.desc new file mode 100644 index 0000000..b8f0e94 --- /dev/null +++ b/packages/glibc/2.34/version.desc @@ -0,0 +1 @@ +# Released 2 Aug 2021 -- cgit v0.10.2-6-g49f6