diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index 452ab145944ffcb98b8f1325c0929559c2cf04f6..741160eab1d8bd1a084fee1841f0192cd9d5400f 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -649,6 +649,7 @@ CXXFLAGS_JDKEXE CXXFLAGS_JDKLIB CFLAGS_JDKEXE CFLAGS_JDKLIB +MACOSX_REQUIRED_VERSION PACKAGE_PATH LEGACY_EXTRA_LDFLAGS LEGACY_EXTRA_CXXFLAGS @@ -3731,7 +3732,7 @@ fi #CUSTOM_AUTOCONF_INCLUDE # Do not change or remove the following line, it is needed for consistency checks: -DATE_WHEN_GENERATED=1361137039 +DATE_WHEN_GENERATED=1361218904 ############################################################################### # @@ -28241,6 +28242,10 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then 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 + + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)" fi if test "x$OPENJDK_TARGET_OS" = xbsd; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE" diff --git a/common/autoconf/spec.gmk.in b/common/autoconf/spec.gmk.in index ad882958d9d2ad12910383e0f98130afe2d51051..ec47d0364fde55548d1f13a04e33ad15f6bec462 100644 --- a/common/autoconf/spec.gmk.in +++ b/common/autoconf/spec.gmk.in @@ -282,6 +282,9 @@ X_CFLAGS:=@X_CFLAGS@ X_LIBS:=@X_LIBS@ OPENWIN_HOME:=@OPENWIN_HOME@ +# The lowest required version of macosx to enforce compatiblity for +MACOSX_REQUIRED_VERSION=@MACOSX_REQUIRED_VERSION@ + # There are two types: CC or CL # CC is gcc and others behaving reasonably similar. # CL is cl.exe only. diff --git a/common/autoconf/toolchain.m4 b/common/autoconf/toolchain.m4 index 7b7f19fefa8dd74b86a2b13d005f5cc277fff845..740b0c480938515621c1cc10ff1a18e36b807dfb 100644 --- a/common/autoconf/toolchain.m4 +++ b/common/autoconf/toolchain.m4 @@ -876,6 +876,10 @@ if test "x$OPENJDK_TARGET_OS" = xsolaris; then 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)" fi if test "x$OPENJDK_TARGET_OS" = xbsd; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"