diff options
author | Yi Zhao <yi.zhao@windriver.com> | 2022-04-01 17:41:59 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2022-04-06 20:25:33 -0400 |
commit | fcdafe933c96149b5e433d3755a75e7f9ee7a42c (patch) | |
tree | 377a4ecfe478964db0e0de023d747d3cdf9f986b /meta-initramfs | |
parent | f00ec3db13a4eaa0b94a65ec587c795deb8aaefe (diff) | |
download | meta-openembedded-fcdafe933c96149b5e433d3755a75e7f9ee7a42c.tar.gz |
dracut: upgrade 055 -> 056
* Add a patch to fix musl build:
src/install/util.c:30:19: error: missing binary operator before token "("
30 | #if __GLIBC_PREREQ(2, 30) == 0
| ^
make: *** [Makefile:57: src/install/util.o] Error 1
* Pass "-fPIC" to CFLAGS to fix build warning with musl build:
WARNING: dracut-1_056-r0 do_package_qa: QA Issue: dracut: ELF binary
/usr/lib/dracut/dracut-install has relocations in .text [textrel]
Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-initramfs')
-rw-r--r-- | meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch | 35 | ||||
-rw-r--r-- | meta-initramfs/recipes-devtools/dracut/dracut_056.bb (renamed from meta-initramfs/recipes-devtools/dracut/dracut_055.bb) | 4 |
2 files changed, 38 insertions, 1 deletions
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch b/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch new file mode 100644 index 000000000..bd768d00d --- /dev/null +++ b/meta-initramfs/recipes-devtools/dracut/dracut/0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From ff5e1a662ba93ba79e2aeaaaec48a2a8ec4b4701 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Thu, 31 Mar 2022 22:22:44 +0800 | ||
4 | Subject: [PATCH] Guard against __GLIBC_PREREQ for musl libc | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
9 | --- | ||
10 | src/install/util.c | 2 ++ | ||
11 | 1 file changed, 2 insertions(+) | ||
12 | |||
13 | diff --git a/src/install/util.c b/src/install/util.c | ||
14 | index 5721de89..784aec48 100644 | ||
15 | --- a/src/install/util.c | ||
16 | +++ b/src/install/util.c | ||
17 | @@ -27,6 +27,7 @@ | ||
18 | |||
19 | #include "util.h" | ||
20 | |||
21 | +#if defined(__GLIBC__) | ||
22 | #if __GLIBC_PREREQ(2, 30) == 0 | ||
23 | #include <sys/syscall.h> | ||
24 | #ifndef SYS_gettid | ||
25 | @@ -35,6 +36,7 @@ | ||
26 | |||
27 | #define gettid() ((pid_t) syscall(SYS_gettid)) | ||
28 | #endif /*__GLIBC_PREREQ */ | ||
29 | +#endif /*__GLIBC__*/ | ||
30 | |||
31 | size_t page_size(void) | ||
32 | { | ||
33 | -- | ||
34 | 2.25.1 | ||
35 | |||
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_055.bb b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb index a8fc5462f..7b8900610 100644 --- a/meta-initramfs/recipes-devtools/dracut/dracut_055.bb +++ b/meta-initramfs/recipes-devtools/dracut/dracut_056.bb | |||
@@ -7,9 +7,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
7 | 7 | ||
8 | PE = "1" | 8 | PE = "1" |
9 | 9 | ||
10 | SRCREV = "86bf2533d77762e823ad7a3e06a574522c1a90e3" | 10 | SRCREV = "631d5f72a223288aa1f48bb8e8d0313e75947400" |
11 | SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \ | 11 | SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http;branch=master \ |
12 | file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \ | 12 | file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \ |
13 | file://0001-Guard-against-__GLIBC_PREREQ-for-musl-libc.patch \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | DEPENDS += "kmod" | 16 | DEPENDS += "kmod" |
@@ -36,6 +37,7 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ | |||
36 | 37 | ||
37 | EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' | 38 | EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"' |
38 | 39 | ||
40 | CFLAGS:append = " -fPIC" | ||
39 | LDLIBS:append:libc-musl = " -lfts" | 41 | LDLIBS:append:libc-musl = " -lfts" |
40 | 42 | ||
41 | do_configure() { | 43 | do_configure() { |