diff mbox

[Darwin] fix PR50699.

Message ID 827A5A00-6E1F-4A81-A340-B1A6A568054A@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Oct. 13, 2011, 3:22 p.m. UTC
.. this looks like an (almost) obvious fix for the bootstrap breakage...
OK for trunk?
Iain

Comments

Mike Stump Oct. 13, 2011, 10:22 p.m. UTC | #1
On Oct 13, 2011, at 8:22 AM, Iain Sandoe wrote:
> .. this looks like an (almost) obvious fix for the bootstrap breakage...

No...

> -/* Add $LDBL128 suffix to long double builtins.  */
> +#if defined (__ppc__) || defined (__ppc64__)

__ppc__ is a property of the host machine.

> +/* Add $LDBL128 suffix to long double builtins for ppc darwin.  */
> 
> static void
> -darwin_patch_builtin (int fncode)
> +darwin_patch_builtin (enum built_in_function fncode)

This is a property of the target machine.  DARWIN_PPC is a property of the target machine; maybe if (DARWIN_PPC) { } will do what you want?  If that works, Ok with that change.
Iain Sandoe Oct. 13, 2011, 10:38 p.m. UTC | #2
On 13 Oct 2011, at 23:22, Mike Stump wrote:
>> +/* Add $LDBL128 suffix to long double builtins for ppc darwin.  */
>>
>> static void
>> -darwin_patch_builtin (int fncode)
>> +darwin_patch_builtin (enum built_in_function fncode)
>
> This is a property of the target machine.  DARWIN_PPC is a property  
> of the target machine; maybe if (DARWIN_PPC) { } will do what you  
> want?

yes, that should be right - there was no reason that this should have  
broken x86 darwin.
diff mbox

Patch

Index: gcc/config/darwin.c
===================================================================
--- gcc/config/darwin.c	(revision 179865)
+++ gcc/config/darwin.c	(working copy)
@@ -2957,10 +2957,11 @@  darwin_override_options (void)
    darwin_running_cxx = (strstr (lang_hooks.name, "C++") != 0);
  }

-/* Add $LDBL128 suffix to long double builtins.  */
+#if defined (__ppc__) || defined (__ppc64__)
+/* Add $LDBL128 suffix to long double builtins for ppc darwin.  */

  static void
-darwin_patch_builtin (int fncode)
+darwin_patch_builtin (enum built_in_function fncode)
  {
    tree fn = builtin_decl_explicit (fncode);
    tree sym;
@@ -2998,6 +2999,7 @@  darwin_patch_builtins (void)
  #undef PATCH_BUILTIN_NO64
  #undef PATCH_BUILTIN_VARIADIC
  }
+#endif

  /*  CFStrings implementation.  */
  static GTY(()) tree cfstring_class_reference = NULL_TREE;