m68k: add the real gcc bugfix from upstream
PATCH 1/1 m68k: add the real gcc bugfix from upstream
--- package/gcc/4.9.4/0002-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/4.9.4/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/5.5.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/5.5.0/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/6.4.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/6.4.0/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/7.3.0/0891-fix-m68k-uclinux.patch | 30 -------------- 8 files changed, 192 insertions(+), 84 deletions(-) create mode 100644 package/gcc/4.9.4/0002-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/4.9.4/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/5.5.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/5.5.0/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/6.4.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/6.4.0/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/7.3.0/0891-fix-m68k-uclinux.patch
package/gcc/4.9.4/0002-m68k-coldfire-pr68467.patch new file +16 -0
@@ -0,0 +1,48 @@ +Backport from upstream, see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +diff -Nur gcc-4.9.4.orig/gcc/config/m68k/m68k.c gcc-4.9.4/gcc/config/m68k/m68k.c +--- gcc-4.9.4.orig/gcc/config/m68k/m68k.c 2014-02-27 12:10:55.000000000 +0100 ++++ gcc-4.9.4/gcc/config/m68k/m68k.c 2018-02-17 21:28:53.430538916 +0100 +@@ -166,6 +166,8 @@ + const_tree, bool); + static bool m68k_cannot_force_const_mem (enum 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; +
+ /* Initialize the GCC target structure. */
+@@ -308,6 +310,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,
+@@ -6527,4 +6532,20 @@
+ == m68k_fk_interrupt_handler));
+ }
+
++/* 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"
package/gcc/4.9.4/891-fix-m68k-uclinux.patch deleted +0 -18
@@ -1,18 +0,0 @@ -avoids internal compiler error while compiling linux-atomic.c -See here: -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 - -Signed-off-by: Waldemar Brodkorb <[email protected]> - -diff -Nur gcc-4.9.3.orig/libgcc/config.host gcc-4.9.3/libgcc/config.host ---- gcc-4.9.3.orig/libgcc/config.host 2014-03-27 16:40:31.000000000 +0100 -+++ gcc-4.9.3/libgcc/config.host 2016-04-05 16:20:53.422809885 +0200 -@@ -750,7 +750,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
package/gcc/5.5.0/0001-m68k-coldfire-pr68467.patch new file +16 -0
@@ -0,0 +1,48 @@ +Backport from upstream, see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +diff -Nur gcc-5.5.0.orig/gcc/config/m68k/m68k.c gcc-5.5.0/gcc/config/m68k/m68k.c +--- gcc-5.5.0.orig/gcc/config/m68k/m68k.c 2015-01-15 14:28:42.000000000 +0100 ++++ gcc-5.5.0/gcc/config/m68k/m68k.c 2018-02-17 19:34:33.146309632 +0100 +@@ -196,6 +196,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; +
+ /* Initialize the GCC target structure. */
+@@ -338,6 +340,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,
+@@ -6548,4 +6553,20 @@
+ == m68k_fk_interrupt_handler));
+ }
+
++/* 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"
package/gcc/5.5.0/891-fix-m68k-uclinux.patch deleted +0 -18
@@ -1,18 +0,0 @@ -avoids internal compiler error while compiling linux-atomic.c -See here: -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 - -Signed-off-by: Waldemar Brodkorb <[email protected]> - -diff -Nur gcc-5.3.0.orig/libgcc/config.host gcc-5.3.0/libgcc/config.host ---- gcc-5.3.0.orig/libgcc/config.host 2015-10-01 14:01:18.000000000 +0200 -+++ gcc-5.3.0/libgcc/config.host 2016-04-26 21:30:25.353691745 +0200 -@@ -794,7 +794,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
package/gcc/6.4.0/0001-m68k-coldfire-pr68467.patch new file +16 -0
@@ -0,0 +1,48 @@ +Backport from upstream, see +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68467 + +Signed-off-by: Waldemar Brodkorb <[email protected]> + +diff -Nur gcc-6.4.0.orig/gcc/config/m68k/m68k.c gcc-6.4.0/gcc/config/m68k/m68k.c +--- gcc-6.4.0.orig/gcc/config/m68k/m68k.c 2016-01-04 15:30:50.652828000 +0100 ++++ gcc-6.4.0/gcc/config/m68k/m68k.c 2018-02-17 19:08:16.313168186 +0100 +@@ -180,6 +180,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; +
+ /* Initialize the GCC target structure. */
+@@ -322,6 +324,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,
+@@ -6524,4 +6529,20 @@
+ == m68k_fk_interrupt_handler));
+ }
+
++/* 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"
package/gcc/6.4.0/891-fix-m68k-uclinux.patch deleted +0 -18
@@ -1,18 +0,0 @@ -avoids internal compiler error while compiling linux-atomic.c -See here: -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 - -Signed-off-by: Waldemar Brodkorb <[email protected]> - -diff -Nur gcc-6.1.0.orig/libgcc/config.host gcc-6.1.0/libgcc/config.host ---- gcc-6.1.0.orig/libgcc/config.host 2016-02-26 21:02:28.000000000 +0100 -+++ gcc-6.1.0/libgcc/config.host 2016-04-29 09:18:40.377989160 +0200 -@@ -812,7 +812,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
package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch new file +48 -0
48 lines not on this page · raw message
package/gcc/7.3.0/0891-fix-m68k-uclinux.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From c2773170a1b0e2728f71f2275a99fd177ba2cef4 Mon Sep 17 00:00:00 2001 -From: Romain Naour <[email protected]> -Date: Tue, 2 May 2017 23:25:17 +0200 -Subject: [PATCH] fix m68k uclinux avoids internal compiler error while - compiling linux-atomic.c See here: - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53833 - -Signed-off-by: Waldemar Brodkorb <[email protected]> -[Romain: convert to git patch] -Signed-off-by: Romain Naour <[email protected]> ---- - libgcc/config.host | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libgcc/config.host b/libgcc/config.host -index b279a64..04fe183 100644 ---- a/libgcc/config.host -+++ b/libgcc/config.host -@@ -820,7 +820,7 @@ m68k*-*-netbsdelf*) - 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 --- -2.9.3 -
Signature · 1 line
2.1.4
PATCH 1/1 m68k: add the real gcc bugfix from upstream
Hello,
Quoted 1 line · Waldemar Brodkorb
Signed-off-by Waldemar Brodkorb <[email protected]>
Thanks for following up on this! Do you consider this a change for "master" or for "next" ?
It's a gcc change, so I would tend to be careful and take this only for the next branch. However, it's touching only m68k, so it's not like an issue is really going to affect a huge number of users.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering http://bootlin.com
PATCH 1/1 m68k: add the real gcc bugfix from upstream
Hi Thomas,
Thomas Petazzoni wrote,
Quoted 7 lines
Hello,
Quoted 1 line · Waldemar Brodkorb
Signed-off-by Waldemar Brodkorb <[email protected]>Thanks for following up on this! Do you consider this a change for "master" or for "next" ?
I think it might be safer to use it for next.
Quoted 3 lines
It's a gcc change, so I would tend to be careful and take this only for the next branch. However, it's touching only m68k, so it's not like an issue is really going to affect a huge number of users.
Better we first see how it influences the autobuilders.
A backport might be possible later, if Peter's time permits it.
I started to use 4 digits patches, may be we should do it for the existing patches?
best regards
Waldemar
Thomas Petazzoni
AppliedPATCH 1/1 m68k: add the real gcc bugfix from upstream
In reply to Waldemar BrodkorbHello,
Quoted 11 lines · Waldemar Brodkorb
Signed-off-by Waldemar Brodkorb <[email protected]>--- package/gcc/4.9.4/0002-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/4.9.4/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/5.5.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/5.5.0/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/6.4.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/6.4.0/891-fix-m68k-uclinux.patch | 18 -------- package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch | 48 ++++++++++++++++++++++ package/gcc/7.3.0/0891-fix-m68k-uclinux.patch | 30 -------------- 8 files changed, 192 insertions(+), 84 deletions(-)
Quoted 8 lines
create mode 100644 package/gcc/4.9.4/0002-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/4.9.4/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/5.5.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/5.5.0/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/6.4.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/6.4.0/891-fix-m68k-uclinux.patch create mode 100644 package/gcc/7.3.0/0001-m68k-coldfire-pr68467.patch delete mode 100644 package/gcc/7.3.0/0891-fix-m68k-uclinux.patch
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com