Macho-embedded: update build script for newer Clang behaviour.

Clang now uses the *-apple-macho triples for embedded targets using MachO. The
environment makes less pretences to be running an actual Mach kernel with all
the support that would imply, so a few changes are needed to the build scripts:
    
+ The Apple way of detecting endianness applies in all cases so drop the
  __MACH__ test.
+ A quick rename since "darwin_embedded" no longer makes any sense. If there's
  no Mach going on, there's certainly no Darwin.
+ Change how we test for support for a platform. The functions we build don't
  need any SDK support (stdio.h, ...) so we don't need to check for it.

llvm-svn: 199731
This commit is contained in:
Tim Northover 2014-01-21 12:38:02 +00:00
parent 20494ca293
commit bea1cafde8
3 changed files with 3 additions and 4 deletions

View File

@ -62,7 +62,7 @@
/* .. */
/* Mac OSX has __BIG_ENDIAN__ or __LITTLE_ENDIAN__ automatically set by the compiler (at least with GCC) */
#if defined(__APPLE__) && defined(__MACH__) || defined(__ellcc__ )
#if defined(__APPLE__) || defined(__ellcc__ )
#ifdef __BIG_ENDIAN__
#if __BIG_ENDIAN__

View File

@ -14,13 +14,12 @@ CheckArches = \
for arch in $(1); do \
if $(CC) -arch $$arch -c \
-integrated-as \
$(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
-isysroot $(ProjSrcRoot)/SDKs/darwin \
$(ProjSrcRoot)/make/platform/clang_macho_embedded_test_input.c \
-o /dev/null > /dev/null 2> /dev/null; then \
result="$$result$$arch "; \
else \
printf 1>&2 \
"warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'\n"; \
"warning: clang_macho_embedded.mk: dropping arch '$$arch' from lib '$(2)'\n"; \
fi; \
done; \
echo $$result)