From patchwork Tue Mar 6 15:46:21 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: 130821 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp4088937lja; Tue, 6 Mar 2018 07:47:03 -0800 (PST) X-Google-Smtp-Source: AG47ELvnIqU6SQa+lf4nXeEdVZAjWV3e/6Fx1NAz+8kC/zpG232yzBrTheVxjwYKwBqcQ6yqy3hU X-Received: by 10.101.69.134 with SMTP id o6mr15869441pgq.340.1520351223500; Tue, 06 Mar 2018 07:47:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520351223; cv=none; d=google.com; s=arc-20160816; b=r3nvUb9JGyCJIQI/1xI/WSh8QBfm4rtb6/CX4xYHKfhsMODBdbo/Uxpeb4+Ui987MQ ueGvNRZNw3RyPvk9sn7z++9WrKIAIwqE+6B63RJr00k2qBjAq5d/zRVJfgwg1jdjp3Fw bIw5oJ/xMmE/kG2njqmorI7kcLOc6UvrB1xwTUpFbyRmg0PWEZiYbWWqnV5uSvYNkhgL bKxsGVKIzsrLK+cf5TTKftmMLAlGePMBhtM/Jf9megGWEhRHhpAG0kiW7pTWtHE3mrUz OxUSNSSkSIt39kcXIWSAYWmuAznG4Wgsg7D85hvmU6Tkaau6cIimRhck7CMFoPBB5HEe ZEHw== 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=nbXZlxwwTq+JBcjtdFH/TqZCDbofX+qsvtDHeYZrfEg=; b=IobWdiXs2bBL1ZNtJSL4C4DihznWCkZm6j4IZ8evd/5kJGK5VfrQ/rsR+6M6Xtyi2K 5e1AtM3xa0JvBPWT1YyciydhpHf3jJW+ChFdJM5bJBI5lQsTcxF4aYXFdD1y1XarxIZU MsG0lFW52utxSEJvctcrPrfIs/v0SybPzbO3e6JF5AtDWNOf+ITmTQ9qrVALSqoA2KOo JBindJGENTNkcni8ixjzO3RfaN/szSpjReklsh2U67LJ69m2AN9UmI+wxFUxmH3+Y5FP 7OdxcZk08NisVR02HKRQgj/uIlweHkvySvxnz3SBtmCeJ5tJe1/VMXZkIazOp7/8lU4v IWAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=kL5veBa8; 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 i136si10014102pgc.416.2018.03.06.07.47.02; Tue, 06 Mar 2018 07:47:03 -0800 (PST) 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=kL5veBa8; 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 3709478ABE; Tue, 6 Mar 2018 15:46:59 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by mail.openembedded.org (Postfix) with ESMTP id 436D778297 for ; Tue, 6 Mar 2018 15:46:56 +0000 (UTC) Received: by mail-ot0-f196.google.com with SMTP id n74so18748732ota.1 for ; Tue, 06 Mar 2018 07:46:58 -0800 (PST) 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=Y2xCOuramHL69KA6x4r1YV1JfGoM4vWsyqQEmnoHx9M=; b=kL5veBa87RrIxku/qD+uDepjEnEbLTsdwaWwOm5ZtbMAR3FiWuwRgpbMd+TpKnBkWV Kkmp0x42RTyo3mU8gMJDjyNef0DkdrLqOUBbqtUDAbRwbaa9fXRLKD+Qj6lBmrFG+78/ As/dXS+HSlQaLjl72UHxXPW8t0J2CRqjH3TLQ= 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=Y2xCOuramHL69KA6x4r1YV1JfGoM4vWsyqQEmnoHx9M=; b=Yq1tfpnbhF/XVc2SGpmrrHk2UumBUvjOfpcgtnNuXrpebk/nZOHE1Nv9wkIn7663bn GYaTy23rFSc9opogKzMyzQktR1wdYNOeyNzTL1CSu6PI/g6mGSBjg23uKhijNxeFhJZc ItL4IPJehYd8VMtjxksZpfPDJSFerz987C2AT9qVkN+0nvD4RG6MgHMhNDJnrfDS0/h/ 9X8QeKzoawfAE1bawh1S01+qPjNgkTVeAh3QVUFGv7hYcFjT/ZBmiNZGC3JdMkE2emTx eHwUwBMqTOmlVq9IjmCI87WgfL4xunT8t21iNAI8HskbDcu1gwxoqk+FeJPRE+h+ByLD SD2Q== X-Gm-Message-State: AElRT7FNZ8gpmpdqW3+MLeig6OdoLyeGb/g3N+F8BtiXSioxOQwU2XOt 4826ebYvNwG826iXc/roCRL17tvsF9o= X-Received: by 10.157.89.158 with SMTP id u30mr5691872oth.294.1520351217695; Tue, 06 Mar 2018 07:46:57 -0800 (PST) Received: from aura.cortijodelrio.net (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id h188sm7407997oib.4.2018.03.06.07.46.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 06 Mar 2018 07:46:56 -0800 (PST) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Tue, 6 Mar 2018 09:46:21 -0600 Message-Id: <1520351181-18084-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520051014-6587-1-git-send-email-daniel.diaz@linaro.org> References: <1520051014-6587-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [PATCH v2] 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. Signed-off-by: Daniel Díaz --- v2: Add signed-off-by tag to patch meta/recipes-devtools/gdb/gdb-8.0.1.inc | 1 + ...4-defining-TRAP_HWBKPT-before-including-g.patch | 56 ++++++++++++++++++++++ 2 files changed, 57 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-8.0.1.inc b/meta/recipes-devtools/gdb/gdb-8.0.1.inc index 83c08e5..4a5299b 100644 --- a/meta/recipes-devtools/gdb/gdb-8.0.1.inc +++ b/meta/recipes-devtools/gdb/gdb-8.0.1.inc @@ -17,6 +17,7 @@ SRC_URI = "http://ftp.gnu.org/gnu/gdb/gdb-${PV}.tar.xz \ file://0010-resolve-restrict-keyword-conflict.patch \ file://package_devel_gdb_patches_120-sigprocmask-invalid-call.patch \ file://0012-Unbreak-GDBserver-build-for-x32.patch \ + file://gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \ " SRC_URI[md5sum] = "48cac527e6f3018b865ece021e9723ac" SRC_URI[sha256sum] = "3dbd5f93e36ba2815ad0efab030dcd0c7b211d7b353a40a53f4c02d7d56295e3" 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..2cdeafc --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch @@ -0,0 +1,56 @@ +From c57122f94b1c749e4c12f6449b61a3b114f705cd 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 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +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] + +Signed-off-by: Daniel Díaz +--- + 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 3265b16..559c2de 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 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 +