summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-11-09 00:07:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-11 17:21:41 +0000
commita469b6efc6a267bfdda109ef15356419b3f62cb1 (patch)
tree3359743ec15c4d73d5444516ce9d0c511f432ea8
parent6d57ce3fa34bb3c4d20d7b744296f154a0776edc (diff)
downloadpoky-a469b6efc6a267bfdda109ef15356419b3f62cb1.tar.gz
systemtap: fix native linking on recent Ubuntu
The latest Ubuntu uses yet more aggressive hardening options, which causes the unconventional build order used by systemtap to fail. [ YOCTO #10521 ] (From OE-Core rev: 5ca6ac8739ea4a273df7b8e5c5f7d481619923d8) (From OE-Core rev: 3397af5877a41a6a59aeb90f8610c759cad38795) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch41
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.inc1
2 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch b/meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch
new file mode 100644
index 0000000000..2bf0742a1d
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch
@@ -0,0 +1,41 @@
1Upstream-Status: Submitted
2Signed-off-by: Ross Burton <ross.burton@intel.com>
3
4From d940aa0079c253b958cf9158e9ec7922ecf464f9 Mon Sep 17 00:00:00 2001
5From: Ross Burton <ross.burton@intel.com>
6Date: Wed, 9 Nov 2016 00:00:48 +0000
7Subject: [PATCH] staprun: fix linking if monitor is enabled
8
9If the monitor is enabled, monitor.c needs to link against json-c and ncurses.
10Instead of adding these linker flags to AM_CFLAGS (global CC flags) add them to
11stapio_LDADD.
12
13Apart from being the "right" thing to do, this fixes build failures on systems
14such as current Ubuntu (which defaults to using --as-needed and similar) where
15link order is important.
16---
17 staprun/Makefile.am | 7 +++----
18 1 file changed, 3 insertions(+), 4 deletions(-)
19
20diff --git a/staprun/Makefile.am b/staprun/Makefile.am
21index 63d4088..66b3e21 100644
22--- a/staprun/Makefile.am
23+++ b/staprun/Makefile.am
24@@ -42,12 +42,11 @@ staprun_CXXFLAGS += $(nss_CFLAGS)
25 staprun_LDADD += $(nss_LIBS)
26 endif
27
28-if HAVE_MONITOR_LIBS
29-AM_CFLAGS += $(jsonc_LIBS) $(ncurses_LIBS)
30-endif
31-
32 stapio_SOURCES = stapio.c mainloop.c common.c ctl.c relay.c relay_old.c monitor.c
33 stapio_LDADD = libstrfloctime.a -lpthread
34+if HAVE_MONITOR_LIBS
35+stapio_LDADD += $(jsonc_LIBS) $(ncurses_LIBS)
36+endif
37
38 man_MANS = staprun.8
39
40--
412.8.1
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 34cf22749f..a0f0e6859a 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -10,6 +10,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
10 file://x32_abi_time.patch \ 10 file://x32_abi_time.patch \
11 file://monitor-option.patch \ 11 file://monitor-option.patch \
12 file://no-msgfmt-check.patch \ 12 file://no-msgfmt-check.patch \
13 file://fix-monitor-linking.patch \
13 " 14 "
14 15
15# systemtap doesn't support mips 16# systemtap doesn't support mips