From a1f0d22b32f1179b8a27477562de9d8de372bc87 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Wed, 10 Nov 2021 15:00:34 -0500 Subject: [PATCH] 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 --- tests/benchmark/Makefile.am | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.34.1