This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch committed] Fix SH bootstrap failure


Hi,

I've applied the attached patch to fix bootstrap on SH.  Currently
it fails with

cc1: internal compiler error: in cl_optimization_save, at options.c:5572

during building target libgcc.
cl_optimize_save checks if flag_omit_frame_pointer is in the range
0-255 but SH may set it to -1 temporarily at OPTIMIZATION_OPTIONS.
Although OVERRIDE_OPTIONS will reset its value to zero, it seems that
cl_optimize_save checks the value before OVERRIDE_OPTIONS runs.

Regards,
	kaz
--
2008-07-24  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.h (OPTIMIZATION_OPTIONS): Set flag_omit_frame_pointer
	to 2 instead of -1.
	(OVERRIDE_OPTIONS): Check if flag_omit_frame_pointer is equal
	to 2.

diff -up ORIG/trunk/gcc/config/sh/sh.h LOCAL/trunk/gcc/config/sh/sh.h
--- ORIG/trunk/gcc/config/sh/sh.h	2008-07-20 16:14:52.000000000 +0900
+++ LOCAL/trunk/gcc/config/sh/sh.h	2008-07-24 09:19:42.000000000 +0900
@@ -463,7 +463,7 @@ do { \
 do {									\
   if (LEVEL)								\
     {									\
-      flag_omit_frame_pointer = -1;					\
+      flag_omit_frame_pointer = 2;					\
       if (! SIZE)							\
 	sh_div_str = "inv:minlat";					\
     }									\
@@ -690,7 +690,7 @@ do {									\
     if (! VALID_REGISTER_P (ADDREGNAMES_REGNO (regno)))			\
       sh_additional_register_names[regno][0] = '\0';			\
 									\
-  if (flag_omit_frame_pointer < 0)					\
+  if (flag_omit_frame_pointer == 2)					\
    {									\
      /* The debugging information is sufficient,			\
         but gdb doesn't implement this yet */				\


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]