diff -r a62c89adce3d -r c1ee09fe3274 jdk/make/lib/CoreLibraries.gmk --- a/jdk/make/lib/CoreLibraries.gmk Thu Oct 15 14:41:37 2015 +0100 +++ b/jdk/make/lib/CoreLibraries.gmk Mon Oct 19 13:41:09 2015 -0400 @@ -436,10 +436,14 @@ OBJECT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static, \ DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES))) - $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) + ifeq ($(STATIC_BUILD), true) + TARGETS += $(BUILD_LIBJLI_STATIC) + else + $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a: $(BUILD_LIBJLI_STATIC) $(call install-file) - TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a + TARGETS += $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libjli_static.a + endif else ifeq ($(OPENJDK_TARGET_OS), aix) # AIX also requires a static libjli because the compiler doesn't support '-rpath'