Skip to contentSkip to conversation

liburing: Do not build examples on risc/musl

PATCH New Khem Raj 1 participant 1 message Feb 18, 2021

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 liburing: Do not build examples on risc/musl

it needs ucontext for building examples and its not implemented yet for riscv

---
 .../liburing/0001-do-not-build-examples.patch | 30 +++++++++++++++++++
 .../recipes-support/liburing/liburing_0.7.bb  |  7 ++++-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch
meta-oe/recipes-support/liburing/liburing/0001-do-not-build-examples.patch new file +30 -0
new file mode 100644
index 0000000000..19bf14708b
@@ -0,0 +1,30 @@
+From 3ee2f1e231bde18a99f86da747a9b8feca3c179d Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 17 Feb 2021 19:18:16 -0800
+Subject: [PATCH] do not build examples
+
+examples need ucontext and some architectures on musl do not have it
+implemented e.g. riscv
+
+Upstream-Status: Inappropriate [Arch-Specific]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ Makefile | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index 948e004..8b63024 100644
+--- a/Makefile
++++ b/Makefile
+@@ -11,7 +11,6 @@ default: all
+ all:
+ 	@$(MAKE) -C src
+ 	@$(MAKE) -C test
+-	@$(MAKE) -C examples
+ 
+ partcheck: all
+ 	@echo "make partcheck => TODO add tests with out kernel support"
+-- 
+2.30.1
+
meta-oe/recipes-support/liburing/liburing_0.7.bb +6 -1
index e122a907cd..d79389a696 100644
@@ -12,6 +12,9 @@ LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=d51b5805e2a675685e
 SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https \
            file://0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch \
            "
+SRC_URI_append_libc-musl_riscv64 = " file://0001-do-not-build-examples.patch "
+SRC_URI_append_libc-musl_riscv32 = " file://0001-do-not-build-examples.patch "
+
 SRCREV = "45f0735219a615ae848033c47c7e2d85d101d43e"
 S = "${WORKDIR}/git"
 
@@ -20,7 +23,9 @@ XCFLAGS = "-pthread"
 XCFLAGS_append_libc-musl = " -lucontext"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'LDFLAGS=${LDFLAGS}' 'XCFLAGS=${XCFLAGS}' 'BUILDDIR=${S}'"
-
+do_configure() {
+    ${S}/configure --prefix=${prefix}
+}
 do_install () {
     oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} INCLUDEDIR=${includedir}
 }
Signature · 1 line
2.30.1