From patchwork Thu Jul 24 21:59:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 373535 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 96F3B1401FA for ; Fri, 25 Jul 2014 07:59:42 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9ADAF8B10E; Thu, 24 Jul 2014 21:59:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JSa6VzAvfXPs; Thu, 24 Jul 2014 21:59:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 354AC89630; Thu, 24 Jul 2014 21:59:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 24ED71C211A for ; Thu, 24 Jul 2014 21:59:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 208278BED6 for ; Thu, 24 Jul 2014 21:59:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s3wVbbZdzOZU for ; Thu, 24 Jul 2014 21:59:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (top.free-electrons.com [176.31.233.9]) by whitealder.osuosl.org (Postfix) with ESMTP id 17D9D8459E for ; Thu, 24 Jul 2014 21:59:37 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id 4D13185B; Thu, 24 Jul 2014 23:59:36 +0200 (CEST) Received: from localhost (128-79-216-6.hfc.dyn.abo.bbox.fr [128.79.216.6]) by mail.free-electrons.com (Postfix) with ESMTPSA id 076AF7ED; Thu, 24 Jul 2014 23:59:36 +0200 (CEST) From: Alexandre Belloni To: buildroot@busybox.net Date: Thu, 24 Jul 2014 23:59:21 +0200 Message-Id: <1406239161-23777-1-git-send-email-alexandre.belloni@free-electrons.com> X-Mailer: git-send-email 1.9.1 Cc: Thomas Petazzoni Subject: [Buildroot] [PATCH] ltrace: use current master X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net ltrace 0.7.3 is the latest release but it is actually broken on ARM since PTRACE_SINGLESTEP emulation has been removed, see: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=425fc47adb5bb69f76285be77a09a3341a30799e It fails with: PTRACE_SINGLESTEP: Input/output error Using master solves that until a new release is made. Signed-off-by: Alexandre Belloni --- package/ltrace/Config.in | 1 + package/ltrace/ltrace-02-arm-plt.patch | 30 ++++++++++++++++++++++++++++++ package/ltrace/ltrace.mk | 13 +++++++++---- 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 package/ltrace/ltrace-02-arm-plt.patch diff --git a/package/ltrace/Config.in b/package/ltrace/Config.in index 3448342619af..aee14bd001bc 100644 --- a/package/ltrace/Config.in +++ b/package/ltrace/Config.in @@ -3,6 +3,7 @@ config BR2_PACKAGE_LTRACE depends on (BR2_i386 || BR2_arm || BR2_mips || BR2_mipsel \ || BR2_powerpc || BR2_sparc || BR2_x86_64) select BR2_PACKAGE_LIBELF + select BR2_PACKAGE_ELFUTILS help Debugging program which runs a specified command until it exits. While the command is executing, ltrace intercepts and records diff --git a/package/ltrace/ltrace-02-arm-plt.patch b/package/ltrace/ltrace-02-arm-plt.patch new file mode 100644 index 000000000000..f130ce8426e7 --- /dev/null +++ b/package/ltrace/ltrace-02-arm-plt.patch @@ -0,0 +1,30 @@ +From 04377d28135e351c8d096c4392a493e937416815 Mon Sep 17 00:00:00 2001 +From: Alexandre Belloni +Date: Thu, 24 Jul 2014 23:15:20 +0200 +Subject: [PATCH] Allow building with uclibc toolchains + +Unfortunately, uclicbc doesn't define SHT_ARM_ATTRIBUTES in elf.h + +Signed-off-by: Alexandre Belloni +--- + sysdeps/linux-gnu/arm/plt.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sysdeps/linux-gnu/arm/plt.c b/sysdeps/linux-gnu/arm/plt.c +index 9e9e37f0c5b0..a0a5795eb9cb 100644 +--- a/sysdeps/linux-gnu/arm/plt.c ++++ b/sysdeps/linux-gnu/arm/plt.c +@@ -28,6 +28,10 @@ + #include "library.h" + #include "ltrace-elf.h" + ++#ifndef SHT_ARM_ATTRIBUTES ++#define SHT_ARM_ATTRIBUTES 0x70000003 ++#endif ++ + static int + get_hardfp(uint64_t abi_vfp_args) + { +-- +1.9.1 + diff --git a/package/ltrace/ltrace.mk b/package/ltrace/ltrace.mk index 99c1af64b678..0a3a90c344c1 100644 --- a/package/ltrace/ltrace.mk +++ b/package/ltrace/ltrace.mk @@ -4,13 +4,18 @@ # ################################################################################ -LTRACE_VERSION = 0.7.3 -LTRACE_SITE = http://sources.buildroot.net/ -LTRACE_SOURCE = ltrace-$(LTRACE_VERSION).tar.bz2 -LTRACE_DEPENDENCIES = libelf +LTRACE_VERSION = 0896ce554f80afdcba81d9754f6104f863dea803 +LTRACE_SITE = git://anonscm.debian.org/collab-maint/ltrace.git +LTRACE_DEPENDENCIES = libelf elfutils LTRACE_CONF_OPT = --disable-werror LTRACE_LICENSE = GPLv2 LTRACE_LICENSE_FILES = COPYING +LTRACE_AUTORECONF = YES + +define LTRACE_CREATE_CONFIG_M4 + mkdir -p $(@D)/config/m4 +endef +LTRACE_POST_PATCH_HOOKS += LTRACE_CREATE_CONFIG_M4 # ltrace can use libunwind only if libc has backtrace() support # We don't normally do so for uClibc and we can't know if it's external