From patchwork Wed Dec 19 23:43:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Stefan_Fr=C3=B6berg?= X-Patchwork-Id: 207568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 5E8E72C008C for ; Thu, 20 Dec 2012 10:45:25 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 107252DF1D; Wed, 19 Dec 2012 23:45:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8Umz9SbUeWO3; Wed, 19 Dec 2012 23:45:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 802162E438; Wed, 19 Dec 2012 23:44:53 +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 60B7B8F753 for ; Wed, 19 Dec 2012 23:44:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C28EA8109C for ; Wed, 19 Dec 2012 23:44:24 +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 76dy2whJmttk for ; Wed, 19 Dec 2012 23:44:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.petroprogram.com (mail.petroprogram.com [194.89.34.74]) by whitealder.osuosl.org (Postfix) with ESMTPS id 0F98581682 for ; Wed, 19 Dec 2012 23:44:22 +0000 (UTC) Received: from localhost.fi (unknown [194.89.34.74]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan.froberg@petroprogram.com) by mail.petroprogram.com (Postfix) with ESMTPSA id 12C9A4FAC9; Thu, 20 Dec 2012 01:34:49 +0200 (EET) From: =?UTF-8?q?Stefan=20Fr=C3=B6berg?= To: buildroot@busybox.net Date: Thu, 20 Dec 2012 01:43:48 +0200 Message-Id: <1355960630-25089-10-git-send-email-stefan.froberg@petroprogram.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1355960630-25089-1-git-send-email-stefan.froberg@petroprogram.com> References: <1355960630-25089-1-git-send-email-stefan.froberg@petroprogram.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 10/12] elfutils: new package 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Elfutils uses nonstandard (glibc extension) mcheck.h interface which provides mtrace() memory leak debugging function. Disabling for uClibc. Signed-off-by: Stefan Fröberg --- package/elfutils/elfutils-mcheck.patch | 214 ++++++++++++++++++++++++++++++++ 1 files changed, 214 insertions(+), 0 deletions(-) create mode 100644 package/elfutils/elfutils-mcheck.patch diff --git a/package/elfutils/elfutils-mcheck.patch b/package/elfutils/elfutils-mcheck.patch new file mode 100644 index 0000000..b49c36f --- /dev/null +++ b/package/elfutils/elfutils-mcheck.patch @@ -0,0 +1,214 @@ +diff -Naur elfutils-0.155.org/src/nm.c elfutils-0.155/src/nm.c +--- elfutils-0.155.org/src/nm.c 2012-12-18 01:12:37.292859311 +0200 ++++ elfutils-0.155/src/nm.c 2012-12-18 01:13:08.965884787 +0200 +@@ -33,7 +33,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +diff -Naur elfutils-0.155.org/src/nm.c elfutils-0.155/src/nm.c +--- elfutils-0.155.org/src/nm.c 2012-12-18 01:16:09.545835592 +0200 ++++ elfutils-0.155/src/nm.c 2012-12-18 01:16:52.454289013 +0200 +@@ -219,8 +219,10 @@ + int remaining; + int result = 0; + ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); +diff -Naur elfutils-0.155.org/src/size.c elfutils-0.155/src/size.c +--- elfutils-0.155.org/src/size.c 2012-12-18 01:34:34.548275699 +0200 ++++ elfutils-0.155/src/size.c 2012-12-18 01:35:16.606621092 +0200 +@@ -28,7 +28,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -160,8 +162,10 @@ + int remaining; + int result = 0; + ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + __fsetlocking (stdin, FSETLOCKING_BYCALLER); +diff -Naur elfutils-0.155.org/src/strip.c elfutils-0.155/src/strip.c +--- elfutils-0.155.org/src/strip.c 2012-12-18 01:45:44.790460034 +0200 ++++ elfutils-0.155/src/strip.c 2012-12-18 01:46:32.118475178 +0200 +@@ -30,7 +30,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -161,8 +163,10 @@ + int remaining; + int result = 0; + ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + __fsetlocking (stdin, FSETLOCKING_BYCALLER); +diff -Naur elfutils-0.155.org/src/ld.c elfutils-0.155/src/ld.c +--- elfutils-0.155.org/src/ld.c 2012-12-18 01:57:30.383137235 +0200 ++++ elfutils-0.155/src/ld.c 2012-12-18 01:58:13.428608088 +0200 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -277,7 +279,7 @@ + int remaining; + int err; + +-#ifndef NDEBUG ++#if !defined(NDEBUG) && !defined(__UCLIBC__) + /* Enable memory debugging. */ + mtrace (); + #endif +--- elfutils-0.155.org/src/addr2line.c 2012-12-18 01:57:30.388137872 +0200 ++++ elfutils-0.155/src/addr2line.c 2012-12-18 02:11:54.732772211 +0200 +@@ -30,7 +30,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -121,8 +123,10 @@ + int remaining; + int result = 0; + ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); +--- elfutils-0.155.org/src/objdump.c 2012-12-18 01:57:30.390138126 +0200 ++++ elfutils-0.155/src/objdump.c 2012-12-18 02:15:33.408820422 +0200 +@@ -26,7 +26,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -131,8 +133,10 @@ + int + main (int argc, char *argv[]) + { ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); +--- elfutils-0.155.org/src/ranlib.c 2012-12-18 01:57:30.388137872 +0200 ++++ elfutils-0.155/src/ranlib.c 2012-12-18 02:17:13.868780486 +0200 +@@ -29,7 +29,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -78,8 +80,10 @@ + int + main (int argc, char *argv[]) + { ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); ++#endif + + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); +--- elfutils-0.155.org/src/ar.c 2012-12-18 01:57:30.389137999 +0200 ++++ elfutils-0.155/src/ar.c 2012-12-18 02:23:02.753432773 +0200 +@@ -28,7 +28,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -141,9 +143,10 @@ + int + main (int argc, char *argv[]) + { ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); +- ++#endif + /* We use no threads here which can interfere with handling a stream. */ + (void) __fsetlocking (stdin, FSETLOCKING_BYCALLER); + (void) __fsetlocking (stdout, FSETLOCKING_BYCALLER); +--- elfutils-0.155.org/src/unstrip.c 2012-12-18 01:57:30.384137363 +0200 ++++ elfutils-0.155/src/unstrip.c 2012-12-18 02:25:34.519547331 +0200 +@@ -36,7 +36,9 @@ + #include + #include + #include ++#ifndef __UCLIBC__ + #include ++#endif + #include + #include + #include +@@ -2215,9 +2217,10 @@ + int + main (int argc, char **argv) + { ++#ifndef __UCLIBC__ + /* Make memory leak detection possible. */ + mtrace (); +- ++#endif + /* We use no threads here which can interfere with handling a stream. */ + __fsetlocking (stdin, FSETLOCKING_BYCALLER); + __fsetlocking (stdout, FSETLOCKING_BYCALLER);