From patchwork Tue Mar 13 16:17:37 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: 131499 Delivered-To: patch@linaro.org Received: by 10.80.210.197 with SMTP id q5csp1028512edg; Tue, 13 Mar 2018 09:17:50 -0700 (PDT) X-Google-Smtp-Source: AG47ELubkYamNMytqDC+9wbl1LXvoVt1M0hauNDuwEKrROeQmcO871YSt8OjxVZqeVsFILmtBzK0 X-Received: by 10.99.64.197 with SMTP id n188mr938409pga.21.1520957870197; Tue, 13 Mar 2018 09:17:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957870; cv=none; d=google.com; s=arc-20160816; b=owqkzNaoGTTaX+/gSqkSZPt9LIlek8uw0zkWbNWTtejPyY4zRHtqhVvzPq2+wwIs9X lx1+c8IdvER25u/izz7Ep18zHHx4thPDSmGcdkdsdANsF/k3/N8PgsklHVIN5rp5ZLaU NBlsyQRPo3wI07jaSZgXwHwCTbNjge4XV/MD96PWulSHbqZChEkltiOwUS2w+fGntcW4 fclydZN4IRdX4KtWAxxHZitVU6//Bf/KET8mmj183nHO2F6Lhgva6O8aIa7pTQX6XPxJ E2QEica8G32lQfADQRGefzU3XGCBhEDc1WUk7t0s0yEIZ2QgHoSewStfddCBzcqlZSAK sc2A== 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=uO+jH7zsDQGSTif1pYMGlDizSTHpVc0qMRXw9lMXI1o=; b=kgl1QlFDBwiFspv3lQKwxHJVl5NaJ6IDXwSiNkhDYxZXdKSaxT8UMc61gJHuYfDGm2 Lqia1R3owgzloRbQm58Xe1b/PAOXD+m3543F8W6Y6JUCXp6Lc7gvqI4XjPxNcpCFmUtc bIiidll36NpY/MaZeuZN0SjhnsALIspVAXo8lJjgVLwzpu29PLS6IBaFtIfar8bDQ7Ln iqCuGqtqDeFF1li1QQ4s63vaYPjwIE+ZKzrTVF+HtJl6pFN4Z+GKcOwxjis/MpeNev51 mTAlBT8moEoomsxv/76x7qfmVSITxYaKAZVoGtUqvuDf/zHVB2jKm5upsE6sQ9EBLoYu uhXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ad400wHb; 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 k186si331952pgc.15.2018.03.13.09.17.49; Tue, 13 Mar 2018 09:17:50 -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=Ad400wHb; 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 DA2DF78935; Tue, 13 Mar 2018 16:17:46 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-ot0-f193.google.com (mail-ot0-f193.google.com [74.125.82.193]) by mail.openembedded.org (Postfix) with ESMTP id CF50A78919 for ; Tue, 13 Mar 2018 16:17:44 +0000 (UTC) Received: by mail-ot0-f193.google.com with SMTP id 95-v6so179925ote.5 for ; Tue, 13 Mar 2018 09:17:46 -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=LW1pxWc5nBKQ2cVD9bdI8bVrM+vfbjq/Ff/CGbM4/dU=; b=Ad400wHbtJYxf83/NqZSgnxKp2Ujv0wU8oRHy86RwW1Dfk/bwSP3qR7K5ReO/289G5 eQzMvToFuzNy+P+eCkjymeGvlIH53UXR3mOJM8I00J3OhNYqpBVnKy0Dl+RVt1ruepMj Gwcdytv8vYEPaw7k5JmGqdKhkoY78Y2N9ZwJk= 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=LW1pxWc5nBKQ2cVD9bdI8bVrM+vfbjq/Ff/CGbM4/dU=; b=oqE4JQfJIFM4nRJ3UswlNcKnTw8rKm3TGyAVZTr0/mSZEJqfxJK8thd8OFkatUS6ES GuYZt4qv0DM4JqjEQU1cAv4ooPq5TW2uwPoeVf2gFDx99ysn8pm78mAfF4Rizej+iblt G9sSiYFfVbttxGCYq9DSHD+aX2MEcypccVTyjsCMKUtlg/l95MMq69O+WAwtGgy5Pm1W vXxyo3dncmkT+50kcI20CHloapW9jWh1l6pP6dhQomCiPz2ch71pcLUPJSsPbdHy421/ assNZw9OJXVN63iANNdJw911c/JM6TtqgoR+JKqLQAjXc1Kwk8mmVjFJYtMk8hTwoN/J 7PfQ== X-Gm-Message-State: AElRT7EEbEu2NFnxScVOuiwI6CTlInM+mrtuvmP7JLS2sUSOfIVVSdpJ t13ou7f2dtRF+ch843GZ7KZaK3J2stg= X-Received: by 10.157.14.5 with SMTP id c5mr913323otc.314.1520957865042; Tue, 13 Mar 2018 09:17:45 -0700 (PDT) Received: from localhost.localdomain (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id c33sm283789ote.79.2018.03.13.09.17.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 09:17:43 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Tue, 13 Mar 2018 10:17:37 -0600 Message-Id: <1520957858-7006-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [OE-core] [morty][PATCH 1/2] 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 --- ...o.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch | 69 ++++++++++++++++++++++ meta/recipes-core/glibc/glibc_2.24.bb | 1 + 2 files changed, 70 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..fe22cc3 --- /dev/null +++ b/meta/recipes-core/glibc/glibc/0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch @@ -0,0 +1,69 @@ +From af3054b3856379d353a779801678f330e1b58c9a Mon Sep 17 00:00:00 2001 +Message-Id: +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 4919df543634..6dc714e8f30b 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 7b0d4f62a331..9cdf42a42557 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.9.3 + diff --git a/meta/recipes-core/glibc/glibc_2.24.bb b/meta/recipes-core/glibc/glibc_2.24.bb index 6ea4585..09694f2 100644 --- a/meta/recipes-core/glibc/glibc_2.24.bb +++ b/meta/recipes-core/glibc/glibc_2.24.bb @@ -38,6 +38,7 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0025-Define-DUMMY_LOCALE_T-if-not-defined.patch \ file://0026-build_local_scope.patch \ file://0028-Bug-20116-Fix-use-after-free-in-pthread_create.patch \ + file://0029-bits-siginfo.h-enum-definition-for-TRAP_HWBKPT-is-mi.patch \ file://CVE-2016-6323.patch \ file://0001-Add-atomic_exchange_relaxed.patch \ file://0002-Add-atomic-operations-required-by-the-new-condition-.patch \ From patchwork Tue Mar 13 16:17:38 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: 131500 Delivered-To: patch@linaro.org Received: by 10.80.210.197 with SMTP id q5csp1028661edg; Tue, 13 Mar 2018 09:17:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELstJ3W2WzNO++C0Eu/OLIyxHsimn5uWZCnXebZJTga+XBcz0h3ukj5gHCoUfbeBqv5tU8vC X-Received: by 10.98.182.26 with SMTP id j26mr1114484pff.223.1520957878148; Tue, 13 Mar 2018 09:17:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520957878; cv=none; d=google.com; s=arc-20160816; b=nXSL9OoSUFvTGaiJB4wu/1Eb9xPPN4MYmgt4rbTO/Sa05H25ZX8USna0zDEBZCVycb UNjJk6W3Kkv43OwA99Cm+ypiRQANBUiUe+iUk9pRTfs4hYLwt4eJvE+/LaMc1e0z702C i+VKSpNRxyqi8LIa2Yt2gottauAmp961B35Y419IcerbEn4tVEQB3o4rwgS1vB10BY9t 3Ju8TEBXX+J8Mig+MfqOE+2WNwIOaHD84agJm8rsBhyBlCVr/KXPxPWMlr9KKu16ZVB3 5WVph1bvf0xbAVRHY3o4lbHAoaJEn8QbfV+TEesUURs3eWF9Y9SSdLkLeM0B66sb61wD yMbg== 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=RBk/ZZhrzF7/5Kp4ueQXCLZlWdXCLQkl7lLrU/FilHU=; b=j68TJInvwphcUc8HXWgC2dgPcx3p+wjWleDKqkOB4zvnA5I/d0UzrN2JusSNIEAv8z cD7+Fo5kvgw9htasIX2ocAF6c4zLY4IBNth7Ue7eLMaKj51j0/QkX8vmuACYPw6AFVuq ccDtyEonKXGgsuF/IIUtmn3t0ylX7A3bjUQzua0KiBJvwO17979/V8e2bAhoD2tv5XeK RvOq5dhyCFQJYR9Ngbc7v51X1DSf+bGR9e3+OI7X/7r4zMCggv8I0754aHtJ5poY3z/n QGR9C1cK1c124mQKgVKiXPkVdYFxb4ogoMil1pox7udLjMiZGbiwgg2AfLkmR/RxV8+J Hi8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=KJ36KKRM; 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 a23si305193pgv.672.2018.03.13.09.17.57; Tue, 13 Mar 2018 09:17:58 -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=KJ36KKRM; 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 C87C37893F; Tue, 13 Mar 2018 16:17:55 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-ot0-f193.google.com (mail-ot0-f193.google.com [74.125.82.193]) by mail.openembedded.org (Postfix) with ESMTP id 9ABE378924 for ; Tue, 13 Mar 2018 16:17:46 +0000 (UTC) Received: by mail-ot0-f193.google.com with SMTP id 108-v6so186688otv.3 for ; Tue, 13 Mar 2018 09:17:48 -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=0ZymNTB1z7x3q7ErOP6R7vJCpWat82bmUF6l3EJ9G5o=; b=KJ36KKRM7dy/vvEhMHIIaK5iEo/ocElzTkAp34U0HPpVQvlv8I5aoVy5UYm465Ga6X 4Bv3txevCcp2JCj6LZv6/7NmOWDrcdboBEo8hCeBP4/WE6TAK/u9wreFMUjOv7rJyKzs Gt6En96n+6illoKTxpCg7h3As9IGRzPawJmA0= 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=0ZymNTB1z7x3q7ErOP6R7vJCpWat82bmUF6l3EJ9G5o=; b=YGORs54n7pXM89NIrtl/2apD3wWUK7IwGWXeQgmC+x+fkZB7g0d7rQ4+7p6VUDv1sP vXuX83BqYv8YxleBmOxDuNy3P9+NPh2dRDTVIP6Clu4ku5wvR1xc55XJCR9mC/r6I/eM oU9jhp+PJu4iWxEGvDjZdkyXsHxHGU+cGEllcA0u6zFsHWzDzxyN6l7GEJcU4x2bwl/D 3X0TfpsNltRwcTqpE/G+p+TUnKm3NLuHUlkjD5GD5lAbt7OMiNoze8tRtnblNQ34OpxF t6wC7c1Ck6azH8gHqu7Tq1HAlh5eqGIjBqKDsx2uxBn0BjsvlKdtbnECzqI4nn/eEJp5 Zs1Q== X-Gm-Message-State: AElRT7GqgGruNh+8HMoAsodaVC0Y0DJRUnwkJ3OoFBM1xV7jn5QDbTdA bnmptVde42yYoSsuXv0mrQR8qMjz9MI= X-Received: by 10.157.83.9 with SMTP id g9mr830418oth.172.1520957867420; Tue, 13 Mar 2018 09:17:47 -0700 (PDT) Received: from localhost.localdomain (CableLink-187-161-113-185.PCs.InterCable.net. [187.161.113.185]) by smtp.googlemail.com with ESMTPSA id c33sm283789ote.79.2018.03.13.09.17.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Mar 2018 09:17:46 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Tue, 13 Mar 2018 10:17:38 -0600 Message-Id: <1520957858-7006-2-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520957858-7006-1-git-send-email-daniel.diaz@linaro.org> References: <1520957858-7006-1-git-send-email-daniel.diaz@linaro.org> MIME-Version: 1.0 Subject: [OE-core] [morty][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.11.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/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch diff --git a/meta/recipes-devtools/gdb/gdb-7.11.1.inc b/meta/recipes-devtools/gdb/gdb-7.11.1.inc index d9dfe6f..c8ead51 100644 --- a/meta/recipes-devtools/gdb/gdb-7.11.1.inc +++ b/meta/recipes-devtools/gdb/gdb-7.11.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://0011-avx_mpx.patch \ + file://0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch \ " SRC_URI[md5sum] = "5aa71522e488e358243917967db87476" diff --git a/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch b/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch new file mode 100644 index 0000000..1fcd355 --- /dev/null +++ b/meta/recipes-devtools/gdb/gdb/0012-gdb-Fix-ia64-defining-TRAP_HWBKPT-before-including-g.patch @@ -0,0 +1,56 @@ +From e8e11841f55521dc7dbfdd3530a5a0ff7ccbfc7e 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 0eaf9a3..446d5ba 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" + + /* Stores the ptrace options supported by the running kernel. + A value of -1 means we did not check for features yet. A value +diff --git a/gdb/nat/linux-ptrace.h b/gdb/nat/linux-ptrace.h +index 0a23bcb..d84114b 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 +