Skip to content

Commit d2cf4ba

Browse files
author
benjamin.peterson
committed
#3381 fix framework builds on 10.4
git-svn-id: http://svn.python.org/projects/python/trunk@65061 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent a7f3d15 commit d2cf4ba

2 files changed

Lines changed: 57 additions & 41 deletions

File tree

configure

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# From configure.in Revision: 64567 .
2+
# From configure.in Revision: 65033 .
33
# Guess values for system-dependent variables and create Makefiles.
44
# Generated by GNU Autoconf 2.61 for python 2.6.
55
#
@@ -4643,6 +4643,8 @@ echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
46434643
Darwin*)
46444644
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
46454645
# used to be here, but non-Apple gcc doesn't accept them.
4646+
4647+
46464648
if test "${enable_universalsdk}"; then
46474649
UNIVERSAL_ARCH_FLAGS=""
46484650
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
@@ -4665,8 +4667,33 @@ echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2
46654667

46664668

46674669
BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
4668-
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4670+
tgt=`sw_vers -productVersion | sed 's/\(10\.0-9*\).*/\1/'`
4671+
if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
4672+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
4673+
fi
4674+
fi
4675+
4676+
# Calculate the right deployment target for this build.
4677+
#
4678+
cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4679+
if test ${cur_target} '>' 10.2; then
4680+
cur_target=10.3
46694681
fi
4682+
if test "${UNIVERSAL_ARCHS}" = "all"; then
4683+
# Ensure that the default platform for a 4-way
4684+
# universal build is OSX 10.5, that's the first
4685+
# OS release where 4-way builds make sense.
4686+
cur_target='10.5'
4687+
fi
4688+
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4689+
4690+
# Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4691+
# environment with a value that is the same as what we'll use
4692+
# in the Makefile to ensure that we'll get the same compiler
4693+
# environment during configure and build time.
4694+
MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4695+
export MACOSX_DEPLOYMENT_TARGET
4696+
EXPORT_MACOSX_DEPLOYMENT_TARGET=''
46704697

46714698
;;
46724699
OSF*)
@@ -13034,26 +13061,7 @@ then
1303413061
Darwin/*)
1303513062
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
1303613063
# This allows an extension to be used in any Python
13037-
cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
13038-
if test ${cur_target} '>' 10.2; then
13039-
cur_target=10.3
13040-
fi
13041-
if test "${UNIVERSAL_ARCHS}" = "all"; then
13042-
# Ensure that the default platform for a 4-way
13043-
# universal build is OSX 10.5, that's the first
13044-
# OS release where 4-way builds make sense.
13045-
cur_target='10.5'
13046-
fi
13047-
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
13048-
13049-
# Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
13050-
# environment with a value that is the same as what we'll use
13051-
# in the Makefile to ensure that we'll get the same compiler
13052-
# environment during configure and build time.
13053-
MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
13054-
export MACOSX_DEPLOYMENT_TARGET
1305513064

13056-
EXPORT_MACOSX_DEPLOYMENT_TARGET=''
1305713065
if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
1305813066
then
1305913067
if test "${enable_universalsdk}"; then

configure.in

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,8 @@ yes)
903903
Darwin*)
904904
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
905905
# used to be here, but non-Apple gcc doesn't accept them.
906+
907+
906908
if test "${enable_universalsdk}"; then
907909
UNIVERSAL_ARCH_FLAGS=""
908910
if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
@@ -923,9 +925,34 @@ yes)
923925

924926

925927
BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
926-
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
928+
tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
929+
if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
930+
CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
931+
fi
927932
fi
928933

934+
# Calculate the right deployment target for this build.
935+
#
936+
cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
937+
if test ${cur_target} '>' 10.2; then
938+
cur_target=10.3
939+
fi
940+
if test "${UNIVERSAL_ARCHS}" = "all"; then
941+
# Ensure that the default platform for a 4-way
942+
# universal build is OSX 10.5, that's the first
943+
# OS release where 4-way builds make sense.
944+
cur_target='10.5'
945+
fi
946+
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
947+
948+
# Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
949+
# environment with a value that is the same as what we'll use
950+
# in the Makefile to ensure that we'll get the same compiler
951+
# environment during configure and build time.
952+
MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
953+
export MACOSX_DEPLOYMENT_TARGET
954+
EXPORT_MACOSX_DEPLOYMENT_TARGET=''
955+
929956
;;
930957
OSF*)
931958
BASECFLAGS="$BASECFLAGS -mieee"
@@ -1624,26 +1651,7 @@ then
16241651
Darwin/*)
16251652
# Use -undefined dynamic_lookup whenever possible (10.3 and later).
16261653
# This allows an extension to be used in any Python
1627-
cur_target=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'`
1628-
if test ${cur_target} '>' 10.2; then
1629-
cur_target=10.3
1630-
fi
1631-
if test "${UNIVERSAL_ARCHS}" = "all"; then
1632-
# Ensure that the default platform for a 4-way
1633-
# universal build is OSX 10.5, that's the first
1634-
# OS release where 4-way builds make sense.
1635-
cur_target='10.5'
1636-
fi
1637-
CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
1638-
1639-
# Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
1640-
# environment with a value that is the same as what we'll use
1641-
# in the Makefile to ensure that we'll get the same compiler
1642-
# environment during configure and build time.
1643-
MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
1644-
export MACOSX_DEPLOYMENT_TARGET
16451654

1646-
EXPORT_MACOSX_DEPLOYMENT_TARGET=''
16471655
if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
16481656
then
16491657
if test "${enable_universalsdk}"; then

0 commit comments

Comments
 (0)