fix iOS 7 build using latest Xcode

It looks like the iOS 7 SDK doesn't have GCC anymore, so we need to
use clang instead.  Also, thread_act.h and thread_status.h have moved,
so I updated arm.h accordingly.  That might break the build for older
SDKs, but I don't have one available at the moment.  If it does break,
I'll fix it.
This commit is contained in:
Joel Dice 2013-12-18 11:10:04 -07:00
parent 15906ddb12
commit 38477c113c
2 changed files with 10 additions and 3 deletions

View File

@ -652,7 +652,8 @@ ifeq ($(platform),darwin)
sdk-dir = $(platform-dir)/Developer/SDKs
ios-version := $(shell \
if test -d $(sdk-dir)/$(target)6.1.sdk; then echo 6.1; \
if test -d $(sdk-dir)/$(target)7.0.sdk; then echo 7.0; \
elif test -d $(sdk-dir)/$(target)6.1.sdk; then echo 6.1; \
elif test -d $(sdk-dir)/$(target)6.0.sdk; then echo 6.0; \
elif test -d $(sdk-dir)/$(target)5.1.sdk; then echo 5.1; \
elif test -d $(sdk-dir)/$(target)5.0.sdk; then echo 5.0; \
@ -666,6 +667,12 @@ ifeq ($(platform),darwin)
ios-bin = $(platform-dir)/Developer/usr/bin
found-gcc = $(shell if test -f $(ios-bin)/gcc; then echo true; else echo false; fi)
ifeq ($(found-gcc),false)
use-clang = true
endif
ifeq ($(use-clang),true)
cxx = clang -std=c++11
cc = clang

View File

@ -19,8 +19,8 @@
# include "libkern/OSAtomic.h"
# include "libkern/OSCacheControl.h"
# include "mach/mach_types.h"
# include "mach/arm/thread_act.h"
# include "mach/arm/thread_status.h"
# include "mach/thread_act.h"
# include "mach/thread_status.h"
# define THREAD_STATE ARM_THREAD_STATE
# define THREAD_STATE_TYPE arm_thread_state_t