Fix i686 build failure due to nolibc

liburing builds without libc (-ffreestanding) by default. Unfortunately,
Fedora's compiler flags cause a conflict because the stack protector
requires symbols that are in libc. Disable nolibc for now.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Stefan Hajnoczi 2023-06-20 15:13:43 +02:00
parent 4b5f9baef8
commit 1501c4595e
2 changed files with 27 additions and 1 deletions

22
0001-enable-libc.patch Normal file
View File

@ -0,0 +1,22 @@
diff --git a/configure b/configure
index 28f3eb0..9f7cff4 100755
--- a/configure
+++ b/configure
@@ -413,9 +413,15 @@ int main(void){
#endif
}
EOF
-if compile_prog "" "" "nolibc support"; then
- liburing_nolibc="yes"
-fi
+# Temporarily disable nolibc because false positives exist and compilation may
+# fail later. The issue is that compile_prog does not use the CFLAGS modified
+# for nolibc, so it cannot detect when nolibc won't work (e.g. due to the gcc
+# stack protector requiring __stack_chk_fail_local from libc on i686).
+#
+# if compile_prog "" "" "nolibc support"; then
+# liburing_nolibc="yes"
+# fi
+liburing_nolibc="no"
print_config "nolibc support" "$liburing_nolibc";
#############################################################################

View File

@ -1,10 +1,11 @@
Name: liburing
Version: 2.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Linux-native io_uring I/O access library
License: (GPLv2 with exceptions and LGPLv2+) or MIT
Source0: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz
Source1: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz.asc
Patch1: 0001-enable-libc.patch
URL: https://git.kernel.dk/cgit/liburing/
BuildRequires: gcc
BuildRequires: gcc-c++
@ -53,6 +54,9 @@ for the Linux-native io_uring.
%{_mandir}/man7/*
%changelog
* Tue Jun 20 2023 Stefan Hajnoczi <stefanha@redhat.com> - 2.4-2
- Fix i686 build failure due to nolibc conflict with stack protector.
* Tue Jun 20 2023 Stefan Hajnoczi <stefanha@redhat.com> - 2.4-1
- Update to liburing 2.4.