summaryrefslogtreecommitdiff
path: root/toolchain/gcc/7.3.0
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc/7.3.0')
-rw-r--r--toolchain/gcc/7.3.0/add-crtreloc.frv12
-rw-r--r--toolchain/gcc/7.3.0/disable-split-stack-nothread.patch10
-rw-r--r--toolchain/gcc/7.3.0/ia64-fix-libgcc.patch17
-rw-r--r--toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch43
-rw-r--r--toolchain/gcc/7.3.0/microblaze.patch23
-rw-r--r--toolchain/gcc/7.3.0/musl-s390x.patch13
-rw-r--r--toolchain/gcc/7.3.0/nios2-softfp.patch14
7 files changed, 132 insertions, 0 deletions
diff --git a/toolchain/gcc/7.3.0/add-crtreloc.frv b/toolchain/gcc/7.3.0/add-crtreloc.frv
new file mode 100644
index 000000000..dce4a0ea0
--- /dev/null
+++ b/toolchain/gcc/7.3.0/add-crtreloc.frv
@@ -0,0 +1,12 @@
+diff -Nur gcc-7.1.0.orig/gcc/config/frv/linux.h gcc-7.1.0/gcc/config/frv/linux.h
+--- gcc-7.1.0.orig/gcc/config/frv/linux.h 2017-01-01 13:07:43.000000000 +0100
++++ gcc-7.1.0/gcc/config/frv/linux.h 2017-06-07 14:52:44.289044131 +0200
+@@ -27,7 +27,7 @@
+
+ #undef STARTFILE_SPEC
+ #define STARTFILE_SPEC \
+- "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
++ "%{!shared: %{pg|p|profile:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} crtreloc.o%s \
+ crti.o%s %{static:crtbeginT.o%s;shared|pie:crtbeginS.o%s;:crtbegin.o%s}"
+
+ #undef ENDFILE_SPEC
diff --git a/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch b/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch
new file mode 100644
index 000000000..0038d7573
--- /dev/null
+++ b/toolchain/gcc/7.3.0/disable-split-stack-nothread.patch
@@ -0,0 +1,10 @@
+diff -Nur gcc-7.1.0.orig/libgcc/config/t-stack gcc-7.1.0/libgcc/config/t-stack
+--- gcc-7.1.0.orig/libgcc/config/t-stack 2010-10-01 21:31:49.000000000 +0200
++++ gcc-7.1.0/libgcc/config/t-stack 2017-06-23 19:55:25.215965555 +0200
+@@ -1,4 +1,6 @@
+ # Makefile fragment to provide generic support for -fsplit-stack.
+ # This should be used in config.host for any host which supports
+ # -fsplit-stack.
++ifeq ($(enable_threads),yes)
+ LIB2ADD_ST += $(srcdir)/generic-morestack.c $(srcdir)/generic-morestack-thread.c
++endif
diff --git a/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch b/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch
new file mode 100644
index 000000000..f1f3c8d2d
--- /dev/null
+++ b/toolchain/gcc/7.3.0/ia64-fix-libgcc.patch
@@ -0,0 +1,17 @@
+diff -Nur gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c gcc-6.3.0/libgcc/config/ia64/fde-glibc.c
+--- gcc-6.3.0.orig/libgcc/config/ia64/fde-glibc.c 2016-01-04 15:30:50.000000000 +0100
++++ gcc-6.3.0/libgcc/config/ia64/fde-glibc.c 2017-03-05 13:07:33.316600613 +0100
+@@ -25,6 +25,8 @@
+ /* Locate the FDE entry for a given address, using glibc ld.so routines
+ to avoid register/deregister calls at DSO load/unload. */
+
++#ifndef inhibit_libc
++
+ #ifndef _GNU_SOURCE
+ #define _GNU_SOURCE 1
+ #endif
+@@ -159,3 +161,4 @@
+
+ return data.ret;
+ }
++#endif
diff --git a/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch b/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch
new file mode 100644
index 000000000..45e9eb0ba
--- /dev/null
+++ b/toolchain/gcc/7.3.0/m68k-coldfire-pr68467.patch
@@ -0,0 +1,43 @@
+diff -Nur gcc-7.2.0.orig/gcc/config/m68k/m68k.c gcc-7.2.0/gcc/config/m68k/m68k.c
+--- gcc-7.2.0.orig/gcc/config/m68k/m68k.c 2017-04-03 22:30:56.274463000 +0000
++++ gcc-7.2.0/gcc/config/m68k/m68k.c 2018-01-27 02:16:53.779367849 +0000
+@@ -182,6 +182,8 @@
+ const_tree, bool);
+ static bool m68k_cannot_force_const_mem (machine_mode mode, rtx x);
+ static bool m68k_output_addr_const_extra (FILE *, rtx);
++static machine_mode m68k_promote_function_mode (const_tree, machine_mode,
++ int *, const_tree, int);
+ static void m68k_init_sync_libfuncs (void) ATTRIBUTE_UNUSED;
+ static enum flt_eval_method
+ m68k_excess_precision (enum excess_precision_type);
+@@ -332,6 +334,9 @@
+ #undef TARGET_ATOMIC_TEST_AND_SET_TRUEVAL
+ #define TARGET_ATOMIC_TEST_AND_SET_TRUEVAL 128
+
++#undef TARGET_PROMOTE_FUNCTION_MODE
++#define TARGET_PROMOTE_FUNCTION_MODE m68k_promote_function_mode
++
+ static const struct attribute_spec m68k_attribute_table[] =
+ {
+ /* { name, min_len, max_len, decl_req, type_req, fn_type_req, handler,
+@@ -6571,4 +6576,20 @@
+ return FLT_EVAL_METHOD_UNPREDICTABLE;
+ }
+
++/* Implement TARGET_PROMOTE_FUNCTION_MODE. */
++
++static machine_mode
++m68k_promote_function_mode (const_tree type, machine_mode mode,
++ int *punsignedp ATTRIBUTE_UNUSED,
++ const_tree fntype ATTRIBUTE_UNUSED,
++ int for_return)
++{
++ /* Promote libcall arguments narrower than int to match the normal C
++ ABI (for which promotions are handled via
++ TARGET_PROMOTE_PROTOTYPES). */
++ if (type == NULL_TREE && !for_return && (mode == QImode || mode == HImode))
++ return SImode;
++ return mode;
++}
++
+ #include "gt-m68k.h"
diff --git a/toolchain/gcc/7.3.0/microblaze.patch b/toolchain/gcc/7.3.0/microblaze.patch
new file mode 100644
index 000000000..eb6c08492
--- /dev/null
+++ b/toolchain/gcc/7.3.0/microblaze.patch
@@ -0,0 +1,23 @@
+revert 6dcad60c0ef48af584395a40feeb256fb82986a8
+as it breaks any userland in qemu
+
+diff -Nur gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h gcc-6.3.0/gcc/config/microblaze/microblaze.h
+--- gcc-6.3.0.orig/gcc/config/microblaze/microblaze.h 2016-01-21 18:10:54.000000000 +0100
++++ gcc-6.3.0/gcc/config/microblaze/microblaze.h 2017-05-26 18:33:31.297534916 +0200
+@@ -253,14 +253,14 @@
+ #define FIXED_REGISTERS \
+ { \
+ 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, \
+- 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1, 1, 1 \
+ }
+
+ #define CALL_USED_REGISTERS \
+ { \
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+- 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
++ 1, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
+ 1, 1, 1, 1 \
+ }
+ #define GP_REG_FIRST 0
diff --git a/toolchain/gcc/7.3.0/musl-s390x.patch b/toolchain/gcc/7.3.0/musl-s390x.patch
new file mode 100644
index 000000000..1163bdbf4
--- /dev/null
+++ b/toolchain/gcc/7.3.0/musl-s390x.patch
@@ -0,0 +1,13 @@
+diff -Nur gcc-7.2.0.orig/gcc/config/s390/linux.h gcc-7.2.0/gcc/config/s390/linux.h
+--- gcc-7.2.0.orig/gcc/config/s390/linux.h 2017-02-06 11:25:05.513198000 +0100
++++ gcc-7.2.0/gcc/config/s390/linux.h 2017-10-30 13:22:45.348170100 +0100
+@@ -76,6 +76,9 @@
+ #define GLIBC_DYNAMIC_LINKER32 "/lib/ld.so.1"
+ #define GLIBC_DYNAMIC_LINKER64 "/lib/ld64.so.1"
+
++#define MUSL_DYNAMIC_LINKER32 "/lib/ld-musl-s390.so.1"
++#define MUSL_DYNAMIC_LINKER64 "/lib/ld-musl-s390x.so.1"
++
+ #undef LINK_SPEC
+ #define LINK_SPEC \
+ "%{m31:-m elf_s390}%{m64:-m elf64_s390} \
diff --git a/toolchain/gcc/7.3.0/nios2-softfp.patch b/toolchain/gcc/7.3.0/nios2-softfp.patch
new file mode 100644
index 000000000..c677c6c2f
--- /dev/null
+++ b/toolchain/gcc/7.3.0/nios2-softfp.patch
@@ -0,0 +1,14 @@
+diff -Nur gcc-6.2.0.orig/libgcc/config.host gcc-6.2.0/libgcc/config.host
+--- gcc-6.2.0.orig/libgcc/config.host 2016-05-17 08:15:52.000000000 +0200
++++ gcc-6.2.0/libgcc/config.host 2016-10-15 14:42:53.971919904 +0200
+@@ -962,6 +962,10 @@
+ ;;
+ esac
+ ;;
++nios2-*-linux-uclibc*)
++ tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc t-softfp-sfdf t-softfp"
++ md_unwind_header=nios2/linux-unwind.h
++ ;;
+ nios2-*-linux*)
+ tmake_file="$tmake_file nios2/t-nios2 nios2/t-linux t-libgcc-pic t-slibgcc-libgcc"
+ md_unwind_header=nios2/linux-unwind.h