提交 75c62ea3 编写于 作者: E erikj

8008451: Make mac builds on 10.8 work on 10.7

Reviewed-by: ohair, ddehaven
上级 578f83cc
......@@ -283,7 +283,7 @@ X_LIBS:=@X_LIBS@
OPENWIN_HOME:=@OPENWIN_HOME@
# The lowest required version of macosx to enforce compatiblity for
MACOSX_REQUIRED_VERSION=@MACOSX_REQUIRED_VERSION@
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
# There are two types: CC or CL
# CC is gcc and others behaving reasonably similar.
......
......@@ -876,10 +876,17 @@ 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)"
# 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"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册