From patchwork Fri Mar 1 07:18:51 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: christian.braunersorensen@prevas.dk X-Patchwork-Id: 224242 X-Patchwork-Delegate: esben@haabendal.dk Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hugin.dotsrc.org (hugin.dotsrc.org [IPv6:2001:878:346::102]) by ozlabs.org (Postfix) with ESMTP id B67F02C02A1 for ; Fri, 1 Mar 2013 18:18:59 +1100 (EST) Received: from hugin.dotsrc.org (localhost [127.0.0.1]) by hugin.dotsrc.org (Postfix) with ESMTP id DFA133FC97 for ; Fri, 1 Mar 2013 08:18:55 +0100 (CET) X-Original-To: dev@oe-lite.org Delivered-To: dev@oe-lite.org Received: from mail02.prevas.se (mail02.prevas.se [62.95.78.10]) by hugin.dotsrc.org (Postfix) with ESMTPS id 43F4E3FC97 for ; Fri, 1 Mar 2013 08:18:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=prevas.dk; i=@prevas.dk; l=3337; q=dns/txt; s=ironport2; t=1362122335; x=1393658335; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SaGAlBYqoKTS7978HneOfyL1EsqqIjdw/eI05sjwTP0=; b=Ojnz5VVFA9xCbis+LaixrQZd58tm6hVXpCGFDzQQyq28+i68bWF8RecV RlslaUcpNucvi/z91BQM7ZaFiq035+fkqMdhzYirGqVPCbxL6288kqPUe vC1n0BYhKzylNMwRBGlXam0yGv4Ooz1PMBbS388dLecumcGWjFnlURQoq 4=; X-IronPort-AV: E=Sophos;i="4.84,760,1355094000"; d="scan'208";a="2203204" Received: from vmprevas3.prevas.se (HELO smtp.prevas.se) ([172.16.8.103]) by ironport2.prevas.se with ESMTP/TLS/AES128-SHA; 01 Mar 2013 08:18:54 +0100 Received: from localhost (172.16.10.102) by smtp.prevas.se (172.16.8.105) with Microsoft SMTP Server id 14.2.342.3; Fri, 1 Mar 2013 08:18:53 +0100 Received: by localhost (Postfix, from userid 30007) id 1B8CF68154C; Fri, 1 Mar 2013 07:18:54 +0000 (UTC) From: To: Subject: [PATCH 1/1] crosstool-ng: Patch dmalloc-5.5.2 for powerpc, and fix recursion loop Date: Fri, 1 Mar 2013 07:18:51 +0000 Message-ID: X-Mailer: git-send-email 1.8.0.3 In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: dev@oe-lite.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: OE-lite development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dev-bounces@oe-lite.org Errors-To: dev-bounces@oe-lite.org From: Christian Sørensen --- .../dmalloc-5.5.2-fix-recursion.patch | 18 ++++++++++++++++++ .../crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch | 15 +++++++++++++++ recipes/crosstool-ng/crosstool-ng_1.17.0.oe | 2 ++ 3 files changed, 35 insertions(+) create mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch create mode 100644 recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch new file mode 100644 index 0000000..e67ffd1 --- /dev/null +++ b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-fix-recursion.patch @@ -0,0 +1,18 @@ +--- crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/130-fix-recursion.patch 2013-01-07 14:20:25.277907402 +0000 ++++ crosstool-ng-1.17.0/patches/dmalloc/5.5.2/130-fix-recursion.patch 2013-01-25 13:35:02.292399503 +0000 +@@ -0,0 +1,15 @@ ++diff --git a/malloc.c b/malloc.c ++index 9a9477e..07db134 100644 ++--- a/malloc.c +++++ b/malloc.c ++@@ -1030,7 +1030,9 @@ int dmalloc_free(const char *file, const int line, DMALLOC_PNT pnt, ++ const int func_id) ++ { ++ int ret; ++- +++ if(NULL==pnt) +++ return FREE_NOERROR; +++ ++ if (! dmalloc_in(file, line, 1)) { ++ if (tracking_func != NULL) { ++ tracking_func(file, line, func_id, 0, 0, pnt, NULL); diff --git a/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch new file mode 100644 index 0000000..86d7d40 --- /dev/null +++ b/recipes/crosstool-ng/crosstool-ng-1.17.0/dmalloc-5.5.2-powerpc.patch @@ -0,0 +1,15 @@ +diff -urN crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/131-powerpc.patch crosstool-ng-1.17.0/patches/dmalloc/5.5.2/131-powerpc.patch +--- crosstool-ng-1.17.0~orig/patches/dmalloc/5.5.2/131-powerpc.patch 1970-01-01 01:00:00.000000000 +0100 ++++ crosstool-ng-1.17.0/patches/dmalloc/5.5.2/131-powerpc.patch 2012-12-17 20:55:29.864946447 +0100 +@@ -0,0 +1,11 @@ ++--- dmalloc-5.5.2/return.h~orig 2012-12-17 20:49:44.776955097 +0100 +++++ dmalloc-5.5.2/return.h 2012-12-17 20:49:58.720954747 +0100 ++@@ -251,8 +251,7 @@ ++ #define GET_RET_ADDR(file) \ ++ do { \ ++- asm("mflr 0"); \ ++- asm("stw 0,%0" : "=g" (file)); \ +++ asm("mflr %0" : "=g" (file)); \ ++ } while(0) ++ ++ #endif /* __powerpc__ && __GNUC__ && !__OPTIMIZE__ */ diff --git a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe b/recipes/crosstool-ng/crosstool-ng_1.17.0.oe index e8f5ad5..37a5096 100644 --- a/recipes/crosstool-ng/crosstool-ng_1.17.0.oe +++ b/recipes/crosstool-ng/crosstool-ng_1.17.0.oe @@ -11,6 +11,8 @@ SRC_URI += "${SRC_URI_FIXES_BASE}/002-scripts_functions_fix_debug_shell.patch" SRC_URI += "file://prefix.patch" SRC_URI += "file://canadian-skip-cc-core.patch" SRC_URI += "file://dir-extract-with-copy.patch" +SRC_URI += "file://dmalloc-5.5.2-powerpc.patch" +SRC_URI += "file://dmalloc-5.5.2-fix-recursion.patch" # For some odd reason, ct-NG configure scripts end up setting make path # to just "make" and not the full path. And even more odd, this breaks