From patchwork Wed Apr 11 03:43:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 133130 Delivered-To: patch@linaro.org Received: by 10.46.84.29 with SMTP id i29csp226935ljb; Tue, 10 Apr 2018 20:44:14 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+wyMLKxwBzLvFoBSFLvarIHluEccPqB76ehUwpYLRggoU9cUI6RDE3m6tOOBPu6a6zsbC7 X-Received: by 10.99.183.15 with SMTP id t15mr2221853pgf.416.1523418254457; Tue, 10 Apr 2018 20:44:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523418254; cv=none; d=google.com; s=arc-20160816; b=qAxvR8a8Jt4H2v0wg588jEJ2mEVjEeL/Qto2MtgFvPe28qDY/2S9Eko8tGYrqGmS1/ q5B5LJAD7CuQF5KNFozzRfXaCwhUe+lwLYgdTZFwIyAWHOAfW5rW6Ie8GTxwBUes/OS5 vErKPhA54QRuEguE+lx257ANKS3n4wIp1tHReLidzzwGkwOYu6vF1duPMcTN1T28UwzW MeuwAMLIMUVI6NzNDW6PlWdfvj75NsO1UBLgQEJesKRd5wBNgBoL0hNymoLOHRgNVbdf hHa83IFli7+bmoh0OVeHFm2VeaUtcULK6mFUwZqxmv2Tds/9fAPkP6+TxVMhsqUr5UGM vB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=/YOUJvXFzES8M60sLtgf8nARQW3FcW0/kncbCs98QPk=; b=DMX30KVvM8SUuq+BW7Zy1c7jCgYRlNmk35mPo1qIOdXACIXrBYdWw+GzBMGWyxpnp8 7qOAGk12PAcinP0JElVe/JJR+By5Kt31fuRQoU35AVaLcXpgtGTXJaOOM6D0Wmx0Bwqh QDOI/SS0mdKWe0F3YNncTWy9WN7pl/moyenRec0JkjMbYDT5WBGRYgjZXbLRLE4uHX0+ 706sGFXCi3DUmg7nH6HsRjnFbS5QmtvWHI9uVXkcBWE4IDoict1QpdrLifSa00t0P+VM SWpoxAvvZpv8D61Eg6RG0zUV5SFpSOSmK5svbjGSufMiqkhuqsL5t4f+94upy2QkHg2f idXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MR0DCDiQ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id b2si165996pgt.44.2018.04.10.20.44.14; Tue, 10 Apr 2018 20:44:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=MR0DCDiQ; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from layers.openembedded.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id C49107491C; Wed, 11 Apr 2018 03:44:11 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f67.google.com (mail-oi0-f67.google.com [209.85.218.67]) by mail.openembedded.org (Postfix) with ESMTP id 2AF2D7493C for ; Wed, 11 Apr 2018 03:43:51 +0000 (UTC) Received: by mail-oi0-f67.google.com with SMTP id e123-v6so402039oih.13 for ; Tue, 10 Apr 2018 20:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Rhq5yGjins2pc8fbO27/9X5ZNnd95X3sUk4f78zCOqs=; b=MR0DCDiQJ/i0cqpWbQKFhHoTxcEJ6ulunhyZs2aReV80irDnxe6Ttq3kCtUZm+u2I6 p6O4NOUYCNjoSPQqiuJmscok6l34vTJgwK/zD/Ot7CkWHFOxU9fKpxXyNls61YrvJpxK Dllpz2BeQhxgwUiUB60dl6enVt1FmCVXA279Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Rhq5yGjins2pc8fbO27/9X5ZNnd95X3sUk4f78zCOqs=; b=aIrk0mnSofxorzgCjehxoCuJKQBj6tbiyHLz/Na5SRNwYHg0L0WM8Tc+UHaRaeOlJG v/p2kQITcMVvXvYL1x9WKM9nN6hcB3W4tYTupukmdrgUdMO84TrbFb5/aOTyWK1hvG8k ej249hFLIL7cXlqCm/HAZ08DvGL602e2RIP0QLjE0GQW18ZsiteGrB9FpZavXbNvR7II rNWDzIon/t+oGk5xE/i1EuAeiHJ04HJmIzDYM8hNfVwRRkBWGeqPH3ZyjtCBQBzRm22/ RZLfOXwttHJ3470zt7AJSMCxmFW5TkJQDfcHwYGW5KQXYc8zA9KmDrDfrRP38l8G5vme LgcA== X-Gm-Message-State: ALQs6tBgZnyyGXb01uJzxpaNIY1un7W2F2EmeXVwQShUJIQ7t+8f7Jun R5A2BoemgCEWdFsapy1mw6UsAAWSW92dqg== X-Received: by 2002:aca:3303:: with SMTP id z3-v6mr2039620oiz.67.1523418231837; Tue, 10 Apr 2018 20:43:51 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink-187-161-190-249.PCs.InterCable.net. [187.161.190.249]) by smtp.googlemail.com with ESMTPSA id j23-v6sm169001oiy.22.2018.04.10.20.43.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Apr 2018 20:43:50 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Tue, 10 Apr 2018 22:43:29 -0500 Message-Id: <1523418209-1534-2-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523418209-1534-1-git-send-email-daniel.diaz@linaro.org> References: <1523418209-1534-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [pyro][PATCH 2/2] gdb: fix header ordering for TRAP_HWBKPT X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org This error can appear in gdb/nat/linux-ptrace.c because of the order in which some headers are processed: | In file included from ../../gdb-7.11.1/gdb/nat/linux-ptrace.c:20:0: | ../../gdb-7.11.1/gdb/nat/linux-ptrace.h:175:22: error: expected identifier before numeric constant | # define TRAP_HWBKPT 4 | ^ | Makefile:2357: recipe for target 'linux-ptrace.o' failed | make[2]: *** [linux-ptrace.o] Error 1 | make[2]: *** Waiting for unfinished jobs.... | make[2]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux/gdb' | Makefile:8822: recipe for target 'all-gdb' failed | make[1]: *** [all-gdb] Error 2 | make[1]: Leaving directory '/oe/build/tmp-rpb-glibc/work/aarch64-linaro-linux/gdb/7.11.1-r0/build-aarch64-linaro-linux' | Makefile:846: recipe for target 'all' failed | make: *** [all] Error 2 A patch from GDB's current master solves the issue. (From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e) Signed-off-by: Daniel Díaz Signed-off-by: Ross Burton --- meta/recipes-devtools/gdb/gdb-7.12.1.inc | 1 + ...4-defining-TRAP_HWBKPT-before-including-g.patch | 51 ++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch diff --git a/meta/recipes-devtools/gdb/gdb-7.12.1.inc b/meta/recipes-devtools/gdb/gdb-7.12.1.inc index 634756c..1d81185 100644 --- a/meta/recipes-devtools/gdb/gdb-7.12.1.inc +++ b/meta/recipes-devtools/gdb/gdb-7.12.1.inc @@ -16,6 +16,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ file://0009-Change-order-of-CFLAGS.patch \ file://0010-resolve-restrict-keyword-conflict.patch \ file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ + file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \ " SRC_URI[md5sum] = "193453347ddced7acb6b1cd2ee8f2e4b" SRC_URI[sha256sum] = "4607680b973d3ec92c30ad029f1b7dbde3876869e6b3a117d8a7e90081113186" diff --git a/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch new file mode 100644 index 0000000..cbcc65a --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch @@ -0,0 +1,51 @@ +From 49bd068c3acf376a3018c0ebd849bf7f72a1874d 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. + +Upstream-Status: Accepted [https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=5a6c3296a7a90694ad4042f6256f3da6d4fa4ee8] +--- + 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 3447e07..dd3310e 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" + #include + + /* Stores the ptrace options supported by the running kernel. +diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h +index 5954945..6faa89b 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.7.4 +