diff mbox series

[oe,meta-initramfs,16/18] dracut: Upgrade to 045

Message ID 20170714054013.34458-16-raj.khem@gmail.com
State New
Headers show
Series [oe,meta-initramfs,01/18] klibc: Fix build issue when default ISA is not thumb | expand

Commit Message

Khem Raj July 14, 2017, 5:40 a.m. UTC
Fix build on musl while here

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...-util.h-include-sys-reg.h-when-libc-glibc.patch | 33 ++++++++++++++++++++++
 .../recipes-devtools/dracut/dracut_git.bb          | 19 +++++++++----
 2 files changed, 46 insertions(+), 6 deletions(-)
 create mode 100644 meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch

-- 
2.13.2

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch b/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
new file mode 100644
index 000000000..32714038b
--- /dev/null
+++ b/meta-initramfs/recipes-devtools/dracut/dracut/0001-util.h-include-sys-reg.h-when-libc-glibc.patch
@@ -0,0 +1,33 @@ 
+From 06011ce55b1e892e863568a73d64eebc6389544f Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 13 Jul 2017 17:14:05 -0700
+Subject: [PATCH] util.h: include <sys/reg.h> when libc != glibc
+
+For musl libc it is required to include <sys/reg.h> to
+have __WORDSIZE defined to e.g. 32 for arm*-musl.
+
+Taken from void-linux
+https://github.com/voidlinux/void-packages/blob/master/srcpkgs/dracut/patches/musl-__wordsize.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ install/util.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/install/util.h b/install/util.h
+index 2ad3254d..062626ec 100644
+--- a/install/util.h
++++ b/install/util.h
+@@ -36,6 +36,9 @@
+ #include <sys/stat.h>
+ #include <dirent.h>
+ #include <sys/resource.h>
++#if !defined(__GLIBC__)
++#include <sys/reg.h>
++#endif
+ 
+ #include "macro.h"
+ 
+-- 
+2.13.2
+
diff --git a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
index b91f3fae2..09c86d0b7 100644
--- a/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
+++ b/meta-initramfs/recipes-devtools/dracut/dracut_git.bb
@@ -5,13 +5,18 @@  LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 PE = "1"
-PV = "044+git${SRCREV}"
+PV = "045+git${SRCREV}"
 
-# v044 tag
-SRCREV = "1bc3e733f96033a508841e97fe08da7a12851782"
-SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http"
+# v045 tag
+SRCREV = "39c9b67f86145953aa30def9d77c68597a4ccfe8"
+SRC_URI = "git://git.kernel.org/pub/scm/boot/dracut/dracut.git;protocol=http \
+           file://0001-util.h-include-sys-reg.h-when-libc-glibc.patch \
+           "
 
-inherit bash-completion
+DEPENDS += "kmod"
+DEPENDS_append_libc-musl = " fts"
+
+inherit bash-completion pkgconfig
 
 S = "${WORKDIR}/git"
 
@@ -30,7 +35,9 @@  EXTRA_OECONF = "--prefix=${prefix} \
 PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
 PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,,systemd"
 
-EXTRA_OEMAKE += 'libdir=${prefix}/lib'
+EXTRA_OEMAKE += 'libdir=${prefix}/lib LDLIBS="${LDLIBS}"'
+
+LDLIBS_append_libc-musl = " -lfts"
 
 do_configure() {
     ./configure ${EXTRA_OECONF}