This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: darwin cross compiling breakage
Andrew Pinski <pinskia@physics.uc.edu> writes:
> On Jun 6, 2006, at 5:57 AM, Mike Stump wrote:
>
> > The recent changes to support code generation for the current
> > machine on x86 has broken darwin's ppc x i386 compiler. :-( We go
> > out of our way to not define CROSS_COMPILE to get everything to
> > work right, but there just isn't anyway to run x86 instructions of
> > the ppc to figure out what x86 cpu we're on. :-) We could run ppc
> > instructions on the x86, but I digress.
>
> That seems wrong. Not defining CROSS_COMPILE is asking for trouble
> later on. This is just one
> example.
When I implemented the darwin cross support, every single thing that
CROSS_COMPILE was causing to happen was wrong. I don't really want to
go through the compiler and make every instance of
#ifdef CROSS_COMPILE
into
#if defined(CROSS_COMPILE) && ! defined (DARWIN_CROSS)
or similar, because that is also asking for trouble later on, when
someone adds a new #if and forgets to special-case darwin.