kumquat-buildroot/package/iperf3/Config.in
Julien Olivain f10488a411 package/iperf3: fix build with libatomic
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>
2024-04-01 22:10:22 +02:00

19 lines
629 B
Plaintext

config BR2_PACKAGE_IPERF3
bool "iperf3"
depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_THREADS
help
iperf is a tool for active measurements of the maximum
achievable bandwidth on IP networks.
It supports tuning of various parameters related to timing,
protocols, and buffers. For each test it reports the
bandwidth, loss, and other parameters.
It's a redesign of the NLANR/DAST iperf(2) and is not backward
compatible.
http://software.es.net/iperf/index.html
comment "iperf3 needs a toolchain w/ threads"
depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on !BR2_TOOLCHAIN_HAS_THREADS