mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
util-linux: Build fixes for 32bit arches with 64bit time_t
some 32bit architectures ( e.g. riscv32 and arc ) are using 64bit time_t from get go, therefore may not have time32 syscalls, these backports help restore the successful builds for util-linux on such machines (From OE-Core rev: df9535626c66e59c6769bd7cc285c6f26271c6aa) Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+52
@@ -0,0 +1,52 @@
|
|||||||
|
From 5547316c85cd45c0ea29c4c7c48eecd616783cd5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
Date: Tue, 17 Nov 2020 11:27:48 +0100
|
||||||
|
Subject: [PATCH] build-sys: do not build plymouth-ctrl.c w/ disabled plymouth
|
||||||
|
|
||||||
|
Do not build plymouth-ctrl.c in agetty and sulogin in case the plymouth
|
||||||
|
support is disabled.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/5547316c85cd45c0ea29c4c7c48eecd616783cd5]
|
||||||
|
Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
---
|
||||||
|
login-utils/Makemodule.am | 6 ++++--
|
||||||
|
term-utils/Makemodule.am | 6 ++++--
|
||||||
|
2 files changed, 8 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am
|
||||||
|
index 4f52cea3c..8bc3ee37e 100644
|
||||||
|
--- a/login-utils/Makemodule.am
|
||||||
|
+++ b/login-utils/Makemodule.am
|
||||||
|
@@ -31,8 +31,10 @@ dist_man_MANS += login-utils/sulogin.8
|
||||||
|
sulogin_SOURCES = \
|
||||||
|
login-utils/sulogin.c \
|
||||||
|
login-utils/sulogin-consoles.c \
|
||||||
|
- login-utils/sulogin-consoles.h \
|
||||||
|
- lib/plymouth-ctrl.c
|
||||||
|
+ login-utils/sulogin-consoles.h
|
||||||
|
+if USE_PLYMOUTH_SUPPORT
|
||||||
|
+sulogin_SOURCES += lib/plymouth-ctrl.c
|
||||||
|
+endif
|
||||||
|
sulogin_LDADD = $(LDADD) libcommon.la
|
||||||
|
|
||||||
|
if HAVE_LIBCRYPT
|
||||||
|
diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am
|
||||||
|
index 92df7dbc8..c424dbdf8 100644
|
||||||
|
--- a/term-utils/Makemodule.am
|
||||||
|
+++ b/term-utils/Makemodule.am
|
||||||
|
@@ -42,8 +42,10 @@ endif # BUILD_SCRIPTLIVE
|
||||||
|
if BUILD_AGETTY
|
||||||
|
sbin_PROGRAMS += agetty
|
||||||
|
dist_man_MANS += term-utils/agetty.8
|
||||||
|
-agetty_SOURCES = term-utils/agetty.c \
|
||||||
|
- lib/plymouth-ctrl.c
|
||||||
|
+agetty_SOURCES = term-utils/agetty.c
|
||||||
|
+if USE_PLYMOUTH_SUPPORT
|
||||||
|
+agetty_SOURCES += lib/plymouth-ctrl.c
|
||||||
|
+endif
|
||||||
|
agetty_LDADD = $(LDADD) libcommon.la
|
||||||
|
if BSD
|
||||||
|
agetty_LDADD += -lutil
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
||||||
+30
@@ -0,0 +1,30 @@
|
|||||||
|
From 367972fae13d170675768d63678577cae1890143 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
Date: Tue, 17 Nov 2020 11:32:45 +0100
|
||||||
|
Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32
|
||||||
|
|
||||||
|
Check that __NR_settimeofday_time32 exists before trying to use it as
|
||||||
|
syscall number.
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/367972fae13d170675768d63678577cae1890143]
|
||||||
|
Signed-off-by: Pino Toscano <toscano.pino@tiscali.it>
|
||||||
|
---
|
||||||
|
sys-utils/hwclock.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c
|
||||||
|
index 1f7ef3317..db448687d 100644
|
||||||
|
--- a/sys-utils/hwclock.c
|
||||||
|
+++ b/sys-utils/hwclock.c
|
||||||
|
@@ -678,7 +678,7 @@ display_time(struct timeval hwctime)
|
||||||
|
#ifndef SYS_settimeofday
|
||||||
|
# ifdef __NR_settimeofday
|
||||||
|
# define SYS_settimeofday __NR_settimeofday
|
||||||
|
-# else
|
||||||
|
+# elif defined(__NR_settimeofday_time32)
|
||||||
|
# define SYS_settimeofday __NR_settimeofday_time32
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
--
|
||||||
|
2.29.2
|
||||||
|
|
||||||
@@ -39,6 +39,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz
|
|||||||
file://run-ptest \
|
file://run-ptest \
|
||||||
file://display_testname_for_subtest.patch \
|
file://display_testname_for_subtest.patch \
|
||||||
file://avoid_parallel_tests.patch \
|
file://avoid_parallel_tests.patch \
|
||||||
|
file://0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch \
|
||||||
|
file://0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch \
|
||||||
"
|
"
|
||||||
SRC_URI[sha256sum] = "09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed"
|
SRC_URI[sha256sum] = "09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user