all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Efraim Flashner <efraim@flashner.co.il>
To: 47615@debbugs.gnu.org, guix-devel@gnu.org
Subject: [PATCH v2 04/12] gnu: binutils: Fix bug in test suite in libiberty.
Date: Thu, 22 Apr 2021 10:59:17 +0300	[thread overview]
Message-ID: <a8909225203d17a2244756f1a4602d4b66c68c96.1619076704.git.efraim@flashner.co.il> (raw)
In-Reply-To: <cover.1619076704.git.efraim@flashner.co.il>

* 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(-)
 create mode 100644 gnu/packages/patches/binutils-libiberty-endianness-bug.patch

Completely rewritten. I reported the bug upstream to binutils and after
some testing it was determined to be an actual bug in libiberty's test
suite affecting big-endian systems. I've tested this on x86_64 and saw
no issues with it.

diff --git a/gnu/local.mk b/gnu/local.mk
index f9996e6fa1..23b768871c 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -865,6 +865,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 ee1ab1bcad..3dd4f2d0be 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 0000000000..e6c82f704e
--- /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
+
-- 
2.31.1



  parent reply	other threads:[~2021-04-22  8:02 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 12:24 [bug#47615] [PATCH 0/9] Add 32-bit powerpc support Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 1/9] gnu: bootstrap: Add support for powerpc-linux Efraim Flashner
2021-04-14  3:51   ` bug#47615: " Chris Marusich
2021-04-14  7:36     ` Vincent Legoll
2021-04-14 13:56       ` [bug#47615] " Efraim Flashner
2021-05-05  1:52     ` bug#47615: " Chris Marusich
2021-05-05  8:51       ` Efraim Flashner
2021-05-06 16:35       ` Ludovic Courtès
2021-04-06 12:32 ` [bug#47615] [PATCH 2/9] gnu: guile-3.0: Fix building on powerpc-linux Efraim Flashner
2021-04-14  4:00   ` bug#47615: " Chris Marusich
2021-04-14 14:00     ` Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 3/9] gnu: binutils: Adjust test suite " Efraim Flashner
2021-04-17 19:51   ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Chris Marusich
2021-04-17 20:02     ` bug#47615: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux Chris Marusich
2021-04-18  9:23     ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Efraim Flashner
2021-04-22  5:11       ` bug#47615: [PATCH 3/9] gnu: binutils: Adjust test suite on powerpc-linux Chris Marusich
2021-04-27  7:01         ` [bug#47615] " Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 4/9] gnu: mesa: Add support for powerpc-linux Efraim Flashner
2021-04-06 19:29   ` Efraim Flashner
2021-04-06 12:32 ` [PATCH 5/9] gnu: Add mac-fdisk Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 6/9] gnu: american-fuzzy-lop: Add support for powerpc-linux Efraim Flashner
2021-04-14  3:25   ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Chris Marusich
2021-04-06 12:32 ` [bug#47615] [PATCH 7/9] build: qemu-command: Add support for powerpc Efraim Flashner
2021-04-06 17:02   ` Vincent Legoll
2021-04-06 19:17     ` Efraim Flashner
2021-04-06 22:27       ` Vincent Legoll
2021-04-06 12:32 ` [PATCH 8/9] gnu: mercurial: Skip tests on powerpc-linux Efraim Flashner
2021-04-06 12:32 ` [bug#47615] [PATCH 9/9] gnu: nss: " Efraim Flashner
2021-04-06 17:00   ` Vincent Legoll
2021-04-06 19:18     ` Efraim Flashner
2021-04-06 22:31       ` Vincent Legoll
2021-04-07 20:33 ` [PATCH 0/9] Add 32-bit powerpc support Vincent Legoll
2021-04-08  7:00   ` Efraim Flashner
2021-04-17 16:04 ` Ludovic Courtès
2021-04-17 16:51   ` Vincent Legoll
2021-04-17 19:42   ` Efraim Flashner
2021-04-17 20:07     ` Vincent Legoll
2021-05-06 14:38     ` bug#47615: " Ludovic Courtès
2021-05-10  8:20       ` Efraim Flashner
2021-05-11 20:24         ` Ludovic Courtès
2021-05-24  9:51           ` Efraim Flashner
2021-05-26 14:09             ` Ludovic Courtès
2021-05-31 10:23               ` Tobias Platen
2021-04-22  7:59 ` [bug#47615] [PATCH v2 00/12] " Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 01/12] gnu: bootstrap: Add support for powerpc-linux Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 02/12] gnu: guile-3.0: Fix building on powerpc-linux Efraim Flashner
2021-05-06 14:45     ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-05-10  8:01       ` Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 03/12] gnu: gcc-boot0: Use 128-bit long-double on powerpc-linux Efraim Flashner
2021-04-22  7:59   ` Efraim Flashner [this message]
2021-04-22  7:59   ` [PATCH v2 05/12] gnu: mesa: Add support for powerpc-linux Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 06/12] gnu: Add mac-fdisk Efraim Flashner
2021-05-06 14:48     ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-05-06 15:48       ` [bug#47615] " Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 07/12] gnu: american-fuzzy-lop: Add support for powerpc-linux Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 08/12] build: qemu-command: Add support for powerpc Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 09/12] gnu: mercurial: Skip tests on powerpc-linux Efraim Flashner
2021-04-22 16:41     ` [bug#47615] " Maxime Devos
2021-05-06 14:51       ` bug#47615: [PATCH 0/9] Add 32-bit powerpc support Ludovic Courtès
2021-04-22  7:59   ` [PATCH v2 10/12] gnu: nss: Skip tests on powerpc-linux Efraim Flashner
2021-04-22  7:59   ` [PATCH v2 11/12] gnu: zstd: Adjust test suite for 32-bit architectures Efraim Flashner
2021-04-22  7:59   ` [bug#47615] [PATCH v2 12/12] gnu: glib: Disable failing test Efraim Flashner
2021-05-04 15:50   ` [PATCH v2 00/12] Add 32-bit powerpc support Efraim Flashner
2021-05-24  9:54 ` bug#47615: [PATCH 0/9] " Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8909225203d17a2244756f1a4602d4b66c68c96.1619076704.git.efraim@flashner.co.il \
    --to=efraim@flashner.co.il \
    --cc=47615@debbugs.gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.