From ee4a6fa59e83047345df9a9c6d3ef76c111eeb35 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Tue, 8 Mar 2016 15:20:30 -0800 Subject: [PATCH] OSX: Use the oldest SDK, but always set our target to 10.8 Build binaries usable on older machines even if older SDKs are not installed. Older SDKs can no longer be installed on newer Xcode versions. Change-Id: I0c9f2534466a127a19107820879c2856bfac0076 --- core/combo/mac_version.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/combo/mac_version.mk b/core/combo/mac_version.mk index 44cfb6b407..380aabe06f 100644 --- a/core/combo/mac_version.mk +++ b/core/combo/mac_version.mk @@ -5,6 +5,13 @@ # mac_sdk_root # gcc_darwin_version +# You can no longer install older SDKs in newer xcode versions, so it appears +# to be expected to use the newer SDKs, but set command line flags in order to +# target older Mac OS X versions. +# +# We'll use the oldest SDK we can find, and then use the -mmacosx-version-min +# and MACOSX_DEPLOYMENT_TARGET flags to set our minimum version. + ifndef build_mac_version build_mac_version := $(shell sw_vers -productVersion) @@ -37,4 +44,7 @@ $(warning *****************************************************) $(error Stop.) endif +# Set to the minimum version of OS X that we want to run on. +mac_sdk_version := $(firstword $(mac_sdk_versions_supported)) + endif # ifndef build_mac_version