diff mbox

rs6000_option_optimization section anchors cleanup

Message ID Pine.LNX.4.64.1010150047110.2442@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Oct. 15, 2010, 12:48 a.m. UTC
Continuing cleanups to TARGET_OPTION_OPTIMIZATION hooks, this patch
removes a hack in rs6000_option_optimization.

There *used* to be problems with section anchors for Objective-C: bug
41848, resulting in a hack in this back end to disable them in that
case.  At that bug shows, those problems were fixed, meaning that such
a hack did not need to be introduced for ARM, and the hack should be
removed for rs6000 as well, which this patch does.

Tested by building cc1 for a cross to powerpc-eabi.  OK to commit?

2010-10-14  Joseph Myers  <joseph@codesourcery.com>

	* config/rs6000/rs6000.c (rs6000_option_optimization): Don't
	disable section anchors for lang_hooks.name[4] != 'O'.

Comments

Mike Stump Oct. 15, 2010, 1:20 a.m. UTC | #1
On Oct 14, 2010, at 5:48 PM, "Joseph S. Myers" <joseph@codesourcery.com> wrote:
> Continuing cleanups to TARGET_OPTION_OPTIMIZATION hooks, this patch
> removes a hack in rs6000_option_optimization.

Seems reasonable to me.
>
David Edelsohn Oct. 15, 2010, 3:11 a.m. UTC | #2
On Thu, Oct 14, 2010 at 8:48 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> Continuing cleanups to TARGET_OPTION_OPTIMIZATION hooks, this patch
> removes a hack in rs6000_option_optimization.
>
> There *used* to be problems with section anchors for Objective-C: bug
> 41848, resulting in a hack in this back end to disable them in that
> case.  At that bug shows, those problems were fixed, meaning that such
> a hack did not need to be introduced for ARM, and the hack should be
> removed for rs6000 as well, which this patch does.
>
> Tested by building cc1 for a cross to powerpc-eabi.  OK to commit?
>
> 2010-10-14  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/rs6000/rs6000.c (rs6000_option_optimization): Don't
>        disable section anchors for lang_hooks.name[4] != 'O'.

Okay.

Glad to see the underlying problem finally was fixed.

Thanks, David
diff mbox

Patch

Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 165460)
+++ gcc/config/rs6000/rs6000.c	(working copy)
@@ -3690,10 +3690,8 @@  rs6000_option_optimization (int level AT
        avoid calling them when that's the only reason we would.  */
     flag_errno_math = 0;
 
-  /* Enable section anchors by default.
-     Skip section anchors for Objective C and Objective C++
-     until front-ends fixed.  */
-  if (!TARGET_MACHO && lang_hooks.name[4] != 'O')
+  /* Enable section anchors by default.  */
+  if (!TARGET_MACHO)
     flag_section_anchors = 2;
 }