libconfig-general-perl: Enable on musl targets
PATCH 1/2 libconfig-general-perl: Enable on musl targets
its needed by tgt and thankfully builds with musl these days
Signed-off-by Khem Raj <[email protected]>
--- meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb | 2 -- 1 file changed, 2 deletions(-)
meta-oe/recipes-devtools/perl/libconfig-general-perl_2.65.bb +0 -2
@@ -12,8 +12,6 @@ SRC_URI[sha256sum] = "4d6d5754be3a9f30906836f0cc10e554c8832e14e7a1341efb15b05d70 S = "${WORKDIR}/${SRCNAME}-${PV}" -COMPATIBLE_HOST:libc-musl = "null" - EXTRA_CPANFLAGS = "EXPATLIBPATH=${STAGING_LIBDIR} EXPATINCPATH=${STAGING_INCDIR}" inherit cpan
Signature · 1 line
2.43.0
PATCH 2/2 tgt: Fix build with musl
Signed-off-by Khem Raj <[email protected]>
--- .../tgt/files/musl-__wordsize.patch | 41 +++++++++++++++++++ .../recipes-extended/tgt/tgt_1.0.90.bb | 6 +-- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch
meta-networking/recipes-extended/tgt/files/musl-__wordsize.patch new file +41 -0
@@ -0,0 +1,41 @@ +The definition of __WORDSIZE is found in <sys/reg.h> + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +--- a/usr/iscsi/iscsid.h ++++ b/usr/iscsi/iscsid.h +@@ -22,6 +22,9 @@ + #include <stdint.h> + #include <inttypes.h> + #include <netdb.h> ++#if !defined(__GLIBC__) ++#include <sys/reg.h> ++#endif + + #include "transport.h" + #include "list.h" +--- a/usr/tgtd.h ++++ b/usr/tgtd.h +@@ -1,6 +1,9 @@ + #ifndef __TARGET_DAEMON_H + #define __TARGET_DAEMON_H + ++#if !defined(__GLIBC__) ++#include <sys/reg.h> ++#endif + #include "log.h" + #include "scsi_cmnd.h" + #include "tgtadm_error.h" +--- a/usr/util.h ++++ b/usr/util.h +@@ -19,6 +19,9 @@ + #include <linux/fs.h> + #include <sys/types.h> + #include <sys/stat.h> ++#if !defined(__GLIBC__) ++#include <sys/reg.h> ++#endif + + #include "be_byteshift.h" +
meta-networking/recipes-extended/tgt/tgt_1.0.90.bb +3 -3
@@ -7,9 +7,10 @@ DEPENDS = "sg3-utils libaio" SRCREV = "df991fa788e22cd8b8e3013cfae306988c19c3d0" SRC_URI = "git://github.com/fujita/tgt.git;branch=master;protocol=https \ - file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \ + file://0001-Correct-the-path-of-header-files-check-in-Yocto-buil.patch \ file://0001-usr-Makefile-WARNING-fix.patch \ file://usr-Makefile-apply-LDFLAGS-to-all-executables.patch \ + file://musl-__wordsize.patch \ " SRC_URI += "file://tgtd.init \ file://tgtd.service \
@@ -18,8 +19,6 @@ SRC_URI += "file://tgtd.init \ S = "${WORKDIR}/git" -COMPATIBLE_HOST:libc-musl = "null" - CONFFILES:${PN} += "${sysconfdir}/tgt/targets.conf" inherit update-rc.d systemd
@@ -29,6 +28,7 @@ SYSTEMD_AUTO_ENABLE:${PN} = "disable" CFLAGS += ' -I. -DUSE_SIGNALFD -DUSE_TIMERFD -D_GNU_SOURCE -DTGT_VERSION=\\"1.0.63\\" -DBSDIR=\\"${libdir}/backing-store\\"' +CFLAGS:append:libc-musl = " -D_LARGEFILE64_SOURCE" #do_compile() { # oe_runmake SYSROOT="${STAGING_DIR_TARGET}" -e programs conf scripts #}
Signature · 1 line
2.43.0