From: Juergen Borleis <jbe@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] latrace: add new package
Date: Mon, 21 Nov 2016 14:02:08 +0100 [thread overview]
Message-ID: <20161121130208.9567-1-jbe@pengutronix.de> (raw)
This change adds a different approach to log library calls than 'ltrace'
does.
Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
---
.../0001-Buildsystem-fix-configure-creation.patch | 25 ++++++++
.../0002-Buildsystem-fix-cross-compilation.patch | 53 +++++++++++++++
patches/latrace-0.5.11/autogen.sh | 1 +
patches/latrace-0.5.11/series | 5 ++
rules/latrace.in | 8 +++
rules/latrace.make | 75 ++++++++++++++++++++++
6 files changed, 167 insertions(+)
create mode 100644 patches/latrace-0.5.11/0001-Buildsystem-fix-configure-creation.patch
create mode 100644 patches/latrace-0.5.11/0002-Buildsystem-fix-cross-compilation.patch
create mode 120000 patches/latrace-0.5.11/autogen.sh
create mode 100644 patches/latrace-0.5.11/series
create mode 100644 rules/latrace.in
create mode 100644 rules/latrace.make
diff --git a/patches/latrace-0.5.11/0001-Buildsystem-fix-configure-creation.patch b/patches/latrace-0.5.11/0001-Buildsystem-fix-configure-creation.patch
new file mode 100644
index 0000000..8da3bce
--- /dev/null
+++ b/patches/latrace-0.5.11/0001-Buildsystem-fix-configure-creation.patch
@@ -0,0 +1,25 @@
+From: Juergen Borleis <jbe@pengutronix.de>
+Date: Fri, 11 Nov 2016 10:47:48 +0100
+Subject: [PATCH] Buildsystem: fix configure creation
+
+According to the AC_DEFINE documentation no parameter is possible, but it
+fails to create the configure script
+
+Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2c287d128f28..42bb7ec78e0f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,7 +88,7 @@ AC_DEFINE(CONFIG_VERSION, "AC_PACKAGE_VERSION", [Version of latrace.])
+ if test "$unamem" = "x86_64" -o\
+ "$unamem" = "i686" -o\
+ "$unamem" = "arm"; then
+- AC_DEFINE(CONFIG_ARCH_HAVE_ARGS)
++ AC_DEFINE(CONFIG_ARCH_HAVE_ARGS, [], [argument display support])
+ AC_SUBST(CONFIG_ARCH_HAVE_ARGS, "y")
+ else
+ AC_MSG_WARN([Arguments display support disabled])
diff --git a/patches/latrace-0.5.11/0002-Buildsystem-fix-cross-compilation.patch b/patches/latrace-0.5.11/0002-Buildsystem-fix-cross-compilation.patch
new file mode 100644
index 0000000..359228f
--- /dev/null
+++ b/patches/latrace-0.5.11/0002-Buildsystem-fix-cross-compilation.patch
@@ -0,0 +1,53 @@
+From: Juergen Borleis <jbe@pengutronix.de>
+Date: Fri, 11 Nov 2016 10:48:21 +0100
+Subject: [PATCH] Buildsystem: fix cross compilation
+
+Its a really bad idea to use build host's 'uname'...
+
+Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
+---
+ configure.ac | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 42bb7ec78e0f..4671c2e0c9a5 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -75,19 +75,19 @@ AC_TYPE_UINT8_T
+ AC_SYS_LARGEFILE
+
+ date=`date "+%B %G"`
+-unamem=`uname -m | sed -e 's/i.86/i686/' -e 's/^armv.*/arm/'`
++AC_CACHE_VAL([latrace_arch], [latrace_arch=`uname -m | sed -e 's/i.86/i686/' -e 's/^armv.*/arm/'`])
+
+ AC_SUBST(CONFIG_DATE, "$date")
+-AC_SUBST(CONFIG_SYSDEP_DIR, "$unamem")
++AC_SUBST(CONFIG_SYSDEP_DIR, "$latrace_arch")
+ AC_SUBST(CONFIG_VERSION, "AC_PACKAGE_VERSION")
+
+ AC_DEFINE(CONFIG_LT_CONFIG, "/tmp/lt-config", [Temporary directory prefix.])
+ AC_DEFINE(CONFIG_VERSION, "AC_PACKAGE_VERSION", [Version of latrace.])
+
+ # for following architectures we have argument display support
+-if test "$unamem" = "x86_64" -o\
+- "$unamem" = "i686" -o\
+- "$unamem" = "arm"; then
++if test "$latrace_arch" = "x86_64" -o\
++ "$latrace_arch" = "i686" -o\
++ "$latrace_arch" = "arm"; then
+ AC_DEFINE(CONFIG_ARCH_HAVE_ARGS, [], [argument display support])
+ AC_SUBST(CONFIG_ARCH_HAVE_ARGS, "y")
+ else
+@@ -95,9 +95,9 @@ else
+ fi
+
+ # for following architectures we have automated tests support
+-if test "$unamem" = "x86_64" -o\
+- "$unamem" = "i686" -o\
+- "$unamem" = "arm" ; then
++if test "$latrace_arch" = "x86_64" -o\
++ "$latrace_arch" = "i686" -o\
++ "$latrace_arch" = "arm" ; then
+ AC_SUBST(CONFIG_ARCH_HAVE_TEST, "y")
+ else
+ AC_MSG_WARN([No automated test support])
diff --git a/patches/latrace-0.5.11/autogen.sh b/patches/latrace-0.5.11/autogen.sh
new file mode 120000
index 0000000..9f8a4cb
--- /dev/null
+++ b/patches/latrace-0.5.11/autogen.sh
@@ -0,0 +1 @@
+../autogen.sh
\ No newline at end of file
diff --git a/patches/latrace-0.5.11/series b/patches/latrace-0.5.11/series
new file mode 100644
index 0000000..b3d7039
--- /dev/null
+++ b/patches/latrace-0.5.11/series
@@ -0,0 +1,5 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-Buildsystem-fix-configure-creation.patch
+0002-Buildsystem-fix-cross-compilation.patch
+# 2fce77713402030eb4733818ed9fa789 - git-ptx-patches magic
diff --git a/rules/latrace.in b/rules/latrace.in
new file mode 100644
index 0000000..8aa6ae9
--- /dev/null
+++ b/rules/latrace.in
@@ -0,0 +1,8 @@
+## SECTION=debug_tools
+
+config LATRACE
+ tristate
+ prompt "latrace"
+ help
+ A tool to trace library calls and get their statistics in a
+ manner similar to the strace utility
diff --git a/rules/latrace.make b/rules/latrace.make
new file mode 100644
index 0000000..bfd402a
--- /dev/null
+++ b/rules/latrace.make
@@ -0,0 +1,75 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2016 by Juergen Borleis <jbe@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_ARCH_ARM)-$(PTXCONF_LATRACE) += latrace
+PACKAGES-$(PTXCONF_ARCH_X86)-$(PTXCONF_LATRACE) += latrace
+#
+# Paths and names
+#
+LATRACE_VERSION := 0.5.11
+LATRACE_MD5 := 138457c7b9eaf3246eddb7856702cddf
+LATRACE := latrace-$(LATRACE_VERSION)
+LATRACE_SUFFIX := tar.bz2
+LATRACE_URL := http://people.redhat.com/jolsa/latrace/dl/$(LATRACE).$(LATRACE_SUFFIX)
+LATRACE_SOURCE := $(SRCDIR)/$(LATRACE).$(LATRACE_SUFFIX)
+LATRACE_DIR := $(BUILDDIR)/$(LATRACE)
+LATRACE_LICENSE := GPL-3.0
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+ifdef PTXCONF_ARCH_X86
+LATRACE_ARCH := i686
+endif
+ifdef PTXCONF_ARCH_ARM
+LATRACE_ARCH := arm
+endif
+
+LATRACE_ENV := $(CROSS_ENV) \
+ latrace_arch=$(LATRACE_ARCH)
+#
+# autoconf
+#
+LATRACE_CONF_TOOL := autoconf
+
+# autotools, but hand-made Makefile m(
+LATRACE_MAKE_PAR := NO
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/latrace.targetinstall:
+ @$(call targetinfo)
+
+ @$(call install_init, latrace)
+ @$(call install_fixup, latrace,PRIORITY,optional)
+ @$(call install_fixup, latrace,SECTION,base)
+ @$(call install_fixup, latrace,AUTHOR,"Juergen Borleis <jbe@pengutronix.de>")
+ @$(call install_fixup, latrace,DESCRIPTION,"library call tracer")
+
+ @$(call install_copy, latrace, 0, 0, 0755, /etc/latrace.d)
+ @$(call install_copy, latrace, 0, 0, 0755, /etc/latrace.d/headers)
+ @$(call install_alternative, latrace, 0, 0, 0644, /etc/latrace.d/latrace.conf)
+ @$(call install_tree, latrace, 0, 0, -, /etc/latrace.d/headers/)
+
+ @$(call install_copy, latrace, 0, 0, 0755, -, /usr/bin/latrace)
+ @$(call install_link, latrace, latrace, /usr/bin/latrace-ctl)
+ @$(call install_lib, latrace, 0, 0, 0644, libltaudit)
+
+ @$(call install_finish, latrace)
+
+ @$(call touch)
+
+# vim: syntax=make
--
2.10.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
reply other threads:[~2016-11-21 13:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20161121130208.9567-1-jbe@pengutronix.de \
--to=jbe@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox