From patchwork Fri Jun 22 21:09:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 933606 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="N0TGA/mB"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41CB6P1cdKz9ryk for ; Sat, 23 Jun 2018 07:10:04 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 16A49885CB; Fri, 22 Jun 2018 21:10:02 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z7YrzoxPJFUq; Fri, 22 Jun 2018 21:10:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7583787D58; Fri, 22 Jun 2018 21:10:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 4F5271C03C8 for ; Fri, 22 Jun 2018 21:09:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 51BDF895A7 for ; Fri, 22 Jun 2018 21:09:59 +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 3B50ubCbLs2U for ; Fri, 22 Jun 2018 21:09:58 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by hemlock.osuosl.org (Postfix) with ESMTPS id 1414889598 for ; Fri, 22 Jun 2018 21:09:58 +0000 (UTC) Received: by mail-wr0-f177.google.com with SMTP id a12-v6so7926798wro.1 for ; Fri, 22 Jun 2018 14:09:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5efZrk+4gaaLOsN8gRw4fIltzzcJBGLCSe1Mz9jc+Yg=; b=N0TGA/mBol9Yb51iDwNlUn+3CAzTGvl4apMKGffz1I7DLU6kabtT9+DZ3y3NYTYSMU QXRaEWrqU4CdfJI7zsm5Dm4BMimHthV3En3+Fq88qUiT7UBq0TiA4srX/k4y+nIxjyAG zz2SprPRn0btY6V60Ty7TdDjw8k1c4YZGJLnwzLuASqCjmEpGg2et+xvG8NR7biOu6LH 7D7nOc5BeRlGLVfnUBgfYnqB5iFGZ7QBg5CKirrc3XxLGA4q1fDBXQjATgLMQz+wLuZ8 D7Vg2lkie6Yq56+RoAX/W0Mkv0kEeIRetHgQqa8WgX+jp9hwhPRDNwWtKUilliBe88mM k7SA== 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=5efZrk+4gaaLOsN8gRw4fIltzzcJBGLCSe1Mz9jc+Yg=; b=YohPQYe1IdsYPmn+kl3BU4T16/TXMxwhAyPrCYJox8qQ1u9f+HJA4ZnHt85x0lKH/B Khd9e3pqI0hfkvXnk2gGyMmMivcD6Zn/uv8YdyA6qapJiuldyLaFlzUH+22MUtrXDNVz lQDeCjk9afytQyj6HyjPxqUPzcPva9s36QihNXSoQYMzZQ7PA5dTAs+b680X5U6ixZkJ Jmrh6Qg2LJdn6podzQb2vQJN0fEITVaQkOt0T1ZEA9sy0IXbu06/tJNnbs24RzSwMph/ qd0N1VIf8pnzoH7zNO0UlfVLyh/eiWc758D8vkkzKSDn782f+jKEsy1emw2GRiidDZUN r29A== X-Gm-Message-State: APt69E1Ktbj0fIflS1B3oT+lin85XTR0WyWyfFlf7O2XPpwCNO/vt+vn AgV+5ERoCIQGdp0QPLoKDKuPqii1 X-Google-Smtp-Source: AAOMgpfB4vdR7OGdIcE1rMIRnRDbhtMWRuXS31ijK0Q+FnUZnebL1aDWHSARASm3K7W74RUym0hbHA== X-Received: by 2002:adf:c892:: with SMTP id k18-v6mr2994131wrh.6.1529701796050; Fri, 22 Jun 2018 14:09:56 -0700 (PDT) Received: from adeos.home (2a01cb00054978001a46adb371a118d7.ipv6.abo.wanadoo.fr. [2a01:cb00:549:7800:1a46:adb3:71a1:18d7]) by smtp.gmail.com with ESMTPSA id m145-v6sm2967221wma.19.2018.06.22.14.09.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 22 Jun 2018 14:09:55 -0700 (PDT) From: Romain Naour To: buildroot@buildroot.org Date: Fri, 22 Jun 2018 23:09:49 +0200 Message-Id: <20180622210949.18107-1-romain.naour@gmail.com> X-Mailer: git-send-email 2.14.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/gdb: fix gdbserver build for m68k X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" As for strace [1], when is included after , the build fails on m68k with the following diagnostics: In file included from ./../nat/linux-ptrace.h:28:0, from linux-low.h:27, from linux-m68k-low.c:20: [...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant PT_D1 = 0, ^ [...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant [...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant In file included from linux-m68k-low.c:27:0: [...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token }; ^ Fix this by moving on top of "linux-low.h". Fixes: https://gitlab.com/free-electrons/toolchains-builder/-/jobs/72006385 [1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 Signed-off-by: Romain Naour Cc: Thomas Petazzoni Cc: Waldemar Brodkorb --- I'm not taking into acount gdb 7.11 and 7.10 since they will be removed soon. http://patchwork.ozlabs.org/patch/869573/ http://patchwork.ozlabs.org/patch/869574/ gdb 8.1 needs this patch too. http://patchwork.ozlabs.org/patch/869572/ --- .../7.12.1/0007-gdbserver-fix-build-for-m68k.patch | 62 ++++++++++++++++++++++ .../8.0.1/0005-gdbserver-fix-build-for-m68k.patch | 62 ++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 package/gdb/7.12.1/0007-gdbserver-fix-build-for-m68k.patch create mode 100644 package/gdb/8.0.1/0005-gdbserver-fix-build-for-m68k.patch diff --git a/package/gdb/7.12.1/0007-gdbserver-fix-build-for-m68k.patch b/package/gdb/7.12.1/0007-gdbserver-fix-build-for-m68k.patch new file mode 100644 index 0000000000..451bed312c --- /dev/null +++ b/package/gdb/7.12.1/0007-gdbserver-fix-build-for-m68k.patch @@ -0,0 +1,62 @@ +From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 22 Jun 2018 22:40:26 +0200 +Subject: [PATCH] gdbserver: fix build for m68k +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As for strace [1], when is included after , +the build fails on m68k with the following diagnostics: + +In file included from ./../nat/linux-ptrace.h:28:0, + from linux-low.h:27, + from linux-m68k-low.c:20: +[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant + PT_D1 = 0, + ^ +[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant +[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant +In file included from linux-m68k-low.c:27:0: +[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token + }; + ^ + +Fix this by moving on top of "linux-low.h". + +[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 + +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-m68k-low.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c +index 5594f10f927..19b4ef7b259 100644 +--- a/gdb/gdbserver/linux-m68k-low.c ++++ b/gdb/gdbserver/linux-m68k-low.c +@@ -17,16 +17,17 @@ + along with this program. If not, see . */ + + #include "server.h" ++ ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + #include "linux-low.h" + + /* Defined in auto-generated file reg-m68k.c. */ + void init_registers_m68k (void); + extern const struct target_desc *tdesc_m68k; + +-#ifdef HAVE_SYS_REG_H +-#include +-#endif +- + #define m68k_num_regs 29 + #define m68k_num_gregs 18 + +-- +2.14.4 + diff --git a/package/gdb/8.0.1/0005-gdbserver-fix-build-for-m68k.patch b/package/gdb/8.0.1/0005-gdbserver-fix-build-for-m68k.patch new file mode 100644 index 0000000000..451bed312c --- /dev/null +++ b/package/gdb/8.0.1/0005-gdbserver-fix-build-for-m68k.patch @@ -0,0 +1,62 @@ +From 80c60ea9fb3634272a98ec526eabff25f5255bae Mon Sep 17 00:00:00 2001 +From: Romain Naour +Date: Fri, 22 Jun 2018 22:40:26 +0200 +Subject: [PATCH] gdbserver: fix build for m68k +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +As for strace [1], when is included after , +the build fails on m68k with the following diagnostics: + +In file included from ./../nat/linux-ptrace.h:28:0, + from linux-low.h:27, + from linux-m68k-low.c:20: +[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant + PT_D1 = 0, + ^ +[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant +[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant +In file included from linux-m68k-low.c:27:0: +[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token + }; + ^ + +Fix this by moving on top of "linux-low.h". + +[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92 + +Signed-off-by: Romain Naour +--- + gdb/gdbserver/linux-m68k-low.c | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +diff --git a/gdb/gdbserver/linux-m68k-low.c b/gdb/gdbserver/linux-m68k-low.c +index 5594f10f927..19b4ef7b259 100644 +--- a/gdb/gdbserver/linux-m68k-low.c ++++ b/gdb/gdbserver/linux-m68k-low.c +@@ -17,16 +17,17 @@ + along with this program. If not, see . */ + + #include "server.h" ++ ++#ifdef HAVE_SYS_REG_H ++#include ++#endif ++ + #include "linux-low.h" + + /* Defined in auto-generated file reg-m68k.c. */ + void init_registers_m68k (void); + extern const struct target_desc *tdesc_m68k; + +-#ifdef HAVE_SYS_REG_H +-#include +-#endif +- + #define m68k_num_regs 29 + #define m68k_num_gregs 18 + +-- +2.14.4 +