diff options
Diffstat (limited to 'import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace')
4 files changed, 156 insertions, 0 deletions
diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ltrace-fix-gcc-5-logical-not-parentheses.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ltrace-fix-gcc-5-logical-not-parentheses.patch new file mode 100644 index 000000000..681c43da0 --- /dev/null +++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/0001-ltrace-fix-gcc-5-logical-not-parentheses.patch @@ -0,0 +1,38 @@ +From 876fe5680d77800426f8c4c5680a235732d722e6 Mon Sep 17 00:00:00 2001 +From: Kai Kang <kai.kang@windriver.com> +Date: Mon, 24 Aug 2015 17:37:54 +0800 +Subject: [PATCH] ltrace: fix gcc 5 logical not parentheses + +Upstream-Status: Pending + +Build ltrace with gcc 5.2, it fails with: + +error: logical not is only applied to the left hand side of comparison +[-Werror=logical-not-parentheses] + if (!need_data(data, offset, SIZE / 8) < 0) \ + ^ + +Function need_data just return 0 on success and -1 if fail. So it is ok +to just test if (need_data(data, offset, SIZE / 8) < 0). + +Signed-off-by: Kai Kang <kai.kang@windriver.com> +--- + ltrace-elf.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ltrace-elf.c b/ltrace-elf.c +index c571d2a..7fe830f 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -218,7 +218,7 @@ need_data(Elf_Data *data, GElf_Xword offset, GElf_Xword size) + int \ + NAME(Elf_Data *data, GElf_Xword offset, uint##SIZE##_t *retp) \ + { \ +- if (!need_data(data, offset, SIZE / 8) < 0) \ ++ if (need_data(data, offset, SIZE / 8) < 0) \ + return -1; \ + \ + if (data->d_buf == NULL) /* NODATA section */ { \ +-- +1.9.1 + diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch new file mode 100644 index 000000000..4f89d8f2e --- /dev/null +++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/configure-allow-to-disable-selinux-support.patch @@ -0,0 +1,36 @@ +From 887a403e38f590ebf1d04ce600d94cb7a351744c Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong.fan@windriver.com> +Date: Mon, 1 Dec 2014 00:57:42 -0500 +Subject: [PATCH] ltrace: allow to enable/disable selinux support + +Upstream-Status: Pending + +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> +--- + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 6fe5e3b..189885a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -125,8 +125,14 @@ AC_SUBST(libstdcxx_LIBS) + + + dnl Check security_get_boolean_active availability. +-AC_CHECK_HEADERS(selinux/selinux.h) +-AC_CHECK_LIB(selinux, security_get_boolean_active) ++AC_ARG_ENABLE([selinux], ++ AS_HELP_STRING([--enable-selinux],[enable SELinux support [default=auto]]), ++ [], [enable_selinux=auto]) ++ ++if test x$enable_selinux != xno; then ++ AC_CHECK_HEADERS(selinux/selinux.h) ++ AC_CHECK_LIB(selinux, security_get_boolean_active) ++fi + + dnl Whether (and which) elfutils libdw.so to use for unwinding. + AC_ARG_WITH(elfutils, +-- +1.7.9.5 + diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/ltrace-0.7.2-unused-typedef.patch b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/ltrace-0.7.2-unused-typedef.patch new file mode 100644 index 000000000..8f3c0ecea --- /dev/null +++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace/ltrace-0.7.2-unused-typedef.patch @@ -0,0 +1,49 @@ +diff --git a/value.c b/value.c +index d18db17..b98298e 100644 +--- a/value.c ++++ b/value.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as +@@ -282,9 +282,9 @@ value_init_deref(struct value *ret_val, struct value *valp) + if (value_extract_word(valp, &l, NULL) < 0) + return -1; + +- /* We need "long" to be long enough to hold platform ++ /* We need "long" to be long enough to hold target + * pointers. */ +- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))]; ++ assert(sizeof(l) >= sizeof(arch_addr_t)); + + value_common_init(ret_val, valp->inferior, valp, + valp->type->u.ptr_info.info, 0); +diff --git a/lens_default.c b/lens_default.c +index ed3d0e1..5d00814 100644 +--- a/lens_default.c ++++ b/lens_default.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 1998,2004,2007,2008,2009 Juan Cespedes + * Copyright (C) 2006 Ian Wienand + * Copyright (C) 2006 Steve Fink +@@ -342,9 +342,9 @@ format_array(FILE *stream, struct value *value, struct value_dict *arguments, + struct expr_node *length, size_t maxlen, int before, + const char *open, const char *close, const char *delim) + { +- /* We need "long" to be long enough to cover the whole address +- * space. */ +- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))]; ++ /* We need "long" to be long enough to cover the whole target ++ * address space. */ ++ assert(sizeof(long) >= sizeof(arch_addr_t)); + long l; + if (expr_eval_word(length, value, arguments, &l) < 0) + return -1; diff --git a/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb new file mode 100644 index 000000000..bc4e27166 --- /dev/null +++ b/import-layers/meta-openembedded/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -0,0 +1,33 @@ +SUMMARY = "ltrace intercepts and records dynamic library calls" + +DESCRIPTION = "ltrace intercepts and records dynamic library calls \ +which are called by an executed process and the signals received by that process. \ +It can also intercept and print the system calls executed by the program.\ +" +HOMEPAGE = "http://ltrace.org/" + +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" + +PE = "1" +PV = "7.3+git${SRCPV}" +SRCREV = "37ecc41b58be3dbdd79592a76e331b5b371e4f81" + +DEPENDS = "elfutils" +RDEPENDS_${PN} = "elfutils" +SRC_URI = "git://anonscm.debian.org/collab-maint/ltrace.git;branch=ltrace-0.7 \ + file://ltrace-0.7.2-unused-typedef.patch \ + file://configure-allow-to-disable-selinux-support.patch \ + file://0001-ltrace-fix-gcc-5-logical-not-parentheses.patch \ + " +S = "${WORKDIR}/git" + +inherit autotools + +PACKAGECONFIG ?= "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" +PACKAGECONFIG[unwind] = "--with-libunwind,--without-libunwind,libunwind" +PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux,libselinux,libselinux" + +do_configure_prepend () { + ( cd ${S}; ./autogen.sh ) +} |