From patchwork Mon Dec 10 09:35:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 1010338 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=synopsys.com header.i=@synopsys.com header.b="DlFFvw9C"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 43CycL5vlgz9s55 for ; Mon, 10 Dec 2018 20:35:45 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 87615878A8; Mon, 10 Dec 2018 09:35:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BGop8SHSKL0j; Mon, 10 Dec 2018 09:35:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id B16A587839; Mon, 10 Dec 2018 09:35:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BBC5B1C24E2 for ; Mon, 10 Dec 2018 09:35:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B8A2C855E4 for ; Mon, 10 Dec 2018 09:35:35 +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 gtj-xgXN8d+i for ; Mon, 10 Dec 2018 09:35:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay2.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id 71A678558D for ; Mon, 10 Dec 2018 09:35:34 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost3.synopsys.com [10.12.238.238]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0527410C07F6 for ; Mon, 10 Dec 2018 01:35:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1544434534; bh=hC6AEyb2YykjaSjdvfSh0JyWRvUBaY74CCR4mb8424c=; h=From:To:Cc:Subject:Date:From; b=DlFFvw9Cqs3hi21Rmbqy4J8lmFo5soGHyQPowomkJRN5F8pFMiPLIurVJHbSC9v98 4tFt9d8DOqkCwa2Or/pSzSZh8g62RdephuAjA/GcAecLBZbtykAWR6rKqaonkS1bWU T2jZw7xfS8qMat0i5TxBJGcFaV34dCdN1hjp9MQK9bw3AhzuyMXmbJd3xwTjtikg14 DsfUf4Yhj0kA3GLydptOWj4n/H5pGYMoQ6EgYdfk6TBT6+vSabuE+IM5meWNh4rPpI Q1vrNjIxGbjEg/W0VifL9wFHYsJ+SuLYODcRtwRO3pDmb7tslyY+EBbVnBYYNI+YG1 k41tHQ5gUIqpw== Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 01D7734F1; Mon, 10 Dec 2018 01:35:32 -0800 (PST) From: Alexey Brodkin To: buildroot@busybox.net Date: Mon, 10 Dec 2018 12:35:26 +0300 Message-Id: <20181210093526.29619-1-abrodkin@synopsys.com> X-Mailer: git-send-email 2.16.2 Subject: [Buildroot] [PATCH] gdb: Fix compilation for arc-2018.09 in some cases X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Brodkin , ARC Buildroot mailing list MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" In some cases which seem to depend on how toolchain headers got installed or configured we may face well-known by now failure fixed in upstream with [1]: ------------------------------>8---------------------------- In file included from nat/linux-ptrace.c:20: nat/linux-ptrace.h:175:22: error: expected identifier before numeric constant # define TRAP_HWBKPT 4 ^ nat/linux-ptrace.h:175:22: error: expected '}' before numeric constant In file included from .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/signal.h:58, from build-gnulib/import/signal.h:52, from .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/sys/wait.h:36, from ./common/gdb_wait.h:23, from nat/linux-ptrace.c:24: .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/bits/siginfo-consts.h:156:1: note: to match this '{' { ^ In file included from nat/linux-ptrace.c:20: nat/linux-ptrace.h:175:22: error: expected unqualified-id before numeric constant # define TRAP_HWBKPT 4 ^ In file included from .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/features.h:428, from .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/bits/libc-header-start.h:33, from .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/stdio.h:27, from build-gnulib/import/stdio.h:43, from ./common/common-defs.h:52, from nat/linux-ptrace.c:19: .../output/host/arc-buildroot-linux-gnu/sysroot/usr/include/sys/wait.h:158:1: error: expected declaration before '}' token __END_DECLS ^~~~~~~~~~~ ------------------------------>8---------------------------- Back-porting the fix for ARC now to get predictably successful results. [1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8 Signed-off-by: Alexey Brodkin --- ...4-defining-TRAP_HWBKPT-before-including-g.patch | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package/gdb/arc-2018.09-gdb/0001-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch diff --git a/package/gdb/arc-2018.09-gdb/0001-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/package/gdb/arc-2018.09-gdb/0001-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch new file mode 100644 index 0000000000..47992cba3d --- /dev/null +++ b/package/gdb/arc-2018.09-gdb/0001-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch @@ -0,0 +1,49 @@ +From e213d8e1b5317389c3beee648811bc649d62d743 Mon Sep 17 00:00:00 2001 +From: James Clarke +Date: Fri, 19 Jan 2018 17:22:49 +0000 +Subject: [PATCH] gdb: Fix ia64 defining TRAP_HWBKPT before including + gdb_wait.h + +On ia64, gdb_wait.h eventually includes siginfo-consts-arch.h, which +contains an enum with TRAP_HWBKPT, along with a #define. Thus we cannot +define TRAP_HWBKPT to 4 beforehand, and so gdb_wait.h must be included +earlier; include it from linux-ptrace.h so it can never come afterwards. + +gdb/ChangeLog: + + * nat/linux-ptrace.c: Remove unnecessary reinclusion of + gdb_ptrace.h, and move including gdb_wait.h ... + * nat/linux-ptrace.h: ... to here. +--- + gdb/nat/linux-ptrace.c | 2 -- + gdb/nat/linux-ptrace.h | 1 + + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/gdb/nat/linux-ptrace.c b/gdb/nat/linux-ptrace.c +index 438177fa7622..1240eead0d50 100644 +--- a/gdb/nat/linux-ptrace.c ++++ b/gdb/nat/linux-ptrace.c +@@ -21,8 +21,6 @@ + #include "linux-procfs.h" + #include "linux-waitpid.h" + #include "buffer.h" +-#include "gdb_wait.h" +-#include "gdb_ptrace.h" + #ifdef HAVE_SYS_PROCFS_H + #include + #endif +diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h +index 59549452c099..6faa89b22a0e 100644 +--- a/gdb/nat/linux-ptrace.h ++++ b/gdb/nat/linux-ptrace.h +@@ -21,6 +21,7 @@ + struct buffer; + + #include "nat/gdb_ptrace.h" ++#include "gdb_wait.h" + + #ifdef __UCLIBC__ + #if !(defined(__UCLIBC_HAS_MMU__) || defined(__ARCH_HAS_MMU__)) +-- +2.19.2 +