summaryrefslogtreecommitdiff
path: root/toolchain/gcc/patches
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain/gcc/patches')
-rw-r--r--toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch43
-rw-r--r--toolchain/gcc/patches/7.2.0/m68k-disable-atomic-uclinux.patch12
2 files changed, 43 insertions, 12 deletions
diff --git a/toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch b/toolchain/gcc/patches/7.2.0/m68k-coldfire-pr68467.patch
new file mode 100644
index 000000000..45e9eb0ba
--- /dev/null
+++ b/toolchain/gcc/patches/7.2.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/patches/7.2.0/m68k-disable-atomic-uclinux.patch b/toolchain/gcc/patches/7.2.0/m68k-disable-atomic-uclinux.patch
deleted file mode 100644
index 4ab553218..000000000
--- a/toolchain/gcc/patches/7.2.0/m68k-disable-atomic-uclinux.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nur gcc-4.8.3.orig/libgcc/config.host gcc-4.8.3/libgcc/config.host
---- gcc-4.8.3.orig/libgcc/config.host 2014-03-20 17:12:30.000000000 +0100
-+++ gcc-4.8.3/libgcc/config.host 2014-07-26 13:15:06.359463368 +0200
-@@ -689,7 +689,7 @@
- m68k*-*-openbsd*)
- ;;
- m68k-*-uclinux*) # Motorola m68k/ColdFire running uClinux with uClibc
-- tmake_file="$tmake_file m68k/t-floatlib m68k/t-linux"
-+ tmake_file="$tmake_file m68k/t-floatlib"
- md_unwind_header=m68k/linux-unwind.h
- ;;
- m68k-*-linux*) # Motorola m68k's running GNU/Linux