--- old/make/CreateJmods.gmk 2018-04-07 00:56:41.750580400 +0200 +++ new/make/CreateJmods.gmk 2018-04-07 00:56:41.265552600 +0200 @@ -117,6 +117,17 @@ --hash-modules '^(?!$(EXCLUDE_PATTERN)$$)' endif endif +else # not java.base + ifeq ($(OPENJDK_TARGET_OS), windows) + # Only java.base needs to include the MSVC*_DLLs. Make sure no other module + # tries to include them (typically imported ones). + ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCR_DLL))), ) + JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))' + endif + ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), ) + JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))' + endif + endif endif # Changes to the jmod tool itself should also trigger a rebuild of all jmods. @@ -133,18 +144,21 @@ DEPS := $(filter-out $(SUPPORT_OUTPUTDIR)/modules_libs/java.base/classlist, $(DEPS)) endif +JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' + # Create jmods in a temp dir and then move them into place to keep the # module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times. $(JMODS_DIR)/$(MODULE).jmod: $(DEPS) $(call LogWarn, Creating $(patsubst $(OUTPUTDIR)/%, %, $@)) $(call MakeDir, $(JMODS_DIR) $(JMODS_TEMPDIR)) $(RM) $@ $(JMODS_TEMPDIR)/$(notdir $@) - $(JMOD) create \ - --module-version $(VERSION_SHORT) \ - --target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \ - --module-path $(JMODS_DIR) \ - --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}' \ - $(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) + $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/jmods/$(MODULE).jmod, \ + $(JMOD) create \ + --module-version $(VERSION_SHORT) \ + --target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \ + --module-path $(JMODS_DIR) \ + $(JMOD_FLAGS) $(JMODS_TEMPDIR)/$(notdir $@) \ + ) $(MV) $(JMODS_TEMPDIR)/$(notdir $@) $@ TARGETS += $(JMODS_DIR)/$(MODULE).jmod --- old/make/autoconf/toolchain_windows.m4 2018-04-07 00:56:44.045711600 +0200 +++ new/make/autoconf/toolchain_windows.m4 2018-04-07 00:56:43.549683300 +0200 @@ -522,7 +522,6 @@ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then AC_MSG_RESULT([ok]) MSVC_DLL="$POSSIBLE_MSVC_DLL" - BASIC_FIXUP_PATH(MSVC_DLL) AC_MSG_CHECKING([for $DLL_NAME]) AC_MSG_RESULT([$MSVC_DLL]) else --- old/make/common/NativeCompilation.gmk 2018-04-07 00:56:46.355843800 +0200 +++ new/make/common/NativeCompilation.gmk 2018-04-07 00:56:45.857815300 +0200 @@ -904,20 +904,22 @@ $1_IMPORT_LIBRARY := $$($1_OBJECT_DIR)/$$($1_NAME).lib $1_EXTRA_LDFLAGS += "-implib:$$($1_IMPORT_LIBRARY)" - # To properly trigger downstream dependants of the import library, just as - # for debug files, we must have a recipe in the rule. To avoid rerunning - # the recipe every time have it touch the target. If an import library - # file is deleted by something external, explicitly delete the target to - # trigger a rebuild of both. - ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY)) - $$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing) - $$(shell $(RM) $$($1_TARGET)) - endif - $$($1_IMPORT_LIBRARY): $$($1_TARGET) + ifeq ($$($1_TYPE), LIBRARY) + # To properly trigger downstream dependants of the import library, just as + # for debug files, we must have a recipe in the rule. To avoid rerunning + # the recipe every time have it touch the target. If an import library + # file is deleted by something external, explicitly delete the target to + # trigger a rebuild of both. + ifneq ($$(wildcard $$($1_IMPORT_LIBRARY)), $$($1_IMPORT_LIBRARY)) + $$(call LogDebug, Deleting $$($1_BASENAME) because import library is missing) + $$(shell $(RM) $$($1_TARGET)) + endif + $$($1_IMPORT_LIBRARY): $$($1_TARGET) $$(if $$(CORRECT_FUNCTION_IN_RECIPE_EVALUATION), \ $$(if $$(wildcard $$@), , $$(error $$@ was not created for $$<)) \ ) $(TOUCH) $$@ + endif endif $1_VARDEPS := $$($1_LD) $$($1_SYSROOT_LDFLAGS) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) \ --- old/make/launcher/Launcher-jdk.pack.gmk 2018-04-07 00:56:48.687977200 +0200 +++ new/make/launcher/Launcher-jdk.pack.gmk 2018-04-07 00:56:48.193948900 +0200 @@ -88,6 +88,7 @@ CFLAGS_solaris := -KPIC, \ CFLAGS_macosx := -fPIC, \ DISABLED_WARNINGS_gcc := unused-result implicit-fallthrough, \ + DISABLED_WARNINGS_microsoft := 4005, \ LDFLAGS := $(UNPACKEXE_ZIPOBJS) \ $(LDFLAGS_JDKEXE) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ --- old/make/lib/Awt2dLibraries.gmk 2018-04-07 00:56:50.957106900 +0200 +++ new/make/lib/Awt2dLibraries.gmk 2018-04-07 00:56:50.460078500 +0200 @@ -543,7 +543,7 @@ DISABLED_WARNINGS_solstudio := \ E_STATEMENT_NOT_REACHED \ E_END_OF_LOOP_CODE_NOT_REACHED, \ - DISABLED_WARNINGS_microsoft := 4267 4244, \ + DISABLED_WARNINGS_microsoft := 4267 4244 4312, \ LDFLAGS := $(LDFLAGS_JDKLIB) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ )) --- old/make/lib/Lib-jdk.accessibility.gmk 2018-04-07 00:56:53.290240400 +0200 +++ new/make/lib/Lib-jdk.accessibility.gmk 2018-04-07 00:56:52.788211700 +0200 @@ -45,6 +45,7 @@ NAME := javaaccessbridge$1, \ SRC := $(JAVA_AB_SRCDIR), \ OPTIMIZATION := LOW, \ + DISABLED_WARNINGS_microsoft := 4311 4302 4312, \ CFLAGS := $(CFLAGS_JDKLIB) $(ACCESSBRIDGE_CFLAGS) \ $(addprefix -I,$(JAVA_AB_SRCDIR)) \ -I$(ROOT_SRCDIR)/include/bridge \ @@ -69,6 +70,7 @@ NAME := windowsaccessbridge$1, \ SRC := $(WIN_AB_SRCDIR), \ OPTIMIZATION := LOW, \ + DISABLED_WARNINGS_microsoft := 4311 4302 4312, \ CFLAGS := $(filter-out -MD, $(CFLAGS_JDKLIB)) -MT $(ACCESSBRIDGE_CFLAGS) \ $(addprefix -I,$(WIN_AB_SRCDIR)) \ -I$(ROOT_SRCDIR)/include/bridge \ --- old/make/lib/Lib-jdk.pack.gmk 2018-04-07 00:56:55.571370900 +0200 +++ new/make/lib/Lib-jdk.pack.gmk 2018-04-07 00:56:55.083342900 +0200 @@ -40,6 +40,7 @@ $(LIBJAVA_HEADER_FLAGS), \ CFLAGS_release := -DPRODUCT, \ DISABLED_WARNINGS_gcc := implicit-fallthrough, \ + DISABLED_WARNINGS_microsoft := 4005, \ LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK) \ $(call SET_SHARED_LIBRARY_ORIGIN), \ LDFLAGS_windows := -map:$(SUPPORT_OUTPUTDIR)/native/$(MODULE)/unpack.map -debug, \ --- old/src/java.instrument/share/native/libinstrument/Reentrancy.c 2018-04-07 00:56:57.860501800 +0200 +++ new/src/java.instrument/share/native/libinstrument/Reentrancy.c 2018-04-07 00:56:57.363473400 +0200 @@ -90,7 +90,7 @@ jthread thread, const void * expected) { jvmtiError error; - void * test = (void *) 0x99999999UL; + void * test = (void *) 0x99999999ULL; /* now check if we do a fetch we get what we wrote */ error = (*jvmtienv)->GetThreadLocalStorage(