diff --git a/config/Makefile.ios b/config/Makefile.ios index 6ef89241889c84447cf78ff800e6ded26ba61bb3..9acf88fb340d11d66932df2d08f87571fe9fa24b 100644 --- a/config/Makefile.ios +++ b/config/Makefile.ios @@ -21,13 +21,20 @@ IOS_MAJOR := $(shell echo $(IOSVERS) | cut -d . -f 1) ifeq ($(subst $(IOS_MAJOR),,1234),1234) CXX := $(shell xcrun -find clang++) CC := $(shell xcrun -find clang) +ifeq ($(CXX11),yes) +CXX11FLAGS = -std=c++11 +endif +ifeq ($(LIBCXX),yes) +CXX11FLAGS += -stdlib=libc++ +CXX11LDFLAGS = -stdlib=libc++ +endif else CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ - $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) + $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch armv7 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) COMPILER = gnu @@ -39,7 +46,7 @@ else LD := $(shell xcrun -find g++) endif LDFLAGS = $(OPT) -arch armv7 -isysroot $(IOSSDK) \ - -miphoneos-version-min=$(IOSVERS) + -miphoneos-version-min=$(IOSVERS) $(CXX11LDFLAGS) # this is set for 64 but not for 32 bit (for iOS too???) CXXFLAGS += -D__DARWIN_UNIX03=1 diff --git a/config/Makefile.iossim b/config/Makefile.iossim index 4f3f2099cdb1a310f98f4ab35d5ee04d808b5a4d..25d712d869b34a304678ccb83a489e9ce7a76f2e 100644 --- a/config/Makefile.iossim +++ b/config/Makefile.iossim @@ -21,13 +21,20 @@ IOS_MAJOR := $(shell echo $(IOSVERS) | cut -d . -f 1) ifeq ($(subst $(IOS_MAJOR),,1234),1234) CXX := $(shell xcrun -find clang++) CC := $(shell xcrun -find clang) +ifeq ($(CXX11),yes) +CXX11FLAGS = -std=c++11 +endif +ifeq ($(LIBCXX),yes) +CXX11FLAGS += -stdlib=libc++ +CXX11LDFLAGS = -stdlib=libc++ +endif else CXX := $(shell xcrun -find g++) CC := $(shell xcrun -find gcc) endif CXXFLAGS = -arch i386 -pipe -Wshadow -W -Wall -Woverloaded-virtual \ -fsigned-char -fno-common -fvisibility-inlines-hidden \ - $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) + $(EXTRA_CXXFLAGS) -isysroot $(IOSSDK) $(CXX11FLAGS) CFLAGS = -arch i386 -pipe -Wshadow -W -Wall -fsigned-char -fno-common \ $(EXTRA_CFLAGS) -isysroot $(IOSSDK) COMPILER = gnu @@ -39,7 +46,7 @@ else LD := $(shell xcrun -find g++) endif LDFLAGS = $(OPT) -arch i386 -isysroot $(IOSSDK) \ - -miphoneos-version-min=$(IOSVERS) + -miphoneos-version-min=$(IOSVERS) $(CXX11LDFLAGS) # this is set for 64 but not for 32 bit (for iOS too???) CXXFLAGS += -D__DARWIN_UNIX03=1 diff --git a/configure b/configure index 1831348a01112e33231b7c581eb1e7278374261b..e271c42300947f9c8a0ace1264f7127a80531f2a 100755 --- a/configure +++ b/configure @@ -1904,9 +1904,9 @@ macosx*) # get most recent SDK version macosxminor=`sw_vers | sed -n 's/ProductVersion://p' | cut -d . -f 2` macosxvers=10.$macosxminor - # make available to conftest.mk scripts - export MACOSXVERS=$macosxvers fi + # make available to conftest.mk scripts + export MACOSXVERS=$macosxvers ;; ios*) logmsg "Will check iOS SDK libraries" @@ -1915,8 +1915,15 @@ ios*) # get most recent SDK version iosvers=`xcodebuild -showsdks | sed -n '/iphoneos/s/.*iOS //p' | sed 's/ .*//'|awk 'END{print}'` fi + if [ `echo $iosvers | cut -d . -f 1` -ge 7 ]; then + ios7=yes + fi xcodepath=`/usr/bin/xcode-select -print-path` - iossdk=$xcodepath/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$iosvers.sdk + if test "x$arch" = "xios"; then + iossdk=$xcodepath/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS$iosvers.sdk + else + iossdk=$xcodepath/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator$iosvers.sdk + fi result "$iossdk" if [ ! -d $iossdk ]; then result "`basename $0`: no iOS SDK found at $iossdk" @@ -1924,6 +1931,9 @@ ios*) result "or make sure the desired SDK version is installed" exit 1 fi + # make available to conftest.mk scripts + export IOSSDK=$iossdk + export IOSVERS=$iosvers enable_genvector="no" enable_tmva="no" ;; @@ -2514,6 +2524,10 @@ fi if test "x$macosx109" = "xyes" && echo $altcxx | grep 'clang++' > /dev/null 2>&1; then enable_libcxx="yes" fi +# iOS 7.0 only has libc++ with clang so make sure this option is turned on +if test "x$ios7" = "xyes" && echo $altcxx | grep 'clang++' > /dev/null 2>&1; then + enable_libcxx="yes" +fi uselibcxx="undef" if test "x$enable_libcxx" = "xyes" ; then diff --git a/core/lzma/Module.mk b/core/lzma/Module.mk index 783aa7c64bb5c5a29c56add19c6f0d87503b7e06..c9fb2956e0a751e343ca03fc1a36c630be99d1be 100644 --- a/core/lzma/Module.mk +++ b/core/lzma/Module.mk @@ -143,12 +143,10 @@ else LZMA_CFLAGS="-m64"; \ fi; \ if [ $(ARCH) = "iossim" ]; then \ - LZMACC="$$LZMACC -arch i386"; \ LZMA_CFLAGS="-arch i386 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ LZMA_HOST="--host=i686-apple-darwin10"; \ fi; \ if [ $(ARCH) = "ios" ]; then \ - LZMACC="$$LZMACC -arch armv7"; \ LZMA_CFLAGS="-arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ LZMA_HOST="--host=arm-apple-darwin10"; \ fi; \ diff --git a/graf2d/freetype/Module.mk b/graf2d/freetype/Module.mk index 1f3c0f5dab9359c9b762251949a340c89c71a106..54554a43c3a5582e38f730137b2d0d20ded6fb28 100644 --- a/graf2d/freetype/Module.mk +++ b/graf2d/freetype/Module.mk @@ -135,12 +135,10 @@ else FREE_CFLAGS="-m64"; \ fi; \ if [ $(ARCH) = "iossim" ]; then \ - FREECC="$$FREECC -arch i386"; \ FREE_CFLAGS="-arch i386 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ FREE_HOST="--host=i686-apple-darwin10"; \ fi; \ if [ $(ARCH) = "ios" ]; then \ - FREECC="$$FREECC -arch armv7"; \ FREE_CFLAGS="-arch armv7 -isysroot $(IOSSDK) -miphoneos-version-min=$(IOSVERS)"; \ FREE_HOST="--host=arm-apple-darwin10"; \ fi; \ diff --git a/sql/sqlite/Module.mk b/sql/sqlite/Module.mk index caad67d80abffb693dbba70649405dd0dc398ea0..20390c9edc9ecdd6cb6d2ac63c5e9e7fd3a1144a 100644 --- a/sql/sqlite/Module.mk +++ b/sql/sqlite/Module.mk @@ -54,7 +54,7 @@ $(SQLITEDS): $(SQLITEH) $(SQLITEL) $(ROOTCINTTMPDEP) $(call pcmdep,SQLITE) $(MAKEDIR) @echo "Generating dictionary $@..." $(ROOTCINTTMP) -f $@ $(call dictModule,SQLITE) \ - -c $(SQLITEINCDIR:%=-I%) $(SQLITEH) $(SQLITEL) + -c $(SQLITEH) $(SQLITEL) $(SQLITEMAP): $(RLIBMAP) $(MAKEFILEDEP) $(SQLITEL) $(RLIBMAP) -o $@ -l $(SQLITELIB) \