From 7db01153a2bdf47bfe4508f3e134cb3717acf9c2 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 2 Jan 2017 15:15:42 -0500 Subject: [PATCH] add patch fixing broken microblaze gcc on 32-bit hosts bogus use PRIx64 with unsigned long (assumption of 64-bit host) in gcc. older gcc versions are also affected, I think, but not yet fixed. --- .../gcc-6.3.0/0013-microblaze-pr65649.diff | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 patches/gcc-6.3.0/0013-microblaze-pr65649.diff diff --git a/patches/gcc-6.3.0/0013-microblaze-pr65649.diff b/patches/gcc-6.3.0/0013-microblaze-pr65649.diff new file mode 100644 index 0000000..5604485 --- /dev/null +++ b/patches/gcc-6.3.0/0013-microblaze-pr65649.diff @@ -0,0 +1,20 @@ +--- gcc-6.3.0/gcc/config/microblaze/microblaze.c.orig 2017-01-02 15:07:18.924082703 -0500 ++++ gcc-6.3.0/gcc/config/microblaze/microblaze.c 2017-01-02 15:08:06.362438573 -0500 +@@ -2364,7 +2364,7 @@ + unsigned long value_long; + REAL_VALUE_TO_TARGET_SINGLE (*CONST_DOUBLE_REAL_VALUE (op), + value_long); +- fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long); ++ fprintf (file, "0x%lx", value_long); + } + else + { +@@ -2423,7 +2423,7 @@ + print_operand_address (file, XEXP (op, 0)); + } + else if (letter == 'm') +- fprintf (file, HOST_WIDE_INT_PRINT_DEC, (1L << INTVAL (op))); ++ fprintf (file, "%ld", (1L << INTVAL (op))); + else + output_addr_const (file, op); + }