Fix: Add POPT_CFLAGS to lttng_CFLAGS
authorYannick Lamarre <ylamarre@efficios.com>
Fri, 22 Feb 2019 19:33:37 +0000 (14:33 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 28 Mar 2019 19:52:47 +0000 (15:52 -0400)
The generated makefile was ignoring POPT_CFLAGS when compiling
lttng, but was adding POPT_LIBS to lttng_LDADD. With this commit,
make now honors both settings for applications and tests.

Fixes: #1165
Signed-off-by: Yannick Lamarre <ylamarre@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng/Makefile.am
tests/regression/kernel/Makefile.am
tests/regression/ust/multi-lib/Makefile.am

index b0e1247d2ecac70f95ea8698e9f8cc6a73f76380..62ae059374063e0aa010b9bb921da7d8ace07fb7 100644 (file)
@@ -28,6 +28,8 @@ lttng_SOURCES = command.h conf.c conf.h commands/start.c \
                                commands/disable_rotation.c \
                                utils.c utils.h lttng.c
 
+lttng_CFLAGS = $(AM_CFLAGS) $(POPT_CFLAGS)
+
 lttng_LDADD = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                        $(top_builddir)/src/common/libcommon.la \
                        $(top_builddir)/src/common/config/libconfig.la \
index a787e4fa55a23ac205a3cde395f60c631bcb2213..3ab6d75bde10c0704e96e4f27e2b892c9e89da9c 100644 (file)
@@ -7,7 +7,7 @@ EXTRA_DIST = test_event_basic test_all_events test_syscall \
 noinst_PROGRAMS = select_poll_epoll
 select_poll_epoll_SOURCES = select_poll_epoll.c
 select_poll_epoll_LDADD = $(POPT_LIBS)
-select_poll_epoll_CFLAGS = -fno-stack-protector -D_FORTIFY_SOURCE=0 $(AM_CFLAGS)
+select_poll_epoll_CFLAGS = $(POPT_CFLAGS) -fno-stack-protector -D_FORTIFY_SOURCE=0 $(AM_CFLAGS)
 
 all-local:
        @if [ x"$(srcdir)" != x"$(builddir)" ]; then \
index 3fb4ae74ec8f6605fe3a310ed1230f7fd81f358d..17ccf3e648fda66dc6188e7edfde95bc79931377 100644 (file)
@@ -3,13 +3,13 @@ EXTRA_DIST = test_multi_lib
 noinst_PROGRAMS = exec-with-callsites exec-without-callsites
 
 exec_with_callsites_SOURCES = multi-lib-test.c callsites.c
-exec_with_callsites_LDFLAGS = -ldl -lpopt
-exec_with_callsites_CFLAGS = $(AM_CFLAGS) -DHAS_CALLSITES=1
+exec_with_callsites_LDFLAGS = -ldl $(POPT_LIBS)
+exec_with_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=1
 
 exec_without_callsites_SOURCES = multi-lib-test.c
-exec_without_callsites_LDFLAGS = -ldl -lpopt -llttng-ust
+exec_without_callsites_LDFLAGS = -ldl $(POPT_LIBS) -llttng-ust
 exec_without_callsites_LDADD = probes.o
-exec_without_callsites_CFLAGS = $(AM_CFLAGS) -DHAS_CALLSITES=0
+exec_without_callsites_CFLAGS = $(POPT_CFLAGS) $(AM_CFLAGS) -DHAS_CALLSITES=0
 
 PROBES_SRC=probes.c probes.h
 PROBES_LDF=-shared -module -llttng-ust -avoid-version -rpath $(abs_builddir)/.libs/
This page took 0.027863 seconds and 5 git commands to generate.