[patch committed] Fix SH bootstrap failure

Top Page

Reply to this message
Author: Kaz Kojima
Date:  
To: gcc-patches
Subject: [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@???>

    * 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 */                \