1 Upstream status: Merged
2 Fetched from: https://git.lttng.org/?p=lttng-tools.git;a=commit;h=3622d7c3931685fab8d1b2e5585a369b78cefd12
3 From 3622d7c3931685fab8d1b2e5585a369b78cefd12 Mon Sep 17 00:00:00 2001
4 From: Samuel Martin <s.martin49@gmail.com>
5 Date: Wed, 2 Dec 2015 00:36:45 +0100
6 Subject: [PATCH] tests/unit: fix object files' location
8 Content-Type: text/plain; charset=UTF-8
9 Content-Transfer-Encoding: 8bit
11 Referring to *.o files under a .libs/ directory is not recommended
12 because this belongs to libtool's innards.
14 Indeed, libtool decides to place the *.o files in an
15 implementation-specific location:
16 - PIC *.o files go into a .libs/ directory;
17 - non-PIC *.o files are generated along side to their corresponding
20 Using PIC objects to build executable is legit, thought it may
21 introduce some minor overhead at runtime.
23 However, hard-coding these PIC object files in the Makefile.am to build
24 executables breaks the build in case of static only build.
26 In this case, no PIC object files is generated, so the linker will not
27 found some of the needed objects files.
29 Changing these dependencies' path fixes the static build, keeping the
30 shared one ok, though the non-PIC object files are now always built.
34 Fix tested on git master and v2.6 with no change needed.
36 Signed-off-by: Samuel Martin <s.martin49@gmail.com>
37 Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
39 tests/unit/Makefile.am | 18 +++++++++---------
40 1 file changed, 9 insertions(+), 9 deletions(-)
42 diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am
43 index c0c9c45..7bfe65a 100644
44 --- a/tests/unit/Makefile.am
45 +++ b/tests/unit/Makefile.am
46 @@ -34,9 +34,9 @@ SESSIONS=$(top_builddir)/src/bin/lttng-sessiond/session.o \
47 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
48 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
49 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
50 - $(top_builddir)/src/common/.libs/uri.o \
51 - $(top_builddir)/src/common/.libs/utils.o \
52 - $(top_builddir)/src/common/.libs/error.o \
53 + $(top_builddir)/src/common/uri.o \
54 + $(top_builddir)/src/common/utils.o \
55 + $(top_builddir)/src/common/error.o \
56 $(top_builddir)/src/common/health/libhealth.la \
57 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
59 @@ -60,8 +60,8 @@ UST_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-ust.o \
60 $(top_builddir)/src/bin/lttng-sessiond/session.o \
61 $(top_builddir)/src/bin/lttng-sessiond/snapshot.o \
62 $(top_builddir)/src/bin/lttng-sessiond/agent.o \
63 - $(top_builddir)/src/common/.libs/uri.o \
64 - $(top_builddir)/src/common/.libs/utils.o \
65 + $(top_builddir)/src/common/uri.o \
66 + $(top_builddir)/src/common/utils.o \
67 $(top_builddir)/src/common/health/libhealth.la \
68 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
70 @@ -75,8 +75,8 @@ endif
71 KERN_DATA_TRACE=$(top_builddir)/src/bin/lttng-sessiond/trace-kernel.o \
72 $(top_builddir)/src/bin/lttng-sessiond/consumer.o \
73 $(top_builddir)/src/bin/lttng-sessiond/utils.o \
74 - $(top_builddir)/src/common/.libs/uri.o \
75 - $(top_builddir)/src/common/.libs/utils.o \
76 + $(top_builddir)/src/common/uri.o \
77 + $(top_builddir)/src/common/utils.o \
78 $(top_builddir)/src/common/health/libhealth.la \
79 $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la
81 @@ -86,8 +86,8 @@ test_kernel_data_LDADD = $(LIBTAP) $(LIBCOMMON) $(LIBRELAYD) $(LIBSESSIOND_COMM)
82 test_kernel_data_LDADD += $(KERN_DATA_TRACE)
84 # utils suffix for unit test
85 -UTILS_SUFFIX=$(top_builddir)/src/common/.libs/utils.o \
86 - $(top_builddir)/src/common/.libs/runas.o
87 +UTILS_SUFFIX=$(top_builddir)/src/common/utils.o \
88 + $(top_builddir)/src/common/runas.o
90 # parse_size_suffix unit test
91 test_utils_parse_size_suffix_SOURCES = test_utils_parse_size_suffix.c