From a714eb56f0249e0034b238dc2a3a136536c58ad8 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 16 Apr 2012 10:14:56 -0400 Subject: [PATCH] When building on Mac OS X, only set SDK_FLAGS if specified osversion doesn't match host. --- mkpkg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mkpkg b/mkpkg index c1ea8ed3c..7a4e8b844 100755 --- a/mkpkg +++ b/mkpkg @@ -229,7 +229,10 @@ case "$osversion" in macos*) # Build universal binaries (intel-only) targetting Mac OS X 10.5 ARCH_FLAGS="-arch i386 -arch x86_64" - SDK_FLAGS="-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" + if test "${osversion}" != "`$top_srcdir/pp --probe`"; then + sdkvers=`echo "${osversion}" | sed 's/^macos\([0-9][0-9]\)\([0-9]*\)-.*$/\1.\2/'` + SDK_FLAGS="-isysroot /Developer/SDKs/MacOSX${sdkvers}.sdk -mmacosx-version-min=${sdkvers}" + fi export CFLAGS="-O2 -g $ARCH_FLAGS $SDK_FLAGS" export LDFLAGS="$ARCH_FLAGS $SDK_FLAGS" # Note, must indent with tabs, not spaces due to IFS trickery -- 2.40.0