mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
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.
This commit is contained in:
parent
dc25a9dfa8
commit
62282ff40b
3 changed files with 39 additions and 1 deletions
36
gnu/packages/patches/binutils-libiberty-endianness-bug.patch
Normal file
36
gnu/packages/patches/binutils-libiberty-endianness-bug.patch
Normal file
|
@ -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
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue