[PATCH 57/94] sys-libs/glibc: rebase Hurd patches (and reformat)
Sam James <[email protected]>
| Newsgroups | gmane.linux.gentoo.devel |
|---|---|
| Message-ID | <dc0b162580362c15f5dab78088b65f85b6cb6e27.1774994336.git.sam@gentoo.org> |
Rebase and reformat the patches so they can go in our patchset eventually, possibly with some special number prefix to denote they should be applied conditionally just for Hurd. Signed-off-by: Sam James <[email protected]> --- .../glibc-2.43-hurd-CLOCK_MONOTONIC.patch | 82 ++++++++++++------- .../files/glibc-2.43-hurd-ldconfig.patch | 53 ++++++++---- 2 files changed, 90 insertions(+), 45 deletions(-) diff --git a/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch b/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch index c31cdccdc55c2..0e318b7b45095 100644 --- a/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch +++ b/sys-libs/glibc/files/glibc-2.43-hurd-CLOCK_MONOTONIC.patch @@ -1,13 +1,41 @@ -https://salsa.debian.org/glibc-team/glibc/-/blob/c2bff774aba6fc93eb9c3baef4746db56a2be24c/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff +From 9fdd7c3b7c89ea240f24ad8d900639904c3064e5 Mon Sep 17 00:00:00 2001 +Message-ID: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org> +From: Samuel Thibault <[email protected]> +Date: Sat, 12 Nov 2011 14:03:09 +0000 +Subject: [PATCH 1/2] hurd: use normal clocks for raw & coarse clock Use the normal clocks for the raw & coarse clock for now. vlc doesn't build when _POSIX_CLOCK_SELECTION is enabled but _POSIX_TIMERS is not, and they refuse to fix that (see #765578), so disable the former. +Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/c2bff774aba6fc93eb9c3baef4746db56a2be24c/debian/patches/hurd-i386/local-clock_gettime_MONOTONIC.diff +--- + rt/timer_create.c | 2 +- + sysdeps/mach/clock_gettime.c | 3 +++ + sysdeps/mach/clock_nanosleep.c | 2 +- + sysdeps/mach/hurd/bits/posix_opt.h | 4 ++-- + sysdeps/posix/clock_getres.c | 4 ++++ + 5 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/rt/timer_create.c b/rt/timer_create.c +index 4f03dcb867..f8c57e1b50 100644 +--- a/rt/timer_create.c ++++ b/rt/timer_create.c +@@ -47,7 +47,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) + return -1; + } + +- if (clock_id != CLOCK_REALTIME) ++ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) + { + __set_errno (EINVAL); + return -1; +diff --git a/sysdeps/mach/clock_gettime.c b/sysdeps/mach/clock_gettime.c +index 2e8b92b1e0..a04d85d1d7 100644 --- a/sysdeps/mach/clock_gettime.c +++ b/sysdeps/mach/clock_gettime.c -@@ -33,6 +33,8 @@ __clock_gettime (clockid_t clock_id, str +@@ -33,6 +33,8 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts) switch (clock_id) { case CLOCK_MONOTONIC: @@ -16,25 +44,29 @@ not, and they refuse to fix that (see #765578), so disable the former. /* If HAVE_HOST_GET_UPTIME64 is not defined or not available, CLOCK_MONOTONIC will be equivalent to CLOCK_REALTIME. */ #ifdef HAVE_HOST_GET_UPTIME64 -@@ -56,6 +58,7 @@ __clock_gettime (clockid_t clock_id, str +@@ -56,6 +58,7 @@ __clock_gettime (clockid_t clock_id, struct timespec *ts) /* FALLTHROUGH */ case CLOCK_REALTIME: + case CLOCK_REALTIME_COARSE: { - /* __host_get_time can only fail if passed an invalid host_t. - __mach_host_self could theoretically fail (producing an ---- a/rt/timer_create.c -+++ b/rt/timer_create.c -@@ -47,7 +47,7 @@ timer_create (clockid_t clock_id, struct - return -1; - } - -- if (clock_id != CLOCK_REALTIME) -+ if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) - { - __set_errno (EINVAL); - return -1; + #ifdef HAVE_HOST_GET_TIME64 + time_value64_t tv_64; +diff --git a/sysdeps/mach/clock_nanosleep.c b/sysdeps/mach/clock_nanosleep.c +index 65b488d952..b8de6d40f6 100644 +--- a/sysdeps/mach/clock_nanosleep.c ++++ b/sysdeps/mach/clock_nanosleep.c +@@ -67,7 +67,7 @@ int + __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, + struct timespec *rem) + { +- if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC) ++ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) + || req->tv_sec < 0 + || !valid_nanoseconds (req->tv_nsec) + || (flags != 0 && flags != TIMER_ABSTIME)) +diff --git a/sysdeps/mach/hurd/bits/posix_opt.h b/sysdeps/mach/hurd/bits/posix_opt.h +index a1a0707d25..c9f9d3ae5a 100644 --- a/sysdeps/mach/hurd/bits/posix_opt.h +++ b/sysdeps/mach/hurd/bits/posix_opt.h @@ -165,8 +165,8 @@ @@ -48,9 +80,11 @@ not, and they refuse to fix that (see #765578), so disable the former. /* Advisory information interfaces could be available in future. */ #define _POSIX_ADVISORY_INFO 0 +diff --git a/sysdeps/posix/clock_getres.c b/sysdeps/posix/clock_getres.c +index 2c5adcd0e9..4d171aa5ad 100644 --- a/sysdeps/posix/clock_getres.c +++ b/sysdeps/posix/clock_getres.c -@@ -55,6 +55,10 @@ __clock_getres (clockid_t clock_id, stru +@@ -55,6 +55,10 @@ __clock_getres (clockid_t clock_id, struct timespec *res) switch (clock_id) { case CLOCK_REALTIME: @@ -61,14 +95,6 @@ not, and they refuse to fix that (see #765578), so disable the former. retval = realtime_getres (res); break; ---- a/sysdeps/mach/clock_nanosleep.c -+++ b/sysdeps/mach/clock_nanosleep.c -@@ -67,7 +67,7 @@ int - __clock_nanosleep (clockid_t clock_id, int flags, const struct timespec *req, - struct timespec *rem) - { -- if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC) -+ if ((clock_id != CLOCK_REALTIME && clock_id != CLOCK_MONOTONIC && clock_id != CLOCK_MONOTONIC_RAW && clock_id != CLOCK_REALTIME_COARSE && clock_id != CLOCK_MONOTONIC_COARSE) - || req->tv_sec < 0 - || !valid_nanoseconds (req->tv_nsec) - || (flags != 0 && flags != TIMER_ABSTIME)) +-- +2.53.0 + diff --git a/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch b/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch index 1dd77155ef8fe..252fc6b7af8bd 100644 --- a/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch +++ b/sys-libs/glibc/files/glibc-2.43-hurd-ldconfig.patch @@ -1,26 +1,45 @@ -https://salsa.debian.org/glibc-team/glibc/-/blob/93d5069240943c4dcc950f6255028f7d1fcc2df0/debian/patches/hurd-i386/local-enable-ldconfig.diff +From c4d83b933e688fabc0ef24c770ac04df88cebb9d Mon Sep 17 00:00:00 2001 +Message-ID: <c4d83b933e688fabc0ef24c770ac04df88cebb9d.1774310363.git.sam@gentoo.org> +In-Reply-To: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org> +References: <9fdd7c3b7c89ea240f24ad8d900639904c3064e5.1774310363.git.sam@gentoo.org> +From: Jeff Bailey <[email protected]> +Date: Fri, 25 Apr 2003 03:40:46 +0000 +Subject: [PATCH 2/2] hurd: enable ldconfig -# DP: Description: Enable ldconfig and such on hurd-i386 -# DP: Author: Jeff Bailey <[email protected]> -# DP: Related Bugs: #309489 -# DP: Upstream status: Not submitted -# DP: Status Details: Upstream disagrees with this patch, but I'm -# DP: putting it in so that we have expected Debian behaviour on the -# DP: Hurd. We should review this when the ELF standard supports runpath. -# DP: Date: 08 Apr 2003 - +DP: Description: Enable ldconfig and such on hurd-i386 +DP: Author: Jeff Bailey <[email protected]> +DP: Upstream status: Not submitted +DP: Status Details: Upstream disagrees with this patch, but I'm +DP: putting it in so that we have expected Debian behaviour on the +DP: Hurd. We should review this when the ELF standard supports runpath. +DP: Date: 08 Apr 2003 +Imported-from: https://salsa.debian.org/glibc-team/glibc/-/blob/93d5069240943c4dcc950f6255028f7d1fcc2df0/debian/patches/hurd-i386/local-enable-ldconfig.diff +--- + sysdeps/mach/hurd/configure | 3 ++- + sysdeps/mach/hurd/configure.ac | 2 ++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/sysdeps/mach/hurd/configure b/sysdeps/mach/hurd/configure +index 743bad5fcb..44ba9ff0f5 100644 --- a/sysdeps/mach/hurd/configure +++ b/sysdeps/mach/hurd/configure -@@ -52,3 +52,4 @@ - # Hurd has libpthread as a separate library. +@@ -222,4 +222,5 @@ fi pthread_in_libc=no - + # Hurd already provides abort implementation for the loader + abort_in_ld=yes +- ++# We want ldconfig +use_ldconfig=yes +diff --git a/sysdeps/mach/hurd/configure.ac b/sysdeps/mach/hurd/configure.ac +index 6d33feed0e..30fef74bed 100644 --- a/sysdeps/mach/hurd/configure.ac +++ b/sysdeps/mach/hurd/configure.ac -@@ -29,3 +29,5 @@ - - # Hurd has libpthread as a separate library. +@@ -50,3 +50,5 @@ fi pthread_in_libc=no -+ + # Hurd already provides abort implementation for the loader + abort_in_ld=yes ++# We want ldconfig +use_ldconfig=yes +-- +2.53.0 + -- 2.53.0