diff --git a/configure/os/CONFIG.Common.iosCommon b/configure/os/CONFIG.Common.iosCommon index 0bd045027..7e530fc01 100644 --- a/configure/os/CONFIG.Common.iosCommon +++ b/configure/os/CONFIG.Common.iosCommon @@ -53,13 +53,15 @@ OPT_CXXFLAGS_YES += -g CC_GNU = gcc CCC_GNU = g++ -CC_LLVM = llvm-gcc -CCC_LLVM = llvm-g++ + +CC_LLVM_GNU = llvm-gcc +CCC_LLVM_GNU = llvm-g++ + CC_CLANG = clang CCC_CLANG = clang++ -CC = $(firstword $(wildcard $(GNU_BIN)/$(CC_$(COMPILER))) $(CC_$(COMPILER))) -CCC = $(firstword $(wildcard $(GNU_BIN)/$(CCC_$(COMPILER))) $(CCC_$(COMPILER))) +# Convert the iOS platform to lowercase for passing to xcrun's sdk parameter +XCRUN_SDK_BASE = $(shell echo $(IOS_PLATFORM) | tr A-Z a-z) #------------------------------------------------------- # Linker flags @@ -70,7 +72,7 @@ OP_SYS_LDFLAGS += -dynamic -Z -L$(SDK_DIR)/usr/lib -L$(SDK_DIR)/usr/lib/system # Shared libraries SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION) SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \ - -install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \ + -install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \ -compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \ -current_version $(SHRLIB_VERSION) SHRLIB_SUFFIX_BASE = .dylib @@ -93,13 +95,14 @@ vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS) #-------------------------------------------------- # Header dependency file generation # -# Use compiler when ARCH_CLASS is a single arch value -# otherwise use perl script command -SINGLE_ARCH=$(filter 1,$(words $(ARCH_CLASS))) -HDEPENDS_CFLAGS = $(if $(SINGLE_ARCH),$(HDEPENDS_CFLAGS_$(HDEPENDS))) -HDEPENDS_METHOD = $(if $(SINGLE_ARCH),CFLAGS,CMD) +HDEPENDS_METHOD = CMD #-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.Common.iosCommon -include $(CONFIG)/os/CONFIG_SITE.$(EPICS_HOST_ARCH).iosCommon + +#-------------------------------------------------- +# Find the Xcode compilers for the specified SDK just once +CC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CC_$(COMPILER))) +CCC := $(shell xcrun -sdk $(XCRUN_SDK_BASE) -find $(CCC_$(COMPILER))) diff --git a/configure/os/CONFIG.darwinCommon.darwinCommon b/configure/os/CONFIG.darwinCommon.darwinCommon index 7e02bbf82..a330190ed 100644 --- a/configure/os/CONFIG.darwinCommon.darwinCommon +++ b/configure/os/CONFIG.darwinCommon.darwinCommon @@ -67,7 +67,7 @@ CCC = $(GNU_BIN)/c++ # SHRLIB_VERSION = $(EPICS_VERSION).$(EPICS_REVISION).$(EPICS_MODIFICATION) SHRLIB_LDFLAGS = -dynamiclib -flat_namespace -undefined suppress \ - -install_name $(shell perl $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \ + -install_name $(shell $(PERL) $(TOOLS)/fullPathName.pl $(INSTALL_LIB))/$@ \ -compatibility_version $(EPICS_VERSION).$(EPICS_REVISION) \ -current_version $(SHRLIB_VERSION) SHRLIB_SUFFIX_BASE = .dylib diff --git a/configure/os/CONFIG_SITE.Common.ios-arm b/configure/os/CONFIG_SITE.Common.ios-arm index 462db67f8..e6ae3fcc1 100644 --- a/configure/os/CONFIG_SITE.Common.ios-arm +++ b/configure/os/CONFIG_SITE.Common.ios-arm @@ -1,21 +1,26 @@ # CONFIG_SITE.Common.ios-arm # # $Revision-Id$ -# This file is maintained by the build community. # # Site-specific settings for ios-arm target builds #------------------------------------------------------- # Which ARM instruction set(s) to generate code for: -# Most iOS devices can run programs compiled for both the -# ARMv6 and ARMv7 instruction sets. ARMv7 code is usually -# more efficient, but the older devices listed below can only -# use the ARMv6 instruction set. Including both architectures -# generates a Universal binary, which is larger and takes -# longer to compile but runs efficiently on all devices. +# Most iOS devices can run programs compiled for older +# instruction sets, although the newer instructions are +# more efficient. # -# ARMv6-only devices: iPhone 1 or 3G, iPod Touch Gen 1 or 2 +# Apple's compilers can build for multiple architectures, +# generating a Universal binary. This is larger and takes +# longer to compile, but runs efficiently on all devices. # -ARCH_CLASS = armv7 +# Xcode 4.5 dropped support for the ARMv6. +# +# ARMv7s devices: iPhone 5 +# ARMv6 devices: iPhone 1 and 3G, iPod Touch Gen 1 and 2 +# All other devices are ARMv7 + +ARCH_CLASS = armv7 armv7s +#ARCH_CLASS = armv7 #ARCH_CLASS = armv6 armv7 #ARCH_CLASS = armv6 diff --git a/configure/os/CONFIG_SITE.Common.iosCommon b/configure/os/CONFIG_SITE.Common.iosCommon index a41721621..0fa3d4523 100644 --- a/configure/os/CONFIG_SITE.Common.iosCommon +++ b/configure/os/CONFIG_SITE.Common.iosCommon @@ -1,7 +1,6 @@ # CONFIG_SITE.Common.iosCommon # # $Revision-Id$ -# This file is maintained by the build community. # # Site-specific settings for Apple iOS builds #------------------------------------------------------- @@ -12,16 +11,18 @@ #IOS_VERSION = 4.1 #IOS_VERSION = 4.2 #IOS_VERSION = 4.3 -IOS_VERSION = 5.0 +#IOS_VERSION = 5.0 +#IOS_VERSION = 5.1 +IOS_VERSION = 6.0 # Which compiler to use: # CLANG is preferred for recent versions of Xcode -# LLVM uses the llvm-gcc and llvm-g++ compilers +# LLVM_GNU uses the llvm-gcc and llvm-g++ compilers # GNU is needed for older versions of Xcode COMPILER = CLANG -#COMPILER = LLVM +#COMPILER = LLVM_GNU #COMPILER = GNU