Files
Bernd Kuhls 37fc95c90a package/fio: link with -latomic if needed
Upstream commit http://git.kernel.dk/cgit/fio/commit/?h=fio-3.41&id=a9ba7cef70a7fc99d406addbdc6479f633d01ec7
which was first included in version 3.41 and bumped in buildroot with
commit 215133c0fc added use of atomic
functions causing build errors which are fixed by linking to libatomic.

Fixes:
https://autobuild.buildroot.net/results/c74/c74529b5a3800af269b6819af3cc742ba348d5fe/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-11-22 18:29:35 +01:00

56 lines
1.2 KiB
Makefile

################################################################################
#
# fio
#
################################################################################
FIO_VERSION = 3.41
FIO_SITE = https://brick.kernel.dk/snaps
FIO_LICENSE = GPL-2.0
FIO_LICENSE_FILES = COPYING MORAL-LICENSE
FIO_OPTS = --disable-native --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)"
# Uses __atomic_load_8
ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
FIO_CONF_ENV += LIBS=-latomic
endif
ifeq ($(BR2_PACKAGE_LIBAIO),y)
FIO_DEPENDENCIES += libaio
endif
ifeq ($(BR2_PACKAGE_LIBNFS),y)
FIO_OPTS += --enable-libnfs
FIO_DEPENDENCIES += host-pkgconf libnfs
else
FIO_OPTS += --disable-libnfs
endif
ifeq ($(BR2_PACKAGE_LIBISCSI),y)
FIO_OPTS += --enable-libiscsi
FIO_DEPENDENCIES += host-pkgconf libiscsi
endif
ifeq ($(BR2_PACKAGE_NUMACTL),y)
FIO_DEPENDENCIES += numactl
endif
ifeq ($(BR2_PACKAGE_ZLIB),y)
FIO_DEPENDENCIES += zlib
endif
define FIO_CONFIGURE_CMDS
(cd $(@D); $(TARGET_MAKE_ENV) $(FIO_CONF_ENV) ./configure $(FIO_OPTS))
endef
define FIO_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
endef
define FIO_INSTALL_TARGET_CMDS
$(INSTALL) -D $(@D)/fio $(TARGET_DIR)/usr/bin/fio
endef
$(eval $(generic-package))