Adriaan van Os wrote:
To the best of my knowledge, powerpc-apple-darwin doesn't define TARGET_POWERPC, but uses __ppc__ as the define for the *target* processor. So, I believe your change was wrong (sorry). But this is no longer relevant, as the processor check can be skipped (the problem also occurs on i386-apple-darwin (as reported before)).
I am not sure if TARGET_POWERPC was the correct symbol, but I think you are confusing things here: to find correct define you should always look at a cross-compiler. When building a cross compiler we have _two_ sets of predefined symbols: one for host machine and one for target. Assume theat we are building a cross-compiler which should run on i386-linux and targetting powerpc-darwin. This compiler should run on i386-linux and is compiled using i386-linux compiler. During compilation _all_ normal symbols predefined by i386-linux compiler are active. So, the test for __I386__ will succeed regardless of the target and the test for _ARCH_PPC will fail regardless of the target.
There is a separte set of predefines to describe the target machine, which sould be used in compiler sources. Look at the following snippet from rs6000-c.c:
if (TARGET_POWERPC) builtin_define ("_ARCH_PPC");
The snippet shows that if _during build_ the symbol TARGET_POWERPC is defined then the running compiler will define _ARCH_PPC.
The situation is different when we build RTS: the RTS is build using the target compiler, so you use "normal" predefines (like _ARCH_PPC).