From patchwork Mon Jul 19 11:09:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Salvaterra X-Patchwork-Id: 1506908 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) 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=bombadil.20210309 header.b=I1/KWHUZ; 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=XPgVye8G; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (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 4GSzhd60C0z9sRR for ; Mon, 19 Jul 2021 21:12:31 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; 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:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qU439ZZ9TPDJaCeRGBxYN2GcXagSoERaOLcZJ0lVwRc=; b=I1/KWHUZq7e2LX 8SpaPvSekP8fsLak4CuJHP+zZJD2aAJKbdatRq2dCmGLIV+xLvqG9LHLHKB7ydsLw0Y8UzEUn3aRu lrKTJb/v+vbJ0pCbiqfLhMRT2kMVKKC5LnTAgSWcH9yLIT2j0Vi/dIlftC3rfk5qEFFxdpOEXeILF xk3l4RnvZkG5K4v9aiXsfYFLoTRW6KmLZpYCUXguKGGS59qHkdXVBd74Zc9ZW3Vb+PsVgmGIPy14+ ujJSsfg3+IdrT4fEI40wTLWeGT/y0Vd0IW2oZDyz3Xz+F8Rm1nwBOKHyW2VaxUPTMgEfGG89e9PEd j55icW4KGjfGSIHHK8xQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5R9g-009SGm-3o; Mon, 19 Jul 2021 11:09:48 +0000 Received: from mail-ed1-x531.google.com ([2a00:1450:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m5R9c-009SFx-LT for openwrt-devel@lists.openwrt.org; Mon, 19 Jul 2021 11:09:46 +0000 Received: by mail-ed1-x531.google.com with SMTP id w14so23366631edc.8 for ; Mon, 19 Jul 2021 04:09:43 -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=OzExcWOQEiSHHfVfYKf4DgQ/D21oWl6CfUzeKdVJA7Q=; b=XPgVye8GOHagraL9bM8jnh4zr2seZ6hFbdqiWW1v21ilTRagfkhGi7QCt90IZbplT1 OmeB3KrBB5/R3Lb7mCgFu2QuQiv54Vakz+iZlWwcEbuiIfP2q9Oe7UuKb9iYvNGIsbgJ lco+Usmr7yGbqzL5zlvqsL5wCGWGPqWHgUqOd1LFThfcqWGsNnY0L7pzMOQdkCEmXf56 1WKa2a2Bg2al8FucnoiNcIKn3JneKSkcQrVB2K/HJyv4G2+nxuWPL2zFFIgOKmEHc2ic iKxF91zByU0bIt2fYbcnn1fHy7+eUPFMWJf9ALESYjnRiAJMhee4HPnAj1795iFPXgDk t92w== 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=OzExcWOQEiSHHfVfYKf4DgQ/D21oWl6CfUzeKdVJA7Q=; b=XrpINHs+KylXmuB/XEfjg/IsazA0luM1Bs43yA5zaQWfBnSGeY57h/2xxTpUZbQQFy EzNVthcps0w/Vn3/pJjtiRYWur6b0GL9Od6Cc9r9IS6uXletljqfQCDblxfskzrTWDoR 0R6FUWFiZSVuXpb4CHTOYA87QXZlrkwOA2KaWr10EMHpZEAYdPuaBCHuC9XYFUY8OS8M 0FmEPj6tcWvSc+Oq1hLrpATHyqpFHe3DpJOGAgFdAVUSd2M4m8qFBTXaL6jXNpjI/+ss SxaGB6lAfUrOsSlTBi7U+cfTosn0yi4YhyS8t6KfEqeaXIN1LbHYRZXwFlB8rf4YrQUZ wqYQ== X-Gm-Message-State: AOAM5338o33ioFp4D7QS5snxpdglvSxmXYKjrHhwkjvGatKzj+cR4SHP mwaRlutqWNXoWDIj21XKxbnWsXqHOwIg X-Google-Smtp-Source: ABdhPJwSWcVconMlobs1F4Bwx8Ujlq5lzKPLsT3tdpmHLezCNVLU1L1jXSL4e7Q1+eZsHYtCfLeTNg== X-Received: by 2002:aa7:ccc1:: with SMTP id y1mr33671725edt.321.1626692982780; Mon, 19 Jul 2021 04:09:42 -0700 (PDT) Received: from mallard.adg.lan (a95-93-125-60.cpe.netcabo.pt. [95.93.125.60]) by smtp.gmail.com with ESMTPSA id jw8sm5751871ejc.60.2021.07.19.04.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 04:09:42 -0700 (PDT) From: Rui Salvaterra To: openwrt-devel@lists.openwrt.org Cc: hauke@hauke-m.de, Rui Salvaterra Subject: [PATCH] toolchain/binutils: add binutils 2.37 Date: Mon, 19 Jul 2021 12:09:38 +0100 Message-Id: <20210719110938.1788739-1-rsalvaterra@gmail.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210719_040944_748075_3BAEC48C X-CRM114-Status: GOOD ( 13.19 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Tested on ath79/generic, without issues. Signed-off-by: Rui Salvaterra --- toolchain/binutils/Config.in | 4 ++ toolchain/binutils/Config.version | 4 ++ toolchain/binutils/Makefile | 4 ++ .../2.37/300-001_ld_makefile_patch.patch | 22 ++++++ [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:531 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [rsalvaterra[at]gmail.com] -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 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 X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 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 Tested on ath79/generic, without issues. Signed-off-by: Rui Salvaterra --- toolchain/binutils/Config.in | 4 ++ toolchain/binutils/Config.version | 4 ++ toolchain/binutils/Makefile | 4 ++ .../2.37/300-001_ld_makefile_patch.patch | 22 +++++++++++ .../400-mips_no_dynamic_linking_sym.patch | 18 +++++++++ ...e-default-emulation-for-mips64-linux.patch | 38 +++++++++++++++++++ 6 files changed, 90 insertions(+) create mode 100644 toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch create mode 100644 toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch create mode 100644 toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in index b436a66c98..4b9579379c 100644 --- a/toolchain/binutils/Config.in +++ b/toolchain/binutils/Config.in @@ -21,6 +21,10 @@ choice config BINUTILS_USE_VERSION_2_36_1 bool "Binutils 2.36.1" select BINUTILS_VERSION_2_36_1 + + config BINUTILS_USE_VERSION_2_37 + bool "Binutils 2.37" + select BINUTILS_VERSION_2_37 endchoice config EXTRA_BINUTILS_CONFIG_OPTIONS diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version index 82ef9b8fc3..985e3b1b32 100644 --- a/toolchain/binutils/Config.version +++ b/toolchain/binutils/Config.version @@ -11,9 +11,13 @@ config BINUTILS_VERSION_2_35_2 config BINUTILS_VERSION_2_36_1 bool +config BINUTILS_VERSION_2_37 + bool + config BINUTILS_VERSION string default "2.32" if BINUTILS_VERSION_2_32 default "2.34" if BINUTILS_VERSION_2_34 default "2.35.2" if BINUTILS_VERSION_2_35_2 default "2.36.1" if BINUTILS_VERSION_2_36_1 + default "2.37" if BINUTILS_VERSION_2_37 diff --git a/toolchain/binutils/Makefile b/toolchain/binutils/Makefile index 5d1b518343..d58f6662bb 100644 --- a/toolchain/binutils/Makefile +++ b/toolchain/binutils/Makefile @@ -31,6 +31,10 @@ ifeq ($(PKG_VERSION),2.36.1) PKG_HASH:=e81d9edf373f193af428a0f256674aea62a9d74dfe93f65192d4eae030b0f3b0 endif +ifeq ($(PKG_VERSION),2.37) + PKG_HASH:=820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c +endif + HOST_BUILD_PARALLEL:=1 PATCH_DIR:=./patches/$(PKG_VERSION) diff --git a/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch new file mode 100644 index 0000000000..f1cbb8198b --- /dev/null +++ b/toolchain/binutils/patches/2.37/300-001_ld_makefile_patch.patch @@ -0,0 +1,22 @@ +--- a/ld/Makefile.am ++++ b/ld/Makefile.am +@@ -50,7 +50,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + + EMUL = @EMUL@ + EMULATION_OFILES = @EMULATION_OFILES@ +--- a/ld/Makefile.in ++++ b/ld/Makefile.in +@@ -561,7 +561,7 @@ AM_CFLAGS = $(WARN_CFLAGS) $(ELF_CLFAGS) + # We put the scripts in the directory $(scriptdir)/ldscripts. + # We can't put the scripts in $(datadir) because the SEARCH_DIR + # directives need to be different for native and cross linkers. +-scriptdir = $(tooldir)/lib ++scriptdir = $(libdir) + BASEDIR = $(srcdir)/.. + BFDDIR = $(BASEDIR)/bfd + INCDIR = $(BASEDIR)/include diff --git a/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch new file mode 100644 index 0000000000..070247ecf0 --- /dev/null +++ b/toolchain/binutils/patches/2.37/400-mips_no_dynamic_linking_sym.patch @@ -0,0 +1,18 @@ +--- a/bfd/elfxx-mips.c ++++ b/bfd/elfxx-mips.c +@@ -8057,6 +8057,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + name = SGI_COMPAT (abfd) ? "_DYNAMIC_LINK" : "_DYNAMIC_LINKING"; + bh = NULL; ++ if (0) { + if (!(_bfd_generic_link_add_one_symbol + (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) +@@ -8069,6 +8070,7 @@ _bfd_mips_elf_create_dynamic_sections (b + + if (! bfd_elf_link_record_dynamic_symbol (info, h)) + return false; ++ } + + if (! mips_elf_hash_table (info)->use_rld_obj_head) + { diff --git a/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch new file mode 100644 index 0000000000..c59843766e --- /dev/null +++ b/toolchain/binutils/patches/2.37/500-Change-default-emulation-for-mips64-linux.patch @@ -0,0 +1,38 @@ +--- a/bfd/config.bfd ++++ b/bfd/config.bfd +@@ -891,12 +891,12 @@ case "${targ}" in + targ_selvecs="mips_elf32_le_vec mips_elf64_be_vec mips_elf64_le_vec mips_ecoff_be_vec mips_ecoff_le_vec" + ;; + mips64*el-*-linux*) +- targ_defvec=mips_elf32_ntrad_le_vec +- targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_le_vec mips_elf64_trad_be_vec" ++ targ_defvec=mips_elf64_trad_le_vec ++ targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_ntrad_be_vec mips_elf32_trad_le_vec mips_elf32_trad_be_vec mips_elf64_trad_be_vec" + ;; + mips64*-*-linux*) +- targ_defvec=mips_elf32_ntrad_be_vec +- targ_selvecs="mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_be_vec mips_elf64_trad_le_vec" ++ targ_defvec=mips_elf64_trad_be_vec ++ targ_selvecs="mips_elf32_ntrad_be_vec mips_elf32_ntrad_le_vec mips_elf32_trad_be_vec mips_elf32_trad_le_vec mips_elf64_trad_le_vec" + ;; + mips*el-*-linux*) + targ_defvec=mips_elf32_trad_le_vec +--- a/ld/configure.tgt ++++ b/ld/configure.tgt +@@ -530,12 +530,12 @@ mips*-*-vxworks*) targ_emul=elf32ebmipvx + ;; + mips*-*-windiss) targ_emul=elf32mipswindiss + ;; +-mips64*el-*-linux-*) targ_emul=elf32ltsmipn32 +- targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip" ++mips64*el-*-linux-*) targ_emul=elf64ltsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32ltsmip elf32btsmip elf64btsmip" + targ_extra_libpath=$targ_extra_emuls + ;; +-mips64*-*-linux-*) targ_emul=elf32btsmipn32 +- targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip" ++mips64*-*-linux-*) targ_emul=elf64btsmip ++ targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip" + targ_extra_libpath=$targ_extra_emuls + ;; + mips*el-*-linux-*) targ_emul=elf32ltsmip