[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#640035: possible patches



tags 638603 + patch
tags 635918 + patch
thanks

The attached patch for gcc-4.4 lets it compile past the stage
where it aborted previously. Both attached patches compile
cleanly on amd64; whether m68k will succeed is pretty certain
but can only be told in 1/2 (gcc) or three to four (gcj) days.

(The gcc build has just started stage3, and I’m starting a
gcj build on another machine right now.)

The gcj-4.4 patch is the same as the gcc-4.4 patch, just
rebased for gcj. It fixes #635918 as well.
A fix for gcc-4.6 (#639303) might be similar in nature.

bye,
//mirabilos
-- 
I believe no one can invent an algorithm. One just happens to hit upon it
when God enlightens him. Or only God invents algorithms, we merely copy them.
If you don't believe in God, just consider God as Nature if you won't deny
existence.		-- Coywolf Qi Hunt
diff -u gcc-4.4-4.4.6/debian/rules2 gcc-4.4-4.4.6/debian/rules2
--- gcc-4.4-4.4.6/debian/rules2
+++ gcc-4.4-4.4.6/debian/rules2
@@ -365,6 +365,10 @@
   CONFARGS += --with-multilib-list=m4,m4-nofpu --with-cpu=sh4
 endif
 
+ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
+  CONFARGS += --disable-multilib
+endif
+
 ifeq ($(DEB_TARGET_ARCH_OS),linux)
   ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
     ifeq ($(DEB_TARGET_ARCH),alpha)
diff -u gcc-4.4-4.4.6/debian/rules.patch gcc-4.4-4.4.6/debian/rules.patch
--- gcc-4.4-4.4.6/debian/rules.patch
+++ gcc-4.4-4.4.6/debian/rules.patch
@@ -251,6 +251,7 @@
   debian_patches += pr46179
   debian_patches += pr39531
   debian_patches += pr41064
+  debian_patches += pr47908
 endif
 
 ifeq ($(DEB_TARGET_ARCH),powerpcspe)
diff -u gcc-4.4-4.4.6/debian/changelog gcc-4.4-4.4.6/debian/changelog
--- gcc-4.4-4.4.6/debian/changelog
+++ gcc-4.4-4.4.6/debian/changelog
@@ -1,3 +1,10 @@
+gcc-4.4 (4.4.6-10+m68k.1) unreleased; urgency=low
+
+  * [m68k] Disable multilib, it FTBFS. (Closes: #638603)
+  * debian/patches/pr47908.diff: Fix ICE on m68k. (Closes: #635918)
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 01 Sep 2011 20:31:52 +0000
+
 gcc-4.4 (4.4.6-10) unstable; urgency=low
 
   * Fix non-biarch multiarch builds.
only in patch2:
unchanged:
--- gcc-4.4-4.4.6.orig/debian/patches/pr47908.diff
+++ gcc-4.4-4.4.6/debian/patches/pr47908.diff
@@ -0,0 +1,51 @@
+# DP: Fix PR target/47908 with Attachment #24863 from Mikael Pettersson
+# DP: A fix is already included with gcc-4.6 MAIN.
+
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k-protos.h
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k-protos.h	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k-protos.h	2011-09-01 20:22:07.000000000 +0000
+@@ -96,6 +96,7 @@
+ extern bool m68k_use_return_insn (void);
+ extern void m68k_expand_epilogue (bool);
+ extern void override_options (void);
++extern void optimization_options (int, int);
+ extern const char *m68k_cpp_cpu_ident (const char *);
+ extern const char *m68k_cpp_cpu_family (const char *);
+ extern void init_68881_table (void);
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.c
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k.c	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.c	2011-09-01 20:22:07.000000000 +0000
+@@ -729,6 +729,17 @@
+     }
+ }
+ 
++void
++optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
++{
++  if (m68k_sched_cpu == CPU_UNKNOWN)
++    {
++      flag_schedule_insns = 0;
++      flag_schedule_insns_after_reload = 0;
++      flag_modulo_sched = 0;
++    }
++}
++
+ /* Generate a macro of the form __mPREFIX_cpu_NAME, where PREFIX is the
+    given argument and NAME is the argument passed to -mcpu.  Return NULL
+    if -mcpu was not passed.  */
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.h
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k.h	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.h	2011-09-01 20:22:07.000000000 +0000
+@@ -274,6 +274,9 @@
+ 
+ #define OVERRIDE_OPTIONS   override_options()
+ 
++#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
++  optimization_options ((LEVEL), (SIZE))
++
+ /* These are meant to be redefined in the host dependent files */
+ #define SUBTARGET_OVERRIDE_OPTIONS
+ 
diff -u gcj-4.4-4.4.6/debian/rules2 gcj-4.4-4.4.6/debian/rules2
--- gcj-4.4-4.4.6/debian/rules2
+++ gcj-4.4-4.4.6/debian/rules2
@@ -365,6 +365,10 @@
   CONFARGS += --with-multilib-list=m4,m4-nofpu --with-cpu=sh4
 endif
 
+ifneq (,$(findstring m68k-linux,$(DEB_TARGET_GNU_TYPE)))
+  CONFARGS += --disable-multilib
+endif
+
 ifeq ($(DEB_TARGET_ARCH_OS),linux)
   ifneq (,$(findstring $(DEB_TARGET_ARCH), alpha powerpc ppc64 s390 s390x sparc sparc64))
     ifeq ($(DEB_TARGET_ARCH),alpha)
diff -u gcj-4.4-4.4.6/debian/rules.patch gcj-4.4-4.4.6/debian/rules.patch
--- gcj-4.4-4.4.6/debian/rules.patch
+++ gcj-4.4-4.4.6/debian/rules.patch
@@ -251,6 +251,7 @@
   debian_patches += pr46179
   debian_patches += pr39531
   debian_patches += pr41064
+  debian_patches += pr47908
 endif
 
 ifeq ($(DEB_TARGET_ARCH),powerpcspe)
diff -u gcj-4.4-4.4.6/debian/changelog gcj-4.4-4.4.6/debian/changelog
--- gcj-4.4-4.4.6/debian/changelog
+++ gcj-4.4-4.4.6/debian/changelog
@@ -1,3 +1,16 @@
+gcj-4.4 (4.4.6-10+m68k.1) unreleased; urgency=low
+
+  * Upload as gcj-4.4. (Closes: #640035)
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Fri, 02 Sep 2011 19:33:33 +0000
+
+gcc-4.4 (4.4.6-10+m68k.1) unreleased; urgency=low
+
+  * [m68k] Disable multilib, it FTBFS. (Closes: #638603)
+  * debian/patches/pr47908.diff: Fix ICE on m68k. (Closes: #635918)
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 01 Sep 2011 20:31:52 +0000
+
 gcj-4.4 (4.4.6-10) unstable; urgency=low
 
   * Fix non-biarch multiarch builds.
only in patch2:
unchanged:
--- gcj-4.4-4.4.6.orig/debian/patches/pr47908.diff
+++ gcj-4.4-4.4.6/debian/patches/pr47908.diff
@@ -0,0 +1,51 @@
+# DP: Fix PR target/47908 with Attachment #24863 from Mikael Pettersson
+# DP: A fix is already included with gcc-4.6 MAIN.
+
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k-protos.h
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k-protos.h	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k-protos.h	2011-09-01 20:22:07.000000000 +0000
+@@ -96,6 +96,7 @@
+ extern bool m68k_use_return_insn (void);
+ extern void m68k_expand_epilogue (bool);
+ extern void override_options (void);
++extern void optimization_options (int, int);
+ extern const char *m68k_cpp_cpu_ident (const char *);
+ extern const char *m68k_cpp_cpu_family (const char *);
+ extern void init_68881_table (void);
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.c
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k.c	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.c	2011-09-01 20:22:07.000000000 +0000
+@@ -729,6 +729,17 @@
+     }
+ }
+ 
++void
++optimization_options (int level ATTRIBUTE_UNUSED, int size ATTRIBUTE_UNUSED)
++{
++  if (m68k_sched_cpu == CPU_UNKNOWN)
++    {
++      flag_schedule_insns = 0;
++      flag_schedule_insns_after_reload = 0;
++      flag_modulo_sched = 0;
++    }
++}
++
+ /* Generate a macro of the form __mPREFIX_cpu_NAME, where PREFIX is the
+    given argument and NAME is the argument passed to -mcpu.  Return NULL
+    if -mcpu was not passed.  */
+Index: gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.h
+===================================================================
+--- gcc-4.4-4.4.6.orig/src/gcc/config/m68k/m68k.h	2011-09-01 19:57:54.000000000 +0000
++++ gcc-4.4-4.4.6/src/gcc/config/m68k/m68k.h	2011-09-01 20:22:07.000000000 +0000
+@@ -274,6 +274,9 @@
+ 
+ #define OVERRIDE_OPTIONS   override_options()
+ 
++#define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \
++  optimization_options ((LEVEL), (SIZE))
++
+ /* These are meant to be redefined in the host dependent files */
+ #define SUBTARGET_OVERRIDE_OPTIONS
+ 

Reply to: