diff options
Diffstat (limited to 'patches/gcc/4.9.4')
3 files changed, 113 insertions, 0 deletions
diff --git a/patches/gcc/4.9.4/1100-msp430-string-literals.patch b/patches/gcc/4.9.4/1100-msp430-string-literals.patch new file mode 100644 index 0000000..346842e --- /dev/null +++ b/patches/gcc/4.9.4/1100-msp430-string-literals.patch @@ -0,0 +1,27 @@ +commit 9d247a3d78b97c004e7ca5e7d6cc9964dba870c7 +Author: jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Wed May 13 01:11:13 2015 +0000 + + gcc/ + * config/mmix/mmix.c, config/msp430/msp430.c: Add space between + string literal and macro name. + gcc/ada/ + * sigtramp-vxworks.c: Add space between string literal and macro + name. + + git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223106 138bc75d-0d04-0410-961f-82ee72b054a4 + +[4.9 change: remove non-applicable parts of the patch] +diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c +index bec168ca2ae..58d0efea1de 100644 +--- a/gcc/config/msp430/msp430.c ++++ b/gcc/config/msp430/msp430.c +@@ -2248,7 +2248,7 @@ static struct + } + const_shift_helpers[] = + { +-#define CSH(N,C,X,G) { "__mspabi_"N, C, X, gen_##G } ++#define CSH(N,C,X,G) { "__mspabi_" N, C, X, gen_##G } + + CSH ("slli", 1, 1, slli_1), + CSH ("slll", 1, 1, slll_1), diff --git a/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch b/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch new file mode 100644 index 0000000..93f6e94 --- /dev/null +++ b/patches/gcc/4.9.4/111-alpha-bad-eh_frame.patch @@ -0,0 +1,13 @@ +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80037 + +diff --git a/libgcc/config/alpha/t-alpha b/libgcc/config/alpha/t-alpha +index 0b6ffb1..0c2f840 100644 +--- a/libgcc/config/alpha/t-alpha ++++ b/libgcc/config/alpha/t-alpha +@@ -1,2 +1,6 @@ + # This is a support routine for longlong.h, used by libgcc2.c. + LIB2ADD += $(srcdir)/config/alpha/qrnnd.S ++ ++# When GAS-generated unwind tables are created, they get created ++# after the __FRAME_END__ terminator, which causes an ld error. ++CRTSTUFF_T_CFLAGS = -fno-unwind-tables diff --git a/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch b/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch new file mode 100644 index 0000000..052ffc3 --- /dev/null +++ b/patches/gcc/4.9.4/875-gcc-xtensa-fix-fprintf-format-specifiers.patch @@ -0,0 +1,73 @@ +From 0f32ae7bc51725cd500e2877b571fd914d77852e Mon Sep 17 00:00:00 2001 +From: Max Filippov <jcmvbkbc@gmail.com> +Date: Sun, 28 May 2017 19:56:56 -0700 +Subject: [PATCH] gcc: xtensa: fix fprintf format specifiers + +HOST_WIDE_INT may not be long as assumed in print_operand and +xtensa_emit_call. Use HOST_WIDE_INT_PRINT_DEC/HOST_WIDE_INT_PRINT_HEX +format strings instead of %ld/0x%lx. This fixes incorrect assembly code +generation by the compiler running on armhf host. + +2017-05-28 Max Filippov <jcmvbkbc@gmail.com> +gcc/ + * config/xtensa/xtensa.c (xtensa_emit_call): Use + HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string. + (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld + format string. + +Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> +--- + gcc/config/xtensa/xtensa.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/gcc/config/xtensa/xtensa.c b/gcc/config/xtensa/xtensa.c +index d8c8298..3c00961 100644 +--- a/gcc/config/xtensa/xtensa.c ++++ b/gcc/config/xtensa/xtensa.c +@@ -1785,7 +1785,7 @@ xtensa_emit_call (int callop, rtx *operands) + rtx tgt = operands[callop]; + + if (GET_CODE (tgt) == CONST_INT) +- sprintf (result, "call8\t0x%lx", INTVAL (tgt)); ++ sprintf (result, "call8\t" HOST_WIDE_INT_PRINT_HEX, INTVAL (tgt)); + else if (register_operand (tgt, VOIDmode)) + sprintf (result, "callx8\t%%%d", callop); + else +@@ -2360,14 +2360,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; +@@ -2381,7 +2381,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; +@@ -2450,7 +2450,7 @@ print_operand (FILE *file, rtx x, int letter) + else if (GET_CODE (x) == MEM) + output_address (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); + } +-- +2.1.4 + |