diff --git a/README.md b/README.md index 8051aaaf84..923d5195ca 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/makefile b/makefile index 023f981272..72b9079e30 100755 --- a/makefile +++ b/makefile @@ -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