diff options
| -rw-r--r-- | meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch | 41 | ||||
| -rw-r--r-- | meta/recipes-kernel/systemtap/systemtap_git.inc | 1 |
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 @@ | |||
| 1 | Upstream-Status: Submitted | ||
| 2 | Signed-off-by: Ross Burton <ross.burton@intel.com> | ||
| 3 | |||
| 4 | From d940aa0079c253b958cf9158e9ec7922ecf464f9 Mon Sep 17 00:00:00 2001 | ||
| 5 | From: Ross Burton <ross.burton@intel.com> | ||
| 6 | Date: Wed, 9 Nov 2016 00:00:48 +0000 | ||
| 7 | Subject: [PATCH] staprun: fix linking if monitor is enabled | ||
| 8 | |||
| 9 | If the monitor is enabled, monitor.c needs to link against json-c and ncurses. | ||
| 10 | Instead of adding these linker flags to AM_CFLAGS (global CC flags) add them to | ||
| 11 | stapio_LDADD. | ||
| 12 | |||
| 13 | Apart from being the "right" thing to do, this fixes build failures on systems | ||
| 14 | such as current Ubuntu (which defaults to using --as-needed and similar) where | ||
| 15 | link order is important. | ||
| 16 | --- | ||
| 17 | staprun/Makefile.am | 7 +++---- | ||
| 18 | 1 file changed, 3 insertions(+), 4 deletions(-) | ||
| 19 | |||
| 20 | diff --git a/staprun/Makefile.am b/staprun/Makefile.am | ||
| 21 | index 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 | -- | ||
| 41 | 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 \ | |||
| 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 |
