8199745: JDK-8199668 introduced a build race on macosx jdk-11+5
authorerikj
Fri, 16 Mar 2018 21:40:09 +0100
changeset 49261 d5c43e9f08fb
parent 49260 55c0de67f375
child 49262 1b3ee04e3e54
8199745: JDK-8199668 introduced a build race on macosx Reviewed-by: tbell
make/lib/Awt2dLibraries.gmk
make/lib/Lib-java.instrument.gmk
make/lib/Lib-jdk.crypto.ucrypto.gmk
make/lib/LibCommon.gmk
make/lib/SoundLibraries.gmk
--- a/make/lib/Awt2dLibraries.gmk	Fri Mar 16 16:17:17 2018 -0400
+++ b/make/lib/Awt2dLibraries.gmk	Fri Mar 16 21:40:09 2018 +0100
@@ -931,7 +931,7 @@
   TARGETS += $(BUILD_LIBSPLASHSCREEN)
 
   ifeq ($(OPENJDK_TARGET_OS), macosx)
-    $(BUILD_LIBSPLASHSCREEN): $(INSTALL_LIBRARIES_HERE)/$(LIBRARY_PREFIX)osxapp$(SHARED_LIBRARY_SUFFIX)
+    $(BUILD_LIBSPLASHSCREEN): $(call FindLib, java.desktop, osxapp)
   endif
 
 endif
@@ -1009,7 +1009,7 @@
 
   $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBMLIB_IMAGE)
 
-  $(BUILD_LIBAWT_LWAWT): $(BUILD_LIBOSXAPP)
+  $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.desktop, osxapp)
 
   $(BUILD_LIBAWT_LWAWT): $(call FindLib, java.base, java)
 
@@ -1047,12 +1047,10 @@
 
   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT)
 
-  $(BUILD_LIBOSXUI): $(BUILD_LIBOSXAPP)
+  $(BUILD_LIBOSXUI): $(call FindLib, java.desktop, osxapp)
 
   $(BUILD_LIBOSXUI): $(BUILD_LIBAWT_LWAWT)
 
-  #$(BUILD_LIBOSXUI): $(call FindLib, java.base, java)
-
 endif
 
 ################################################################################
--- a/make/lib/Lib-java.instrument.gmk	Fri Mar 16 16:17:17 2018 -0400
+++ b/make/lib/Lib-java.instrument.gmk	Fri Mar 16 21:40:09 2018 +0100
@@ -73,17 +73,17 @@
     LIBS_aix := -liconv -ljli_static $(LIBDL), \
     LIBS_macosx := -liconv -framework Cocoa -framework Security \
         -framework ApplicationServices \
-        $(SUPPORT_OUTPUTDIR)/native/java.base/libjli_static.a, \
+        $(call FindStaticLib, java.base, jli_static), \
     LIBS_windows := jvm.lib $(WIN_JAVA_LIB) advapi32.lib \
-        $(SUPPORT_OUTPUTDIR)/native/java.base/jli_static.lib, \
+        $(call FindStaticLib, java.base, jli_static), \
 ))
 
-ifneq (, $(findstring $(OPENJDK_TARGET_OS), macosx windows aix))
-  $(BUILD_LIBINSTRUMENT): $(SUPPORT_OUTPUTDIR)/native/java.base/$(LIBRARY_PREFIX)jli_static$(STATIC_LIBRARY_SUFFIX)
+ifneq ($(filter $(OPENJDK_TARGET_OS), macosx windows aix), )
+  $(BUILD_LIBINSTRUMENT): $(call FindStaticLib, java.base, jli_static)
 else
   $(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, jli, /jli)
 endif
-$(BUILD_LIBINSTRUMENT): $(BUILD_LIBJAVA)
+$(BUILD_LIBINSTRUMENT): $(call FindLib, java.base, java)
 
 TARGETS += $(BUILD_LIBINSTRUMENT)
 
--- a/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri Mar 16 16:17:17 2018 -0400
+++ b/make/lib/Lib-jdk.crypto.ucrypto.gmk	Fri Mar 16 21:40:09 2018 +0100
@@ -42,7 +42,7 @@
       LIBS := $(LIBDL), \
   ))
 
-  $(BUILD_LIBJ2UCRYPTO): $(BUILD_LIBJAVA)
+  $(BUILD_LIBJ2UCRYPTO): $(call FindLib, java.base, java)
 
   TARGETS += $(BUILD_LIBJ2UCRYPTO)
 
--- a/make/lib/LibCommon.gmk	Fri Mar 16 16:17:17 2018 -0400
+++ b/make/lib/LibCommon.gmk	Fri Mar 16 21:40:09 2018 +0100
@@ -54,11 +54,19 @@
 # Find a library
 # Param 1 - module name
 # Param 2 - library name
-# Param 3 - subdir for library
+# Param 3 - optional subdir for library
 FindLib = \
     $(call FindLibDirForModule, \
         $(strip $1))$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(SHARED_LIBRARY_SUFFIX)
 
+################################################################################
+# Find a static library
+# Param 1 - module name
+# Param 2 - library name
+# Param 3 - optional subdir for library
+FindStaticLib = \
+    $(addprefix $(SUPPORT_OUTPUTDIR)/native/, \
+        $(strip $1)$(strip $3)/$(LIBRARY_PREFIX)$(strip $2)$(STATIC_LIBRARY_SUFFIX))
 
 ################################################################################
 # Define the header include flags needed to compile against it.
--- a/make/lib/SoundLibraries.gmk	Fri Mar 16 16:17:17 2018 -0400
+++ b/make/lib/SoundLibraries.gmk	Fri Mar 16 21:40:09 2018 +0100
@@ -133,7 +133,7 @@
     LIBS_windows := $(WIN_JAVA_LIB) advapi32.lib winmm.lib, \
 ))
 
-$(BUILD_LIBJSOUND): $(BUILD_LIBJAVA)
+$(BUILD_LIBJSOUND): $(call FindLib, java.base, java)
 
 TARGETS += $(BUILD_LIBJSOUND)
 
@@ -166,7 +166,7 @@
       LIBS := $(ALSA_LIBS) -ljava -ljvm, \
   ))
 
-  $(BUILD_LIBJSOUNDALSA): $(BUILD_LIBJAVA)
+  $(BUILD_LIBJSOUNDALSA): $(call FindLib, java.base, java)
 
   TARGETS += $(BUILD_LIBJSOUNDALSA)
 
@@ -191,7 +191,7 @@
       LIBS := $(JDKLIB_LIBS) dsound.lib winmm.lib user32.lib ole32.lib, \
   ))
 
-  $(BUILD_LIBJSOUNDDS): $(BUILD_LIBJAVA)
+  $(BUILD_LIBJSOUNDDS): $(call FindLib, java.base, java)
 
   TARGETS += $(BUILD_LIBJSOUNDDS)