diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-12-28 23:03:34 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-31 11:56:41 +0000 |
commit | bcbbd13c636742a91dd0df12fbdf408f2f8b3a02 (patch) | |
tree | 4f0417d3d24edc55ac2d615beae0fef193a95399 | |
parent | 620e4689db96058d46a3cfa176425664856e8482 (diff) | |
download | poky-bcbbd13c636742a91dd0df12fbdf408f2f8b3a02.tar.gz |
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>
3 files changed, 84 insertions, 0 deletions
diff --git a/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch b/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch new file mode 100644 index 0000000000..f3ae5ef948 --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From 5547316c85cd45c0ea29c4c7c48eecd616783cd5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pino Toscano <toscano.pino@tiscali.it> | ||
3 | Date: Tue, 17 Nov 2020 11:27:48 +0100 | ||
4 | Subject: [PATCH] build-sys: do not build plymouth-ctrl.c w/ disabled plymouth | ||
5 | |||
6 | Do not build plymouth-ctrl.c in agetty and sulogin in case the plymouth | ||
7 | support is disabled. | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/5547316c85cd45c0ea29c4c7c48eecd616783cd5] | ||
10 | Signed-off-by: Pino Toscano <toscano.pino@tiscali.it> | ||
11 | --- | ||
12 | login-utils/Makemodule.am | 6 ++++-- | ||
13 | term-utils/Makemodule.am | 6 ++++-- | ||
14 | 2 files changed, 8 insertions(+), 4 deletions(-) | ||
15 | |||
16 | diff --git a/login-utils/Makemodule.am b/login-utils/Makemodule.am | ||
17 | index 4f52cea3c..8bc3ee37e 100644 | ||
18 | --- a/login-utils/Makemodule.am | ||
19 | +++ b/login-utils/Makemodule.am | ||
20 | @@ -31,8 +31,10 @@ dist_man_MANS += login-utils/sulogin.8 | ||
21 | sulogin_SOURCES = \ | ||
22 | login-utils/sulogin.c \ | ||
23 | login-utils/sulogin-consoles.c \ | ||
24 | - login-utils/sulogin-consoles.h \ | ||
25 | - lib/plymouth-ctrl.c | ||
26 | + login-utils/sulogin-consoles.h | ||
27 | +if USE_PLYMOUTH_SUPPORT | ||
28 | +sulogin_SOURCES += lib/plymouth-ctrl.c | ||
29 | +endif | ||
30 | sulogin_LDADD = $(LDADD) libcommon.la | ||
31 | |||
32 | if HAVE_LIBCRYPT | ||
33 | diff --git a/term-utils/Makemodule.am b/term-utils/Makemodule.am | ||
34 | index 92df7dbc8..c424dbdf8 100644 | ||
35 | --- a/term-utils/Makemodule.am | ||
36 | +++ b/term-utils/Makemodule.am | ||
37 | @@ -42,8 +42,10 @@ endif # BUILD_SCRIPTLIVE | ||
38 | if BUILD_AGETTY | ||
39 | sbin_PROGRAMS += agetty | ||
40 | dist_man_MANS += term-utils/agetty.8 | ||
41 | -agetty_SOURCES = term-utils/agetty.c \ | ||
42 | - lib/plymouth-ctrl.c | ||
43 | +agetty_SOURCES = term-utils/agetty.c | ||
44 | +if USE_PLYMOUTH_SUPPORT | ||
45 | +agetty_SOURCES += lib/plymouth-ctrl.c | ||
46 | +endif | ||
47 | agetty_LDADD = $(LDADD) libcommon.la | ||
48 | if BSD | ||
49 | agetty_LDADD += -lutil | ||
50 | -- | ||
51 | 2.29.2 | ||
52 | |||
diff --git a/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch b/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch new file mode 100644 index 0000000000..3e818470fe --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 367972fae13d170675768d63678577cae1890143 Mon Sep 17 00:00:00 2001 | ||
2 | From: Pino Toscano <toscano.pino@tiscali.it> | ||
3 | Date: Tue, 17 Nov 2020 11:32:45 +0100 | ||
4 | Subject: [PATCH] hwclock: do not assume __NR_settimeofday_time32 | ||
5 | |||
6 | Check that __NR_settimeofday_time32 exists before trying to use it as | ||
7 | syscall number. | ||
8 | |||
9 | Upstream-Status: Backport [https://github.com/karelzak/util-linux/commit/367972fae13d170675768d63678577cae1890143] | ||
10 | Signed-off-by: Pino Toscano <toscano.pino@tiscali.it> | ||
11 | --- | ||
12 | sys-utils/hwclock.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/sys-utils/hwclock.c b/sys-utils/hwclock.c | ||
16 | index 1f7ef3317..db448687d 100644 | ||
17 | --- a/sys-utils/hwclock.c | ||
18 | +++ b/sys-utils/hwclock.c | ||
19 | @@ -678,7 +678,7 @@ display_time(struct timeval hwctime) | ||
20 | #ifndef SYS_settimeofday | ||
21 | # ifdef __NR_settimeofday | ||
22 | # define SYS_settimeofday __NR_settimeofday | ||
23 | -# else | ||
24 | +# elif defined(__NR_settimeofday_time32) | ||
25 | # define SYS_settimeofday __NR_settimeofday_time32 | ||
26 | # endif | ||
27 | #endif | ||
28 | -- | ||
29 | 2.29.2 | ||
30 | |||
diff --git a/meta/recipes-core/util-linux/util-linux_2.36.1.bb b/meta/recipes-core/util-linux/util-linux_2.36.1.bb index 8ea0bac9b2..bf46922271 100644 --- a/meta/recipes-core/util-linux/util-linux_2.36.1.bb +++ b/meta/recipes-core/util-linux/util-linux_2.36.1.bb | |||
@@ -39,6 +39,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/${BPN}/v${MAJOR_VERSION}/${BP}.tar.xz | |||
39 | file://run-ptest \ | 39 | file://run-ptest \ |
40 | file://display_testname_for_subtest.patch \ | 40 | file://display_testname_for_subtest.patch \ |
41 | file://avoid_parallel_tests.patch \ | 41 | file://avoid_parallel_tests.patch \ |
42 | file://0001-build-sys-do-not-build-plymouth-ctrl.c-w-disabled-pl.patch \ | ||
43 | file://0001-hwclock-do-not-assume-__NR_settimeofday_time32.patch \ | ||
42 | " | 44 | " |
43 | SRC_URI[sha256sum] = "09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed" | 45 | SRC_URI[sha256sum] = "09fac242172cd8ec27f0739d8d192402c69417617091d8c6e974841568f37eed" |
44 | 46 | ||