Fixes based on quick code review. ihse-jdk-library-branch
authorihse
Fri, 04 May 2018 01:31:12 +0200
branchihse-jdk-library-branch
changeset 56522 76b0a9b8f417
parent 56521 7bc4639175fe
child 56523 f4048e6f33ba
Fixes based on quick code review.
make/lib/Awt2dLibraries.gmk
make/lib/Lib-jdk.accessibility.gmk
make/lib/Lib-jdk.crypto.mscapi.gmk
make/lib/Lib-jdk.internal.le.gmk
make/lib/Lib-jdk.pack.gmk
--- a/make/lib/Awt2dLibraries.gmk	Fri May 04 01:17:28 2018 +0200
+++ b/make/lib/Awt2dLibraries.gmk	Fri May 04 01:31:12 2018 +0200
@@ -281,6 +281,17 @@
 
     LIBAWT_XAWT_EXCLUDES := medialib
 
+    LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
+        $(LIBAWT_DEFAULT_HEADER_DIRS) \
+        libawt_xawt/awt \
+        include \
+        common/awt/debug \
+        common/awt/systemscale \
+        common/font \
+        common/java2d/opengl \
+        common/java2d/x11 \
+        #
+
     LIBAWT_XAWT_CFLAGS += -DXAWT -DXAWT_HACK \
         -DPACKAGE_PATH=\"$(PACKAGE_PATH)\" \
         $(FONTCONFIG_CFLAGS) \
@@ -313,17 +324,6 @@
       BUILD_LIBAWT_XAWT_debug_mem.c_CFLAGS := -w
     endif
 
-    LIBAWT_XAWT_EXTRA_HEADER_DIRS := \
-        $(LIBAWT_DEFAULT_HEADER_DIRS) \
-        libawt_xawt/awt \
-        include \
-        common/awt/debug \
-        common/awt/systemscale \
-        common/font \
-        common/java2d/opengl \
-        common/java2d/x11 \
-        #
-
     $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_XAWT, \
         NAME := awt_xawt, \
         EXTRA_SRC := $(LIBAWT_XAWT_EXTRA_SRC), \
@@ -365,7 +365,7 @@
   # If we're using an external library, we'll just need the wrapper part.
   # By including it explicitly, all other files will be excluded.
   BUILD_LIBLCMS_INCLUDE_FILES := LCMS.c
-  # If we're using an external library, we'll can't include our own SRC path
+  # If we're using an external library, we can't include our own SRC path
   # as includes, instead the system headers should be used.
   LIBLCMS_HEADERS_FROM_SRC := false
 else
@@ -414,7 +414,7 @@
   BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
       imageioJPEG.c \
       jpegdecoder.c
-  # If we're using an external library, we'll can't include our own SRC path
+  # If we're using an external library, we can't include our own SRC path
   # as includes, instead the system headers should be used.
   LIBJPEG_HEADERS_FROM_SRC := false
 else
@@ -451,15 +451,16 @@
       #
 
   LIBAWT_HEADLESS_EXCLUDES := medialib
-  LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \
-      -DHEADLESS=true -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
 
   LIBAWT_HEADLESS_EXTRA_HEADER_DIRS := \
       $(LIBAWT_DEFAULT_HEADER_DIRS) \
       common/awt/debug \
       common/font \
       common/java2d/opengl \
-  #
+      #
+
+  LIBAWT_HEADLESS_CFLAGS := $(CUPS_CFLAGS) $(FONTCONFIG_CFLAGS) $(X_CFLAGS) \
+      -DHEADLESS=true -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
 
   $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_HEADLESS, \
       NAME := awt_headless, \
@@ -553,6 +554,16 @@
 
 #### End harfbuzz configuration
 
+LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
+    libfontmanager/harfbuzz \
+    libfontmanager/harfbuzz/hb-ucdn \
+    common/awt \
+    common/font \
+    libawt/java2d \
+    libawt/java2d/pipe \
+    libawt/java2d/loops \
+    #
+
 LIBFONTMANAGER_CFLAGS += $(LIBFREETYPE_CFLAGS)
 BUILD_LIBFONTMANAGER_FONTLIB += $(LIBFREETYPE_LIBS)
 
@@ -582,17 +593,6 @@
   BUILD_LIBFONTMANAGER_ExtensionSubtables.cpp_CXXFLAGS := -fno-strict-aliasing
 endif
 
-LIBFONTMANAGER_EXTRA_HEADER_DIRS := \
-    libfontmanager/harfbuzz \
-    libfontmanager/harfbuzz/hb-ucdn \
-    common/awt \
-    common/font \
-    libawt/java2d \
-    libawt/java2d/pipe \
-    libawt/java2d/loops \
-    #
-
-#
 # LDFLAGS clarification:
 #   Filter relevant linker flags disallowing unresolved symbols as we cannot
 #   build-time decide to which library to link against (libawt_headless or
@@ -657,10 +657,6 @@
 
   LIBJAWT_CFLAGS := -EHsc -DUNICODE -D_UNICODE
 
-  ifeq ($(OPENJDK_TARGET_CPU), x86)
-    KERNEL32_LIB := kernel32.lib
-  endif
-
   LIBJAWT_EXTRA_HEADER_DIRS := \
       include \
       common/awt/debug \
@@ -670,15 +666,17 @@
       libawt/windows \
       java.base:include \
       java.base:libjava \
-  #
+      #
+
+  ifeq ($(OPENJDK_TARGET_CPU), x86)
+    KERNEL32_LIB := kernel32.lib
+  endif
 
   $(eval $(call SetupJdkLibrary, BUILD_LIBJAWT, \
       NAME := jawt, \
       OPTIMIZATION := LOW, \
       CFLAGS := $(CXXFLAGS_JDKLIB) \
           $(LIBJAWT_CFLAGS), \
-      CXXFLAGS := $(CXXFLAGS_JDKLIB) \
-          $(LIBJAWT_CFLAGS), \
       EXTRA_HEADER_DIRS := $(LIBJAWT_EXTRA_HEADER_DIRS), \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \
       LIBS := $(JDKLIB_LIBS) $(KERNEL32_LIB) advapi32.lib $(WIN_AWT_LIB), \
@@ -838,7 +836,7 @@
       libosxapp \
       java.base:include \
       java.base:libjava \
-  #
+      #
 
   $(eval $(call SetupJdkLibrary, BUILD_LIBSPLASHSCREEN, \
       NAME := splashscreen, \
@@ -849,8 +847,6 @@
       OPTIMIZATION := LOW, \
       CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
           $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
-      CXXFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
-          $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS) $(PNG_CFLAGS) $(LIBZ_CFLAGS), \
       EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
       DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
           maybe-uninitialized shift-negative-value implicit-fallthrough, \
@@ -885,11 +881,6 @@
       $(TOPDIR)/src/$(MODULE)/share/native/common/java2d \
       #
 
-  LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS)
-
-  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
-  LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/$(MODULE)/unix/native/common/awt/medialib
-
   LIBAWT_LWAWT_EXTRA_HEADER_DIRS := \
       $(LIBAWT_DEFAULT_HEADER_DIRS) \
       libawt_lwawt/awt \
@@ -901,6 +892,11 @@
       libosxapp \
       #
 
+  LIBAWT_LWAWT_CFLAGS := $(X_CFLAGS) $(X_LIBS)
+
+  LIBAWT_LWAWT_EXFILES := fontpath.c awt_Font.c X11Color.c
+  LIBAWT_LWAWT_EXCLUDES := $(TOPDIR)/src/$(MODULE)/unix/native/common/awt/medialib
+
   $(eval $(call SetupJdkLibrary, BUILD_LIBAWT_LWAWT, \
       NAME := awt_lwawt, \
       EXTRA_SRC := $(LIBAWT_LWAWT_EXTRA_SRC), \
--- a/make/lib/Lib-jdk.accessibility.gmk	Fri May 04 01:17:28 2018 +0200
+++ b/make/lib/Lib-jdk.accessibility.gmk	Fri May 04 01:31:12 2018 +0200
@@ -42,7 +42,7 @@
         CFLAGS := $(CFLAGS_JDKLIB) \
             -DACCESSBRIDGE_ARCH_$2, \
         EXTRA_HEADER_DIRS := \
-            include/bridge) \
+            include/bridge \
             java.base:include \
             java.desktop:include, \
         LDFLAGS := $(LDFLAGS_JDKLIB), \
--- a/make/lib/Lib-jdk.crypto.mscapi.gmk	Fri May 04 01:17:28 2018 +0200
+++ b/make/lib/Lib-jdk.crypto.mscapi.gmk	Fri May 04 01:31:12 2018 +0200
@@ -32,7 +32,7 @@
   $(eval $(call SetupJdkLibrary, BUILD_LIBSUNMSCAPI, \
       NAME := sunmscapi, \
       OPTIMIZATION := LOW, \
-      CXXFLAGS := $(CXXFLAGS_JDKLIB), \
+      CFLAGS := $(CFLAGS_JDKLIB), \
       LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \
           $(call SET_SHARED_LIBRARY_ORIGIN), \
       LIBS := crypt32.lib advapi32.lib, \
--- a/make/lib/Lib-jdk.internal.le.gmk	Fri May 04 01:17:28 2018 +0200
+++ b/make/lib/Lib-jdk.internal.le.gmk	Fri May 04 01:31:12 2018 +0200
@@ -32,7 +32,7 @@
   $(eval $(call SetupJdkLibrary, BUILD_LIBLE, \
       NAME := le, \
       OPTIMIZATION := LOW, \
-      CXXFLAGS := $(CXXFLAGS_JDKLIB), \
+      CFLAGS := $(CFLAGS_JDKLIB), \
       LDFLAGS := $(LDFLAGS_JDKLIB), \
       LIBS := $(JDKLIB_LIBS) user32.lib, \
   ))
--- a/make/lib/Lib-jdk.pack.gmk	Fri May 04 01:17:28 2018 +0200
+++ b/make/lib/Lib-jdk.pack.gmk	Fri May 04 01:31:12 2018 +0200
@@ -32,7 +32,7 @@
     EXTRA_SRC := common-unpack, \
     TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
     OPTIMIZATION := LOW, \
-    CXXFLAGS := $(CXXFLAGS_JDKLIB) \
+    CFLAGS := $(CXXFLAGS_JDKLIB) \
         -DNO_ZLIB -DUNPACK_JNI -DFULL, \
     CFLAGS_release := -DPRODUCT, \
     EXTRA_HEADER_DIRS := $(call GetJavaHeaderDir, java.base), \