summaryrefslogtreecommitdiff
path: root/toolchain/gcc
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2017-01-05 06:20:00 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2017-01-05 06:26:08 +0100
commit4cc07dabb76d0a66632a32771f885decbaf0252e (patch)
treec76807d55e2efaee4fad5ed33714496fcb670349 /toolchain/gcc
parent028fb64dd208be17cd8e6a35e24979c601d9fa18 (diff)
gcc: fix microblaze compile on 32bit host
Diffstat (limited to 'toolchain/gcc')
-rw-r--r--toolchain/gcc/patches/5.4.0/microblaze-32bithost.patch24
-rw-r--r--toolchain/gcc/patches/6.3.0/microblaze-32bithost.patch24
2 files changed, 48 insertions, 0 deletions
diff --git a/toolchain/gcc/patches/5.4.0/microblaze-32bithost.patch b/toolchain/gcc/patches/5.4.0/microblaze-32bithost.patch
new file mode 100644
index 000000000..9235a2113
--- /dev/null
+++ b/toolchain/gcc/patches/5.4.0/microblaze-32bithost.patch
@@ -0,0 +1,24 @@
+From:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65649
+
+diff -Nur gcc-5.4.0.orig/gcc/config/microblaze/microblaze.c gcc-5.4.0/gcc/config/microblaze/microblaze.c
+--- gcc-5.4.0.orig/gcc/config/microblaze/microblaze.c 2015-01-15 14:28:42.000000000 +0100
++++ gcc-5.4.0/gcc/config/microblaze/microblaze.c 2017-01-03 19:23:38.585074457 +0100
+@@ -2404,7 +2404,7 @@
+ REAL_VALUE_TYPE value;
+ REAL_VALUE_FROM_CONST_DOUBLE (value, op);
+ REAL_VALUE_TO_TARGET_SINGLE (value, value_long);
+- fprintf (file, HOST_WIDE_INT_PRINT_HEX, value_long);
++ fprintf (file, "0x%lx", value_long);
+ }
+ else
+ {
+@@ -2463,7 +2463,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);
+ }
diff --git a/toolchain/gcc/patches/6.3.0/microblaze-32bithost.patch b/toolchain/gcc/patches/6.3.0/microblaze-32bithost.patch
new file mode 100644
index 000000000..d257e61b1
--- /dev/null
+++ b/toolchain/gcc/patches/6.3.0/microblaze-32bithost.patch
@@ -0,0 +1,24 @@
+From:
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65649
+
+diff -Nur gcc-6.3.0.orig/gcc/config/microblaze/microblaze.c gcc-6.3.0/gcc/config/microblaze/microblaze.c
+--- gcc-6.3.0.orig/gcc/config/microblaze/microblaze.c 2016-01-21 18:15:52.000000000 +0100
++++ gcc-6.3.0/gcc/config/microblaze/microblaze.c 2017-01-03 21:54:26.462805169 +0100
+@@ -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);
+ }