# HG changeset patch # User dholmes # Date 1300834576 14400 # Node ID 9076d969ffdf52113410f21ad5d7d58cb8c650d7 # Parent 6a3062c1416f0ba9a69e1f97c090b6e65a4ddbfd 7025066: Build systems changes to support SE Embedded Integration Summary: Define Embedded specific files and include them in the main files. Allow finer control over some build options. Reviewed-by: ohair, bobv, collins diff -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/Defs-embedded.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/make/common/Defs-embedded.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -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 -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/Defs.gmk --- a/jdk/make/common/Defs.gmk Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/common/Defs.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -116,6 +116,12 @@ include $(JDK_TOPDIR)/make/common/Defs-$(PLATFORM).gmk # +# SE-Embedded support, if enabled +# + +include $(JDK_TOPDIR)/make/common/Defs-embedded.gmk + +# # Cross-compilation Settings # ifdef CROSS_COMPILE_ARCH @@ -144,7 +150,6 @@ VM_NAME = client endif - # # Freetype logic is applicable to OpenJDK only # diff -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/Library.gmk --- a/jdk/make/common/Library.gmk Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/common/Library.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -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 -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/Release-embedded.gmk --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/jdk/make/common/Release-embedded.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -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 -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/Release.gmk --- a/jdk/make/common/Release.gmk Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/common/Release.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -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 @@ -38,7 +38,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). # @@ -205,6 +205,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. # @@ -232,7 +242,7 @@ $(INITIAL_IMAGE_JRE) $(INITIAL_IMAGE_JDK) \ trim-image-jre trim-image-jdk \ identify-image-jre identify-image-jdk \ - process-image-jre process-image-jdk sec-files sec-files-win jgss-files + process-image-jre process-image-jdk sec-files sec-files-win jgss-files # Don't use these image-jre:: initial-image-jre trim-image-jre identify-image-jre process-image-jre @@ -623,7 +633,7 @@ $(RESOURCES_JAR): $(RES_JAR_FILELIST) $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ @$(RES_JAR_FILELIST) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -632,7 +642,7 @@ $(JSSE_JAR): $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ $(JSSE_CLASSES_DIRS) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -679,7 +689,7 @@ $(RT_JAR): $(RT_JAR_FILELIST) $(JAR_MANIFEST_FILE) $(prep-target) $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0mf $(JAR_MANIFEST_FILE) $@ \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS) $(JAR_MANIFEST_FILE) $@ \ @$(RT_JAR_FILELIST) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) @@ -687,6 +697,10 @@ BUILDMETAINDEX_JARFILE = $(ABS_BUILDTOOLJARDIR)/buildmetaindex.jar +# SE-Embedded targets if enabled +include $(JDK_TOPDIR)/make/common/Release-embedded.gmk + + ###################################################### # JRE Image ###################################################### @@ -939,7 +953,7 @@ @# lib/tools.jar @# $(CD) $(CLASSBINDIR) && \ - $(BOOT_JAR_CMD) c0f $(ABS_LIBDIR)/tools.jar \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(ABS_LIBDIR)/tools.jar \ $(TOOLS) $(BOOT_JAR_JFLAGS) @$(CD) $(CLASSBINDIR) && $(java-vm-cleanup) $(CP) $(LIBDIR)/tools.jar $(JDK_IMAGE_DIR)/lib/tools.jar @@ -952,7 +966,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) $(EXPORTED_PRIVATE_PKGS) - $(BOOT_JAR_CMD) c0f $(LIBDIR)/ct.sym \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(LIBDIR)/ct.sym \ -C $(OUTPUTDIR)/symbols META-INF $(BOOT_JAR_JFLAGS) @$(java-vm-cleanup) $(CP) $(LIBDIR)/ct.sym $(JDK_IMAGE_DIR)/lib/ct.sym diff -r 6a3062c1416f -r 9076d969ffdf jdk/make/common/shared/Sanity-Settings.gmk --- a/jdk/make/common/shared/Sanity-Settings.gmk Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/common/shared/Sanity-Settings.gmk Tue Mar 22 18:56:16 2011 -0400 @@ -185,7 +185,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 -r 6a3062c1416f -r 9076d969ffdf jdk/make/java/zip/Makefile --- a/jdk/make/java/zip/Makefile Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/java/zip/Makefile Tue Mar 22 18:56:16 2011 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, 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 @@ -50,7 +50,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 endif # diff -r 6a3062c1416f -r 9076d969ffdf jdk/make/sun/nio/cs/Makefile --- a/jdk/make/sun/nio/cs/Makefile Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/make/sun/nio/cs/Makefile Tue Mar 22 18:56:16 2011 -0400 @@ -1,5 +1,5 @@ # -# Copyright (c) 1996, 2010, 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 @@ -120,8 +120,15 @@ $(SHARE_SRC)/classes/sun/nio/cs/ext/$(SERVICE_DESCRIPTION_PATH) $(install-file) +# no compression unless requested +ifndef COMPRESS_JARS + CREATE_JAR_OPTS_NOMANIFEST = cf0 +else + CREATE_JAR_OPTS_NOMANIFEST = cf +endif + $(CHARSETS_JAR): $(FILES_class) $(CLASSDESTDIR)/$(SERVICE_DESCRIPTION_PATH) $(FILES_DAT) - $(BOOT_JAR_CMD) cf0 $(CHARSETS_JAR) \ + $(BOOT_JAR_CMD) $(CREATE_JAR_OPTS_NOMANIFEST) $(CHARSETS_JAR) \ -C $(CLASSDESTDIR) sun \ -C $(CLASSDESTDIR) $(SERVICE_DESCRIPTION_PATH) \ $(BOOT_JAR_JFLAGS) diff -r 6a3062c1416f -r 9076d969ffdf jdk/src/share/classes/sun/misc/Version.java.template --- a/jdk/src/share/classes/sun/misc/Version.java.template Tue Mar 22 11:08:09 2011 -0700 +++ b/jdk/src/share/classes/sun/misc/Version.java.template Tue Mar 22 18:56:16 2011 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 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 @@ -36,8 +36,8 @@ "@@java_version@@"; private static final String java_runtime_name = - "@@java_runtime_name@@"; - + "@@java_runtime_name@@"; + private static final String java_runtime_version = "@@java_runtime_version@@"; @@ -87,12 +87,26 @@ * Give a stream, it will print version info on it. */ public static void print(PrintStream ps) { + boolean isHeadless = false; + + /* Report that we're running headless if the property is true */ + String headless = System.getProperty("java.awt.headless"); + if ( (headless != null) && (headless.equalsIgnoreCase("true")) ) { + isHeadless = true; + } + /* First line: platform version. */ ps.println(launcher_name + " version \"" + java_version + "\""); /* Second line: runtime version (ie, libraries). */ - ps.println(java_runtime_name + " (build " + - java_runtime_version + ")"); + + ps.print(java_runtime_name + " (build " + java_runtime_version); + + if (java_runtime_name.indexOf("Embedded") != -1 && isHeadless) { + // embedded builds report headless state + ps.print(", headless"); + } + ps.println(')'); /* Third line: JVM information. */ String java_vm_name = System.getProperty("java.vm.name");