diff --git a/barrier.h-add-generic-smp_mb-implementation.patch b/barrier.h-add-generic-smp_mb-implementation.patch new file mode 100644 index 0000000..b8ad1ef --- /dev/null +++ b/barrier.h-add-generic-smp_mb-implementation.patch @@ -0,0 +1,28 @@ +From ba97eaf8f9ef2030d581be10df9d875dbfadc91d Mon Sep 17 00:00:00 2001 +From: Jeff Moyer +Date: Tue, 5 Nov 2019 10:33:19 -0500 +Subject: barrier.h: add generic smp_mb implementation +References: bsc#1159055 +Patch-mainline: Queued + +This missing define causes build failures on s390: + + src/include/liburing.h:298: undefined reference to `io_uring_smp_mb' + +Signed-off-by: Jeff Moyer +Signed-off-by: Jens Axboe +Acked-by: Johannes Thumshirn +--- + src/include/liburing/barrier.h | 1 + + 1 file changed, 1 insertion(+) + +--- a/src/include/liburing/barrier.h ++++ b/src/include/liburing/barrier.h +@@ -76,6 +76,7 @@ do { \ + * Add arch appropriate definitions. Be safe and use full barriers for + * archs we don't have support for. + */ ++#define io_uring_smp_mb() __sync_synchronize() + #define io_uring_smp_rmb() __sync_synchronize() + #define io_uring_smp_wmb() __sync_synchronize() + #endif /* defined(__x86_64__) || defined(__i386__) */ diff --git a/liburing.changes b/liburing.changes index 752dd95..c048961 100644 --- a/liburing.changes +++ b/liburing.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Dec 12 09:20:32 UTC 2019 - Johannes Thumshirn + +- Fix builds on ppc64le and s390x (bsc#1159055) + + barrier.h-add-generic-smp_mb-implementation.patch + ------------------------------------------------------------------- Wed Nov 27 08:18:20 UTC 2019 - Johannes Thumshirn diff --git a/liburing.spec b/liburing.spec index 66b1627..7b0fdb6 100644 --- a/liburing.spec +++ b/liburing.spec @@ -23,9 +23,11 @@ Version: 0.2 Release: 0 Summary: Linux-native io_uring I/O access library License: LGPL-2.1-or-later +Group: Development/Libraries/C and C++ URL: https://git.kernel.dk/cgit/liburing Source: https://git.kernel.dk/cgit/liburing/snapshot/%{name}-%{version}.tar.gz Requires: kernel-default >= 5.1 +Patch0: barrier.h-add-generic-smp_mb-implementation.patch %description Provides native async IO for the Linux kernel, in a fast and efficient @@ -41,6 +43,7 @@ manner, for both buffered and O_DIRECT. %package devel Summary: Development files for Linux-native io_uring I/O access library +Group: Development/Libraries/C and C++ Requires: %{name}%{so_ver} = %{version} Requires: pkgconfig @@ -49,7 +52,8 @@ This package provides header files to include and libraries to link with for the Linux-native io_uring. %prep -%autosetup +%setup -n %name-%version +%patch0 -p1 %build ./configure --prefix=%{_prefix} --libdir=/%{_libdir} --mandir=%{_mandir} --includedir=%{_includedir}