Merge pull request #424 from dicej/ios-x86_64

add support for iOS/x86_64
This commit is contained in:
Joshua Warner 2015-03-16 13:57:48 -06:00
commit d9650be570
2 changed files with 24 additions and 11 deletions

View File

@ -62,7 +62,7 @@ Avian can currently target the following platforms:
* Linux (i386, x86_64, ARM, and ARM64)
* Windows (i386 and x86_64)
* Mac OS X (i386 and x86_64)
* Apple iOS (i386, ARM, and ARM64)
* Apple iOS (i386, x86_64, ARM, and ARM64)
* FreeBSD (i386, x86_64)
@ -358,7 +358,7 @@ can also build with the Android class library. Now it should work on Linux, OS X
The simpliest way to build Avian with Android classpath is to use `avian-pack` project: https://github.com/bigfatbrowncat/avian-pack
Avian-pack consists of Avian itself with some Android components (such as libcore and icu4c).
Avian-pack consists of Avian itself with some Android components (such as libcore and icu4c).
Note that we use the upstream OpenSSL repository and apply the
Android patches to it. This is because it is not clear how to build

View File

@ -86,8 +86,8 @@ ifeq ($(platform),macosx)
endif
ifeq ($(platform),ios)
ifeq ($(filter i386 arm arm64,$(arch)),)
x := $(error "please specify 'arch=i386', 'arch=arm', or 'arch=arm64' with 'platform=ios'")
ifeq ($(filter i386 x86_64 arm arm64,$(arch)),)
x := $(error "please specify 'arch=i386', 'arch=x86_64', 'arch=arm', or 'arch=arm64' with 'platform=ios'")
endif
endif
@ -745,10 +745,14 @@ ifeq ($(kernel),darwin)
rpath =
ifeq ($(platform),ios)
ifeq ($(arch),i386)
ifeq (,$(filter arm arm64,$(arch)))
target = iPhoneSimulator
sdk = iphonesimulator$(ios-version)
arch-flag = -arch i386
ifeq ($(arch),i386)
arch-flag = -arch i386
else
arch-flag = -arch x86_64
endif
release = Release-iphonesimulator
else
target = iPhoneOS
@ -765,7 +769,8 @@ ifeq ($(kernel),darwin)
sdk-dir = $(platform-dir)/Developer/SDKs
ios-version := $(shell \
if test -d $(sdk-dir)/$(target)8.1.sdk; then echo 8.1; \
if test -d $(sdk-dir)/$(target)8.2.sdk; then echo 8.2; \
elif test -d $(sdk-dir)/$(target)8.1.sdk; then echo 8.1; \
elif test -d $(sdk-dir)/$(target)8.0.sdk; then echo 8.0; \
elif test -d $(sdk-dir)/$(target)7.1.sdk; then echo 7.1; \
elif test -d $(sdk-dir)/$(target)7.0.sdk; then echo 7.0; \
@ -823,10 +828,18 @@ ifeq ($(kernel),darwin)
endif
ifeq ($(arch),x86_64)
classpath-extra-cflags += -arch x86_64
cflags += -arch x86_64
asmflags += -arch x86_64
lflags += -arch x86_64
ifeq ($(platform),ios)
classpath-extra-cflags += \
-arch x86_64 -miphoneos-version-min=$(ios-version)
cflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
asmflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
lflags += -arch x86_64 -miphoneos-version-min=$(ios-version)
else
classpath-extra-cflags += -arch x86_64
cflags += -arch x86_64
asmflags += -arch x86_64
lflags += -arch x86_64
endif
endif
cflags += -I$(JAVA_HOME)/include/darwin