From: Michael Jeanson Date: Wed, 10 Nov 2021 20:00:34 +0000 (-0500) Subject: fix: link benchmark with pthread X-Git-Tag: v2.12.3~7 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a1f0d22b32f1179b8a27477562de9d8de372bc87;p=lttng-ust.git fix: link benchmark with pthread In commit aefa2e417b0d0a3c43cb4d078fa4a2d4cfbf429c we removed '-lpthread' from the global link flags. Some toolchains don't require to explicitly link with pthread but some do, add it to the benchmark specific link flags. Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: I1a52d1f5363a86e17f82bcf56bd2273179c4328e --- diff --git a/tests/benchmark/Makefile.am b/tests/benchmark/Makefile.am index ef9635c0..de1f8297 100644 --- a/tests/benchmark/Makefile.am +++ b/tests/benchmark/Makefile.am @@ -2,10 +2,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers noinst_PROGRAMS = bench1 bench2 bench1_SOURCES = bench.c tp.c ust_tests_benchmark.h -bench1_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la $(DL_LIBS) +bench1_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la $(DL_LIBS) -lpthread bench2_SOURCES = bench.c tp.c ust_tests_benchmark.h -bench2_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la $(DL_LIBS) +bench2_LDADD = $(top_builddir)/liblttng-ust/liblttng-ust.la $(DL_LIBS) -lpthread bench2_CFLAGS = -DTRACING $(AM_CFLAGS) dist_noinst_SCRIPTS = test_benchmark ptime