pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/cross apply a patch from upstream binutils to fix "isb...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/c3c681be07ee
branches:  trunk
changeset: 459357:c3c681be07ee
user:      mrg <mrg%pkgsrc.org@localhost>
date:      Mon Oct 04 17:54:40 2021 +0000

description:
apply a patch from upstream binutils to fix "isb sy" on arm64eb.

fixes u-boot builds on arm64eb hosts.  bump version, and recursive
bump on GCC, and upgrade to proper version than [0-9]*.

diffstat:

 cross/aarch64-none-elf-binutils/Makefile                              |   3 +-
 cross/aarch64-none-elf-binutils/distinfo                              |   3 +-
 cross/aarch64-none-elf-binutils/patches/patch-gas_config_tc-aarch64.c |  57 ++++++++++
 cross/aarch64-none-elf-gcc/Makefile                                   |   6 +-
 4 files changed, 64 insertions(+), 5 deletions(-)

diffs (109 lines):

diff -r 4eeafee430d6 -r c3c681be07ee cross/aarch64-none-elf-binutils/Makefile
--- a/cross/aarch64-none-elf-binutils/Makefile  Mon Oct 04 17:30:37 2021 +0000
+++ b/cross/aarch64-none-elf-binutils/Makefile  Mon Oct 04 17:54:40 2021 +0000
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.5 2020/04/26 09:47:39 rillig Exp $
+# $NetBSD: Makefile,v 1.6 2021/10/04 17:54:40 mrg Exp $
 
 DISTNAME=      binutils-2.31.1
 PKGNAME=       cross-aarch64-none-elf-${DISTNAME}
+PKGREVISION=   1
 CATEGORIES=    cross
 MASTER_SITES=  ${MASTER_SITE_GNU:=binutils/}
 EXTRACT_SUFX=  .tar.bz2
diff -r 4eeafee430d6 -r c3c681be07ee cross/aarch64-none-elf-binutils/distinfo
--- a/cross/aarch64-none-elf-binutils/distinfo  Mon Oct 04 17:30:37 2021 +0000
+++ b/cross/aarch64-none-elf-binutils/distinfo  Mon Oct 04 17:54:40 2021 +0000
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.3 2018/11/23 05:29:39 ryoon Exp $
+$NetBSD: distinfo,v 1.4 2021/10/04 17:54:40 mrg Exp $
 
 SHA1 (binutils-2.31.1.tar.bz2) = 1c5b0801b4857031d5626d917808cbd5c6401a4b
 RMD160 (binutils-2.31.1.tar.bz2) = f688e5a4d8aa1548ecfbff0eb72ee156e6df7f1d
 SHA512 (binutils-2.31.1.tar.bz2) = b42954e6f49a0adcd2676bdd77dfb59bfc25cec8184b007521d1e2b1d5d0593b58639e3d9448d5a40fe024c3cea386a37743627d6bb16d502f52a4a32b9573bd
 Size (binutils-2.31.1.tar.bz2) = 30110779 bytes
+SHA1 (patch-gas_config_tc-aarch64.c) = 6094c10d3d1c6d3d5c1c4abdb3aeb93fcb04c37a
diff -r 4eeafee430d6 -r c3c681be07ee cross/aarch64-none-elf-binutils/patches/patch-gas_config_tc-aarch64.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/cross/aarch64-none-elf-binutils/patches/patch-gas_config_tc-aarch64.c     Mon Oct 04 17:54:40 2021 +0000
@@ -0,0 +1,57 @@
+$NetBSD: patch-gas_config_tc-aarch64.c,v 1.1 2021/10/04 17:54:40 mrg Exp $
+
+Part of:
+
+From def9db5cb2a3e87ceada962a3269367b08dc4846 Mon Sep 17 00:00:00 2001
+From: Alex Coplan <alex.coplan%arm.com@localhost>
+Date: Tue, 6 Oct 2020 15:56:44 +0100
+Subject: [PATCH] aarch64: Fix bogus type punning in parse_barrier() [PR26699]
+
+This patch fixes a bogus use of type punning in parse_barrier() which
+was causing an assembly failure on big endian LP64 hosts when attempting
+to assemble "isb sy" for AArch64.
+
+The type of the entries in aarch64_barrier_opt_hsh is
+aarch64_name_value_pair. We were incorrectly casting this to the
+locally-defined asm_barrier_opt which has a wider type (on LP64) for the
+second member. This happened to work on little-endian hosts but fails on
+LP64 big endian.
+
+The fix is to use the correct type in parse_barrier(). This makes the
+locally-defined asm_barrier_opt redundant, so remove it.
+
+gas/ChangeLog:
+
+       PR 26699
+       * config/tc-aarch64.c (asm_barrier_opt): Delete.
+       (parse_barrier): Fix bogus type punning.
+       * testsuite/gas/aarch64/system.d: Update disassembly.
+       * testsuite/gas/aarch64/system.s: Add isb sy test.
+
+(cherry picked from commit 05cfb0d8cc9b7f8676f5ae55a93642f091d5405f)
+
+
+--- gas/config/tc-aarch64.c.orig       2019-01-28 07:19:14.000000000 -0800
++++ gas/config/tc-aarch64.c    2021-10-03 16:39:34.086756977 -0700
+@@ -253,12 +253,6 @@
+ typedef struct
+ {
+   const char *template;
+-  unsigned long value;
+-} asm_barrier_opt;
+-
+-typedef struct
+-{
+-  const char *template;
+   uint32_t value;
+ } asm_nzcv;
+ 
+@@ -3893,7 +3887,7 @@
+ parse_barrier (char **str)
+ {
+   char *p, *q;
+-  const asm_barrier_opt *o;
++  const struct aarch64_name_value_pair *o;
+ 
+   p = q = *str;
+   while (ISALPHA (*q))
diff -r 4eeafee430d6 -r c3c681be07ee cross/aarch64-none-elf-gcc/Makefile
--- a/cross/aarch64-none-elf-gcc/Makefile       Mon Oct 04 17:30:37 2021 +0000
+++ b/cross/aarch64-none-elf-gcc/Makefile       Mon Oct 04 17:54:40 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.16 2021/05/24 19:49:25 wiz Exp $
+# $NetBSD: Makefile,v 1.17 2021/10/04 17:54:40 mrg Exp $
 
 DISTNAME=              gcc-8.2.0
 PKGNAME=               cross-aarch64-none-elf-${DISTNAME}
-PKGREVISION=           3
+PKGREVISION=           4
 CATEGORIES=            cross
 MASTER_SITES=          ${MASTER_SITE_GNU:=gcc/gcc-${PKGVERSION_NOREV}/}
 NEWLIBVER=             3.0.0
@@ -21,7 +21,7 @@
 TOOL_DEPENDS+=         gtexinfo>=5.1:../../devel/gtexinfo
 _TOOLS_USE_PKGSRC.makeinfo= yes
 
-DEPENDS+=      cross-aarch64-none-elf-binutils-[0-9]*:../../cross/aarch64-none-elf-binutils
+DEPENDS+=      cross-aarch64-none-elf-binutils>=2.31.1nb1:../../cross/aarch64-none-elf-binutils
 
 USE_LANGUAGES+=                c c++
 



Home | Main Index | Thread Index | Old Index