--- old/common/autoconf/libraries.m4 2016-01-24 09:55:22.195593013 +0100 +++ new/common/autoconf/libraries.m4 2016-01-24 09:55:22.103593008 +0100 @@ -144,6 +144,10 @@ fi done + # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not + # always properly detect -ltinfo + LLVM_LIBS="${LLVM_LIBS} -ltinfo" + AC_SUBST(LLVM_CFLAGS) AC_SUBST(LLVM_LDFLAGS) AC_SUBST(LLVM_LIBS) --- old/common/bin/compare.sh 2016-01-24 09:55:22.551593032 +0100 +++ new/common/bin/compare.sh 2016-01-24 09:55:22.463593027 +0100 @@ -306,7 +306,7 @@ ! -name "*.lib" ! -name "*.war" ! -name "JavaControlPanel" \ ! -name "*.obj" ! -name "*.o" ! -name "JavaControlPanelHelper" \ ! -name "JavaUpdater" ! -name "JavaWSApplicationStub" \ - ! -name "jspawnhelper" \ + ! -name "jspawnhelper" ! -name "*.a" \ | $GREP -v "./bin/" | $SORT | $FILTER) echo Other files with binary differences... @@ -939,7 +939,7 @@ WORK_DIR=$3 LIBS=$(cd $THIS_DIR && $FIND . -type f \( -name 'lib*.so' -o -name '*.dylib' \ - -o -name '*.dll' -o -name '*.obj' -o -name '*.o' \ + -o -name '*.dll' -o -name '*.obj' -o -name '*.o' -o -name '*.a' \ -o -name '*.cpl' \) | $SORT | $FILTER) if [ -n "$LIBS" ]; then --- old/make/Init.gmk 2016-01-24 09:55:22.923593052 +0100 +++ new/make/Init.gmk 2016-01-24 09:55:22.831593047 +0100 @@ -315,6 +315,7 @@ # Support targets for COMPARE_BUILD, used for makefile development pre-compare-build: + $(call WaitForSmartJavacFinish) $(call PrepareCompareBuild) post-compare-build: --- old/make/InitSupport.gmk 2016-01-24 09:55:23.279593071 +0100 +++ new/make/InitSupport.gmk 2016-01-24 09:55:23.187593066 +0100 @@ -440,7 +440,10 @@ $(PRINTF) "=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \ $(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*)), \ $(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \ - $(CAT) $(logfile) | $(GREP) -v -e "^Note: including file:" $(NEWLINE) \ + ($(GREP) -v -e "^Note: including file:" < $(logfile) || true) | $(HEAD) -n 12 $(NEWLINE) \ + if test `$(WC) -l < $(logfile)` -gt 12; then \ + $(ECHO) " ... (rest of output omitted)" ; \ + fi $(NEWLINE) \ ) \ $(PRINTF) "=== End of repeated output ===\n" \ ) @@ -486,6 +489,21 @@ $(TOUCH) $(SJAVAC_SERVER_DIR)/server.port.stop; true endef + ifeq ($(OPENJDK_BUILD_OS), windows) + # On windows we need to synchronize with the javac server to be able to + # move or remove the build output directory. Since we have no proper + # synchronization process, wait for a while and hope it helps. This is only + # used by build comparisons. + define WaitForSmartJavacFinish + $(if $(SJAVAC_SERVER_DIR), \ + sleep 5\ + ) + endef + else + define WaitForSmartJavacFinish + endef + endif + define StartGlobalTimer $(RM) -r $(BUILDTIMESDIR) 2> /dev/null && \ $(MKDIR) -p $(BUILDTIMESDIR) && \ --- old/make/common/JavaCompilation.gmk 2016-01-24 09:55:23.643593091 +0100 +++ new/make/common/JavaCompilation.gmk 2016-01-24 09:55:23.551593086 +0100 @@ -345,7 +345,7 @@ $$(eval $$(call ListPathsSafely,$1_SJAVAC_ARGS_STRING, $$($1_SJAVAC_ARGS_FILE))) endif $(ECHO) Compiling $1 - $(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \ + $(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch, $$($1_SAFE_NAME), \ $$($1_JVM) $$($1_SJAVAC) \ $$($1_REMOTE) \ -j 1 \ @@ -409,7 +409,7 @@ $(MKDIR) -p $$(@D) $$(eval $$(call ListPathsSafely,$1_SRCS, $$@.tmp)) $(ECHO) Compiling `$(WC) $$@.tmp | $(TR) -s ' ' | $(CUT) -f 2 -d ' '` files for $1 - $(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch.log, $$($1_SAFE_NAME), \ + $(call LogFailures, $$($1_BIN)/_the.$$($1_SAFE_NAME)_batch, $$($1_SAFE_NAME), \ $$($1_JVM) $$($1_JAVAC_CMD) $$($1_FLAGS) \ -implicit:none \ -d $$($1_BIN) $$($1_HEADERS_ARG) @$$@.tmp) && \ --- old/make/common/MakeBase.gmk 2016-01-24 09:55:24.011593111 +0100 +++ new/make/common/MakeBase.gmk 2016-01-24 09:55:23.919593106 +0100 @@ -685,14 +685,15 @@ # LogFailures will run a command and store a copy of output in a specified file. # If the command succeeds, the file is deleted, otherwise it is moved to the # failure-logs directory. -# Param 1 - The log file of the failed command +# Param 1 - The base name of the log file / command line file # Param 2 - A compact but representative name to describe this command # Param 3 - Command to run LogFailures = \ - ( $3 > >($(TEE) $1) 2> >($(TEE) $1 >&2) || \ + ( $(ECHO) '$3' > $1.cmdline && \ + ( $3 > >($(TEE) $1.log) 2> >($(TEE) $1.log >&2) || \ (exitcode=$(DOLLAR)$(DOLLAR)? && \ - $(CP) $1 $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(strip $2).log && \ - exit $(DOLLAR)$(DOLLAR)exitcode) ) + $(CP) $1.log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(strip $2).log && \ + exit $(DOLLAR)$(DOLLAR)exitcode) ) ) ################################################################################ # Find lib dir for module --- old/make/common/NativeCompilation.gmk 2016-01-24 09:55:24.383593131 +0100 +++ new/make/common/NativeCompilation.gmk 2016-01-24 09:55:24.291593126 +0100 @@ -241,15 +241,16 @@ $$($1_$2_OBJ) : $2 $$($1_COMPILE_VARDEPS_FILE) $$($1_$2_VARDEPS_FILE) | $$($1_BUILD_INFO) $$(call LogInfo, Compiling $$(notdir $2) (for $$(notdir $$($1_TARGET)))) + $$(call MakeDir, $$(@D)) ifneq ($(TOOLCHAIN_TYPE), microsoft) ifeq ($(TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio) # The Solaris studio compiler doesn't output the full path to the object file in the # generated deps files. Fixing it with sed. If compiling assembly, don't try this. - $(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \ + $(call LogFailures, $$($1_$2_OBJ), $$($1_SAFE_NAME)_$$(notdir $2), \ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2) $(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP) else - $(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \ + $(call LogFailures, $$($1_$2_OBJ), $$($1_SAFE_NAME)_$$(notdir $2), \ $$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP) $(CC_OUT_OPTION)$$($1_$2_OBJ) $2) endif # Create a dependency target file from the dependency file. @@ -264,7 +265,7 @@ # Keep as much as possible on one execution line for best performance on Windows. # No need to save exit code from compilation since pipefail is always active on # Windows. - $(call LogFailures, $$($1_$2_OBJ).log, $$($1_SAFE_NAME)_$$(notdir $2), \ + $(call LogFailures, $$($1_$2_OBJ), $$($1_SAFE_NAME)_$$(notdir $2), \ $$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \ $(CC_OUT_OPTION)$$($1_$2_OBJ) $2) \ | $(GREP) -v -e "^Note: including file:" \ @@ -784,13 +785,25 @@ # Keep as much as possible on one execution line for best performance # on Windows $$(call LogInfo, Linking $$($1_BASENAME)) - $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \ - $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ - $(LD_OUT_OPTION)$$@ \ - $$($1_LD_OBJ_ARG) $$($1_RES) \ - $$($1_LIBS) $$($1_EXTRA_LIBS)) ; \ - $$($1_CREATE_DEBUGINFO_CMDS) - $$($1_STRIP_CMD) + ifeq ($(OPENJDK_TARGET_OS), windows) + ($(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, $$($1_SAFE_NAME)_link, \ + $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ + $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \ + $$($1_EXTRA_LIBS)) || echo $$$$? > $$($1_SAFE_NAME).exitvalue ) \ + | $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \ + test "$$$$?" = "1" ; \ + ( test -s $$($1_SAFE_NAME).exitvalue \ + && exit `$(CAT) $$($1_SAFE_NAME).exitvalue` || true ) ; \ + $$($1_CREATE_DEBUGINFO_CMDS) + $$($1_STRIP_CMD) + else + $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, $$($1_SAFE_NAME)_link, \ + $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ + $(LD_OUT_OPTION)$$@ $$($1_LD_OBJ_ARG) $$($1_RES) $$($1_LIBS) \ + $$($1_EXTRA_LIBS)) ; \ + $$($1_CREATE_DEBUGINFO_CMDS) + $$($1_STRIP_CMD) + endif endif @@ -803,7 +816,7 @@ # Generating a static library, ie object file archive. $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(call LogInfo, Archiving $$($1_STATIC_LIBRARY)) - $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \ + $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, $$($1_SAFE_NAME)_link, \ $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \ $$($1_RES)) ifeq ($(STATIC_BUILD), true) @@ -825,7 +838,7 @@ $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \ $$($1_VARDEPS_FILE) $$(call LogInfo, Linking executable $$($1_BASENAME)) - $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \ + $(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, $$($1_SAFE_NAME)_link, \ $$($1_LD) $$($1_LDFLAGS) $$($1_EXTRA_LDFLAGS) $$($1_SYSROOT_LDFLAGS) \ $(EXE_OUT_OPTION)$$($1_TARGET) \ $$($1_ALL_OBJS) $$($1_RES) \