buildroot/package/drbd-utils/drbd-utils.mk
Fabrice Fontaine ecba9d9a91 package/drbd-utils: fix build without threads
Fix the following build failure without threads raised since bump to
version 9.21.4 in commit e4c81885ed:

CompactDisplay.cpp:13:14: fatal error: pthread.h: No such file or directory
   13 |     #include <pthread.h>
      |              ^~~~~~~~~~~

For an unknown reason, previously drbdmon (which unconditionally uses
threads) was always wrongly disabled:

configure:5846: checking whether /home/fabrice/buildroot/output/host/bin/arm-linux-g++ supports C++11 features by default
configure:6141: /home/fabrice/buildroot/output/host/bin/arm-linux-g++ -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -Os -g0  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.cpp >&5
configure:6141: $? = 0
configure:6149: result: yes
configure:6824: WARNING: No C++11 compiler found, disabling drbdmon build.

The correct activation of drbdmon could be a side-effect of
b235e83409

Fixes:
 - http://autobuild.buildroot.org/results/2cc7d771176ccde7539cc93d83e9621d9ada8357

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2022-08-15 14:36:01 +02:00

37 lines
965 B
Makefile

################################################################################
#
# drbd-utils
#
################################################################################
DRBD_UTILS_VERSION = 9.21.4
DRBD_UTILS_SITE = http://pkg.linbit.com/downloads/drbd/utils
DRBD_UTILS_LICENSE = GPL-2.0+
DRBD_UTILS_LICENSE_FILES = COPYING
DRBD_UTILS_SELINUX_MODULES = drbd
DRBD_UTILS_DEPENDENCIES = host-flex
DRBD_UTILS_CONF_OPTS = --with-distro=generic --without-manual
ifeq ($(BR2_INIT_SYSTEMD),y)
DRBD_UTILS_CONF_OPTS += --with-initscripttype=systemd
DRBD_UTILS_DEPENDENCIES += systemd
else
DRBD_UTILS_CONF_OPTS += --with-initscripttype=sysv
endif
ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
DRBD_UTILS_CONF_OPTS += --with-drbdmon
else
DRBD_UTILS_CONF_OPTS += --without-drbdmon
endif
ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
DRBD_UTILS_CONF_OPTS += --with-udev=yes
DRBD_UTILS_DEPENDENCIES += udev
else
DRBD_UTILS_CONF_OPTS += --with-udev=no
endif
$(eval $(autotools-package))