diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2022-02-16 13:27:30 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2022-03-28 13:48:02 -0700 |
commit | 6d5e22d6c6ac2f30fd3cf3cd7439e9a59c21c930 (patch) | |
tree | 2e2bbab913465d5308cecd64b4d6349e106d3968 /meta-microblaze/recipes-core | |
parent | f7d26af60681af1d44ca1b25593924e55b931d69 (diff) | |
download | meta-xilinx-6d5e22d6c6ac2f30fd3cf3cd7439e9a59c21c930.tar.gz |
meta-microblaze: Move to glibc backport
Move to a backport of the official fix for glibc BZ #28883.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
Diffstat (limited to 'meta-microblaze/recipes-core')
3 files changed, 35 insertions, 51 deletions
diff --git a/meta-microblaze/recipes-core/glibc/files/0001-microblaze-Use-the-correct-select-syscall-BZ-28883.patch b/meta-microblaze/recipes-core/glibc/files/0001-microblaze-Use-the-correct-select-syscall-BZ-28883.patch new file mode 100644 index 00000000..aaaa0fc1 --- /dev/null +++ b/meta-microblaze/recipes-core/glibc/files/0001-microblaze-Use-the-correct-select-syscall-BZ-28883.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From bbe199b27aa52fc407db3372af00c3e9ffa20d1d Mon Sep 17 00:00:00 2001 | ||
2 | From: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
3 | Date: Wed, 16 Feb 2022 13:51:42 -0300 | ||
4 | Subject: [PATCH] microblaze: Use the correct select syscall (BZ #28883) | ||
5 | |||
6 | On Microblaze only __NR_newselect is implemented, even though kernel | ||
7 | advertise __NR_select on asm/unistd.h. Since microblaze is the | ||
8 | only architecture that undef __ASSUME_PSELECT, the generic code | ||
9 | change is simpler than chaging the architecture syscall number. | ||
10 | |||
11 | Upstream-Status: Backport [https://sourceware.org/git/?p=glibc.git;a=commit;h=bbe199b27aa52fc407db3372af00c3e9ffa20d1d] | ||
12 | |||
13 | Acked-by: Mark Hatle <mark.hatle@xilinx.com> | ||
14 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
15 | --- | ||
16 | sysdeps/unix/sysv/linux/select.c | 2 +- | ||
17 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
18 | |||
19 | diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c | ||
20 | index 3bc8b0cc3d..a3f0a2eba7 100644 | ||
21 | --- a/sysdeps/unix/sysv/linux/select.c | ||
22 | +++ b/sysdeps/unix/sysv/linux/select.c | ||
23 | @@ -108,7 +108,7 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, | ||
24 | ptv32 = &tv32; | ||
25 | } | ||
26 | |||
27 | - int r = SYSCALL_CANCEL (select, nfds, readfds, writefds, exceptfds, ptv32); | ||
28 | + int r = SYSCALL_CANCEL (_newselect, nfds, readfds, writefds, exceptfds, ptv32); | ||
29 | if (timeout != NULL) | ||
30 | *timeout = valid_timeval_to_timeval64 (tv32); | ||
31 | return r; | ||
32 | -- | ||
33 | 2.17.1 | ||
34 | |||
diff --git a/meta-microblaze/recipes-core/glibc/files/select-use-newselect-syscall.patch b/meta-microblaze/recipes-core/glibc/files/select-use-newselect-syscall.patch deleted file mode 100644 index 04231f0a..00000000 --- a/meta-microblaze/recipes-core/glibc/files/select-use-newselect-syscall.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | Restore newselect syscall override of select syscall | ||
2 | |||
3 | Commit 4c3df0eba5e8fe98f0de917ade9b2ebba6951c5f removed the check and override | ||
4 | of select syscall with newselect if newselect was defined. | ||
5 | |||
6 | This code path, using select instead of pselect is only executed when | ||
7 | ASSUME_PSELECT is not enabled. This happens on microblaze when the | ||
8 | kernel version is set below 3.15. | ||
9 | |||
10 | On Microblaze select is not implemented, only newselect is. So this automatic | ||
11 | conversion from select to newselect syscall is expected. The original | ||
12 | implementation of the select to newselect syscall was part of: | ||
13 | |||
14 | commit 26f28fd73d20df8847d93f88b6e2a7bd3bd9bf51 | ||
15 | Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> | ||
16 | Date: Fri Nov 18 14:27:03 2016 -0200 | ||
17 | |||
18 | Consolidate Linux select implementation | ||
19 | |||
20 | This patch consolidates the select Linux syscall implementation on | ||
21 | sysdeps/unix/sysv/linux/select.c. The changes are: | ||
22 | |||
23 | 1. Remove select from auto-generation syscalls.list on the architecture | ||
24 | that uses __NR_select. | ||
25 | 2. Remove generic implementation add a default one that handle all | ||
26 | current cases (with the expection of alpha) | ||
27 | The new default implementation will either use __NR_select if | ||
28 | available of fallback to __NR_pselect6 otherwise. | ||
29 | 3. Add a alpha outlier implementation which requires old compatibility | ||
30 | symbols. | ||
31 | |||
32 | Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=28883] | ||
33 | |||
34 | Signed-off-by: Mark Hatle <mark.hatle@xilinx.com> | ||
35 | |||
36 | diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c | ||
37 | index da25b4b4cfe..0f4c67aa29e 100644 | ||
38 | --- a/sysdeps/unix/sysv/linux/select.c | ||
39 | +++ b/sysdeps/unix/sysv/linux/select.c | ||
40 | @@ -101,6 +116,10 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, | ||
41 | TIMESPEC_TO_TIMEVAL (timeout, pts32); | ||
42 | return r; | ||
43 | # else | ||
44 | +# ifdef __NR__newselect | ||
45 | +# undef __NR_select | ||
46 | +# define __NR_select __NR__newselect | ||
47 | +# endif | ||
48 | struct timeval tv32, *ptv32 = NULL; | ||
49 | if (pts64 != NULL) | ||
50 | { | ||
diff --git a/meta-microblaze/recipes-core/glibc/microblaze-glibc.inc b/meta-microblaze/recipes-core/glibc/microblaze-glibc.inc index f7820f24..1dbb0a64 100644 --- a/meta-microblaze/recipes-core/glibc/microblaze-glibc.inc +++ b/meta-microblaze/recipes-core/glibc/microblaze-glibc.inc | |||
@@ -2,6 +2,6 @@ | |||
2 | FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/files" | 2 | FILESEXTRAPATHS:append:microblaze := ":${THISDIR}/files" |
3 | 3 | ||
4 | SRC_URI:append:microblaze = " \ | 4 | SRC_URI:append:microblaze = " \ |
5 | file://select-use-newselect-syscall.patch \ | 5 | file://0001-microblaze-Use-the-correct-select-syscall-BZ-28883.patch \ |
6 | file://0001-microblaze-Add-missing-implementation-when-__ASSUME_.patch \ | 6 | file://0001-microblaze-Add-missing-implementation-when-__ASSUME_.patch \ |
7 | " | 7 | " |