make -march=native available even in some cross compiles

Andrew Pinski pinskia@physics.uc.edu
Fri Sep 22 23:55:00 GMT 2006


> 
> The previous version of this code would make -mcpu=native available
> only when the host and target were exactly the same.  This patch
> expands it to make -mcpu=native available whenever the host and target
> are both x86 or x86_64 platforms.
> 
> This fixes a regression where
> 
> .../configure --target=i386-apple-darwin \
> --with-sysroot=/Developer/SDKs/MacOSX10.4u.sdk --with-as=/usr/bin/as \
> --with-ld=/usr/bin/ld
> 
> on a powerpc-darwin system would fail to link xgcc because
> host_detect_local_cpu was undefined, by making it not required.  It
> also fixes a similar regression with the same command-line on an
> i386-darwin system, but in that case by causing host_detect_local_cpu
> to be defined.
> 
> Tested by building after the above configure command.

This is the normal CROSS_COMPILE vs Darwin cross compiling problem.
Can we actually get a real fix for this instead of keep on changing
the meaning of CROSS_COMPILE on Darwin?

-- Pinski



More information about the Gcc-patches mailing list