From: Jonathan Rajotte Date: Mon, 13 Apr 2015 18:53:04 +0000 (-0400) Subject: Fix: use LIBS instead of AM_LDFLAGS for dl and c linking X-Git-Tag: v2.7.0-rc1~43 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d7c5433442024fc55c8e9e4299c9105ed2c961ae;p=lttng-tools.git Fix: use LIBS instead of AM_LDFLAGS for dl and c linking The change to --as-needed on linking of the tool chain on Debian based dist break the build. This fix aim to generalize the linking and be independent of the distribution choice of base parameter for the linking process. Signed-off-by: Jonathan Rajotte Signed-off-by: Jérémie Galarneau --- diff --git a/tests/regression/tools/filtering/Makefile.am b/tests/regression/tools/filtering/Makefile.am index b4f8d76f0..f96ac89bd 100644 --- a/tests/regression/tools/filtering/Makefile.am +++ b/tests/regression/tools/filtering/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests -I AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif if HAVE_LIBLTTNG_UST_CTL diff --git a/tests/regression/tools/health/Makefile.am b/tests/regression/tools/health/Makefile.am index c244d65af..643dd31d2 100644 --- a/tests/regression/tools/health/Makefile.am +++ b/tests/regression/tools/health/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I. -O2 -g -I$(top_srcdir)/include AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif if NO_SHARED diff --git a/tests/regression/tools/live/Makefile.am b/tests/regression/tools/live/Makefile.am index ea5f417ad..24ccc7cfc 100644 --- a/tests/regression/tools/live/Makefile.am +++ b/tests/regression/tools/live/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/ut AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la diff --git a/tests/regression/ust/high-throughput/Makefile.am b/tests/regression/ust/high-throughput/Makefile.am index 6e9c89e14..25913c3f4 100644 --- a/tests/regression/ust/high-throughput/Makefile.am +++ b/tests/regression/ust/high-throughput/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif noinst_PROGRAMS = gen-events diff --git a/tests/regression/ust/low-throughput/Makefile.am b/tests/regression/ust/low-throughput/Makefile.am index 3eef3ac5e..630d797b3 100644 --- a/tests/regression/ust/low-throughput/Makefile.am +++ b/tests/regression/ust/low-throughput/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif noinst_PROGRAMS = gen-events diff --git a/tests/regression/ust/multi-session/Makefile.am b/tests/regression/ust/multi-session/Makefile.am index 84e58beed..c821e5a1e 100644 --- a/tests/regression/ust/multi-session/Makefile.am +++ b/tests/regression/ust/multi-session/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(srcdir) -O2 AM_LDFLAGS = -llttng-ust if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif noinst_PROGRAMS = gen-nevents diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index dd3dd8c15..c0c9c45f5 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -4,10 +4,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(top_srcdir)/tests/ut AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la diff --git a/tests/utils/testapp/gen-ust-events/Makefile.am b/tests/utils/testapp/gen-ust-events/Makefile.am index 0e726d11c..9372423b3 100644 --- a/tests/utils/testapp/gen-ust-events/Makefile.am +++ b/tests/utils/testapp/gen-ust-events/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) -O2 -g AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif if HAVE_LIBLTTNG_UST_CTL diff --git a/tests/utils/testapp/gen-ust-nevents/Makefile.am b/tests/utils/testapp/gen-ust-nevents/Makefile.am index d62c06db9..ace00160b 100644 --- a/tests/utils/testapp/gen-ust-nevents/Makefile.am +++ b/tests/utils/testapp/gen-ust-nevents/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) -O2 -g AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif if HAVE_LIBLTTNG_UST_CTL diff --git a/tests/utils/testapp/gen-ust-tracef/Makefile.am b/tests/utils/testapp/gen-ust-tracef/Makefile.am index 4385b40ad..06171fa92 100644 --- a/tests/utils/testapp/gen-ust-tracef/Makefile.am +++ b/tests/utils/testapp/gen-ust-tracef/Makefile.am @@ -2,10 +2,10 @@ AM_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src -I$(srcdir) -O2 -g AM_LDFLAGS = if LTTNG_TOOLS_BUILD_WITH_LIBDL -AM_LDFLAGS += -ldl +LIBS += -ldl endif if LTTNG_TOOLS_BUILD_WITH_LIBC_DL -AM_LDFLAGS += -lc +LIBS += -lc endif if HAVE_LIBLTTNG_UST_CTL