Commit 9f94b3b354
"package/iperf3: bump to version 3.16" updated
the package but forgot to reflect a breaking change mentioned in
the release note [1], "iperf3 now requires pthreads and C atomic
variables to compile and run".
When the toolchain has no atomic support, or the libatomic is not
added in the linker flags, the compilation now fail with output:
arm-buildroot-linux-gnueabi/bin/ld: ./.libs/libiperf.so: undefined reference to '__atomic_load_8'
This issue can be seen when running the iperf3 runtime test, with
command:
support/testing/run-tests \
-d dl -o output_test \
tests.package.test_iperf3
This commit fixes the issue by adding a dependency on
BR2_TOOLCHAIN_HAS_ATOMIC and by adding an upstream patch to detect
if linking to libatomic is needed.
Fixes: [2]
[1] https://github.com/esnet/iperf/releases/tag/3.16
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/6466933622
Signed-off-by: Julien Olivain <ju.o@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
29 lines
835 B
Makefile
29 lines
835 B
Makefile
################################################################################
|
|
#
|
|
# iperf3
|
|
#
|
|
################################################################################
|
|
|
|
IPERF3_VERSION = 3.16
|
|
IPERF3_SITE = https://downloads.es.net/pub/iperf
|
|
IPERF3_SOURCE = iperf-$(IPERF3_VERSION).tar.gz
|
|
IPERF3_LICENSE = BSD-3-Clause, BSD-2-Clause, MIT
|
|
IPERF3_LICENSE_FILES = LICENSE
|
|
IPERF3_CPE_ID_VENDOR = es
|
|
|
|
# 0001-Check-and-link-libatomic-if-needed.patch
|
|
IPERF3_AUTORECONF = YES
|
|
|
|
IPERF3_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
|
|
|
|
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
|
# We intentionally don't pass --with-openssl, otherwise pkg-config is
|
|
# not used, and indirect libraries are not picked up when static
|
|
# linking.
|
|
IPERF3_DEPENDENCIES += host-pkgconf openssl
|
|
else
|
|
IPERF3_CONF_OPTS += --without-openssl
|
|
endif
|
|
|
|
$(eval $(autotools-package))
|