summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel
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 11:46:39 +0000
commit3397af5877a41a6a59aeb90f8610c759cad38795 (patch)
tree7906f65caf3de7caaf8471717111f1ab42e86583 /meta/recipes-kernel
parent7d689876574ba47e5ad07d67ad40fd865b0c27f5 (diff)
downloadopenembedded-core-3397af5877a41a6a59aeb90f8610c759cad38795.tar.gz
openembedded-core-3397af5877a41a6a59aeb90f8610c759cad38795.tar.bz2
openembedded-core-3397af5877a41a6a59aeb90f8610c759cad38795.zip
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) 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>
Diffstat (limited to 'meta/recipes-kernel')
-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 @@
+Upstream-Status: Submitted
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From d940aa0079c253b958cf9158e9ec7922ecf464f9 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Wed, 9 Nov 2016 00:00:48 +0000
+Subject: [PATCH] staprun: fix linking if monitor is enabled
+
+If the monitor is enabled, monitor.c needs to link against json-c and ncurses.
+Instead of adding these linker flags to AM_CFLAGS (global CC flags) add them to
+stapio_LDADD.
+
+Apart from being the "right" thing to do, this fixes build failures on systems
+such as current Ubuntu (which defaults to using --as-needed and similar) where
+link order is important.
+---
+ staprun/Makefile.am | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/staprun/Makefile.am b/staprun/Makefile.am
+index 63d4088..66b3e21 100644
+--- a/staprun/Makefile.am
++++ b/staprun/Makefile.am
+@@ -42,12 +42,11 @@ staprun_CXXFLAGS += $(nss_CFLAGS)
+ staprun_LDADD += $(nss_LIBS)
+ endif
+
+-if HAVE_MONITOR_LIBS
+-AM_CFLAGS += $(jsonc_LIBS) $(ncurses_LIBS)
+-endif
+-
+ stapio_SOURCES = stapio.c mainloop.c common.c ctl.c relay.c relay_old.c monitor.c
+ stapio_LDADD = libstrfloctime.a -lpthread
++if HAVE_MONITOR_LIBS
++stapio_LDADD += $(jsonc_LIBS) $(ncurses_LIBS)
++endif
+
+ man_MANS = staprun.8
+
+--
+2.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 \
file://x32_abi_time.patch \
file://monitor-option.patch \
file://no-msgfmt-check.patch \
+ file://fix-monitor-linking.patch \
"
# systemtap doesn't support mips