changeset 13667:d1f14fc9591b

8148955: libjimage.so compiled with wrong flags Reviewed-by: alanb
author erikj
date Thu, 04 Feb 2016 09:51:24 +0100
parents 7181403325ad
children c3da0d44c900
files make/lib/CoreLibraries.gmk src/java.base/share/native/libjimage/imageDecompressor.cpp
diffstat 2 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/CoreLibraries.gmk	Thu Feb 04 14:38:17 2016 +0800
+++ b/make/lib/CoreLibraries.gmk	Thu Feb 04 09:51:24 2016 +0100
@@ -247,6 +247,13 @@
   LIBJIMAGE_TOOLCHAIN := TOOLCHAIN_LINK_CXX
 endif # OPENJDK_TARGET_OS aix
 
+JIMAGELIB_CPPFLAGS := \
+    -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
+    -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
+    -I$(JDK_TOPDIR)/src/java.base/share/native/libjimage \
+    -I$(SUPPORT_OUTPUTDIR)/headers/java.base \
+    #
+
 $(eval $(call SetupNativeCompilation,BUILD_LIBJIMAGE, \
     LIBRARY := jimage, \
     TOOLCHAIN := $(LIBJIMAGE_TOOLCHAIN), \
@@ -255,12 +262,8 @@
     SRC := $(JDK_TOPDIR)/src/java.base/share/native/libjimage \
         $(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjimage, \
     EXCLUDES := $(LIBJIMAGE_EXCLUDES), \
-    CFLAGS := $(CFLAGS_JDKLIB) \
-        $(JIMAGELIB_CPPFLAGS) \
-        -I$(JDK_TOPDIR)/src/java.base/share/native/libjava \
-        -I$(JDK_TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS_TYPE)/native/libjava \
-        -I$(JDK_TOPDIR)/src/java.base/share/native/libjimage \
-        -I$(SUPPORT_OUTPUTDIR)/headers/java.base, \
+    CFLAGS := $(CFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
+    CXXFLAGS := $(CXXFLAGS_JDKLIB) $(JIMAGELIB_CPPFLAGS), \
     CFLAGS_unix := -UDEBUG, \
     MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjimage/mapfile-vers, \
     LDFLAGS := $(LDFLAGS_JDKLIB) \
--- a/src/java.base/share/native/libjimage/imageDecompressor.cpp	Thu Feb 04 14:38:17 2016 +0800
+++ b/src/java.base/share/native/libjimage/imageDecompressor.cpp	Thu Feb 04 09:51:24 2016 +0100
@@ -190,8 +190,8 @@
             { // String in Strings table
                 *uncompressed_resource = 1;
                 uncompressed_resource += 1;
-                int i = decompress_int(data);
-                const char * string = strings->get(i);
+                int k = decompress_int(data);
+                const char * string = strings->get(k);
                 int str_length = (int) strlen(string);
                 Endian::set_java(uncompressed_resource, str_length);
                 uncompressed_resource += 2;