From patchwork Mon Mar 22 13:14:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giulio Benetti X-Patchwork-Id: 1456543 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aruba.it header.i=@aruba.it header.a=rsa-sha256 header.s=a1 header.b=M6onC13e; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (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 4F3w2c1zV6z9t8j for ; Tue, 23 Mar 2021 00:14:47 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id CD8EB82E95; Mon, 22 Mar 2021 13:14:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WQdHvKJnlcAa; Mon, 22 Mar 2021 13:14:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp1.osuosl.org (Postfix) with ESMTP id F18188294A; Mon, 22 Mar 2021 13:14:43 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 889611BF289 for ; Mon, 22 Mar 2021 13:14:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 8566240172 for ; Mon, 22 Mar 2021 13:14:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp2.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=aruba.it Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3721hq5SlaYR for ; Mon, 22 Mar 2021 13:14:41 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from smtpweb146.aruba.it (smtpweb146.aruba.it [62.149.158.146]) by smtp2.osuosl.org (Postfix) with ESMTP id B594C4022B for ; Mon, 22 Mar 2021 13:14:40 +0000 (UTC) Received: from ubuntu.localdomain ([146.241.163.94]) by Aruba Outgoing Smtp with ESMTPSA id OKODlRANN1jmzOKOElumFr; Mon, 22 Mar 2021 14:14:38 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=aruba.it; s=a1; t=1616418878; bh=VjQJ7DNLTKzPN4XkjA+eq5MKvcgZs45FGHjPv8ggt9k=; h=From:To:Subject:Date:MIME-Version; b=M6onC13eCDO8yS5aiP+obq2jfHJai+IWBzvJJyPO/wFBvjvaSfoU4aiGg5N3bYCXg 6iWY7cI7xaobRfoAl8nbKsjLWH46DSSVJVkykOUn7vs5MXb/p+PQQO9wDoD/go7ouC SPNP1V64yi/A3ATkYYGFOaYH+58pPpTAHHqspiBTbEgYcU9AYOF7n04gpaEYFOX5Dv kU/zKm9jk66IlJIdoShYEXFk6394B7lLYuCSMaWokehI1yHiMtQbboC3F+qg6a/nFd d8ewWt3czwRVgvQRSjYRBthiLRBwuMespvgnpkqdwTBx9WmB57yNQmJd8qdcqWWnhh YfK9clvaMC4sg== From: Giulio Benetti To: buildroot@buildroot.org Date: Mon, 22 Mar 2021 14:14:37 +0100 Message-Id: <20210322131437.392225-1-giulio.benetti@benettiengineering.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfK4eXhto7nC+df3ex1bOX0ZCB5LEQcU198jnvmFKKxBOjtfRXQO/XTOIHB3gZJwTMKrKooikIMJ/2oYQIgHRVMjrm+G+UQS5NxTCHqCq2/Q3O1X+Kjwt IqQdo6eZ6J8rXmqQTAZGZZky682091Ya1bgBtB/bN8fDntQ65+d4/VuVALLBtVVjmHklm/qmk3mTHON7IQ4O2N/E6vasi/5hYBOa/+MWdC6Adp4dtFj8y61b C+lfNeyDVsRsedW1T2wMXEAGxK9j5Xi3506MnDjoDX0U5Peb5nA7MBMofyIgsJiAkULCfxGxVMpdsnmn47LnjIUbG3fSE21jjSLzEcDWB/M= Subject: [Buildroot] [PATCH] package/binutils: add patches to fix OpenRisc bug 21464 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Romain Naour , Giulio Benetti , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" These patches fix OpenRisc linker bug 21464 that affects packages libtheora, protobuf and zeromq. Signed-off-by: Giulio Benetti --- .../0010-bfd-elf32-or1k-fix-ld-assert.patch | 33 +++++++++++++++++++ .../0003-bfd-elf32-or1k-fix-ld-assert.patch | 33 +++++++++++++++++++ .../0003-bfd-elf32-or1k-fix-ld-assert.patch | 33 +++++++++++++++++++ .../0003-bfd-elf32-or1k-fix-ld-assert.patch | 33 +++++++++++++++++++ 4 files changed, 132 insertions(+) create mode 100644 package/binutils/2.32/0010-bfd-elf32-or1k-fix-ld-assert.patch create mode 100644 package/binutils/2.34/0003-bfd-elf32-or1k-fix-ld-assert.patch create mode 100644 package/binutils/2.35.2/0003-bfd-elf32-or1k-fix-ld-assert.patch create mode 100644 package/binutils/2.36.1/0003-bfd-elf32-or1k-fix-ld-assert.patch diff --git a/package/binutils/2.32/0010-bfd-elf32-or1k-fix-ld-assert.patch b/package/binutils/2.32/0010-bfd-elf32-or1k-fix-ld-assert.patch new file mode 100644 index 0000000000..07121c3d0d --- /dev/null +++ b/package/binutils/2.32/0010-bfd-elf32-or1k-fix-ld-assert.patch @@ -0,0 +1,33 @@ +From 93cf62b662499e560812145dd989056fcf14f00e Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Mon, 22 Mar 2021 13:30:07 +0100 +Subject: [PATCH] bfd/elf32-or1k: fix ld assert + +Signed-off-by: Giulio Benetti +--- + bfd/elf32-or1k.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c +index 2f200b197b..ae508540f5 100644 +--- a/bfd/elf32-or1k.c ++++ b/bfd/elf32-or1k.c +@@ -2535,11 +2535,10 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + if (h->type == STT_FUNC + || h->needs_plt) + { +- if (! bfd_link_pic (info) +- && !h->def_dynamic +- && !h->ref_dynamic +- && h->root.type != bfd_link_hash_undefweak +- && h->root.type != bfd_link_hash_undefined) ++ if (h->plt.refcount <= 0 ++ || (SYMBOL_CALLS_LOCAL (info, h) ++ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak))) + { + /* This case can occur if we saw a PLT reloc in an input + file, but the symbol was never referred to by a dynamic +-- +2.25.1 + diff --git a/package/binutils/2.34/0003-bfd-elf32-or1k-fix-ld-assert.patch b/package/binutils/2.34/0003-bfd-elf32-or1k-fix-ld-assert.patch new file mode 100644 index 0000000000..4aedc40e51 --- /dev/null +++ b/package/binutils/2.34/0003-bfd-elf32-or1k-fix-ld-assert.patch @@ -0,0 +1,33 @@ +From 1659226a96b1daecfd08c057d0d5c39309d207ee Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Mon, 22 Mar 2021 13:30:07 +0100 +Subject: [PATCH] bfd/elf32-or1k: fix ld assert + +Signed-off-by: Giulio Benetti +--- + bfd/elf32-or1k.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c +index 65938e5137..41908f8938 100644 +--- a/bfd/elf32-or1k.c ++++ b/bfd/elf32-or1k.c +@@ -2566,11 +2566,10 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + if (h->type == STT_FUNC + || h->needs_plt) + { +- if (! bfd_link_pic (info) +- && !h->def_dynamic +- && !h->ref_dynamic +- && h->root.type != bfd_link_hash_undefweak +- && h->root.type != bfd_link_hash_undefined) ++ if (h->plt.refcount <= 0 ++ || (SYMBOL_CALLS_LOCAL (info, h) ++ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak))) + { + /* This case can occur if we saw a PLT reloc in an input + file, but the symbol was never referred to by a dynamic +-- +2.25.1 + diff --git a/package/binutils/2.35.2/0003-bfd-elf32-or1k-fix-ld-assert.patch b/package/binutils/2.35.2/0003-bfd-elf32-or1k-fix-ld-assert.patch new file mode 100644 index 0000000000..4aedc40e51 --- /dev/null +++ b/package/binutils/2.35.2/0003-bfd-elf32-or1k-fix-ld-assert.patch @@ -0,0 +1,33 @@ +From 1659226a96b1daecfd08c057d0d5c39309d207ee Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Mon, 22 Mar 2021 13:30:07 +0100 +Subject: [PATCH] bfd/elf32-or1k: fix ld assert + +Signed-off-by: Giulio Benetti +--- + bfd/elf32-or1k.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c +index 65938e5137..41908f8938 100644 +--- a/bfd/elf32-or1k.c ++++ b/bfd/elf32-or1k.c +@@ -2566,11 +2566,10 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + if (h->type == STT_FUNC + || h->needs_plt) + { +- if (! bfd_link_pic (info) +- && !h->def_dynamic +- && !h->ref_dynamic +- && h->root.type != bfd_link_hash_undefweak +- && h->root.type != bfd_link_hash_undefined) ++ if (h->plt.refcount <= 0 ++ || (SYMBOL_CALLS_LOCAL (info, h) ++ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak))) + { + /* This case can occur if we saw a PLT reloc in an input + file, but the symbol was never referred to by a dynamic +-- +2.25.1 + diff --git a/package/binutils/2.36.1/0003-bfd-elf32-or1k-fix-ld-assert.patch b/package/binutils/2.36.1/0003-bfd-elf32-or1k-fix-ld-assert.patch new file mode 100644 index 0000000000..4aedc40e51 --- /dev/null +++ b/package/binutils/2.36.1/0003-bfd-elf32-or1k-fix-ld-assert.patch @@ -0,0 +1,33 @@ +From 1659226a96b1daecfd08c057d0d5c39309d207ee Mon Sep 17 00:00:00 2001 +From: Giulio Benetti +Date: Mon, 22 Mar 2021 13:30:07 +0100 +Subject: [PATCH] bfd/elf32-or1k: fix ld assert + +Signed-off-by: Giulio Benetti +--- + bfd/elf32-or1k.c | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c +index 65938e5137..41908f8938 100644 +--- a/bfd/elf32-or1k.c ++++ b/bfd/elf32-or1k.c +@@ -2566,11 +2566,10 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, + if (h->type == STT_FUNC + || h->needs_plt) + { +- if (! bfd_link_pic (info) +- && !h->def_dynamic +- && !h->ref_dynamic +- && h->root.type != bfd_link_hash_undefweak +- && h->root.type != bfd_link_hash_undefined) ++ if (h->plt.refcount <= 0 ++ || (SYMBOL_CALLS_LOCAL (info, h) ++ || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT ++ && h->root.type == bfd_link_hash_undefweak))) + { + /* This case can occur if we saw a PLT reloc in an input + file, but the symbol was never referred to by a dynamic +-- +2.25.1 +