changeset 15581:1dd771c6a1ee

8005879: Add -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 to builds on Mac Reviewed-by: ohair
author erikj
date Fri, 15 Feb 2013 10:40:46 +0100
parents d17eb2e13e36
children 3da76885efc3
files common/autoconf/generated-configure.sh common/autoconf/spec.gmk.in common/autoconf/toolchain.m4
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/common/autoconf/generated-configure.sh	Wed Jul 05 18:40:20 2017 +0200
+++ b/common/autoconf/generated-configure.sh	Fri Feb 15 10:40:46 2013 +0100
@@ -641,6 +641,7 @@
 CXXFLAGS_JDKLIB
 CFLAGS_JDKEXE
 CFLAGS_JDKLIB
+MACOSX_REQUIRED_VERSION
 PACKAGE_PATH
 LEGACY_EXTRA_LDFLAGS
 LEGACY_EXTRA_CXXFLAGS
@@ -3723,7 +3724,7 @@
 #CUSTOM_AUTOCONF_INCLUDE
 
 # Do not change or remove the following line, it is needed for consistency checks:
-DATE_WHEN_GENERATED=1359971740
+DATE_WHEN_GENERATED=1360921109
 
 ###############################################################################
 #
@@ -28233,6 +28234,10 @@
 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"
--- a/common/autoconf/spec.gmk.in	Wed Jul 05 18:40:20 2017 +0200
+++ b/common/autoconf/spec.gmk.in	Fri Feb 15 10:40:46 2013 +0100
@@ -282,6 +282,9 @@
 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.
--- a/common/autoconf/toolchain.m4	Wed Jul 05 18:40:20 2017 +0200
+++ b/common/autoconf/toolchain.m4	Fri Feb 15 10:40:46 2013 +0100
@@ -876,6 +876,10 @@
 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"