diff mbox

[Darwin/PPC] make sure rs6000_current_abi is defined early enough.

Message ID 6E08B20A-0B50-443B-8170-C959F9AC2682@sandoe-acoustics.co.uk
State New
Headers show

Commit Message

Iain Sandoe Dec. 5, 2011, 9:11 a.m. UTC
in http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00312.html
I wrote:

where is "_CALL_DARWIN" supposed to come from? (it is not defined by  
the preprocessor AFAICT).

Comments

Richard Henderson Dec. 5, 2011, 5:21 p.m. UTC | #1
On 12/05/2011 01:11 AM, Iain Sandoe wrote:
> in http://gcc.gnu.org/ml/gcc-patches/2011-12/msg00312.html
> I wrote:
> 
> where is "_CALL_DARWIN" supposed to come from? (it is not defined by the preprocessor AFAICT).
> 
> ===
> 
> it seems that we don't define rs6000_current_abi before cpp builtins
> are emitted and the function uses it to decide to emit _CALL_DARWIN.
> 
> fixed as below,
> OK for trunk?
> (what opinion of 4.6?)
> 
> Iain
> 
> gcc:
> 
>     * config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
>     rs6000_current_abi.

Ok everywhere.


r~
diff mbox

Patch

===

it seems that we don't define rs6000_current_abi before cpp builtins  
are emitted and the function uses it to decide to emit _CALL_DARWIN.

fixed as below,
OK for trunk?
(what opinion of 4.6?)

Iain

gcc:

	* config/rs6000/rs6000.c (darwin_rs6000_override_options): Initialize
	rs6000_current_abi.


Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c  (revision 181991)
+++ gcc/config/rs6000/rs6000.c  (working copy)
@@ -2502,6 +2502,7 @@  darwin_rs6000_override_options (void)
       off.  */
    rs6000_altivec_abi = 1;
    TARGET_ALTIVEC_VRSAVE = 1;
+  rs6000_current_abi = ABI_DARWIN;

    if (DEFAULT_ABI == ABI_DARWIN
        && TARGET_64BIT)