diff mbox

Fix anonymous code atoms problem on Darwin.

Message ID 7F9538A1-5F81-4609-A436-AC828BA1940F@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Feb. 8, 2011, 9:14 a.m. UTC
On 8 Feb 2011, at 08:19, IainS wrote:

> On 8 Feb 2011, at 03:01, Mike Stump wrote:
>
>> On Dec 20, 2010, at 3:07 AM, IainS wrote:
>>> This problem became apparent during the resolution of  
>>> PR46904/46916 (we have had to switch off freorder-and-partition to  
>>> avoid regression).
>>
>>> gcc:
>>>
>>> 	* target.def (function_switched_text_sections): New Hook.
>>> 	* doc/tm.texi Regenerated.
>>> 	* doc/tm.texi.in (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
>>> 	New.
>>> 	* final.c (default_function_switched_text_sections): New.
>>> 	(final_scan_insn): Call function_switched_text_sections when a  
>>> mid-function section
>>> 	change occurs.
>>> 	* output.h (default_function_switched_text_sections): Declare.
>>> 	* config/darwin-protos.h  
>>> (darwin_function_switched_text_sections) : Likewise.
>>> 	* config/darwin.c (darwin_function_switched_text_sections): New.
>>> 	* config/darwin.h (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
>>> 	New.
>>
>> This posted patch does not match what was checked in r168571.   
>> Could you please audit what was checked in and ensure it is as you  
>> wanted.  Thanks.
>
> Yes, the commit matches what was intended.

scratch that, I'm obviously blind.....

I'll bootstrap this on *-darwin9  + i686-darwin8 right away.

Iain


        we will switch off -freorder-blocks-and-partition when unwind  
tables will be
        generated".  If the User specifically sets flags... we assume  
(s)he knows
@@ -2596,6 +2596,13 @@ darwin_override_options (void)
                 && !global_options_set.x_flag_non_call_exceptions)
            || (global_options.x_flag_asynchronous_unwind_tables
                 && ! 
global_options_set.x_flag_asynchronous_unwind_tables)))
+    {
+      inform (input_location,
+               "-freorder-blocks-and-partition does not work with  
exceptions "
+               "on this architecture");
+      flag_reorder_blocks_and_partition = 0;
+      flag_reorder_blocks = 1;
+    }

    if (flag_mkernel || flag_apple_kext)
      {

Comments

Iain Sandoe Feb. 8, 2011, 1:35 p.m. UTC | #1
On 8 Feb 2011, at 09:14, IainS wrote:
> On 8 Feb 2011, at 08:19, IainS wrote:
>
>> On 8 Feb 2011, at 03:01, Mike Stump wrote:
>>
>>> On Dec 20, 2010, at 3:07 AM, IainS wrote:
>>>> This problem became apparent during the resolution of  
>>>> PR46904/46916 (we have had to switch off freorder-and-partition  
>>>> to avoid regression).
>>>
>>>> gcc:
>>>>
>>>> 	* target.def (function_switched_text_sections): New Hook.
>>>> 	* doc/tm.texi Regenerated.
>>>> 	* doc/tm.texi.in (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
>>>> 	New.
>>>> 	* final.c (default_function_switched_text_sections): New.
>>>> 	(final_scan_insn): Call function_switched_text_sections when a  
>>>> mid-function section
>>>> 	change occurs.
>>>> 	* output.h (default_function_switched_text_sections): Declare.
>>>> 	* config/darwin-protos.h  
>>>> (darwin_function_switched_text_sections) : Likewise.
>>>> 	* config/darwin.c (darwin_function_switched_text_sections): New.
>>>> 	* config/darwin.h (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS)
>>>> 	New.
>>>
>>> This posted patch does not match what was checked in r168571.   
>>> Could you please audit what was checked in and ensure it is as you  
>>> wanted.  Thanks.
>>
>> Yes, the commit matches what was intended.
>
> scratch that, I'm obviously blind.....
>
> I'll bootstrap this on *-darwin9  + i686-darwin8 right away.

it bootstrapped and does what's intended on *-darwin9 and i686-darwin8.

one endeavors to split composite patches properly, in this case I must  
have accidentally deleted a hunk.
apologies for a careless mistake :(

OK to commit this to correct it?
Iain

> --- gcc/config/darwin.c (revision 169878)
> +++ gcc/config/darwin.c (working copy)
> @@ -2581,7 +2581,7 @@ darwin_override_options (void)
>     global_options.x_flag_asynchronous_unwind_tables = 0;
>
>    /* Disable -freorder-blocks-and-partition when unwind tables are  
> being emitted
> -      for Darwin < 10 (OSX 10.6).
> +      for Darwin < 9 (OSX 10.5).
>       The strategy is, "Unless the User has specifically set/unset  
> an unwind flag
>       we will switch off -freorder-blocks-and-partition when unwind  
> tables will be
>       generated".  If the User specifically sets flags... we assume  
> (s)he knows
> @@ -2596,6 +2596,13 @@ darwin_override_options (void)
>                && !global_options_set.x_flag_non_call_exceptions)
>           || (global_options.x_flag_asynchronous_unwind_tables
>                && ! 
> global_options_set.x_flag_asynchronous_unwind_tables)))
> +    {
> +      inform (input_location,
> +               "-freorder-blocks-and-partition does not work with  
> exceptions "
> +               "on this architecture");
> +      flag_reorder_blocks_and_partition = 0;
> +      flag_reorder_blocks = 1;
> +    }
>
>   if (flag_mkernel || flag_apple_kext)
>     {
>
>
Mike Stump Feb. 8, 2011, 8:49 p.m. UTC | #2
On Feb 8, 2011, at 5:35 AM, IainS wrote:
> OK to commit this to correct it?

Ok, if the indentation level is good...  If you use emacs, just hit tab on each of the lines in question...
diff mbox

Patch

--- gcc/config/darwin.c (revision 169878)
+++ gcc/config/darwin.c (working copy)
@@ -2581,7 +2581,7 @@  darwin_override_options (void)
      global_options.x_flag_asynchronous_unwind_tables = 0;

     /* Disable -freorder-blocks-and-partition when unwind tables are  
being emitted
-      for Darwin < 10 (OSX 10.6).
+      for Darwin < 9 (OSX 10.5).
        The strategy is, "Unless the User has specifically set/unset  
an unwind flag