diff -r fd1a5574cf68 -r ab82853d3365 common/autoconf/toolchain.m4 --- a/common/autoconf/toolchain.m4 Mon Feb 18 15:35:05 2013 -0500 +++ b/common/autoconf/toolchain.m4 Thu Feb 21 14:16:56 2013 +0100 @@ -876,10 +876,17 @@ fi if test "x$OPENJDK_TARGET_OS" = xmacosx; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" - # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7 - MACOSX_REQUIRED_VERSION=1070 - AC_SUBST(MACOSX_REQUIRED_VERSION) - CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)" + # Setting these parameters makes it an error to link to macosx APIs that are + # newer than the given OS version and makes the linked binaries compatible even + # if built on a newer version of the OS. + # The expected format is X.Y.Z + MACOSX_VERSION_MIN=10.7.0 + AC_SUBST(MACOSX_VERSION_MIN) + # The macro takes the version with no dots, ex: 1070 + # Let the flags variables get resolved in make for easier override on make + # command line. + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" + LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)" fi if test "x$OPENJDK_TARGET_OS" = xbsd; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"