diff -Nru openjdk.orig/jdk/make/common/Defs-embedded.gmk openjdk/jdk/make/common/Defs-embedded.gmk
--- openjdk.orig/jdk/make/common/Defs-embedded.gmk	1970-01-01 01:00:00.000000000 +0100
+++ openjdk/jdk/make/common/Defs-embedded.gmk	2013-10-09 11:57:00.416951716 +0100
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Variable definitions for SE Embedded builds.  This file should
+# not contain rules.
+#
+ifdef JAVASE_EMBEDDED
+
+# Compress jar files
+COMPRESS_JARS = true
+
+# Don't mmap zip files
+LIBZIP_CAN_USE_MMAP = false
+
+# Disable ALSA version check
+REQUIRED_ALSA_VERSION =
+
+# Compilation settings
+OTHER_CPPFLAGS += -DJAVASE_EMBEDDED
+
+# Product naming
+PRODUCT_SUFFIX = SE Runtime Environment for Embedded
+RUNTIME_NAME = $(PRODUCT_NAME) $(PRODUCT_SUFFIX)
+
+# Reduced JRE locations
+JRE_REDUCED_HEADLESS_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-headless-image
+JRE_REDUCED_IMAGE_DIR = $(ABS_OUTPUTDIR)/j2re-reduced-image
+
+endif # JAVASE_EMBEDDED
+
diff -Nru openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk
--- openjdk.orig/jdk/make/common/Defs.gmk	2013-10-09 01:32:58.126292030 +0100
+++ openjdk/jdk/make/common/Defs.gmk	2013-10-09 12:02:00.033606462 +0100
@@ -124,6 +124,12 @@
 include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk
 
 #
+# SE-Embedded support, if enabled
+#
+
+include $(JDK_TOPDIR)/make/common/Defs-embedded.gmk
+
+#
 # Freetype logic is applicable to OpenJDK only
 #
 ifdef OPENJDK
diff -Nru openjdk.orig/jdk/make/common/Library.gmk openjdk/jdk/make/common/Library.gmk
--- openjdk.orig/jdk/make/common/Library.gmk	2013-10-09 01:32:58.126292030 +0100
+++ openjdk/jdk/make/common/Library.gmk	2013-10-09 11:57:00.416951716 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1995, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -78,7 +78,7 @@
 endif
 
 $(ACTUAL_LIBRARY):: $(INIT) $(TEMPDIR) $(LIBDIR) $(BINDIR) $(EXTDIR) classheaders
-
+	@$(ECHO) Building lib:$(ACTUAL_LIBRARY) 
 #
 # COMPILE_APPROACH: Different approaches to compile up the native object
 #   files as quickly as possible.
diff -Nru openjdk.orig/jdk/make/common/Release-embedded.gmk openjdk/jdk/make/common/Release-embedded.gmk
--- openjdk.orig/jdk/make/common/Release-embedded.gmk	1970-01-01 01:00:00.000000000 +0100
+++ openjdk/jdk/make/common/Release-embedded.gmk	2013-10-09 11:57:00.416951716 +0100
@@ -0,0 +1,232 @@
+#
+# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.  Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# SE-Embedded Reduced JRE targets
+#
+ifdef JAVASE_EMBEDDED
+
+reduced-image-jre reduced-headless-image-jre ::
+	@$(ECHO) ">>>Making "$@" @ `$(DATE)` ..."
+
+# Add the reduced-jre images as pre-reqs. These will be processed last
+images:: reduced-image-jre reduced-headless-image-jre
+
+
+######################################################
+# Create the headless rt.jar
+######################################################
+
+NOT_HEADLESS_RT_JAR_LIST = $(ABS_TEMPDIR)/not_hl_rt_jar.list
+HEADLESS_RT_JAR_FILELIST=$(JARFILELISTS_TEMPDIR)/hl_rt_jar_list
+TOTAL_HEADLESS_JAR_FILELIST=$(REORDER_TEMPDIR)/hl_file_list
+HEADLESS_CLASSLIST=$(ABS_TEMPDIR)/headless_classlist
+
+# Add the jar file directories that we don't want in the
+# headless JRE.  If you want to remove most classes in a
+# directory, put the directory in the NOT_HEADLESS_RT_JAR_LIST
+# and put the individual classes you want to keep in the 
+# HEADLESS_CLASSLIST file. 
+$(NOT_HEADLESS_RT_JAR_LIST): $(NOT_RT_JAR_LIST)
+	$(RM) $(HEADLESS_CLASSLIST)
+	$(RM) $(NOT_HEADLESS_RT_JAR_LIST)
+	$(CP) $(NOT_RT_JAR_LIST) $(NOT_HEADLESS_RT_JAR_LIST)
+	$(ECHO) "sun/awt/motif/" >> $@
+	$(ECHO) "sun/awt/X11/" >> $@
+	$(ECHO) "sun/applet/" >> $@
+	$(ECHO) "sun/java2d/opengl/" >> $@
+	$(ECHO) "com/sun/java/swing/plaf/" >> $@
+	$(ECHO) "sun/awt/motif/MFontConfiguration" >$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/applet/AppContextCreator" >>$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/applet/AppletAudioClip" >>$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/java2d/opengl/GLXSurfaceData" >>$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/java2d/opengl/GLXSurfaceData"\$$"GLXOffScreenSurfaceData" >>$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/java2d/opengl/GLXVolatileSurfaceManager" >>$(HEADLESS_CLASSLIST)
+	$(ECHO) "sun/java2d/opengl/OGLSurfaceData" >>$(HEADLESS_CLASSLIST)
+
+$(TOTAL_HEADLESS_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_HEADLESS_RT_JAR_LIST)
+	$(prep-target)
+	$(RM) $@.temp
+	$(CD) $(CLASSBINDIR) ; \
+		$(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
+		-o  $@.temp $(HEADLESS_CLASSLIST) $(NOT_HEADLESS_RT_JAR_LIST)  .
+	$(MV) $@.temp $@
+	@$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
+
+# Create the headless rt.jar file list & non-class files list
+MakeHeadlessJarFileList: $(TOTAL_HEADLESS_JAR_FILELIST) $(JARSPLIT_JARFILE)
+	@$(RM) $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST)
+	$(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) $(TOTAL_HEADLESS_JAR_FILELIST) \
+		-o  $(HEADLESS_RT_JAR_FILELIST) $(RES_JAR_FILELIST)
+	@$(java-vm-cleanup)
+
+# Create headless rt.jar
+HL_RT_JAR=$(ABS_TEMPDIR)/rt-hl-orig.jar
+$(HL_RT_JAR): MakeHeadlessJarFileList $(JAR_MANIFEST_FILE)
+	$(prep-target)
+	$(CD) $(CLASSBINDIR) ; \
+		$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ @$(HEADLESS_RT_JAR_FILELIST) \
+		 $(JAR_JFLAGS)
+	@$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
+
+
+#
+# Produce a reduced Headful JRE for Embedded Devices
+#
+# The deployment binaries are added during the deployment build process
+#
+
+# Binaries that don't get included in reduced jre image bin directory
+NOT_REDUCEDJRE_BIN = \
+ java_vm \
+ kinit \
+ klist \
+ ktab \
+ orbd \
+ policytool \
+ rmid \
+ rmiregistry \
+ servertool \
+ tnameserv \
+ pack200 \
+ unpack200
+
+# jars/resources/libs that don't get included in reduced jre image lib directory
+NOT_REDUCEDJRE_LIB = \
+ charsets.jar \
+ ext/dnsns.jar \
+ ext/localedata.jar \
+ $(LIBARCH)/client/classes.jsa \
+ $(LIBARCH)/libjavaplugin_jni.so \
+ $(LIBARCH)/libjavaplugin_nscp_gcc29.so \
+ $(LIBARCH)/libjavaplugin_nscp.so \
+ $(LIBARCH)/libjavaplugin_oji.so
+
+
+ifeq ($(PLATFORM), linux)
+  STRIP_OPTS = --strip-unneeded
+else
+  STRIP_OPTS = -x
+endif
+
+
+reduced-image-jre::
+	@$(ECHO) Starting to Produce Reduced JRE
+	@#
+	@# First make a copy of the full JRE
+	@#
+	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)
+	$(MKDIR) -p $(JRE_REDUCED_IMAGE_DIR)
+	$(CD) $(JRE_IMAGE_DIR); \
+	    $(TAR) cf - . | ($(CD) $(JRE_REDUCED_IMAGE_DIR); $(TAR) xf - ); 
+
+	@# strip the main .so files
+	$(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/client/libjvm.so
+ifndef BUILD_CLIENT_ONLY
+	$(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/server/libjvm.so
+endif
+
+	@#
+	@# Remove all of the files that are not needed for the
+	@# reduced JRE
+	@#
+	for l in $(NOT_JREREDUCED_BIN) ; do \
+	    $(RM) $(JRE_REDUCED_IMAGE_DIR)/bin/$$l ; \
+	done
+	for l in $(NOT_JREREDUCED_LIB) ; do \
+	    $(RM) $(JRE_REDUCED_IMAGE_DIR)/lib/$$l ; \
+	done
+
+	@# Remove misc. other files
+	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man
+	$(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES
+
+	@$(ECHO) Done Creating Reduced JRE
+
+#
+# Produce a reduced Headless JRE
+#
+reduced-headless-image-jre:: $(RT_JAR) $(RESOURCES_JAR) $(BUILD_META_INDEX) $(HL_RT_JAR)
+	@$(ECHO) Starting to Produce Reduced Headless JRE
+	@#
+	@# First make a copy of the reduced JRE we just built
+	@#
+	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
+	$(MKDIR) -p $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
+	$(CD) $(JRE_REDUCED_IMAGE_DIR); \
+	    $(TAR) cf - . | ($(CD) $(JRE_REDUCED_HEADLESS_IMAGE_DIR); $(TAR) xf - ); 
+
+	@# Replace the full rt.jar with the headless rt.jar
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar
+	$(CP) $(HL_RT_JAR) $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/rt.jar
+
+	@#
+	@# Remove all of the files that are not needed for the
+	@# reduced Headless JRE
+	@#
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/gtkhelper
+	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libjsoundalsa.so
+	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/audio
+	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/applet
+	$(RM)  $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/awt_robot
+	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/xawt
+	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/$(LIBARCH)/libsplashscreen.so
+	@# Remove oblique fonts and reduce font support to LucidaSansRegular only
+	$(RM) -fr $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/oblique-fonts
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiBold.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightDemiItalic.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightItalic.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaBrightRegular.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaSansDemiBold.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterBold.ttf
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/LucidaTypewriterRegular.ttf
+
+ifeq ($(PLATFORM), linux)
+# put out minimal fonts.dir file for the remaining font
+	$(RM) -f $(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) 6>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-1">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-2">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-4">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-5">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-7">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+	$(ECHO) "LucidaSansRegular.ttf -b&h-lucidasans-medium-r-normal-sans-0-0-0-0-p-0-iso8859-9">>$(JRE_REDUCED_HEADLESS_IMAGE_DIR)/lib/fonts/fonts.dir
+
+endif # Linux
+
+	@#
+	@# all done with JRE reduced headless image
+	@#
+
+	@$(ECHO) Done Creating Reduced Headless JRE
+
+images-clobber::
+	$(RM) -r $(JRE_REDUCED_IMAGE_DIR)
+	$(RM) -r $(JRE_REDUCED_HEADLESS_IMAGE_DIR)
+
+.PHONY: reduced-image-jre reduced-headless-image-jre 
+
+endif # JAVASE_EMBEDDED
+
diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk
--- openjdk.orig/jdk/make/common/Release.gmk	2013-10-09 01:32:55.966258542 +0100
+++ openjdk/jdk/make/common/Release.gmk	2013-10-09 12:01:06.860785412 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -35,7 +35,7 @@
 
 IMAGE_BINDIR = bin
 
-# The compiler should not issue a "Sun Propietary" warning when compiling
+# The compiler should not issue a "Proprietary" warning when compiling
 # classes in the com.sun.java.swing.plaf packages, since we've always
 # allowed, and even advocated, extending them (see bug 6476749).
 #
@@ -221,6 +221,16 @@
 fi
 endef
 
+
+# no compression unless requested
+ifndef COMPRESS_JARS
+  CREATE_JAR_OPTS = c0mf
+  CREATE_JAR_OPTS_NOMANIFEST = c0f
+else
+  CREATE_JAR_OPTS = cmf
+  CREATE_JAR_OPTS_NOMANIFEST = cf
+endif
+
 #
 # Targets.
 #
@@ -652,7 +662,7 @@
 	$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@
 $(RESOURCES_JAR): $(RES_JAR_ARGLIST) $(JAR_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
+	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
 	    @$(RES_JAR_ARGLIST) $(JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
@@ -660,7 +670,7 @@
 JSSE_JAR=$(TEMPDIR)/jsse-orig.jar
 $(JSSE_JAR): $(JAR_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
+	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
 		$(JSSE_CLASSES_DIRS:%=-C $(CLASSBINDIR) %) \
 		$(JAR_JFLAGS)
 	@$(java-vm-cleanup)
@@ -711,7 +721,7 @@
 	$(SED) -e "s@^@-C $(CLASSBINDIR) @" $< > $@
 $(RT_JAR): $(RT_JAR_ARGLIST) $(JAR_MANIFEST_FILE)
 	$(prep-target)
-	$(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \
+	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \
 	    @$(RT_JAR_ARGLIST) $(JAR_JFLAGS)
 	@$(java-vm-cleanup)
 
@@ -719,6 +729,10 @@
 
 BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar
 
+# SE-Embedded targets if enabled
+include $(JDK_TOPDIR)/make/common/Release-embedded.gmk
+
+
 ######################################################
 # JRE Image
 ######################################################
@@ -948,7 +962,7 @@
 	@#
 	@# lib/tools.jar
 	@#
-	$(BOOT_JAR_CMD) c0f $(LIBDIR)/tools.jar $(addprefix \
+	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(LIBDIR)/tools.jar $(addprefix \
 		-C $(CLASSBINDIR) , $(TOOLS)) \
 	        $(JAR_JFLAGS)
 	@$(java-vm-cleanup)
@@ -962,7 +976,7 @@
 	    -Acom.sun.tools.javac.sym.Jar=$(RT_JAR) \
 	    -Acom.sun.tools.javac.sym.Dest=$(OUTPUTDIR)/symbols/META-INF/sym/rt.jar \
 	    $(CORE_PKGS) $(NON_CORE_PKGS) $(EXCLUDE_PROPWARN_PKGS)
-	$(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \
+	$(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(LIBDIR)/ct.sym \
 	    -C $(OUTPUTDIR)/symbols META-INF $(JAR_JFLAGS)
 	@$(java-vm-cleanup)
 	$(CP) $(LIBDIR)/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym
diff -Nru openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk openjdk/jdk/make/common/shared/Sanity-Settings.gmk
--- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk	2013-10-09 01:32:58.154292464 +0100
+++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk	2013-10-09 11:57:00.420951778 +0100
@@ -180,7 +180,9 @@
   endif
 endif
 ifeq ($(PLATFORM),linux)
-  ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
+  ifdef REQUIRED_ALSA_VERSION
+    ALL_SETTINGS+=$(call addRequiredSetting,ALSA_VERSION)
+  endif
 endif
 ALL_SETTINGS+=$(call addRequiredVersionSetting,OS_VERSION)
 ALL_SETTINGS+=$(call addOptionalSetting,OS_VARIANT_NAME)
diff -Nru openjdk.orig/jdk/make/java/zip/Makefile openjdk/jdk/make/java/zip/Makefile
--- openjdk.orig/jdk/make/java/zip/Makefile	2013-10-09 01:32:53.166215133 +0100
+++ openjdk/jdk/make/java/zip/Makefile	2013-10-09 11:59:34.411356495 +0100
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 1996, 2006, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 #
 # This code is free software; you can redistribute it and/or modify it
@@ -46,7 +46,10 @@
 	java/util/jar/JarFile.java
 
 ifneq ($(PLATFORM), windows)
-OTHER_CFLAGS += -DUSE_MMAP
+  # Use mmap unless explicitly disallowed
+  ifneq ($(LIBZIP_CAN_USE_MMAP),false)
+    OTHER_CFLAGS += -DUSE_MMAP
+  endif
 else
   # Files built here do not compile with warning level 3 if warnings are fatal
   COMPILER_WARNINGS_FATAL=false
