From b5d8d9a16fb8365946ce5049d5bfa16de77b1629 Mon Sep 17 00:00:00 2001 From: erikj Date: Fri, 15 Feb 2013 10:40:46 +0100 Subject: [PATCH] 8005879: Add -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 to builds on Mac Reviewed-by: ohair --- common/autoconf/generated-configure.sh | 7 ++++++- common/autoconf/spec.gmk.in | 3 +++ common/autoconf/toolchain.m4 | 4 ++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh index d53e56e..98908aa 100644 --- a/common/autoconf/generated-configure.sh +++ b/common/autoconf/generated-configure.sh @@ -641,6 +641,7 @@ CXXFLAGS_JDKEXE CXXFLAGS_JDKLIB CFLAGS_JDKEXE CFLAGS_JDKLIB +MACOSX_REQUIRED_VERSION PACKAGE_PATH LEGACY_EXTRA_LDFLAGS LEGACY_EXTRA_CXXFLAGS @@ -3723,7 +3724,7 @@ fi #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 @@ 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 ad88295..ec47d03 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 7b7f19f..740b0c4 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" -- GitLab