From patchwork Mon Jun 19 14:18:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vicente Olivert Riera X-Patchwork-Id: 777786 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wrtPP51SNz9s89 for ; Tue, 20 Jun 2017 00:18:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 4040A865EC; Mon, 19 Jun 2017 14:18:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 8HUyfAPiNeV4; Mon, 19 Jun 2017 14:18:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 5AED086520; Mon, 19 Jun 2017 14:18:30 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id F22001C1E66 for ; Mon, 19 Jun 2017 14:18:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EC213864E4 for ; Mon, 19 Jun 2017 14:18:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YMn1iLdzpnTJ for ; Mon, 19 Jun 2017 14:18:28 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailapp01.imgtec.com (mailapp01.imgtec.com [195.59.15.196]) by whitealder.osuosl.org (Postfix) with ESMTP id E9CF38642A for ; Mon, 19 Jun 2017 14:18:27 +0000 (UTC) Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 62EA4F2A5EA3F for ; Mon, 19 Jun 2017 15:18:19 +0100 (IST) Received: from vriera-linux.le.imgtec.org (192.168.154.36) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server (TLS) id 14.3.294.0; Mon, 19 Jun 2017 15:18:22 +0100 From: Vicente Olivert Riera To: Date: Mon, 19 Jun 2017 15:18:07 +0100 Message-ID: <20170619141807.16084-1-Vincent.Riera@imgtec.com> X-Mailer: git-send-email 2.13.0 MIME-Version: 1.0 X-Originating-IP: [192.168.154.36] Subject: [Buildroot] [PATCH] gdb: fix build for MIPS musl X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Currently building gdb for MIPS musl fails because it's trying to include which is provided by glibc and uClibc, but not by musl. However, the kernel headers provide which has the same definitions, so we can use that one instead. Backporting a patch that has been sent upstream. Taken from here: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 Signed-off-by: Vicente Olivert Riera --- package/gdb/7.10.1/0011-use-asm-sgidefs.h.patch | 44 +++++++++++++++++++++++++ package/gdb/7.11.1/0006-use-asm-sgidefs.h.patch | 42 +++++++++++++++++++++++ package/gdb/7.12.1/0005-use-asm-sgidefs.h.patch | 42 +++++++++++++++++++++++ package/gdb/8.0/0003-use-asm-sgidefs.h.patch | 42 +++++++++++++++++++++++ 4 files changed, 170 insertions(+) create mode 100644 package/gdb/7.10.1/0011-use-asm-sgidefs.h.patch create mode 100644 package/gdb/7.11.1/0006-use-asm-sgidefs.h.patch create mode 100644 package/gdb/7.12.1/0005-use-asm-sgidefs.h.patch create mode 100644 package/gdb/8.0/0003-use-asm-sgidefs.h.patch diff --git a/package/gdb/7.10.1/0011-use-asm-sgidefs.h.patch b/package/gdb/7.10.1/0011-use-asm-sgidefs.h.patch new file mode 100644 index 000000000..9513f2dd4 --- /dev/null +++ b/package/gdb/7.10.1/0011-use-asm-sgidefs.h.patch @@ -0,0 +1,44 @@ +Use + +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 + +Patch has been adapted to apply on 7.10.1. + +Signed-off-by: Vicente Olivert Riera + +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH 07/10] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +Signed-off-by: Khem Raj +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index 9f6d697..8f57bb2 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include + #include + +-- +2.13.1 + diff --git a/package/gdb/7.11.1/0006-use-asm-sgidefs.h.patch b/package/gdb/7.11.1/0006-use-asm-sgidefs.h.patch new file mode 100644 index 000000000..de86154cc --- /dev/null +++ b/package/gdb/7.11.1/0006-use-asm-sgidefs.h.patch @@ -0,0 +1,42 @@ +Use + +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 + +Signed-off-by: Vicente Olivert Riera + +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH 07/10] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +Signed-off-by: Khem Raj +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index f2df1b9907..d24664cb56 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" +-- +2.13.1 + diff --git a/package/gdb/7.12.1/0005-use-asm-sgidefs.h.patch b/package/gdb/7.12.1/0005-use-asm-sgidefs.h.patch new file mode 100644 index 000000000..de86154cc --- /dev/null +++ b/package/gdb/7.12.1/0005-use-asm-sgidefs.h.patch @@ -0,0 +1,42 @@ +Use + +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 + +Signed-off-by: Vicente Olivert Riera + +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH 07/10] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +Signed-off-by: Khem Raj +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index f2df1b9907..d24664cb56 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" +-- +2.13.1 + diff --git a/package/gdb/8.0/0003-use-asm-sgidefs.h.patch b/package/gdb/8.0/0003-use-asm-sgidefs.h.patch new file mode 100644 index 000000000..de86154cc --- /dev/null +++ b/package/gdb/8.0/0003-use-asm-sgidefs.h.patch @@ -0,0 +1,42 @@ +Use + +Taken from: https://sourceware.org/bugzilla/show_bug.cgi?id=21070 + +Signed-off-by: Vicente Olivert Riera + +From 12a0b8d81e1fda6ba98abdce8d6f09f9555ebcf5 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Sat, 30 Apr 2016 15:29:06 -0700 +Subject: [PATCH 07/10] use + +Build fix for MIPS with musl libc + +The MIPS specific header is provided by glibc and uclibc +but not by musl. Regardless of the libc, the kernel headers provide + which provides the same definitions, so use that +instead. + +Upstream-Status: Pending + +Signed-off-by: Andre McCurdy +Signed-off-by: Khem Raj +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gdb/mips-linux-nat.c b/gdb/mips-linux-nat.c +index f2df1b9907..d24664cb56 100644 +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -31,7 +31,7 @@ + #include "gdb_proc_service.h" + #include "gregset.h" + +-#include ++#include + #include "nat/gdb_ptrace.h" + #include + #include "inf-ptrace.h" +-- +2.13.1 +