mariadb: use liburing if kernel supports it
authorEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 4 Nov 2021 17:23:03 +0000 (14:23 -0300)
committerEneas U de Queiroz <cotequeiroz@gmail.com>
Thu, 4 Nov 2021 18:12:58 +0000 (15:12 -0300)
liburing is preferred over libaio.  So, if liburing has already been
built, mariadb will use it, instead of libaio, failing with a missed
dependency.  If it is not found, then libaio is used.

Since it depends on the kernel being built with io_uring support, and it
defaults to y unless SMALL_FLASH=y, then we should allow libaio as
fallback, checking the CONFIG_KERNEL_IO_URING symbol.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
utils/mariadb/Makefile

index 55fb191db06f401edf01f47beaae9553bc1c53f0..a9c9eca937b17ee79406856f247c778473002508 100644 (file)
@@ -82,6 +82,7 @@ MARIADB_SERVER_PLUGINS := \
 
 PKG_CONFIG_DEPENDS := \
        $(patsubst %,CONFIG_PACKAGE_$(PKG_NAME)-server-plugin-%,$(subst _,-,$(MARIADB_SERVER_PLUGINS))) \
+       CONFIG_KERNEL_IO_URING \
        CONFIG_PACKAGE_mariadb-server
 
 plugin-auth_ed25519             := PLUGIN_AUTH_ED25519
@@ -284,7 +285,8 @@ define Package/mariadb-server-base
   $(call Package/mariadb/Default)
   DEPENDS:=mariadb-common \
          $(MARIADB_COMMON_DEPENDS) \
-         +libaio \
+         +!KERNEL_IO_URING:libaio \
+         +KERNEL_IO_URING:liburing \
          +liblzma \
          +libpcre2 \
          +resolveip