summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-07-11 14:30:52 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-02 12:19:06 -0400
commitdba692ca0fb44678fdcc7634d821f04eac2f8042 (patch)
tree5c170d571cb72d078e59edfb500a1976a71e4b22
parent52de184ba28551734e1cb13233588504ab5f62ec (diff)
downloadbfs-dba692ca0fb44678fdcc7634d821f04eac2f8042.tar.xz
build: Add liburing on Linux
-rw-r--r--.github/workflows/ci.yml5
-rw-r--r--.github/workflows/codecov.yml3
-rw-r--r--.github/workflows/codeql.yml3
-rw-r--r--GNUmakefile8
-rw-r--r--README.md12
-rw-r--r--docs/BUILDING.md2
6 files changed, 22 insertions, 11 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ca1737c..971a4df 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -28,9 +28,10 @@ jobs:
libcap-dev \
libcap2:i386 \
libonig-dev \
- libonig5:i386
+ libonig5:i386 \
+ liburing-dev
# Ubuntu doesn't let you install the -dev packages for both amd64 and
- # i386 at once, so we make our own symlinks to fix -m32 -lacl -lattr -lcap
+ # i386 at once, so we make our own symlinks to fix -m32 -lacl -l...
sudo ln -s libacl.so.1 /lib/i386-linux-gnu/libacl.so
sudo ln -s libattr.so.1 /lib/i386-linux-gnu/libattr.so
sudo ln -s libcap.so.2 /lib/i386-linux-gnu/libcap.so
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
index 783cc43..b06ea62 100644
--- a/.github/workflows/codecov.yml
+++ b/.github/workflows/codecov.yml
@@ -20,7 +20,8 @@ jobs:
libattr1-dev \
libcap2-bin \
libcap-dev \
- libonig-dev
+ libonig-dev \
+ liburing-dev
- name: Generate coverage
run: |
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 88e9f3f..3a2f81f 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -37,7 +37,8 @@ jobs:
libattr1-dev \
libcap2-bin \
libcap-dev \
- libonig-dev
+ libonig-dev \
+ liburing-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
diff --git a/GNUmakefile b/GNUmakefile
index 6902979..8154240 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -126,6 +126,7 @@ ifndef NOLIBS
USE_ACL := y
USE_ATTR := y
USE_LIBCAP := y
+USE_LIBURING := y
endif
ifdef USE_ACL
@@ -146,6 +147,11 @@ else
LOCAL_CPPFLAGS += -DBFS_USE_SYS_CAPABILITY_H=0
endif
+ifdef USE_LIBURING
+LOCAL_CPPFLAGS += -DBFS_USE_LIBURING=1
+LOCAL_LDLIBS += -luring
+endif
+
LOCAL_LDFLAGS += -Wl,--as-needed
LOCAL_LDLIBS += -lrt
endif # Linux
@@ -287,7 +293,7 @@ ifneq ($(OS),Darwin)
endif
+$(MAKE) -B tsan ubsan check CC=clang $(DISTCHECK_FLAGS)
ifeq ($(OS) $(ARCH),Linux x86_64)
- +$(MAKE) -B check EXTRA_CFLAGS="-m32" ONIG_CONFIG= $(DISTCHECK_FLAGS)
+ +$(MAKE) -B check EXTRA_CFLAGS="-m32" ONIG_CONFIG= USE_LIBURING= $(DISTCHECK_FLAGS)
endif
+$(MAKE) -B release check $(DISTCHECK_FLAGS)
+$(MAKE) -B check $(DISTCHECK_FLAGS)
diff --git a/README.md b/README.md
index 18af808..a7ca335 100644
--- a/README.md
+++ b/README.md
@@ -290,22 +290,22 @@ Here's how to install them on some common platforms:
<pre>
<strong>Alpine Linux</strong>
-# apk add acl{,-dev} attr{,-dev} libcap{,-dev} oniguruma-dev
+# apk add acl{,-dev} attr{,-dev} libcap{,-dev} liburing-dev oniguruma-dev
<strong>Arch Linux</strong>
-# pacman -S acl attr libcap oniguruma
+# pacman -S acl attr libcap liburing oniguruma
<strong>Debian/Ubuntu</strong>
-# apt install acl libacl1-dev attr libattr1-dev libcap2-bin libcap-dev libonig-dev
+# apt install acl libacl1-dev attr libattr1-dev libcap2-bin libcap-dev liburing-dev libonig-dev
<strong>Fedora</strong>
-# dnf install acl libacl-devel libattr-devel libcap-devel oniguruma-devel
+# dnf install acl libacl-devel libattr-devel libcap-devel liburing-devel oniguruma-devel
<strong>NixOS</strong>
-# nix-env -i acl attr libcap oniguruma
+# nix-env -i acl attr libcap liburing oniguruma
<strong>Void Linux</strong>
-# xbps-install -S acl-{devel,progs} attr-{devel,progs} libcap-{devel,progs} oniguruma-devel
+# xbps-install -S acl-{devel,progs} attr-{devel,progs} libcap-{devel,progs} liburing-devel oniguruma-devel
<strong>Homebrew</strong>
$ brew install oniguruma
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index b19ef00..02f9756 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -75,11 +75,13 @@ These dependencies are optional, and can be turned off at build time if necessar
| [acl] | Linux only | `USE_ACL` |
| [attr] | Linux only | `USE_ATTR` |
| [libcap] | Linux only | `USE_LIBCAP` |
+| [liburing] | Linux only | `USE_LIBURING` |
| [Oniguruma] | All | `USE_ONIGURUMA` |
[acl]: https://savannah.nongnu.org/projects/acl
[attr]: https://savannah.nongnu.org/projects/attr
[libcap]: https://sites.google.com/site/fullycapable/
+[liburing]: https://github.com/axboe/liburing
[Oniguruma]: https://github.com/kkos/oniguruma
### Dependency tracking