comparison make/common/Release-embedded.gmk @ 4254:7c5bc5a807ee

7024120: Verify reduced JRE contents for java 7 Summary: stripped all symbols from libs and executables to reduce JRE size. Restored missing classes needed to pass JCK in headless mode Reviewed-by: bobv, ohair
author dholmes
date Fri, 27 May 2011 19:04:48 -0400
parents e926550709c9
children
comparison
equal deleted inserted replaced
2:109c80b3d6b5 3:7a0640e7b989
51 # HEADLESS_CLASSLIST file. 51 # HEADLESS_CLASSLIST file.
52 $(NOT_HEADLESS_RT_JAR_LIST): $(NOT_RT_JAR_LIST) 52 $(NOT_HEADLESS_RT_JAR_LIST): $(NOT_RT_JAR_LIST)
53 $(RM) $(HEADLESS_CLASSLIST) 53 $(RM) $(HEADLESS_CLASSLIST)
54 $(RM) $(NOT_HEADLESS_RT_JAR_LIST) 54 $(RM) $(NOT_HEADLESS_RT_JAR_LIST)
55 $(CP) $(NOT_RT_JAR_LIST) $(NOT_HEADLESS_RT_JAR_LIST) 55 $(CP) $(NOT_RT_JAR_LIST) $(NOT_HEADLESS_RT_JAR_LIST)
56 # List all the packages to be excluded
56 $(ECHO) "sun/awt/motif/" >> $@ 57 $(ECHO) "sun/awt/motif/" >> $@
57 $(ECHO) "sun/awt/X11/" >> $@ 58 $(ECHO) "sun/awt/X11/" >> $@
58 $(ECHO) "sun/applet/" >> $@ 59 $(ECHO) "sun/applet/" >> $@
59 $(ECHO) "sun/java2d/opengl/" >> $@ 60 $(ECHO) "sun/java2d/opengl/" >> $@
60 $(ECHO) "com/sun/java/swing/plaf/" >> $@ 61 $(ECHO) "com/sun/java/swing/plaf/" >> $@
61 $(ECHO) "sun/awt/motif/MFontConfiguration" >$(HEADLESS_CLASSLIST) 62 # List all the individual classes to be included
62 $(ECHO) "sun/applet/AppContextCreator" >>$(HEADLESS_CLASSLIST) 63 $(ECHO) "sun/awt/motif/MFontConfiguration.class" >$(HEADLESS_CLASSLIST)
63 $(ECHO) "sun/applet/AppletAudioClip" >>$(HEADLESS_CLASSLIST) 64 $(ECHO) "sun/applet/AppContextCreator.class" >>$(HEADLESS_CLASSLIST)
64 $(ECHO) "sun/java2d/opengl/GLXSurfaceData" >>$(HEADLESS_CLASSLIST) 65 $(ECHO) "sun/applet/AppletAudioClip.class" >>$(HEADLESS_CLASSLIST)
65 $(ECHO) "sun/java2d/opengl/GLXSurfaceData"\$$"GLXOffScreenSurfaceData" >>$(HEADLESS_CLASSLIST) 66 $(ECHO) "sun/java2d/opengl/GLXSurfaceData.class" >>$(HEADLESS_CLASSLIST)
66 $(ECHO) "sun/java2d/opengl/GLXVolatileSurfaceManager" >>$(HEADLESS_CLASSLIST) 67 $(ECHO) "sun/java2d/opengl/GLXSurfaceData"\$$"GLXOffScreenSurfaceData.class" >>$(HEADLESS_CLASSLIST)
67 $(ECHO) "sun/java2d/opengl/OGLSurfaceData" >>$(HEADLESS_CLASSLIST) 68 $(ECHO) "sun/java2d/opengl/GLXVolatileSurfaceManager.class" >>$(HEADLESS_CLASSLIST)
69 $(ECHO) "sun/java2d/opengl/OGLSurfaceData.class" >>$(HEADLESS_CLASSLIST)
70
68 71
69 $(TOTAL_HEADLESS_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_HEADLESS_RT_JAR_LIST) 72 $(TOTAL_HEADLESS_JAR_FILELIST): $(JARREORDER_JARFILE) $(NOT_HEADLESS_RT_JAR_LIST)
70 $(prep-target) 73 $(prep-target)
71 $(RM) $@.temp 74 $(RM) $@.temp
72 $(CD) $(CLASSBINDIR) ; \ 75 $(CD) $(CLASSBINDIR) ; \
73 $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \ 76 $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \
74 -o $@.temp $(HEADLESS_CLASSLIST) $(NOT_HEADLESS_RT_JAR_LIST) . 77 -o $@.temp - $(NOT_HEADLESS_RT_JAR_LIST) .
78 # Add on the explicitly included class files from the otherwise excluded packages
79 $(CAT) $(HEADLESS_CLASSLIST) >> $@.temp
75 $(MV) $@.temp $@ 80 $(MV) $@.temp $@
76 @$(CD) $(CLASSBINDIR); $(java-vm-cleanup) 81 @$(CD) $(CLASSBINDIR); $(java-vm-cleanup)
77 82
78 # Create the headless rt.jar file list & non-class files list 83 # Create the headless rt.jar file list & non-class files list
79 MakeHeadlessJarFileList: $(TOTAL_HEADLESS_JAR_FILELIST) $(JARSPLIT_JARFILE) 84 MakeHeadlessJarFileList: $(TOTAL_HEADLESS_JAR_FILELIST) $(JARSPLIT_JARFILE)
122 $(LIBARCH)/libjavaplugin_jni.so \ 127 $(LIBARCH)/libjavaplugin_jni.so \
123 $(LIBARCH)/libjavaplugin_nscp_gcc29.so \ 128 $(LIBARCH)/libjavaplugin_nscp_gcc29.so \
124 $(LIBARCH)/libjavaplugin_nscp.so \ 129 $(LIBARCH)/libjavaplugin_nscp.so \
125 $(LIBARCH)/libjavaplugin_oji.so 130 $(LIBARCH)/libjavaplugin_oji.so
126 131
127 132 # JRE docs that don't get included in reduced jre image top directory
128 ifeq ($(PLATFORM), linux) 133 NOT_REDUCEDJRE_DOC = \
129 STRIP_OPTS = --strip-unneeded 134 Welcome.html
130 else
131 STRIP_OPTS = -x
132 endif
133
134 135
135 reduced-image-jre:: 136 reduced-image-jre::
136 @$(ECHO) Starting to Produce Reduced JRE 137 @$(ECHO) Starting to Produce Reduced JRE
137 @# 138 @#
138 @# First make a copy of the full JRE 139 @# First make a copy of the full JRE
139 @# 140 @#
140 $(RM) -r $(JRE_REDUCED_IMAGE_DIR) 141 $(RM) -r $(JRE_REDUCED_IMAGE_DIR)
141 $(MKDIR) -p $(JRE_REDUCED_IMAGE_DIR) 142 $(MKDIR) -p $(JRE_REDUCED_IMAGE_DIR)
142 $(CD) $(JRE_IMAGE_DIR); \ 143 $(CD) $(JRE_IMAGE_DIR); \
143 $(TAR) cf - . | ($(CD) $(JRE_REDUCED_IMAGE_DIR); $(TAR) xf - ); 144 $(TAR) cf - . | ($(CD) $(JRE_REDUCED_IMAGE_DIR); $(TAR) xf - );
144
145 @# strip the main .so files
146 $(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/client/libjvm.so
147 ifndef BUILD_CLIENT_ONLY
148 $(STRIP) $(STRIP_OPTS) $(JRE_REDUCED_IMAGE_DIR)/lib/$(LIBARCH)/server/libjvm.so
149 endif
150 145
151 @# 146 @#
152 @# Remove all of the files that are not needed for the 147 @# Remove all of the files that are not needed for the
153 @# reduced JRE 148 @# reduced JRE
154 @# 149 @#
155 for l in $(NOT_REDUCEDJRE_BIN) ; do \ 150 for l in $(NOT_REDUCEDJRE_BIN) ; do \
156 $(RM) $(JRE_REDUCED_IMAGE_DIR)/bin/$$l ; \ 151 $(RM) $(JRE_REDUCED_IMAGE_DIR)/bin/$$l ; \
157 done 152 done
158 for l in $(NOT_REDUCEDJRE_LIB) ; do \ 153 for l in $(NOT_REDUCEDJRE_LIB) ; do \
159 $(RM) $(JRE_REDUCED_IMAGE_DIR)/lib/$$l ; \ 154 $(RM) $(JRE_REDUCED_IMAGE_DIR)/lib/$$l ; \
155 done
156 for l in $(NOT_REDUCEDJRE_DOC) ; do \
157 $(RM) $(JRE_REDUCED_IMAGE_DIR)/$$l ; \
160 done 158 done
161 159
162 @# Remove misc. other files 160 @# Remove misc. other files
163 $(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man 161 $(RM) -r $(JRE_REDUCED_IMAGE_DIR)/man
164 $(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES 162 $(RM) -f $(JRE_REDUCED_IMAGE_DIR)/CHANGES