* [PATCH 1/2] systemtap: remove explicit msgfmt check
@ 2016-11-09 0:10 Ross Burton
2016-11-09 0:10 ` [PATCH 2/2] systemtap: fix native linking on recent Ubuntu Ross Burton
0 siblings, 1 reply; 2+ messages in thread
From: Ross Burton @ 2016-11-09 0:10 UTC (permalink / raw)
To: openembedded-core
Passing --disable-nls should be enough to disable the requirement for a full
gettext to be present, but the upstream configure explicitly checks for msgfmt
even if it isn't going to be used. To avoid having to depend on gettext-native,
patch this check out.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../systemtap/systemtap/no-msgfmt-check.patch | 15 +++++++++++++++
meta/recipes-kernel/systemtap/systemtap_git.inc | 1 +
2 files changed, 16 insertions(+)
create mode 100644 meta/recipes-kernel/systemtap/systemtap/no-msgfmt-check.patch
diff --git a/meta/recipes-kernel/systemtap/systemtap/no-msgfmt-check.patch b/meta/recipes-kernel/systemtap/systemtap/no-msgfmt-check.patch
new file mode 100644
index 0000000..471e62c
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap/no-msgfmt-check.patch
@@ -0,0 +1,15 @@
+There is no need to explicitly check that msgfmt was found as the gettext macros
+handle this for us if NLS is enabled.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/configure.ac b/configure.ac
+index e56079a..284bbe0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,4 +38,0 @@ AM_GNU_GETTEXT_VERSION([0.19.4])
+-if test "x$GMSGFMT" = "x:"; then
+- AC_MSG_ERROR([missing gnu /usr/bin/msgfmt])
+-fi
+-
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.inc b/meta/recipes-kernel/systemtap/systemtap_git.inc
index 304eb99..34cf227 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.inc
+++ b/meta/recipes-kernel/systemtap/systemtap_git.inc
@@ -9,6 +9,7 @@ SRC_URI = "git://sourceware.org/git/systemtap.git \
file://configure-allow-to-disable-libvirt.patch \
file://x32_abi_time.patch \
file://monitor-option.patch \
+ file://no-msgfmt-check.patch \
"
# systemtap doesn't support mips
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH 2/2] systemtap: fix native linking on recent Ubuntu
2016-11-09 0:10 [PATCH 1/2] systemtap: remove explicit msgfmt check Ross Burton
@ 2016-11-09 0:10 ` Ross Burton
0 siblings, 0 replies; 2+ messages in thread
From: Ross Burton @ 2016-11-09 0:10 UTC (permalink / raw)
To: openembedded-core
The latest Ubuntu uses yet more aggressive hardening options, which causes the
unconventional build order used by systemtap to fail.
[ YOCTO #10521 ]
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
.../systemtap/systemtap/fix-monitor-linking.patch | 41 ++++++++++++++++++++++
meta/recipes-kernel/systemtap/systemtap_git.inc | 1 +
2 files changed, 42 insertions(+)
create mode 100644 meta/recipes-kernel/systemtap/systemtap/fix-monitor-linking.patch
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 0000000..2bf0742a1
--- /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 34cf227..a0f0e68 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
--
2.8.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-09 0:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-09 0:10 [PATCH 1/2] systemtap: remove explicit msgfmt check Ross Burton
2016-11-09 0:10 ` [PATCH 2/2] systemtap: fix native linking on recent Ubuntu Ross Burton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.