mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-07-25 17:11:16 +00:00
Upgraded libaio from 0.3.112 to 03.3.113
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
# libaio
|
||||
# Source: http://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_0.3.112.orig.tar.xz
|
||||
# Source: https://pagure.io/libaio/archive/libaio-0.3.113/libaio-0.3.113.tar.gz
|
||||
#
|
||||
# $BUILD = Directory to temporarily install
|
||||
# $PKGS = Directory to store built packages
|
||||
@ -11,8 +11,15 @@
|
||||
# Recommended: NONE
|
||||
# Optional: NONE
|
||||
|
||||
patch -Np1 -i ../patches/libaio-alpine/libaio-errno.patch &&
|
||||
patch -Np1 -i ../patches/libaio-alpine/libaio-optional-werror.patch &&
|
||||
patch -Np1 -i ../patches/libaio-chimera/0001-man-Fix-typos.patch
|
||||
patch -Np1 -i ../patches/libaio-chimera/0001-portable-install-1-usage.patch
|
||||
patch -Np1 -i ../patches/libaio-chimera/0011-build-Honour-user-build-flags.patch
|
||||
patch -Np1 -i ../patches/libaio-chimera/0010-build-Do-not-use-Werror-by-default.patch
|
||||
patch -Np1 -i ../patches/libaio-chimera/out-of-tree-build.patch
|
||||
patch -Np1 -i ../patches/libaio-chimera/tests.patch
|
||||
|
||||
# Disable building static library, per BLFS
|
||||
sed -i '/install.*libaio.a/s/^/#/' src/Makefile
|
||||
|
||||
read -p "Compile?" && make prefix=${BUILD}/usr sysconfdir=${BUILD}/etc -j2 &&
|
||||
|
||||
@ -41,5 +48,5 @@ libaio:
|
||||
libaio:
|
||||
EOF
|
||||
sudo -S mv -v /tmp/slack-desc install/ &&
|
||||
sudo -S makepkg -l y -c n $PKGS/libaio-0.3.112-$(uname -m)-mlfs.txz &&
|
||||
sudo -S makepkg -l y -c n $PKGS/libaio-0.3.113-$PSUFFIX &&
|
||||
sudo -S rm -rf ${BUILD}/*
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- libaio-0.3.112.orig/src/compat-0_1.c
|
||||
+++ libaio-0.3.112/src/compat-0_1.c
|
||||
@@ -19,7 +19,7 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
-#include <asm/errno.h>
|
||||
+#include <errno.h>
|
||||
|
||||
#include "libaio.h"
|
||||
#include "vsys_def.h"
|
@ -1,31 +0,0 @@
|
||||
From ebe62b178f3e5fcde8a311e64aaffe62099204a5 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Frysinger <vapier@gentoo.org>
|
||||
Date: Sun, 21 Apr 2019 12:44:26 +0200
|
||||
Subject: [PATCH] make -Werror into an optional flag
|
||||
|
||||
This lets distros disable the flag as random errors might come up with
|
||||
different compiler flags and older/newer toolchain versions.
|
||||
|
||||
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
||||
---
|
||||
harness/Makefile | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/harness/Makefile b/harness/Makefile
|
||||
index f477737..a155c4b 100644
|
||||
--- a/harness/Makefile
|
||||
+++ b/harness/Makefile
|
||||
@@ -6,7 +6,8 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS)
|
||||
HARNESS_SRCS:=main.c
|
||||
# io_queue.c
|
||||
|
||||
-CFLAGS+=-Wall -Werror -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE)
|
||||
+CFLAGS_WERROR?=-Werror
|
||||
+CFLAGS+=-Wall $(CFLAGS_WERROR) -I../src -g -O2 -DPAGE_SIZE=$(shell getconf PAGESIZE)
|
||||
#-lpthread -lrt
|
||||
|
||||
all: $(PROGS)
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
35
patches/libaio-chimera/0001-man-Fix-typos.patch
Normal file
35
patches/libaio-chimera/0001-man-Fix-typos.patch
Normal file
@ -0,0 +1,35 @@
|
||||
From d5be842f622eac15b72a5fea7724fe07ee27fc16 Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Sun, 10 Oct 2021 06:14:51 +0200
|
||||
Subject: [PATCH libaio] man: Fix typos
|
||||
|
||||
Warned-by: lintian
|
||||
---
|
||||
man/io.3 | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/io.3 b/man/io.3
|
||||
index bfa9836..c4554a5 100644
|
||||
--- a/man/io.3
|
||||
+++ b/man/io.3
|
||||
@@ -147,7 +147,7 @@ This is experimental.
|
||||
* 3. When write completes decrement counter and free resources
|
||||
*
|
||||
*
|
||||
- * Usage: aiocp file(s) desination
|
||||
+ * Usage: aiocp file(s) destination
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
@@ -271,7 +271,7 @@ int main(int argc, char *const *argv)
|
||||
|
||||
while (tocopy > 0) {
|
||||
int i, rc;
|
||||
- /* Submit as many reads as once as possible upto AIO_MAXIO */
|
||||
+ /* Submit as many reads as once as possible up to AIO_MAXIO */
|
||||
int n = MIN(MIN(AIO_MAXIO - busy, AIO_MAXIO / 2),
|
||||
howmany(length - offset, AIO_BLKSIZE));
|
||||
if (n > 0) {
|
||||
--
|
||||
2.33.0
|
||||
|
32
patches/libaio-chimera/0001-portable-install-1-usage.patch
Normal file
32
patches/libaio-chimera/0001-portable-install-1-usage.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From 475f8224ff5a3e9471eb843eae5598665ec0b5ab Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Fri, 26 Nov 2021 02:13:30 +0100
|
||||
Subject: [PATCH] portable install(1) usage
|
||||
|
||||
---
|
||||
src/Makefile | 8 +++++---
|
||||
1 file changed, 5 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/Makefile b/src/Makefile
|
||||
index 37ae219..d681dfd 100644
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -58,10 +58,12 @@ $(libname): $(libaio_sobjs) libaio.map
|
||||
$(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
|
||||
|
||||
install: $(all_targets)
|
||||
- install -D -m 644 libaio.h $(includedir)/libaio.h
|
||||
- install -D -m 644 libaio.a $(libdir)/libaio.a
|
||||
+ install -d -m 755 $(includedir)
|
||||
+ install -d -m 755 $(libdir)
|
||||
+ install -m 644 libaio.h $(includedir)/libaio.h
|
||||
+ install -m 644 libaio.a $(libdir)/libaio.a
|
||||
ifeq ($(ENABLE_SHARED),1)
|
||||
- install -D -m 755 $(libname) $(libdir)/$(libname)
|
||||
+ install -m 755 $(libname) $(libdir)/$(libname)
|
||||
ln -sf $(libname) $(libdir)/$(soname)
|
||||
ln -sf $(libname) $(libdir)/libaio.so
|
||||
endif
|
||||
--
|
||||
2.34.0
|
||||
|
@ -0,0 +1,25 @@
|
||||
From 4246fcf2c0c1c6518a5689c8a0ee2662f67c4030 Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Sun, 12 Apr 2020 04:00:03 +0200
|
||||
Subject: [PATCH libaio 10/11] build: Do not use -Werror by default
|
||||
|
||||
Using -Werror on a released project is in general not a good idea, as
|
||||
changes in the toolchain and environment can trigger unexpected build
|
||||
failures.
|
||||
|
||||
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
||||
---
|
||||
harness/Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/harness/Makefile
|
||||
+++ b/harness/Makefile
|
||||
@@ -6,7 +6,7 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS)
|
||||
HARNESS_SRCS:=main.c
|
||||
# io_queue.c
|
||||
|
||||
-CFLAGS+=-Wall -Werror -I../src -g -O2
|
||||
+CFLAGS+=-Wall -I../src -g -O2
|
||||
#-lpthread -lrt
|
||||
|
||||
# gcc-11 does not like the test case in 3.t that
|
@ -0,0 +1,95 @@
|
||||
From a0bd410d67e0632526ba3eb891791c6753b51374 Mon Sep 17 00:00:00 2001
|
||||
From: Guillem Jover <guillem@hadrons.org>
|
||||
Date: Sun, 12 Apr 2020 04:01:27 +0200
|
||||
Subject: [PATCH] build: Honor user build flags
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
CPPFLAGS, CFLAGS and LDFLAGS are user flags, which we need to preserve,
|
||||
regardless of the user passing them over the environment or the
|
||||
command-line. Any required flag that the build system needs, has to be
|
||||
set in some other flag (which we will namespace with «MK_») so that the
|
||||
build will use even if the user flags are passed, even though the user
|
||||
should be able to override by appending after them. We pass CPPFLAGS to
|
||||
any compilation command that missed them.
|
||||
|
||||
Signed-off-by: Guillem Jover <guillem@hadrons.org>
|
||||
---
|
||||
harness/Makefile | 9 ++++++---
|
||||
src/Makefile | 18 +++++++++---------
|
||||
2 files changed, 15 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/harness/Makefile
|
||||
+++ b/harness/Makefile
|
||||
@@ -6,13 +6,16 @@ PROGS:=$(PARTPROGS) $(EXTRAPROGS)
|
||||
HARNESS_SRCS:=main.c
|
||||
# io_queue.c
|
||||
|
||||
-CFLAGS+=-Wall -I../src -g -O2
|
||||
+MK_CPPFLAGS = -I../src $(CPPFLAGS)
|
||||
+CFLAGS ?= -Wall -g -O2
|
||||
+MK_CFLAGS = $(CFLAGS)
|
||||
#-lpthread -lrt
|
||||
+MK_LDFLAGS = main.c $(LIBAIO) -lpthread $(LDFLAGS)
|
||||
|
||||
# gcc-11 does not like the test case in 3.t that
|
||||
# passes an invalid pointer (-1) to the kernel, so
|
||||
# tell the compiler we do not need a warning here
|
||||
-cases/3.p: CFLAGS+=-Wno-stringop-overflow
|
||||
+cases/3.p: MK_CFLAGS+=-Wno-stringop-overflow
|
||||
|
||||
# Change this on the build line to run tests against the installed libraries:
|
||||
# make LIBAIO=-laio partcheck
|
||||
@@ -21,7 +24,7 @@ LIBAIO?=../src/libaio.a
|
||||
all: $(PROGS)
|
||||
|
||||
$(PROGS): %.p: %.t $(HARNESS_SRCS)
|
||||
- $(CC) $(CFLAGS) -DTEST_NAME=\"$<\" -o $@ main.c $(LIBAIO) -lpthread
|
||||
+ $(CC) $(MK_CPPFLAGS) $(MK_CFLAGS) -DTEST_NAME=\"$<\" -o $@ $(MK_LDFLAGS)
|
||||
|
||||
clean:
|
||||
rm -f $(PROGS) *.o runtests.out rofile wofile rwfile
|
||||
--- a/src/Makefile
|
||||
+++ b/src/Makefile
|
||||
@@ -3,12 +3,12 @@ prefix=/usr
|
||||
includedir=$(prefix)/include
|
||||
libdir=$(prefix)/lib
|
||||
|
||||
-CFLAGS ?= -g -fomit-frame-pointer -O2
|
||||
-CFLAGS += -Wall -I. -fPIC
|
||||
-SO_CFLAGS=-shared $(CFLAGS)
|
||||
-L_CFLAGS=$(CFLAGS)
|
||||
-LINK_FLAGS=
|
||||
-LINK_FLAGS+=$(LDFLAGS)
|
||||
+MK_CPPFLAGS = -I. $(CPPFLAGS)
|
||||
+CFLAGS ?= -Wall -g -fomit-frame-pointer -O2
|
||||
+MK_CFLAGS = -fPIC $(CFLAGS)
|
||||
+SO_CFLAGS = -shared $(MK_CFLAGS)
|
||||
+L_CFLAGS = $(MK_CFLAGS)
|
||||
+MK_LDFLAGS = $(LDFLAGS)
|
||||
ENABLE_SHARED ?= 1
|
||||
|
||||
soname=libaio.so.1
|
||||
@@ -43,10 +43,10 @@ libaio_sobjs := $(patsubst %.c,%.os,$(li
|
||||
$(libaio_objs) $(libaio_sobjs): libaio.h vsys_def.h
|
||||
|
||||
%.os: %.c
|
||||
- $(CC) $(SO_CFLAGS) -c -o $@ $<
|
||||
+ $(CC) $(MK_CPPFLAGS) $(SO_CFLAGS) -c -o $@ $<
|
||||
|
||||
%.ol: %.c
|
||||
- $(CC) $(L_CFLAGS) -c -o $@ $<
|
||||
+ $(CC) $(MK_CPPFLAGS) $(L_CFLAGS) -c -o $@ $<
|
||||
|
||||
AR ?= ar
|
||||
RANLIB ?= ranlib
|
||||
@@ -56,7 +56,7 @@ libaio.a: $(libaio_objs)
|
||||
|
||||
$(libname): $(libaio_sobjs) libaio.map
|
||||
$(CC) $(CFLAGS) -c struct_offsets.c
|
||||
- $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(LINK_FLAGS)
|
||||
+ $(CC) $(SO_CFLAGS) -Wl,--version-script=libaio.map -Wl,-soname=$(soname) -o $@ $(libaio_sobjs) $(MK_LDFLAGS)
|
||||
|
||||
install: $(all_targets)
|
||||
install -d -m 755 $(includedir)
|
19
patches/libaio-chimera/out-of-tree-build.patch
Normal file
19
patches/libaio-chimera/out-of-tree-build.patch
Normal file
@ -0,0 +1,19 @@
|
||||
commit 29474fd28dc5ac3db7904557e3ca7fb14175575d
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Thu May 5 02:43:52 2022 +0200
|
||||
|
||||
fix out of tree build
|
||||
|
||||
diff --git a/src/struct_offsets.c b/src/struct_offsets.c
|
||||
index 4dc6fcc..1210754 100644
|
||||
--- a/src/struct_offsets.c
|
||||
+++ b/src/struct_offsets.c
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
#include <stddef.h>
|
||||
#include <assert.h>
|
||||
-#include <libaio.h>
|
||||
+#include "libaio.h"
|
||||
|
||||
void
|
||||
offset_check(void)
|
24
patches/libaio-chimera/tests.patch
Normal file
24
patches/libaio-chimera/tests.patch
Normal file
@ -0,0 +1,24 @@
|
||||
commit c67296145d8f12a6bf336440c162b8872bd4ad5c
|
||||
Author: Daniel Kolesa <daniel@octaforge.org>
|
||||
Date: Fri Mar 3 01:30:57 2023 +0100
|
||||
|
||||
this fails on ppc64le for some reason?
|
||||
|
||||
diff --git a/harness/cases/5.t b/harness/cases/5.t
|
||||
index b0a7c56..6b0ea83 100644
|
||||
--- a/harness/cases/5.t
|
||||
+++ b/harness/cases/5.t
|
||||
@@ -42,11 +42,11 @@ int test_main(void)
|
||||
|
||||
/* Whether PROT_WRITE is readable is arch-dependent. So compare
|
||||
* against write() result (to make the kernel read from buf). */
|
||||
- res = write(rwfd, buf, SIZE);
|
||||
+ /*res = write(rwfd, buf, SIZE);
|
||||
if (res < 0)
|
||||
res = -errno;
|
||||
status |= attempt_rw(rwfd, buf, SIZE, 0, READ, SIZE);
|
||||
- status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res);
|
||||
+ status |= attempt_rw(rwfd, buf, SIZE, 0, WRITE, res);*/
|
||||
|
||||
return status;
|
||||
}
|
Reference in New Issue
Block a user