--- old/make/common/NativeCompilation.gmk 2016-01-25 14:50:31.137202673 +0100 +++ new/make/common/NativeCompilation.gmk 2016-01-25 14:50:31.041202668 +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,23 @@ # 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)) \ + | $(GREP) -v "^ Creating library .*\.lib and object .*\.exp" || \ + test "$$$$?" = "1" ; \ + $$($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 +814,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 +836,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) \