darwin cross compiling breakage
Mike Stump
mrs@apple.com
Mon Jun 12 17:29:00 GMT 2006
On Jun 12, 2006, at 9:50 AM, Andrew Pinski wrote:
>> If you think I need it, please explain the command that you think
>> won't work, and I will run it and see if you are correct. I have a
>> feeling that it actually works. It appears to work just fine for me:
>>
>> mrs $ gcc-4.2 -arch i386 t.c -c
>> mrs $
>>
>> but maybe I missed something?
>
> Yes this is not really a cross but a fake cross.
>
> Apple has other local changes to "fix" up the use of as/ld/ar/ranlib.
? The change that causes the build result to work isn't apple local:
if test x$host != x$target
then
CROSS="-DCROSS_COMPILE"
ALL=all.cross
SYSTEM_HEADER_DIR=$build_system_header_dir
case "$host","$target" in
# Darwin crosses can use the host system's libraries and
headers,
# because of the fat library support. Of course, it must be
the
# same version of Darwin on both sides. Allow the user to
# just say --target=foo-darwin without a version number to mean
# "the version on this system".
*-*-darwin*,*-*-darwin*)
hostos=`echo $host | sed 's/.*-darwin/darwin/'`
targetos=`echo $target | sed 's/.*-darwin/darwin/'`
if test $hostos = $targetos -o $targetos = darwin ;
then
CROSS=
SYSTEM_HEADER_DIR='$(NATIVE_SYSTEM_HEADER_DIR)'
with_headers=yes
fi
;;
i?86-*-*,x86_64-*-* \
| powerpc*-*-*,powerpc64*-*-*)
CROSS="$CROSS -DNATIVE_CROSS" ;;
esac
elif test "x$TARGET_SYSTEM_ROOT" != x; then
SYSTEM_HEADER_DIR=$build_system_header_dir
fi
Anyway, it looks like you're now in agreement with me that I don't
need it.
So, now that that's out of the way, do you have any objections to the
proposed patch?
More information about the Gcc-patches
mailing list