diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-08-01 14:34:16 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-08-01 17:12:27 +0300 |
commit | c07f4d997f8d48ecb58e1ed5a1f71d88bd00abc5 (patch) | |
tree | 7be623d54c36bb7405a19b7ba3cdcffcfed1cf0c /solenv | |
parent | a59a925e36ad6ca4e8f893312ad1b4c17d4dd37c (diff) |
iOS configuration improvements
Make the unxiosr.mk file more like the macosx.mk one.
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/ios.mk | 9 | ||||
-rw-r--r-- | solenv/inc/unxiosr.mk | 116 |
2 files changed, 93 insertions, 32 deletions
diff --git a/solenv/gbuild/platform/ios.mk b/solenv/gbuild/platform/ios.mk index 86cff729962e..67258863edee 100644 --- a/solenv/gbuild/platform/ios.mk +++ b/solenv/gbuild/platform/ios.mk @@ -88,11 +88,12 @@ gb_CXXFLAGS := \ #-fsigned-char \ might be removed? #-malign-natural \ might be removed? -# these are to get g++ to switch to Objective-C++ mode -# (see toolkit module for a case where it is necessary to do it this way) -gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 +# these are to get gcc to switch to Objective-C++ or Objective-C mode +gb_OBJC_OBJCXX_COMMON_FLAGS := -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 -gb_OBJCFLAGS := -x objective-c -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 +gb_OBJCXXFLAGS := -x objective-c++ $(gb_OBJC_OBJCXX_COMMON_FLAGS) + +gb_OBJCFLAGS := -x objective-c $(gb_OBJC_OBJCXX_COMMON_FLAGS) ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) gb_CFLAGS_WERROR := -Werror diff --git a/solenv/inc/unxiosr.mk b/solenv/inc/unxiosr.mk index dad117778222..5532560ce444 100644 --- a/solenv/inc/unxiosr.mk +++ b/solenv/inc/unxiosr.mk @@ -25,28 +25,55 @@ # #************************************************************************* -# --- Unix Environment for iOS cross-compilation ------------- +########################################################################## +# Platform MAKEFILE for iOS, both devices and the simulator +########################################################################## -CFLAGS=-c $(EXTRA_CFLAGS) +PROCESSOR_DEFINES=-DARM32 -LINKC*=$(CC) -LINK*=$(CXX) +# flags to enable build with symbols +CFLAGSENABLESYMBOLS=-g -STDLIBCUIMT=-framework UIKit -framework Foundation -framework CoreText -framework CoreGraphics -framework CoreFoundation -Xlinker -objc_abi_version -Xlinker 2 -STDLIBGUIMT=$(STDLIBCUIMT) -STDSHLCUIMT= -STDSHLGUIMT= +ASM= +AFLAGS= +LINKOUTPUT_FILTER= -LIBMGR*=ar -LIBFLAGS=-r +CFLAGS=-fmessage-length=0 -c $(EXTRA_CFLAGS) -PROCESSOR_DEFINES=-DARM32 +# enable visibility define in "sal/types.h" +.IF "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" +CDEFS += -DHAVE_GCC_VISIBILITY_FEATURE +.ENDIF # "$(HAVE_GCC_VISIBILITY_FEATURE)" == "TRUE" -DLLPRE=lib -DLLPOST=.a +# --------------------------------- +# Compilation flags +# --------------------------------- +# Normal C compilation flags +CFLAGSCC=-pipe -fsigned-char $(ARCH_FLAGS) -# flags to enable build with symbols -CFLAGSENABLESYMBOLS=-g +# Normal Objective C compilation flags +OBJCFLAGS=-fexceptions -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300 +# -x options generally ignored by ccache, tell it that it can cache +# the result nevertheless +CCACHE_SKIP:=$(eq,$(USE_CCACHE),YES --ccache-skip $(NULL)) +OBJCXXFLAGS:=$(CCACHE_SKIP) -x $(CCACHE_SKIP) objective-c++ $(OBJCFLAGS) + +# Comp Flags for files that need exceptions enabled (C and C++) +CFLAGSEXCEPTIONS=-fexceptions -fno-enforce-eh-specs + +# Comp Flags for files that do not need exceptions enabled (C and C++) +CFLAGS_NO_EXCEPTIONS=-fno-exceptions + +# Normal C++ compilation flags +CFLAGSCXX=-pipe -fsigned-char $(ARCH_FLAGS) -Wno-ctor-dtor-privacy + +# No PIC needed as we don't build dynamic objects +PICSWITCH:= +# Other flags +CFLAGSOBJGUIMT=$(PICSWITCH) -fno-common +CFLAGSOBJCUIMT=$(PICSWITCH) -fno-common +CFLAGSSLOGUIMT=$(PICSWITCH) -fno-common +CFLAGSSLOCUIMT=$(PICSWITCH) -fno-common # Flag for including debugging information in object files CFLAGSDEBUG=-g @@ -55,22 +82,55 @@ CFLAGSDBGUTIL= # Flag to specify output file to compiler/linker CFLAGSOUTOBJ=-o -# # Include generic Mac OS X makefile -# .INCLUDE : unxmacx.mk +# --------------------------------- +# Optimization flags +# --------------------------------- +CFLAGSOPT=-O2 -fno-strict-aliasing +CFLAGSNOOPT=-O0 + +# -Wshadow does not work for C with nested uses of pthread_cleanup_push: +# -Wshadow does not work for C++ as /usr/include/c++/4.0.0/ext/hashtable.h +# l. 717 contains a declaration of __cur2 shadowing the declaration at l. 705, +# in template code for which a #pragma gcc system_header would not work: +# -Wextra doesn not work for gcc-3.3 +CFLAGSWARNCC=-Wall -Wendif-labels +CFLAGSWARNCXX=$(CFLAGSWARNCC) -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor +CFLAGSWALLCC=$(CFLAGSWARNCC) +CFLAGSWALLCXX=$(CFLAGSWARNCXX) +CFLAGSWERRCC=-Werror + +LINK*=$(CXX) +LINKC*=$(CC) + +LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress + +# Tag to identify an output file as a library +DLLPRE=lib +# We don't use dynamic shared libraries on iOS +DLLPOST=.a +# Precompiled header file extension +PCHPOST=.gch + +STDOBJVCL=$(L)/salmain.o + +STDLIBCUIMT=-framework UIKit -framework Foundation -framework CoreText -framework CoreGraphics -framework CoreFoundation -Xlinker -objc_abi_version -Xlinker 2 +STDLIBGUIMT=$(STDLIBCUIMT) +STDSHLCUIMT= +STDSHLGUIMT= -# --- general *ix settings --- -HC=hc -HCFLAGS= -PATH_SEPERATOR*=: -CDEFS+=-D__DMAKE +LIBMGR=ar +LIBFLAGS=-r -CDEFS+=-DUNIX +IMPLIB=: +IMPLIBFLAGS= -YACC*=yacc -YACCFLAGS*=-d -t +MAPSYM=: +MAPSYMFLAGS= -EXECPOST= -SCPPOST=.ins -DLLDEST=$(LB) +RC=: +RCFLAGS= +RCLINK= +RCLINKFLAGS= +RCSETVERSION= OOO_LIBRARY_PATH_VAR = DYLD_LIBRARY_PATH |