8005879: Add -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 to builds on Mac
Reviewed-by: ohair
--- a/jdk/make/common/Defs-macosx.gmk Wed Jul 05 18:40:20 2017 +0200
+++ b/jdk/make/common/Defs-macosx.gmk Fri Feb 15 10:41:15 2013 +0100
@@ -405,3 +405,11 @@
endif
LIB_LOCATION ?= $(LIBDIR)
+
+# Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
+ifeq ($(MACOSX_REQUIRED_VERSION),)
+ MACOSX_REQUIRED_VERSION:=1070
+endif
+MACOSX_OS_VERSION_CFLAGS := -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MACOSX_REQUIRED_VERSION)
+OTHER_CFLAGS += $(MACOSX_OS_VERSION_CFLAGS)
+OTHER_CXXFLAGS += $(MACOSX_OS_VERSION_CFLAGS)