From patchwork Wed Jan 2 17:15:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 1020038 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=hauke-m.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TvhK8FOC"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43VHld5FZNz9s4s for ; Thu, 3 Jan 2019 04:16:45 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IMmlInFvzrjKsJVxxYIQCfbWYIqVZBL/ew9vKJztqCA=; b=TvhK8FOCWhinIB vzKhN0AwOBUf8+naV5PPlhL8YfJXakGf9wL0jRwuPx7VM2Vb4NRM21fFT+kP/r8XbrrVipF7Tx7GF zktcYBQLqM7iMP0pIqNjvC1xBNtc4gQkh4mbdwfcRPBPAIWnyrzZLaJd9tZBu9PFDvklN/x4Gmia2 7I7n22JJ6vy8SexwP2TN3MmYZ4wWZDsethwEeS1RlzvBTmk85+HEX/SPlfglZhpoGL+c3J04gc8DN OU1sSGx1xnnGTSQx5Ok82LPEGskk6gYK7eb76ZpEEJ0TZg9l3Bt97BHVCthaum0FV3EEuBCh8SiLy rcx1CoZNVupReXpXyF+g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gek7z-0006o1-3T; Wed, 02 Jan 2019 17:16:23 +0000 Received: from mx1.mailbox.org ([2001:67c:2050:104:0:1:25:1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gek7v-0006nG-1U for openwrt-devel@lists.openwrt.org; Wed, 02 Jan 2019 17:16:21 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 9A5904C50D; Wed, 2 Jan 2019 18:16:13 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id R8RIdSyrT_y3; Wed, 2 Jan 2019 18:16:12 +0100 (CET) From: Hauke Mehrtens To: openwrt-devel@lists.openwrt.org Date: Wed, 2 Jan 2019 18:15:55 +0100 Message-Id: <20190102171555.16040-1-hauke@hauke-m.de> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190102_091619_230642_5566DDD7 X-CRM114-Status: GOOD ( 12.27 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2001:67c:2050:104:0:1:25:1 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record Subject: [OpenWrt-Devel] [PATCH] gdb: The signal definitions of musl and gdb collide X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hauke Mehrtens Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc defines it in signal.h which collides. Kernel 4.14 misses the definitions of struct user_sve_header so we still have to use the aarch64-sve-linux-sigcontext.h header file which also provides that and make sure aarch64-sve-linux-sigcontext.h does not provide the same headers as the kernel or musl. Fixes: FS#2040 Signed-off-by: Hauke Mehrtens --- .../gdb/patches/010-aarch64-headers.patch | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 package/devel/gdb/patches/010-aarch64-headers.patch diff --git a/package/devel/gdb/patches/010-aarch64-headers.patch b/package/devel/gdb/patches/010-aarch64-headers.patch new file mode 100644 index 0000000000..a718a8c6a4 --- /dev/null +++ b/package/devel/gdb/patches/010-aarch64-headers.patch @@ -0,0 +1,44 @@ +The signal definitions of musl and gdb collide + +The kernel defines "struct sigcontext" in asm/sigcontext.h and musl libc +defines it in signal.h which collides. +Kernel 4.14 misses the definitions of struct user_sve_header so we still +have to use the aarch64-sve-linux-sigcontext.h header file which also +provides that and make sure aarch64-sve-linux-sigcontext.h does not +provide the same headers as the kernel or musl. + +--- a/gdb/nat/aarch64-sve-linux-ptrace.h ++++ b/gdb/nat/aarch64-sve-linux-ptrace.h +@@ -20,12 +20,12 @@ + #ifndef AARCH64_SVE_LINUX_PTRACE_H + #define AARCH64_SVE_LINUX_PTRACE_H + +-#include ++#include + #include + #include + #include + +-#ifndef SVE_SIG_ZREGS_SIZE ++#ifndef SVE_PT_REGS_SVE + #include "aarch64-sve-linux-sigcontext.h" + #endif + +--- a/gdb/nat/aarch64-sve-linux-sigcontext.h ++++ b/gdb/nat/aarch64-sve-linux-sigcontext.h +@@ -19,6 +19,7 @@ + #ifndef AARCH64_SVE_LINUX_SIGCONTEXT_H + #define AARCH64_SVE_LINUX_SIGCONTEXT_H + ++#ifndef SVE_MAGIC + #define SVE_MAGIC 0x53564501 + + struct sve_context { +@@ -128,6 +129,7 @@ struct sve_context { + (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) + + #define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) ++#endif + + /* SVE/FP/SIMD state (NT_ARM_SVE) */ +