--- a/jdk/make/gensrc/GensrcMisc.gmk Mon Dec 05 16:27:50 2016 -0800
+++ b/jdk/make/gensrc/GensrcMisc.gmk Mon Dec 05 17:04:02 2016 -0800
@@ -108,3 +108,19 @@
endif
################################################################################
+# Create the javax/crypto/JceSecurity.class, using the build default.
+#
+ifeq ($(UNLIMITED_CRYPTO), true)
+ JCE_DEFAULT_POLICY = unlimited
+else
+ JCE_DEFAULT_POLICY = limited
+endif
+
+$(eval $(call SetupTextFileProcessing, BUILD_JCESECURITY_JAVA, \
+ SOURCE_FILES := $(JDK_TOPDIR)/src/java.base/share/classes/javax/crypto/JceSecurity.java.template, \
+ OUTPUT_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/javax/crypto/JceSecurity.java, \
+ REPLACEMENTS := \
+ @@JCE_DEFAULT_POLICY@@ => $(JCE_DEFAULT_POLICY), \
+))
+
+GENSRC_JAVA_BASE += $(BUILD_JCESECURITY_JAVA)