blob: 0a897a8e133225f1f4584e796efacc742317bf67 [file] [log] [blame]
Andrew Geissler90fd73c2021-03-05 15:25:55 -06001This is a bit ugly. Specifing abs_builddir as an RPATH is plain wrong when
2cross compiling. Sadly, removing the rpath makes libtool/automake do
3weird things and breaks the build as shared libs are no longer generated.
4
5We already try and delete the RPATH at do_install with chrpath however
6that does leave the path in the string table so it doesn't help us
7with reproducibility.
8
9Instead, hack in a bogus but harmless path, then delete it later in
10our do_install. Ultimately we may want to pass a specific path to use
11to configure if we really do need to set an RPATH at all. It is unclear
12to me whether the tests need that or not.
13
14Fixes reproducibility issues for lttng-tools.
15
Patrick Williams2390b1b2022-11-03 13:47:49 -050016Upstream-Status: Submitted [https://bugs.lttng.org/issues/1361 - needs discussion with upstream about the correct solution]
Andrew Geissler90fd73c2021-03-05 15:25:55 -060017RP 2021/3/1
18
19Index: lttng-tools-2.12.2/tests/regression/ust/ust-dl/Makefile.am
20===================================================================
21--- lttng-tools-2.12.2.orig/tests/regression/ust/ust-dl/Makefile.am
22+++ lttng-tools-2.12.2/tests/regression/ust/ust-dl/Makefile.am
23@@ -27,16 +27,16 @@ noinst_LTLIBRARIES = libzzz.la libbar.la
24
25 libzzz_la_SOURCES = libzzz.c libzzz.h
26 libzzz_la_LDFLAGS = -module -shared -avoid-version \
27- -rpath $(abs_builddir)
28+ -rpath /usr/lib
29
30 libbar_la_SOURCES = libbar.c libbar.h
31 libbar_la_LDFLAGS = -module -shared -avoid-version \
32- -rpath $(abs_builddir)
33+ -rpath /usr/lib
34 libbar_la_LIBADD = libzzz.la
35
36 libfoo_la_SOURCES = libfoo.c libfoo.h
37 libfoo_la_LDFLAGS = -module -shared -avoid-version \
38- -rpath $(abs_builddir)
39+ -rpath /usr/lib
40 libfoo_la_LIBADD = libbar.la
41
42 CLEANFILES = libfoo.so libfoo.so.debug libbar.so libbar.so.debug \
43@@ -44,7 +44,7 @@ CLEANFILES = libfoo.so libfoo.so.debug l
44
45 libtp_la_SOURCES = libbar-tp.h libbar-tp.c libfoo-tp.h libfoo-tp.c \
46 libzzz-tp.h libzzz-tp.c
47-libtp_la_LDFLAGS = -module -shared -rpath $(abs_builddir)
48+libtp_la_LDFLAGS = -module -shared -rpath /usr/lib
49
50 # Extract debug symbols
51 libfoo.so.debug: libfoo.la
52Index: lttng-tools-2.12.2/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
53===================================================================
54--- lttng-tools-2.12.2.orig/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
55+++ lttng-tools-2.12.2/tests/utils/testapp/userspace-probe-elf-binary/Makefile.am
56@@ -5,7 +5,7 @@ AM_CFLAGS += -O0
57 noinst_LTLIBRARIES = libfoo.la
58
59 libfoo_la_SOURCES = foo.c foo.h
60-libfoo_la_LDFLAGS = -shared -module -avoid-version -rpath $(abs_builddir)/.libs/
61+libfoo_la_LDFLAGS = -shared -module -avoid-version -rpath /usr/lib
62
63 noinst_PROGRAMS = userspace-probe-elf-binary
64 userspace_probe_elf_binary_SOURCES = userspace-probe-elf-binary.c