Merge pull request #131 from olerem/gcc-2017.06.25
authorAdrian Chadd <adrian.chadd@gmail.com>
Sun, 25 Jun 2017 18:55:59 +0000 (11:55 -0700)
committerGitHub <noreply@github.com>
Sun, 25 Jun 2017 18:55:59 +0000 (11:55 -0700)
Gcc 2017.06.25

Makefile
local/patches/gcc-6.3.0_fixup.patch [new file with mode: 0644]

index a383ae67119afa8a6028557f7f8cb197aaff11a2..9469c40deeb473e1998613672ff54abf1e5705be 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,12 +23,12 @@ BINUTILS_DIR=binutils-$(BINUTILS_VER)
 BINUTILS_PATCHES=local/patches/binutils.patch local/patches/binutils-2.27_fixup.patch
 BINUTILS_SUM=369737ce51587f92466041a97ab7d2358c6d9e1b6490b3940eb09fb0a9a6ac88
 
-GCC_VER=6.2.0
+GCC_VER=6.3.0
 GCC_URL=https://ftp.gnu.org/gnu/gcc/gcc-$(GCC_VER)/gcc-$(GCC_VER).tar.bz2
 GCC_TAR=gcc-$(GCC_VER).tar.bz2
 GCC_DIR=gcc-$(GCC_VER)
-GCC_PATCHES=local/patches/gcc.patch
-GCC_SUM=9944589fc722d3e66308c0ce5257788ebd7872982a718aa2516123940671b7c5
+GCC_PATCHES=local/patches/gcc.patch local/patches/gcc-6.3.0_fixup.patch
+GCC_SUM=f06ae7f3f790fbf0f018f6d40e844451e6bc3b7bc96e128e63b09825c1f8b29f
 
 BASEDIR=$(shell pwd)
 TOOLCHAIN_DIR=$(BASEDIR)/toolchain
diff --git a/local/patches/gcc-6.3.0_fixup.patch b/local/patches/gcc-6.3.0_fixup.patch
new file mode 100644 (file)
index 0000000..681c0ee
--- /dev/null
@@ -0,0 +1,49 @@
+diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c
+index 015dd1049fb..df80ad9117e 100644
+--- a/gcc/config/xtensa/xtensa.c
++++ b/gcc/config/xtensa/xtensa.c
+@@ -1780,7 +1780,8 @@ xtensa_emit_call (int callop, rtx *operands)
+   rtx tgt = operands[callop];
+   if (GET_CODE (tgt) == CONST_INT)
+-    sprintf (result, "call%d\t0x%lx", WINDOW_SIZE, INTVAL (tgt));
++    sprintf (result, "call%d\t" HOST_WIDE_INT_PRINT_HEX,
++           WINDOW_SIZE, INTVAL (tgt));
+   else if (register_operand (tgt, VOIDmode))
+     sprintf (result, "callx%d\t%%%d", WINDOW_SIZE, callop);
+   else
+@@ -2351,14 +2352,14 @@ print_operand (FILE *file, rtx x, int letter)
+     case 'L':
+       if (GET_CODE (x) == CONST_INT)
+-      fprintf (file, "%ld", (32 - INTVAL (x)) & 0x1f);
++      fprintf (file, HOST_WIDE_INT_PRINT_DEC, (32 - INTVAL (x)) & 0x1f);
+       else
+       output_operand_lossage ("invalid %%L value");
+       break;
+     case 'R':
+       if (GET_CODE (x) == CONST_INT)
+-      fprintf (file, "%ld", INTVAL (x) & 0x1f);
++      fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x) & 0x1f);
+       else
+       output_operand_lossage ("invalid %%R value");
+       break;
+@@ -2372,7 +2373,7 @@ print_operand (FILE *file, rtx x, int letter)
+     case 'd':
+       if (GET_CODE (x) == CONST_INT)
+-      fprintf (file, "%ld", INTVAL (x));
++      fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+       else
+       output_operand_lossage ("invalid %%d value");
+       break;
+@@ -2437,7 +2438,7 @@ print_operand (FILE *file, rtx x, int letter)
+       else if (GET_CODE (x) == MEM)
+       output_address (GET_MODE (x), XEXP (x, 0));
+       else if (GET_CODE (x) == CONST_INT)
+-      fprintf (file, "%ld", INTVAL (x));
++      fprintf (file, HOST_WIDE_INT_PRINT_DEC, INTVAL (x));
+       else
+       output_addr_const (file, x);
+     }