[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: gnu: binutils: Fix bug in test suite in libiberty.
From: |
guix-commits |
Subject: |
04/09: gnu: binutils: Fix bug in test suite in libiberty. |
Date: |
Sun, 16 May 2021 03:46:26 -0400 (EDT) |
efraim pushed a commit to branch wip-ppc
in repository guix.
commit 48229165bf08198d39b92376b0299226dba7047f
Author: Efraim Flashner <efraim@flashner.co.il>
AuthorDate: Thu Apr 22 09:35:36 2021 +0300
gnu: binutils: Fix bug in test suite in libiberty.
* gnu/packages/base.scm (binutils)[source]: Add patch.
* gnu/packages/patches/binutils-libiberty-endianness-bug.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
---
gnu/local.mk | 1 +
gnu/packages/base.scm | 3 +-
.../binutils-libiberty-endianness-bug.patch | 36 ++++++++++++++++++++++
3 files changed, 39 insertions(+), 1 deletion(-)
diff --git a/gnu/local.mk b/gnu/local.mk
index 95f4626..bc9ad22 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -869,6 +869,7 @@ dist_patch_DATA =
\
%D%/packages/patches/biber-sortinithash.patch \
%D%/packages/patches/bidiv-update-fribidi.patch \
%D%/packages/patches/binutils-boot-2.20.1a.patch \
+ %D%/packages/patches/binutils-libiberty-endianness-bug.patch \
%D%/packages/patches/binutils-loongson-workaround.patch \
%D%/packages/patches/binutils-mingw-w64-timestamp.patch \
%D%/packages/patches/binutils-mingw-w64-deterministic.patch \
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 33c4952..d30299a 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -507,7 +507,8 @@ change. GNU make offers many powerful extensions over the
standard utility.")
(sha256
(base32
"18ypqr5y48vxqg9mkz1c47798jp1xb1d4vfpmfq8vkihkvkx4jsv"))
- (patches (search-patches "binutils-loongson-workaround.patch"))))
+ (patches (search-patches "binutils-libiberty-endianness-bug.patch"
+ "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
;; TODO: Add dependency on zlib + those for Gold.
diff --git a/gnu/packages/patches/binutils-libiberty-endianness-bug.patch
b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch
new file mode 100644
index 0000000..e6c82f7
--- /dev/null
+++ b/gnu/packages/patches/binutils-libiberty-endianness-bug.patch
@@ -0,0 +1,36 @@
+This patch fixes a bug exposed when running the libiberty test suite on
+big-endian machines.
+
+Original bug report:
+https://sourceware.org/bugzilla/show_bug.cgi?id=27751
+Follow-ups:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100177
+https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568314.html
+
+---
+ libiberty/rust-demangle.c | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/libiberty/rust-demangle.c b/libiberty/rust-demangle.c
+index 6fd8f6a4db0..848563fa3c3 100644
+--- a/libiberty/rust-demangle.c
++++ b/libiberty/rust-demangle.c
+@@ -1253,9 +1253,12 @@ demangle_const_char (struct rust_demangler *rdm)
+ else if (value == '\n')
+ PRINT ("\\n");
+ else if (value > ' ' && value < '~')
+- /* Rust also considers many non-ASCII codepoints to be printable, but
+- that logic is not easily ported to C. */
+- print_str (rdm, (char *) &value, 1);
++ {
++ /* Rust also considers many non-ASCII codepoints to be printable, but
++ that logic is not easily ported to C. */
++ char c = value;
++ print_str (rdm, &c, 1);
++ }
+ else
+ {
+ PRINT ("\\u{");
+--
+2.31.1
+
- branch wip-ppc created (now 5e00d44), guix-commits, 2021/05/16
- 04/09: gnu: binutils: Fix bug in test suite in libiberty.,
guix-commits <=
- 01/09: gnu: bootstrap: Add support for powerpc-linux., guix-commits, 2021/05/16
- 02/09: gnu: guile-3.0: Fix building on powerpc-linux., guix-commits, 2021/05/16
- 09/09: gnu: nss: Skip tests on powerpc-linux., guix-commits, 2021/05/16
- 03/09: gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux., guix-commits, 2021/05/16
- 08/09: gnu: mercurial: Skip tests on powerpc-linux., guix-commits, 2021/05/16
- 06/09: gnu: Add mac-fdisk., guix-commits, 2021/05/16
- 05/09: gnu: mesa: Add support for powerpc-linux., guix-commits, 2021/05/16
- 07/09: build: qemu-command: Add support for powerpc., guix-commits, 2021/05/16