From df6f042b5a44e192c9fb6ba74deef4f9d2d2e1c9 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Fri, 2 Dec 2011 10:42:43 -0600 Subject: [PATCH] configure: Update Apple iOS builds * Default IOS_VERSION to 5.0 * Allow ARMv6 and ARMv7 universal binaries by setting ARCH_CLASS * Switch from g++ to clang++ --- configure/os/CONFIG.Common.ios-arm | 8 +++---- configure/os/CONFIG.Common.ios-x86 | 3 +++ configure/os/CONFIG.Common.iosCommon | 25 ++++++++++++++++---- configure/os/CONFIG_SITE.Common.ios-arm | 28 +++++++++++++++++++++++ configure/os/CONFIG_SITE.Common.iosCommon | 3 ++- documentation/RELEASE_NOTES.html | 24 +++++++++++++++++++ 6 files changed, 80 insertions(+), 11 deletions(-) create mode 100644 configure/os/CONFIG_SITE.Common.ios-arm diff --git a/configure/os/CONFIG.Common.ios-arm b/configure/os/CONFIG.Common.ios-arm index b6f1a57b8..26296a38c 100644 --- a/configure/os/CONFIG.Common.ios-arm +++ b/configure/os/CONFIG.Common.ios-arm @@ -1,17 +1,15 @@ # CONFIG.Common.ios-arm # +# $Revision-Id$ # This file is maintained by the build community. # # Definitions for ios-arm target builds +# Sites may override these definitions in CONFIG_SITE.Common.ios-arm +# or CONFIG_SITE..ios-arm #------------------------------------------------------- IOS_PLATFORM = iPhoneOS -# -# Architecture-specific information -# -ARCH_CLASS = armv6 - OP_SYS_CFLAGS += -fno-inline-functions # iOS optimization flags for arm architecture diff --git a/configure/os/CONFIG.Common.ios-x86 b/configure/os/CONFIG.Common.ios-x86 index c236e606c..064319d2b 100644 --- a/configure/os/CONFIG.Common.ios-x86 +++ b/configure/os/CONFIG.Common.ios-x86 @@ -1,8 +1,11 @@ # CONFIG.Common.ios-x86 # +# $Revision-Id$ # This file is maintained by the build community. # # Definitions for ios-x86 target builds +# Sites may override these definitions in CONFIG_SITE.Common.ios-x86 +# or CONFIG_SITE..ios-x86 #------------------------------------------------------- IOS_PLATFORM = iPhoneSimulator diff --git a/configure/os/CONFIG.Common.iosCommon b/configure/os/CONFIG.Common.iosCommon index 3dd6f126c..40f80cb86 100644 --- a/configure/os/CONFIG.Common.iosCommon +++ b/configure/os/CONFIG.Common.iosCommon @@ -3,7 +3,7 @@ # $Revision-Id$ # This file is maintained by the build community. # -# Definitions for iOS target archs +# Definitions for all Apple iOS builds # Sites may override these definitions in CONFIG_SITE.Common.iosCommon # or CONFIG_SITE..iosCommon #------------------------------------------------------- @@ -29,8 +29,14 @@ SDK_DIR = $(PLATFORM_DIR)/Developer/SDKs/$(IOS_PLATFORM)$(IOS_VERSION).sdk #------------------------------------------------------- # Build architecture flags -ARCH_DEP_CFLAGS += -arch $(ARCH_CLASS) -ARCH_DEP_LDFLAGS += -arch $(ARCH_CLASS) +# ARCH_CLASS must contain a list of CPU architectures which must be +# valid arguments to the -arch options for the cc and ld commands. +# ARCH_CLASS is defined in a CONFIG_SITE file which is not loaded +# until after this file. +# +ARCH_DEP_FLAGS = $(addprefix -arch ,$(ARCH_CLASS)) +ARCH_DEP_CFLAGS += $(ARCH_DEP_FLAGS) +ARCH_DEP_LDFLAGS += $(ARCH_DEP_FLAGS) #-------------------------------------------------- # Operating system flags @@ -49,9 +55,9 @@ OPT_CXXFLAGS_YES += -g #------------------------------------------------------- # Compiler definitions: # Use clang instead of gcc -# Must use g++ still CC = $(GNU_BIN)/clang -CCC = $(GNU_BIN)/c++ +CCC = $(GNU_BIN)/clang++ +GNU_LDLIBS_YES = #------------------------------------------------------- # Linker flags @@ -80,6 +86,15 @@ vpath %.m $(USR_VPATH) $(ALL_SRC_DIRS) %.o: %.m $(COMPILE.c) -c $< +#-------------------------------------------------- +# 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) + #-------------------------------------------------- # Allow site overrides -include $(CONFIG)/os/CONFIG_SITE.Common.iosCommon diff --git a/configure/os/CONFIG_SITE.Common.ios-arm b/configure/os/CONFIG_SITE.Common.ios-arm new file mode 100644 index 000000000..43874fe41 --- /dev/null +++ b/configure/os/CONFIG_SITE.Common.ios-arm @@ -0,0 +1,28 @@ +# 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. +# +# ARMv6-only devices: iPhone 1 or 3G, iPod Touch Gen 1 or 2 +# +ARCH_CLASS = armv7 +#ARCH_CLASS = armv6 armv7 +#ARCH_CLASS = armv6 + + +# Uncomment these two definitions to use g++ instead of clang++ +# which may be needed in some circumstances: +# +#CCC = $(GNU_BIN)/c++ +#GNU_LDLIBS_YES = -lgcc diff --git a/configure/os/CONFIG_SITE.Common.iosCommon b/configure/os/CONFIG_SITE.Common.iosCommon index 0f5c09df3..121857c27 100644 --- a/configure/os/CONFIG_SITE.Common.iosCommon +++ b/configure/os/CONFIG_SITE.Common.iosCommon @@ -10,7 +10,8 @@ #IOS_VERSION = 3.2 #IOS_VERSION = 4.1 -IOS_VERSION = 4.3 +#IOS_VERSION = 4.3 +IOS_VERSION = 5.0 # Most sites will want shared libraries diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html index c2d0494b5..e7b6cb31b 100644 --- a/documentation/RELEASE_NOTES.html +++ b/documentation/RELEASE_NOTES.html @@ -13,6 +13,30 @@ +

Build configurations updated for Apple iOS targets

+ +

The build process can now construct universal binaries containing both ARMv6 +and ARMv7 code, and several defaults have been changed when building for iOS +targets:

+ +
    + +
  • The default value for IOS_VERSION is now 5.0, edit the setting in +configure/os/CONFIG_SITE.Common.iosCommon to use an older version.
  • + +
  • With the introduction of iOS 5.0 we have switched the C++ compiler for +ios-arm from GNU g++ to using the LLVM-based clang++ (the GNU compilers are +apparetnly no longer included with the SDK). This can be switched back by +editing the new CONFIG_SITE.Common.ios-arm file.
  • + +
  • Like the Darwin builds, universal binaries can now be compiled for the +ios-arm target, containing either or both ARMv6 and ARMv7 instructions. This is +configured by setting ARCH_CLASS in the new CONFIG_SITE.Common.ios-arm +file. The default is now to build for ARMv7 only, which is not compatible with +the original iPhone 1 or 3G, or with the iPod Touch Generations 1 or 2.
  • + +
+

Added -b option to dbExpand

This turns off monotonic checking of breakpoint tables.