[oe-commits] [openembedded-core] 03/11: musl: Fix clock_gettime on 32-bit archs without vdso

git at git.openembedded.org git at git.openembedded.org
Mon Aug 5 22:37:05 UTC 2019


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch master-next
in repository openembedded-core.

commit 61a59b349d6f70e38bad7afc5f852292f121828d
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Mon Aug 5 12:34:30 2019 -0700

    musl: Fix clock_gettime on 32-bit archs without vdso
    
    This was seen in x86 code being run via qemu-user ending in
    
    (process:883): GLib-ERROR **: 22:28:34.117: GLib requires working CLOCK_MONOTONIC
    qemu: uncaught target signal 5 (Trace/breakpoint trap) - core dumped
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 ...ion-in-clock_gettime-on-32-bit-archs-with.patch | 30 ++++++++++++++++++++++
 meta/recipes-core/musl/musl_git.bb                 |  1 +
 2 files changed, 31 insertions(+)

diff --git a/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch b/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch
new file mode 100644
index 0000000..d89fcee
--- /dev/null
+++ b/meta/recipes-core/musl/musl/0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch
@@ -0,0 +1,30 @@
+From 192c8e18c0f502fe8269b075c21e58290f875182 Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias at aerifal.cx>
+Date: Mon, 5 Aug 2019 12:01:13 -0400
+Subject: [PATCH] fix regression in clock_gettime on 32-bit archs without vdso
+
+commit 72f50245d018af0c31b38dec83c557a4e5dd1ea8 broke this by creating
+a code path where r is uninitialized.
+
+Upstream-Status: Submitted
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+
+---
+ src/time/clock_gettime.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/time/clock_gettime.c b/src/time/clock_gettime.c
+index 63e9f9c8..3e1d0975 100644
+--- a/src/time/clock_gettime.c
++++ b/src/time/clock_gettime.c
+@@ -73,6 +73,7 @@ int __clock_gettime(clockid_t clk, struct timespec *ts)
+ #endif
+ 
+ #ifdef SYS_clock_gettime64
++	r = -ENOSYS;
+ 	if (sizeof(time_t) > 4)
+ 		r = __syscall(SYS_clock_gettime64, clk, ts);
+ 	if (SYS_clock_gettime == SYS_clock_gettime64 || r!=-ENOSYS)
+-- 
+2.22.0
+
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb
index 039932a..40c3f8a 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -15,6 +15,7 @@ PV = "${BASEVER}+git${SRCPV}"
 SRC_URI = "git://git.musl-libc.org/musl \
            file://0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch \
            file://0002-ldso-Use-syslibdir-and-libdir-as-default-pathes-to-l.patch \
+           file://0001-fix-regression-in-clock_gettime-on-32-bit-archs-with.patch \
           "
 
 S = "${WORKDIR}/git"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list