Skip to content

Commit 5864ad9

Browse files
author
kud1ing
committed
add target triple arm-apple-darwin
1 parent f099593 commit 5864ad9

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

configure

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,13 @@ do
635635
fi
636636
;;
637637

638+
arm-apple-darwin)
639+
if [ $CFG_OSTYPE != apple-darwin ]
640+
then
641+
err "The iOS target is only supported on Mac OS X"
642+
fi
643+
;;
644+
638645
*)
639646
;;
640647
esac

mk/platform.mk

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,35 @@ CFG_LDPATH_i686-unknown-linux-gnu :=
193193
CFG_RUN_i686-unknown-linux-gnu=$(2)
194194
CFG_RUN_TARG_i686-unknown-linux-gnu=$(call CFG_RUN_i686-unknown-linux-gnu,,$(2))
195195

196+
# arm-apple-darwin configuration
197+
ifeq ($(CFG_OSTYPE),apple-darwin)
198+
CFG_IOS_SDK = $(shell xcrun --show-sdk-path -sdk iphoneos)
199+
CFG_IOS_FLAGS = -target arm-apple-darwin -isysroot $(CFG_IOS_SDK) -I $(CFG_IOS_SDK)/usr/include -I $(CFG_IOS_SDK)/usr/include/c++/4.2.1 -I /usr/include
200+
CC_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang)
201+
CXX_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)
202+
CPP_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos clang++)
203+
AR_arm-apple-darwin = $(shell xcrun -find -sdk iphoneos ar)
204+
CFG_LIB_NAME_arm-apple-darwin = lib$(1).dylib
205+
CFG_LIB_GLOB_arm-apple-darwin = lib$(1)-*.dylib
206+
CFG_LIB_DSYM_GLOB_arm-apple-darwin = lib$(1)-*.dylib.dSYM
207+
CFG_GCCISH_CFLAGS_arm-apple-darwin := -Wall -Werror -g -fPIC $(CFG_IOS_FLAGS)
208+
CFG_GCCISH_CXXFLAGS_arm-apple-darwin := -fno-rtti $(CFG_IOS_FLAGS)
209+
CFG_GCCISH_LINK_FLAGS_arm-apple-darwin := -dynamiclib -lpthread -framework CoreServices -Wl,-no_compact_unwind
210+
CFG_GCCISH_DEF_FLAG_arm-apple-darwin := -Wl,-exported_symbols_list,
211+
CFG_GCCISH_PRE_LIB_FLAGS_arm-apple-darwin :=
212+
CFG_GCCISH_POST_LIB_FLAGS_arm-apple-darwin :=
213+
CFG_DEF_SUFFIX_arm-apple-darwin := .darwin.def
214+
CFG_INSTALL_NAME_arm-apple-darwin = -Wl,-install_name,@rpath/$(1)
215+
CFG_LIBUV_LINK_FLAGS_arm-apple-darwin =
216+
CFG_EXE_SUFFIX_arm-apple-darwin :=
217+
CFG_WINDOWSY_arm-apple-darwin :=
218+
CFG_UNIXY_arm-apple-darwin := 1
219+
CFG_PATH_MUNGE_arm-apple-darwin := true
220+
CFG_LDPATH_arm-apple-darwin :=
221+
CFG_RUN_arm-apple-darwin = $(2)
222+
CFG_RUN_TARG_arm-apple-darwin = $(call CFG_RUN_arm-apple-darwin,,$(2))
223+
endif
224+
196225
# x86_64-apple-darwin configuration
197226
CC_x86_64-apple-darwin=$(CC)
198227
CXX_x86_64-apple-darwin=$(CXX)

0 commit comments

Comments
 (0)