From patchwork Sat Nov 28 06:47:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1407456 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=L2ST0fxi; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=WqakUVNz; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Cjhsz4BHWz9s0b for ; Sat, 28 Nov 2020 17:48:55 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:Message-Id:Date:Subject:To:From:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Owner; bh=P5L3dfrQaMvQLrtL9QWtDJaGD/Ppf8uF4e4Ek1X3aKA=; b=L2ST0fxiKoHH12d2xvdlX0vkZ6 Xr6JdcOBmWkgsZ+YVnG+GVH0zkonazDFk4Ud96iKdVRiCbgr3z895/A0OjIn26vPDJkQVJPn7qSuf X/0+723TbidoFXQ1WS3pfpFrWDbkqpfaVxXO4VFls7TZ6bIF1f5/8KMLagnaaSEAsDhK0PI6Hsdlp UMfAeXzsBsnRCd103mSia0lKNjisv4uJyxQnsO2JykbaN8nejkM90ibPJGyHTYKOkTEN7KILzAp4Y TML8c85t5PDeps5FTSz8RFn3jAuW8C7V3k+DgE9ALLPysdpwRGaw1/Q5H5/0kR6YSWjkpr3ETQjBp B+2zNQfw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiu0i-00080e-Vd; Sat, 28 Nov 2020 06:47:09 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kiu0g-0007vY-I5 for openwrt-devel@lists.openwrt.org; Sat, 28 Nov 2020 06:47:07 +0000 Received: by mail-pg1-x542.google.com with SMTP id w16so5967771pga.9 for ; Fri, 27 Nov 2020 22:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=joNGECl0o1k+rUgOrts5ZbeRNxYna8opQ00xGDJVrGU=; b=WqakUVNzXDqyUiOrh6gDDS1WLEc49gkvp/s0oOjMgiQNLLx4IXXaOp2XjnWdXyHBh0 koXSTLzldBQ0M7a77sj+IV1CDXnBeeTNm4OVNoO+7a8itCfnYKDfFier1gbTFGsrZvBT G1wmXpLENDkZSfoEL+G6CKbQrxCtRoKi5yuW3sh4kwKaL7QcHG15dFcRv8o3JYuqSoHD 6Qlj7/MJ6uxDVHtwjBqpLDOb2Pm5LNb5EvViVHDyIH/hVqqJhpZtBo250MmsnEyJD4Y2 lxMTFNe7YU7cXYQkNb9tl3mVgEAOsDfmDp+UOM2DB19meln5iTfMPevmhZd1dqtIGKJD hKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=joNGECl0o1k+rUgOrts5ZbeRNxYna8opQ00xGDJVrGU=; b=ezz3Pt+PvjzpQg6wa2lgDlrPtAawhwKiEUYyE/AKHa+fz1ui4Gr+HfF+Vp+GbesOCz 40gX1bI5FLZhQxZ6ZC0HU+qJl6IF3bHc50awBP7wtWnXDFOk4WaLf4lBb3z8k+YWP9CI fCx5eAs+BVb7Jc3r8i9XP6i16U6J6aS8i/h2+ngg/uNgGY+hbUdtWngOS0wRnGgSlmVD LjApbUZP49DR4SS4C0IRfm6KBLnHURlGrP/4h1jgelREs49i4qsk/xTCBXyDD/Y0m+66 AosuMxGeG//fIFGD89ADLdltWp+ugMoobGfpGSicahPc3jU5SkqYCFIZk89qdCyE9g8W YQuQ== X-Gm-Message-State: AOAM530zIRRQ58WXF5ZGM2bdpq6m87ZpODHFcztMeyWvcPRWxA0x2GI6 wRtqtfsBC7iBYP+ytn6b3XSyBn8bfpNK+w== X-Google-Smtp-Source: ABdhPJwAjMz9ZNQtkx31fsTVnokN+Akn/CIEeUN4koRYzoQfBMd3mL8lmjK5Xxjj3Xfj0W2suJuwtw== X-Received: by 2002:a63:484d:: with SMTP id x13mr9250372pgk.301.1606546024097; Fri, 27 Nov 2020 22:47:04 -0800 (PST) Received: from mangix-trapnet.lan ([2001:470:1f05:79e::a89]) by smtp.gmail.com with ESMTPSA id o29sm9659842pfp.66.2020.11.27.22.47.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Nov 2020 22:47:03 -0800 (PST) From: Rosen Penev To: openwrt-devel@lists.openwrt.org Subject: [PATCH] gdb: add openembedded patches Date: Fri, 27 Nov 2020 22:47:01 -0800 Message-Id: <20201128064701.3146373-1-rosenp@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201128_014706_762046_339AF0CE X-CRM114-Status: GOOD ( 21.27 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:542 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rosenp[at]gmail.com] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Update to musl 1.2.0 removes sgidefs.h. This causes various compilation issues. Add patches from openembedded to fix. Remove uClibc-ng patch. The bug was actually with libstdc++ which was fixed in 1647790ae6202bd70b199e2aa44f8eb43e8d3af1 Signed-off-by: Rosen Penev --- package/devel/gdb/Makefile | 2 +- .../devel/gdb/patches/130-uclibc-fix.patch | 11 ------- package/devel/gdb/patches/140-sgidefs.patch | 30 +++++++++++++++++ package/devel/gdb/patches/150-mips64.patch | 32 +++++++++++++++++++ 4 files changed, 63 insertions(+), 12 deletions(-) delete mode 100644 package/devel/gdb/patches/130-uclibc-fix.patch create mode 100644 package/devel/gdb/patches/140-sgidefs.patch create mode 100644 package/devel/gdb/patches/150-mips64.patch diff --git a/package/devel/gdb/Makefile b/package/devel/gdb/Makefile index 17b2bb8481..64ccef1129 100644 --- a/package/devel/gdb/Makefile +++ b/package/devel/gdb/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=gdb PKG_VERSION:=10.1 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/gdb diff --git a/package/devel/gdb/patches/130-uclibc-fix.patch b/package/devel/gdb/patches/130-uclibc-fix.patch deleted file mode 100644 index a4c339ebe0..0000000000 --- a/package/devel/gdb/patches/130-uclibc-fix.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/gdb/dwarf2/index-write.c -+++ b/gdb/dwarf2/index-write.c -@@ -777,7 +777,7 @@ public: - gdb_assert (m_abbrev_table.empty ()); - const size_t name_count = m_name_to_value_set.size (); - m_bucket_table.resize -- (std::pow (2, std::ceil (std::log2 (name_count * 4 / 3)))); -+ (std::pow (2, std::ceil (log2 (name_count * 4 / 3)))); - m_hash_table.reserve (name_count); - m_name_table_string_offs.reserve (name_count); - m_name_table_entry_offs.reserve (name_count); diff --git a/package/devel/gdb/patches/140-sgidefs.patch b/package/devel/gdb/patches/140-sgidefs.patch new file mode 100644 index 0000000000..05b30f5242 --- /dev/null +++ b/package/devel/gdb/patches/140-sgidefs.patch @@ -0,0 +1,30 @@ +From 677b5b56135141c0d259e370aacd0e11c810aa15 Mon Sep 17 00:00:00 2001 +From: Andre McCurdy +Date: Fri, 5 Feb 2016 14:00:00 -0800 +Subject: [PATCH] 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 +--- + gdb/mips-linux-nat.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- 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" diff --git a/package/devel/gdb/patches/150-mips64.patch b/package/devel/gdb/patches/150-mips64.patch new file mode 100644 index 0000000000..65418fd290 --- /dev/null +++ b/package/devel/gdb/patches/150-mips64.patch @@ -0,0 +1,32 @@ +From e92f8932ef488de2a56db4299131ce6a4eb170bd Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 23 Mar 2016 06:30:09 +0000 +Subject: [PATCH] mips-linux-nat: Define _ABIO32 if not defined + +This helps building gdb on mips64 on musl, since +musl does not provide sgidefs.h this define is +only defined when GCC is using o32 ABI, in that +case gcc emits it as built-in define and hence +it works ok for mips32 + +Signed-off-by: Khem Raj +--- +Upstream-Status: Pending + + gdb/mips-linux-nat.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/gdb/mips-linux-nat.c ++++ b/gdb/mips-linux-nat.c +@@ -42,6 +42,11 @@ + #define PTRACE_GET_THREAD_AREA 25 + #endif + ++/* musl does not define and relies on compiler built-in macros for it */ ++#ifndef _ABIO32 ++#define _ABIO32 1 ++#endif ++ + class mips_linux_nat_target final : public linux_nat_trad_target + { + public: