From 1501c4595e139fdf6e673261f8dabc64739e6c01 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Jun 20 2023 13:13:43 +0000 Subject: 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 --- diff --git a/0001-enable-libc.patch b/0001-enable-libc.patch new file mode 100644 index 0000000..ddee088 --- /dev/null +++ b/0001-enable-libc.patch @@ -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"; + ############################################################################# diff --git a/liburing.spec b/liburing.spec index e469463..18540a6 100644 --- a/liburing.spec +++ b/liburing.spec @@ -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 - 2.4-2 +- Fix i686 build failure due to nolibc conflict with stack protector. + * Tue Jun 20 2023 Stefan Hajnoczi - 2.4-1 - Update to liburing 2.4.