diff mbox series

[lttng-tools,v3,2/2] Enforce DL_LIBS valueinstead of hard coded -ldl

Message ID 20190222193338.7240-2-ylamarre@efficios.com
State Accepted, archived
Delegated to: Jérémie Galarneau
Headers show
Series [lttng-tools,v3,1/2] Fix: Add POPT_CFLAGS tolttng_CFLAGS | expand

Commit Message

Yannick Lamarre Feb. 22, 2019, 7:33 p.m. UTC
Generated makefiles would ignore DL_LIBS value selected by configure
script and use the hard coded value -ldl. Generated makefiles will
now use DL_LIBS.

Refs: #1165

Signed-off-by: Yannick Lamarre <ylamarre at efficios.com>
---
 src/common/testpoint/Makefile.am                           | 2 +-
 tests/regression/ust/baddr-statedump/Makefile.am           | 2 +-
 tests/regression/ust/ust-dl/Makefile.am                    | 2 +-
 tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/src/common/testpoint/Makefile.am b/src/common/testpoint/Makefile.am
index 5c15725e..a2f9d407 100644
--- a/src/common/testpoint/Makefile.am
+++ b/src/common/testpoint/Makefile.am
@@ -1,4 +1,4 @@ 
 noinst_LTLIBRARIES = libtestpoint.la
 
 libtestpoint_la_SOURCES = testpoint.h testpoint.c
-libtestpoint_la_LIBADD = -ldl
+libtestpoint_la_LIBADD = $(DL_LIBS)
diff --git a/tests/regression/ust/baddr-statedump/Makefile.am b/tests/regression/ust/baddr-statedump/Makefile.am
index bf327179..bf51f948 100644
--- a/tests/regression/ust/baddr-statedump/Makefile.am
+++ b/tests/regression/ust/baddr-statedump/Makefile.am
@@ -6,7 +6,7 @@  AM_CPPFLAGS += -I$(srcdir) -g
 
 noinst_PROGRAMS = prog
 prog_SOURCES = prog.c tp.c tp.h
-prog_LDADD = -llttng-ust -ldl
+prog_LDADD = -llttng-ust $(DL_LIBS)
 
 noinst_SCRIPTS = test_baddr-statedump test_baddr-statedump.py
 EXTRA_DIST = test_baddr-statedump test_baddr-statedump.py
diff --git a/tests/regression/ust/ust-dl/Makefile.am b/tests/regression/ust/ust-dl/Makefile.am
index 9889e85a..c51e072f 100644
--- a/tests/regression/ust/ust-dl/Makefile.am
+++ b/tests/regression/ust/ust-dl/Makefile.am
@@ -19,7 +19,7 @@  AM_CPPFLAGS += -I$(srcdir) -g
 
 noinst_PROGRAMS = prog
 prog_SOURCES = prog.c
-prog_LDADD = -ldl
+prog_LDADD = $(DL_LIBS)
 
 noinst_LTLIBRARIES = libzzz.la libbar.la libfoo.la libtp.la
 
diff --git a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
index e86939b4..d79ce0ea 100644
--- a/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
+++ b/tests/utils/testapp/userspace-probe-sdt-binary/Makefile.am
@@ -3,7 +3,7 @@  BUILT_SOURCES = foobar_provider.h
 
 noinst_PROGRAMS = userspace-probe-sdt-binary
 userspace_probe_sdt_binary_SOURCES = userspace-probe-sdt-binary.c sema.h sema.c
-userspace_probe_sdt_binary_LDADD = foobar_provider.o libfoo.la libbar.la -ldl
+userspace_probe_sdt_binary_LDADD = foobar_provider.o libfoo.la libbar.la $(DL_LIBS)
 userspace_probe_sdt_binary_CFLAGS = -I$(abs_builddir)
 nodist_userspace_probe_sdt_binary_SOURCES = $(abs_builddir)/foobar_provider.h