common/autoconf/toolchain.m4

changeset 631
ab82853d3365
parent 621
ffb4d2e95140
child 637
52741ab7c601
child 650
c4901c0e0579
     1.1 --- a/common/autoconf/toolchain.m4	Mon Feb 18 15:35:05 2013 -0500
     1.2 +++ b/common/autoconf/toolchain.m4	Thu Feb 21 14:16:56 2013 +0100
     1.3 @@ -876,10 +876,17 @@
     1.4  fi
     1.5  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
     1.6      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE"
     1.7 -    # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
     1.8 -    MACOSX_REQUIRED_VERSION=1070
     1.9 -    AC_SUBST(MACOSX_REQUIRED_VERSION)
    1.10 -    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)" 
    1.11 +    # Setting these parameters makes it an error to link to macosx APIs that are 
    1.12 +    # newer than the given OS version and makes the linked binaries compatible even
    1.13 +    # if built on a newer version of the OS.
    1.14 +    # The expected format is X.Y.Z
    1.15 +    MACOSX_VERSION_MIN=10.7.0
    1.16 +    AC_SUBST(MACOSX_VERSION_MIN)
    1.17 +    # The macro takes the version with no dots, ex: 1070
    1.18 +    # Let the flags variables get resolved in make for easier override on make
    1.19 +    # command line.
    1.20 +    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
    1.21 +    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
    1.22  fi
    1.23  if test "x$OPENJDK_TARGET_OS" = xbsd; then
    1.24      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"

mercurial