From patchwork Thu Apr 12 22:55:07 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: 133308 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp116045ljb; Thu, 12 Apr 2018 15:55:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx49XRlj5n4umj3XiFuChHk8QxtLl9CXW0DjS2L6yzCfYZz2EhtHJvi5lgeKeJ4Q4yhYwZl8g X-Received: by 10.99.179.68 with SMTP id x4mr2145140pgt.132.1523573731435; Thu, 12 Apr 2018 15:55:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523573731; cv=none; d=google.com; s=arc-20160816; b=pCJl8sXFwJcYP1IEPWnJyTJ4LKbivKq1IZ7ZYm9xkFhhSV+MW+JuP2RRpwabfz8VBw mFYLtoNMyNvTjSQhu4cQrheDFr8SIF1mOL19PzwbhDioMge3JHtDuRCqAx0s+z6HN2rM F1n2ESGbRSkbNWOIm9wS0kw/NHsbGaLvsunb2Wg6airsFOyBy6y4BvhR28//5rNxfHMi 44FCxZ3K52/fTaGKyv/OlBxoGu+EggPC2VpXqMK55rhNYnlJmCfHZKSNnbnMz9ryMHax X76bU6IcXVgOeEVdHZ10uuFWwuJQMtCHaHaQswio/mmyr2RE5sDs7gamW9vPlLf7D7Xj C03Q== 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:message-id:date:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=yoYjswmrI+gzqzjoGHP4RlA79+97Ri5uRzdEI6dudlY=; b=G4z1V0KNFAXV+2NnLOTAZ/4fElQG4Wweiz+66k0EaOtIppJc0PiCYMDEmhrcgskdsq pX/xWcaC38D/wFlC0ICtNziXGeBkqhEDzCCJ6Oeufk0Pe3iy9XQN6kRx6tA9jXPSRuHq sUZgzuB4OMQ7j1eAoj+XJYo3OR7K2udnDdB9AlieFuSCwi5s5lIlKKM4IktyuF8VXoFl DAV9ELdTbYW9B6v/tMxgEx6rrS0HWecXRqomnsf9ZfHRMF5/+gll/nnxBQ9R9mq/TVh8 nYLAJLOtHaHUAHk/R0Lf79Z6N/K8KyOVrlaaxr7ZVVIngEcMcMKrFXmBOwXTGUJsDPP8 tlGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=CpEsJ81O; 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 b25si651763pfc.417.2018.04.12.15.55.30; Thu, 12 Apr 2018 15:55:31 -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=CpEsJ81O; 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 1BAA674635; Thu, 12 Apr 2018 22:55:27 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-oi0-f66.google.com (mail-oi0-f66.google.com [209.85.218.66]) by mail.openembedded.org (Postfix) with ESMTP id 0AA5074585 for ; Thu, 12 Apr 2018 22:55:15 +0000 (UTC) Received: by mail-oi0-f66.google.com with SMTP id 126-v6so6740872oig.0 for ; Thu, 12 Apr 2018 15:55:17 -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:mime-version :content-transfer-encoding; bh=0+837nVG9mXyTqoOnj1DTt8kDLc76wRrZweyRtVqeXE=; b=CpEsJ81OxAp/PypNST/AUI6fB+xoKzXuI5s5MZztN+Bdnp+DoGQ/54p4DW4YLmOcCc 4+rMXERa1t818QdTe+TPQ3i6koSY8MDVNZfebEg8sO+rggwofKrQjepX1QNFg2tl8Xbc uCHq/7LesWx3/zP8OEDpzJDZwnJ65/ZbBm92Y= 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:mime-version :content-transfer-encoding; bh=0+837nVG9mXyTqoOnj1DTt8kDLc76wRrZweyRtVqeXE=; b=duihUFCqXkcgikvEs+y3r/w/XKg0yV/cpVkT0zKF6vQqV9OqsRJAWabItAyUlA/A0C on4YMYdQ4WyJud4OzN0+FY/iwHcgwmJsiMgv+nsgzFnMbn7xq0qQZLdg1gGFDtBs14er +f0x2YFi5gNpXpeI0mvoacYlNZHBWAWtLnNVP0e8m0p5WeJ5mcweNx2rCU21n49UWGhG BGhlPhfAYWO7/2NTZt9Gank5N9IncwCiTpUIKad1kAT9mw42fJy0vfM4uuZl1VxjrrGC ViaHtatvzVMA55iIoPc/pNVkH+5EE/ap5XfdZAwS05F8vhV9aDaGMM/eiNv8f22Zoj5x LwiQ== X-Gm-Message-State: ALQs6tBGvaKsh/C3Sk6EcQOAr542mFwTZGGvPLj2FcySNmFo37fKAqfF cz0C1SeGLrudxZEDrKPo1bCQUnEaztxQPA== X-Received: by 2002:aca:bb02:: with SMTP id l2-v6mr7295140oif.124.1523573716073; Thu, 12 Apr 2018 15:55:16 -0700 (PDT) Received: from localhost.localdomain (CableLink-187-161-190-249.PCs.InterCable.net. [187.161.190.249]) by smtp.googlemail.com with ESMTPSA id k49-v6sm3259864otb.58.2018.04.12.15.55.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Apr 2018 15:55:14 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Thu, 12 Apr 2018 17:55:07 -0500 Message-Id: <1523573708-6519-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [OE-core] [pyro][PATCH 1/2 v2] glibc: add missing TRAP_BRANCH/TRAP_HWBKPT definitions 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 From: Fathi Boudra Patch submitted upstream, pending to be merged: https://sourceware.org/bugzilla/show_bug.cgi?id=21286 (From OE-Core rev: 11ebb5054e5ec1171ade90249e3a30ac8174a35a) Signed-off-by: Fathi Boudra Signed-off-by: Daniel Díaz Signed-off-by: Ross Burton --- v2: No changes. ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 68 ++++++++++++++++++++++ meta/recipes-core/glibc/glibc_2.25.bb | 1 + 2 files changed, 69 insertions(+) create mode 100644 meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch diff --git a/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch new file mode 100644 index 0000000..bef8887 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch @@ -0,0 +1,68 @@ +From 297aca56465035dce1f7b91b5cdda54379141957 Mon Sep 17 00:00:00 2001 +From: Pratyush Anand +Date: Wed, 22 Mar 2017 17:02:38 +0530 +Subject: [PATCH] bits/siginfo.h: enum definition for TRAP_HWBKPT is missing +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Compile following linux kernel test code with latest glibc: + +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/breakpoints/breakpoint_test_arm64.c + +and we get following error: +breakpoint_test_arm64.c: In function ‘run_test’: +breakpoint_test_arm64.c:171:25: error: ‘TRAP_HWBKPT’ undeclared (first use in this function) + if (siginfo.si_code != TRAP_HWBKPT) { + ^ +I can compile test code by modifying my local +/usr/include/bits/siginfo.h and test works great. Therefore, this patch +will be needed in upstream glibc so that issue is fixed there as well. + +Signed-off-by: Pratyush Anand + +Upstream-Status: Submitted [https://sourceware.org/bugzilla/show_bug.cgi?id=21286] +--- + bits/siginfo.h | 6 +++++- + sysdeps/unix/sysv/linux/bits/siginfo.h | 6 +++++- + 2 files changed, 10 insertions(+), 2 deletions(-) + +diff --git a/bits/siginfo.h b/bits/siginfo.h +index 4919df5..6dc714e 100644 +--- a/bits/siginfo.h ++++ b/bits/siginfo.h +@@ -140,8 +140,12 @@ enum + { + TRAP_BRKPT = 1, /* Process breakpoint. */ + # define TRAP_BRKPT TRAP_BRKPT +- TRAP_TRACE /* Process trace trap. */ ++ TRAP_TRACE, /* Process trace trap. */ + # define TRAP_TRACE TRAP_TRACE ++ TRAP_BRANCH, /* Process branch trap. */ ++# define TRAP_BRANCH TRAP_BRANCH ++ TRAP_HWBKPT /* hardware breakpoint/watchpoint */ ++# define TRAP_HWBKPT TRAP_HWBKPT + }; + # endif + +diff --git a/sysdeps/unix/sysv/linux/bits/siginfo.h b/sysdeps/unix/sysv/linux/bits/siginfo.h +index 7b0d4f6..9cdf42a 100644 +--- a/sysdeps/unix/sysv/linux/bits/siginfo.h ++++ b/sysdeps/unix/sysv/linux/bits/siginfo.h +@@ -235,8 +235,12 @@ enum + { + TRAP_BRKPT = 1, /* Process breakpoint. */ + # define TRAP_BRKPT TRAP_BRKPT +- TRAP_TRACE /* Process trace trap. */ ++ TRAP_TRACE, /* Process trace trap. */ + # define TRAP_TRACE TRAP_TRACE ++ TRAP_BRANCH, /* Process branch trap. */ ++# define TRAP_BRANCH TRAP_BRANCH ++ TRAP_HWBKPT /* hardware breakpoint/watchpoint */ ++# define TRAP_HWBKPT TRAP_HWBKPT + }; + # endif + +-- +2.7.4 + diff --git a/meta/recipes-core/glibc/glibc_2.25.bb b/meta/recipes-core/glibc/glibc_2.25.bb index 58b90b7..49fcf0c 100644 --- a/meta/recipes-core/glibc/glibc_2.25.bb +++ b/meta/recipes-core/glibc/glibc_2.25.bb @@ -43,6 +43,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0026-elf-dl-deps.c-Make-_dl_build_local_scope-breadth-fir.patch \ file://0027-locale-fix-hard-coded-reference-to-gcc-E.patch \ file://0028-Rework-fno-omit-frame-pointer-support-on-i386.patch \ + file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \ " NATIVESDKFIXES ?= "" From patchwork Thu Apr 12 22:55:08 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: 133309 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp116240ljb; Thu, 12 Apr 2018 15:55:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx48CkymDuWNeo0dK8cNhhPKuN56e6FPVtnPhfYnrP6r90rxPHO8HT5HAXCowY+a7Pz9GNN/J X-Received: by 2002:a17:902:2e04:: with SMTP id q4-v6mr2852194plb.27.1523573751861; Thu, 12 Apr 2018 15:55:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523573751; cv=none; d=google.com; s=arc-20160816; b=cD/UrFiGp8IQYqfQKkoul1CtiETzD31WRpLFhAuQNA57D0YVkQEx0Vfg0MOX/Tew1n 15RfIZbHD33rTtWlYcBXvJSSemzPsJhnRGXDC2fGV/JmXCgPIiJf33n+OKPhNKbNbXZ+ jGckkNWy9yL4gVe+8kxLScmzacHxe8pCLQllxOJk3w6NYpt6ZbFCBb3oNgS133XsYNKP 1UGfFbn1Y+ZBwrpMU9j6JMlprVFuZbjJTLMALYMcKXHfIeM3WmYMiIGKtsn2nQZW0V5m pAVONAV3N9uLHTVjpw/4Dy8H5+YMFXGEi3nQIFR+iyVPN1CL0yvi8k5NOGTlherTA1H2 VgLw== 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=7Y11o6gH0FHzoaUBuMA7b6eNFgnrneuYz4BuPyYGnh4=; b=T2aDKgpoTl/ik26XZ71+DNn7vHRFw8KKbA7vhyTjLRU8n5/kwYTUK96Qs1AUypaIO/ xgrT8HErh0Ic3eVIyPQ8au1seA3U9M8DPK1uaf6FlU0SU/H5YkjOy97N621s4ZMKe6wX UiLDK8WRgLtQQ4FRVEAoOfl/QxmAjezKbgW65XqywcdExQ8LQZlLYiGejyERMNPw6pRU AAuGgtczBcluYc8CgzbP7z9kzJUlxW+BCLgZZ2MPABwqJjsy9Lwq997fwnXX9bxFjyAS 96wj3HRtbCNf0TAipZakrpnnzqfSpGoepS15mAPoeTui0bE+JGWMVmFyEXPFl4rcXAQy gcog== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YQlZbxRD; 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 r74si3394634pfe.63.2018.04.12.15.55.51; Thu, 12 Apr 2018 15:55:51 -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=YQlZbxRD; 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 3337174651; Thu, 12 Apr 2018 22:55:49 +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 0BB8472EC7 for ; Thu, 12 Apr 2018 22:55:17 +0000 (UTC) Received: by mail-oi0-f67.google.com with SMTP id f63-v6so6745704oic.4 for ; Thu, 12 Apr 2018 15:55:19 -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=rOHpSI55o93/i/xue3DG9OQ9OZ/YNuCiG4RNmM3mBPE=; b=YQlZbxRDvsEPlCqBj5h+aqEldETC8bq9bfHhOs9HcVxEo99QndWhMfJpUc7zSD+1Ua xnxM5uh+P0U7/whcEYlGLwGtJOS0Y1Y9hatI4RAVwLcoDmYFwwyofaRn90UWS1ZeUyx0 Td6V8ElAuuhavQYn4q7bNAM//o/vzx3jht3Qs= 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=rOHpSI55o93/i/xue3DG9OQ9OZ/YNuCiG4RNmM3mBPE=; b=P3Fj33xcApnK9Zb9sZrdP3scLJtsocYjkYr0BU5plkbWyGRYSRv/tLLux3m5tpcABb 69hiKeQuNSNgCOQ8OCW8LBlKzqPOJ6lYjPAD+L9mCz20ejsVPnD2wFnJZk24r12XU8Zj /le9/0uHT9RqdUcv9V0XzDxPehbrq9Uy1bd3ol8yZfKorKD/rm6CmQB3M4i0bFeUIezR o9pFb45jss7QTLDdm+9/PMyHVB7YnXtnRCRcMrY5H/tnbmU8zDRUlujJ8cBBSswxkIwc KfZm4egCLzGJDQU9k56wTrt2Cr+3RXJWvnVZhHZ+hnyuizAFK2/jRzUe2hjwrxO7U/xG t+Hg== X-Gm-Message-State: ALQs6tCFdec5oRzgud8MHJjlfyoBcupDBpS2vyvj7ECWIKqGvKMn0jR9 w+i88Kin/k9fyGI2lOcIXk4JayX73e1x4g== X-Received: by 2002:aca:ec4e:: with SMTP id k75-v6mr7284940oih.81.1523573718301; Thu, 12 Apr 2018 15:55:18 -0700 (PDT) Received: from localhost.localdomain (CableLink-187-161-190-249.PCs.InterCable.net. [187.161.190.249]) by smtp.googlemail.com with ESMTPSA id k49-v6sm3259864otb.58.2018.04.12.15.55.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 12 Apr 2018 15:55:17 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Thu, 12 Apr 2018 17:55:08 -0500 Message-Id: <1523573708-6519-2-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1523573708-6519-1-git-send-email-daniel.diaz@linaro.org> References: <1523573708-6519-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [pyro][PATCH 2/2 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. (From OE-Core rev: 4aaf747099714ec11158571527396ed9e818729e) Signed-off-by: Daniel Díaz Signed-off-by: Ross Burton --- v2: Add signed-off-by to patch. meta/recipes-devtools/gdb/gdb-7.12.1.inc | 1 + ...4-defining-TRAP_HWBKPT-before-including-g.patch | 53 ++++++++++++++++++++++ 2 files changed, 54 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..9bf99f6 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch @@ -0,0 +1,53 @@ +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] + +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 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 +