fix: link benchmark with pthread
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 10 Nov 2021 20:00:34 +0000 (15:00 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Nov 2021 16:53:10 +0000 (11:53 -0500)
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 <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I1a52d1f5363a86e17f82bcf56bd2273179c4328e

tests/benchmark/Makefile.am

index ef9635c0da9b567aa9617f9afd5109dd5e9257ce..de1f8297b44a4279d552558b199d3ad5b3b9ea66 100644 (file)
@@ -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
This page took 0.026162 seconds and 4 git commands to generate.