Skip to contentSkip to conversation

iscsi-initiator-utils: Inherit pkgconfig and override PKG_CONFIG

PATCH New Khem Raj 1 participant 2 messages Sep 3, 2019

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 iscsi-initiator-utils: Inherit pkgconfig and override PKG_CONFIG

PKG_CONFIG is hardcoded to /usr/bin/pkg-config which is not cross compile safe and ends up with build errors especially on hosts where pkgconf is used it ends up with errors like

/usr/bin/pkg-config: line 11: exec: pkgconf: not found /usr/bin/pkg-config: line 11: exec: pkgconf: not found

Override it to use own native pkg-config which can deal with sysroot correctly

---
 .../iscsi-initiator-utils/iscsi-initiator-utils_2.0.877.bb     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-networking/recipes-daemons/iscsi-initiator-utils/iscsi-initiator-utils_2.0.877.bb +2 -1
index 1ba6ef065c..3cef70f5e0 100644
@@ -29,7 +29,7 @@ B = "${WORKDIR}/build"
 
 PV .= "+git${SRCPV}"
 
-inherit update-rc.d systemd autotools
+inherit update-rc.d systemd autotools pkgconfig
 
 EXTRA_OECONF = " \
     --target=${TARGET_SYS} \
@@ -42,6 +42,7 @@ EXTRA_OEMAKE = ' \
     BASE="${prefix}" \
     MANDIR="${mandir}" \
     OPTFLAGS="-DNO_SYSTEMD ${CFLAGS}" \
+    PKG_CONFIG="${STAGING_BINDIR_NATIVE}/pkg-config" \
     NO_SYSTEMD=1 \
 '
 
Signature · 1 line
2.23.0
author
#1 lore raw

PATCH 2/2 klibc: Fix build with 5.2+ kernel headers

---
 ...01-Fix-missing-include-in-sys-mman.h.patch | 36 +++++++++++++++++++
 .../recipes-devtools/klibc/klibc.inc          |  1 +
 2 files changed, 37 insertions(+)
 create mode 100644 meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch
meta-initramfs/recipes-devtools/klibc/files/0001-Fix-missing-include-in-sys-mman.h.patch new file +36 -0
new file mode 100644
index 0000000000..4bedef8052
@@ -0,0 +1,36 @@
+From 36360b16833400de7818151be5588b16ac4fd5bc Mon Sep 17 00:00:00 2001
+From: Barret Rhoden <[email protected]>
+Date: Thu, 14 Mar 2019 17:30:38 -0400
+Subject: [PATCH] Fix missing include in sys/mman.h
+
+Linux commit 746c9398f5ac ("arch: move common mmap flags to
+linux/mman.h") moved a few mmap flags, particularly MAP_PRIVATE, from
+asm/mman.h to linux/mman.h.  This broke klibc's build, which uses
+MAP_PRIVATE.
+
+linux/mman.h includes asm/mman.h, so this commit merely includes
+linux/mman.h instead of asm/mman.h.
+
+Signed-off-by: Barret Rhoden <[email protected]>
+Signed-off-by: Ben Hutchings <[email protected]>
+---
+Upstream-Status: Backport [https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=d4853d030639cf3542ae39129c18b654d8d4f020]
+ usr/include/sys/mman.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/usr/include/sys/mman.h b/usr/include/sys/mman.h
+index 56f0b65c..3fd626e7 100644
+--- a/usr/include/sys/mman.h
++++ b/usr/include/sys/mman.h
+@@ -7,7 +7,7 @@
+ 
+ #include <klibc/extern.h>
+ #include <sys/types.h>
+-#include <asm/mman.h>
++#include <linux/mman.h>
+ 
+ #define MAP_FAILED ((void *)-1)
+ 
+-- 
+2.23.0
+
meta-initramfs/recipes-devtools/klibc/klibc.inc +1 -0
index 86aae33407..26689f87e7 100644
@@ -23,6 +23,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/libs/klibc/klibc.git \
            file://0001-klibc-add-getrandom-syscall.patch \
            file://0001-klibc-Kbuild-Accept-EXTRA_KLIBCAFLAGS.patch \
            file://0001-Define-ulocked_-fgets-fread-fwrite-aliases.patch \
+           file://0001-Fix-missing-include-in-sys-mman.h.patch \
            "
 
 ARMPATCHES ?= ""
Signature · 1 line
2.23.0