This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch Darwin/PPC] make sure rs6000_current_abi is defined early enough.
- From: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Mike Stump <mrs at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Mon, 5 Dec 2011 09:11:50 +0000
- Subject: [Patch Darwin/PPC] make sure rs6000_current_abi is defined early enough.
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.
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)