--- a/hotspot/make/BuildHotspot.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/BuildHotspot.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -45,10 +45,7 @@
jsig:
+$(MAKE) -f lib/CompileLibjsig.gmk
-dist: $(VARIANT_TARGETS) jsig
- +$(MAKE) -f Dist.gmk
-
-all: dist
+all: $(VARIANT_TARGETS) jsig
.PHONY: $(VARIANT_TARGETS) $(VARIANT_GENSRC_TARGETS) $(VARIANT_LIBS_TARGETS) \
- jsig dist all
+ jsig all
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/make/CopyToExplodedJdk.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -0,0 +1,55 @@
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# Copy all built libraries into exploded jdk
+LIB_TARGETS := $(filter $(LIB_OUTPUTDIR)/%, $(TARGETS))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ $(eval $(call SetupCopyFiles, COPY_LIBS_BIN, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
+ DEST := $(JDK_OUTPUTDIR)/bin, \
+ FILES := $(filter-out %.lib, $(LIB_TARGETS)), \
+ ))
+
+ $(eval $(call SetupCopyFiles, COPY_LIBS_LIB, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
+ DEST := $(JDK_OUTPUTDIR)/lib, \
+ FILES := $(filter %.lib, $(LIB_TARGETS))))
+
+ TARGETS += $(COPY_LIBS_BIN) $(COPY_LIBS_LIB)
+else
+ $(eval $(call SetupCopyFiles, COPY_LIBS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
+ DEST := $(JDK_OUTPUTDIR)/lib, \
+ FILES := $(filter %$(SHARED_LIBRARY_SUFFIX), $(LIB_TARGETS)), \
+ ))
+ $(eval $(call SetupCopyFiles, LINK_LIBS, \
+ SRC := $(SUPPORT_OUTPUTDIR)/modules_libs/java.base, \
+ DEST := $(JDK_OUTPUTDIR)/lib, \
+ FILES := $(filter-out %$(SHARED_LIBRARY_SUFFIX), $(LIB_TARGETS)), \
+ MACRO := link-file-relative, \
+ ))
+
+ TARGETS += $(COPY_LIBS) $(LINK_LIBS)
+endif
--- a/hotspot/make/Dist.gmk Wed Jul 05 22:17:45 2017 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,223 +0,0 @@
-#
-# Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation. Oracle designates this
-# particular file as subject to the "Classpath" exception as provided
-# by Oracle in the LICENSE file that accompanied this code.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-################################################################################
-# Copy the generated output into well-defined places in the dist directory.
-
-# This must be the first rule
-default: all
-
-include $(SPEC)
-include MakeBase.gmk
-
-$(eval $(call IncludeCustomExtension, hotspot, Dist.gmk))
-
-DIST_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/dist
-
-# Unfortunately, all platforms have different target subdirs.
-ifeq ($(OPENJDK_TARGET_OS), windows)
- LIB_SUBDIR := bin
-else ifeq ($(OPENJDK_TARGET_OS), macosx)
- LIB_SUBDIR := lib
-else
- LIB_SUBDIR := lib$(OPENJDK_TARGET_CPU_LIBDIR)
-endif
-
-################################################################################
-# Setup make rules to copy a native library and associated data.
-#
-# Parameter 1 is the name of the rule. This name is used as variable prefix,
-# and the targets generated are listed in a variable by that name.
-#
-# Remaining parameters are named arguments. These include:
-# NAME -- The base name of the native library (e.g. 'jvm')
-# VARIANT -- The variant to copy from
-# VARIANT_TARGET_DIR -- The variant target sub dir, with trailing slash, optional
-SetupDistLibFile = $(NamedParamsMacroTemplate)
-define SetupDistLibFileBody
- ifneq ($$($1_VARIANT), )
- $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/variant-$$($1_VARIANT)/lib$$($1_NAME)
- else
- $1_SRC_DIR := $$(HOTSPOT_OUTPUTDIR)/lib$$($1_NAME)
- endif
- $1_LIB_NAME := $(LIBRARY_PREFIX)$$($1_NAME)
- $1_TARGET_DIR := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$$($1_VARIANT_TARGET_DIR)
-
- # Copy the the native library.
- $$(eval $$(call SetupCopyFiles, $1_COPY_LIB, \
- DEST := $$($1_TARGET_DIR), \
- FILES := $$(wildcard \
- $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX)), \
- ))
-
- TARGETS += $$($1_COPY_LIB)
-
- # Copy related data (debug symbols, static-build symbols file etc)
- $$(eval $$(call SetupCopyFiles, $1_COPY_FILES, \
- DEST := $$($1_TARGET_DIR), \
- FILES := $$(wildcard \
- $$(addprefix $$($1_SRC_DIR)/$$($1_LIB_NAME), \
- .diz .debuginfo .pdb .map .symbols)), \
- ))
-
- TARGETS += $$($1_COPY_FILES)
-
- ifeq ($(OPENJDK_TARGET_OS), macosx)
- # Debug symbols on macosx is a directory, not a single file, per library.
- $1_DSYM_SRC := $$($1_SRC_DIR)/$$($1_LIB_NAME)$(SHARED_LIBRARY_SUFFIX).dSYM)
- ifneq ($$(wildcard $$($1_DSYM_SRC)), )
- $$(eval $$(call SetupCopyFiles, $1_COPY_DSYM_DIR, \
- DEST := $$($1_TARGET_DIR), \
- SRC := $$($1_SRC_DIR), \
- FILES := $$(shell $(FIND) $$($1_DSYM_SRC) -type f), \
- ))
- TARGETS += $$($1_COPY_DSYM_DIR)
- endif
- endif
-endef
-
-################################################################################
-# Copy common files, which are independent on the jvm variant(s) being built.
-# For files that were generated during the build, we assume all versions of
-# these files are identical, and just pick one arbitrarily to use as source.
-
-ANY_JVM_VARIANT := $(firstword $(JVM_VARIANTS))
-JVM_VARIANT_OUTPUTDIR := $(HOTSPOT_OUTPUTDIR)/variant-$(ANY_JVM_VARIANT)
-
-### Copy platform-independent .h files
-INCLUDE_FILES_SRC_DIR := $(HOTSPOT_TOPDIR)/src/share/vm
-$(eval $(call SetupCopyFiles, COPY_INCLUDE, \
- SRC := $(INCLUDE_FILES_SRC_DIR), \
- DEST := $(DIST_OUTPUTDIR)/include, \
- FLATTEN := true, \
- FILES := $(INCLUDE_FILES_SRC_DIR)/prims/jni.h \
- $(INCLUDE_FILES_SRC_DIR)/code/jvmticmlr.h \
- $(INCLUDE_FILES_SRC_DIR)/services/jmm.h))
-
-TARGETS += $(COPY_INCLUDE)
-
-### Copy jni_md.h
-
-# This might have been defined in a custom extension
-ifeq ($(JNI_MD_H_SRC), )
- JNI_MD_H_SRC := $(HOTSPOT_TOPDIR)/src/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/jni_$(HOTSPOT_TARGET_CPU_ARCH).h
-endif
-
-ifeq ($(OPENJDK_TARGET_OS), macosx)
- # NOTE: This should most likely be darwin, but the old hotspot build uses bsd
- JNI_MD_SUBDIR := bsd
-else ifeq ($(OPENJDK_TARGET_OS), windows)
- JNI_MD_SUBDIR := win32
-else
- JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
-endif
-
-# SetupCopyFiles is not used here since it's non-trivial to copy a single
-# file with a different target name.
-$(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
- $(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
- $(install-file)
-
-TARGETS += $(DIST_OUTPUTDIR)/include/$(JNI_MD_SUBDIR)/jni_md.h
-
-$(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
- DEST := $(DIST_OUTPUTDIR)/include, \
- FLATTEN := true, \
- FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.h))
-
-TARGETS += $(COPY_JVMTI_H)
-
-# NOTE: In the old build, this file was not copied on Windows.
-ifneq ($(OPENJDK_TARGET_OS), windows)
- $(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \
- DEST := $(DIST_OUTPUTDIR)/docs/platform/jvmti, \
- FILES := $(JVM_VARIANT_OUTPUTDIR)/gensrc/jvmtifiles/jvmti.html))
-endif
-
-TARGETS += $(COPY_JVMTI_HTML)
-
-ifeq ($(OPENJDK_TARGET_OS), windows)
- $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
- DEST := $(DIST_OUTPUTDIR)/lib, \
- FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib))
-
- TARGETS += $(COPY_JVM_LIB)
-endif
-
-# Copy libjsig, if it exists
-$(eval $(call SetupDistLibFile, DIST_jsig, \
- NAME := jsig, \
-))
-
-################################################################################
-# Copy variant-specific files
-
-# Setup make rules to copy a single variant to dist.
-# $1: The name of the variant
-define SetupDistForVariant
- ifneq ($$(filter client minimal, $1), )
- VARIANT_TARGET_DIR := $1
- else
- # Use 'server' as default target directory name for all other variants.
- VARIANT_TARGET_DIR := server
- endif
-
- $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm, \
- NAME := jvm, \
- VARIANT := $1, \
- VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
- ))
-
- # Copy the dtrace libraries, if they exist
- $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_db, \
- NAME := jvm_db, \
- VARIANT := $1, \
- VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
- ))
-
- $$(eval $$(call SetupDistLibFile, DIST_$(strip $1)_jvm_dtrace, \
- NAME := jvm_dtrace, \
- VARIANT := $1, \
- VARIANT_TARGET_DIR := $$(VARIANT_TARGET_DIR)/, \
- ))
-
- # Copy the Xusage.txt file
- $$(eval $$(call SetupCopyFiles, DIST_$(strip $1)_Xusage, \
- DEST := $$(DIST_OUTPUTDIR)/$$(LIB_SUBDIR)/$(strip $1), \
- FILES := $$(HOTSPOT_OUTPUTDIR)/variant-$(strip $1)/support/misc/Xusage.txt, \
- ))
-
- TARGETS += $$(DIST_$(strip $1)_Xusage)
-endef
-
-$(foreach variant, $(JVM_VARIANTS), \
- $(eval $(call SetupDistForVariant, $(variant))) \
-)
-
-################################################################################
-
-all: $(TARGETS)
-
-.PHONY: all
--- a/hotspot/make/HotspotCommon.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/HotspotCommon.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -33,6 +33,15 @@
DTRACE_SUPPORT_DIR := $(JVM_SUPPORT_DIR)/dtrace
+LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
+ifneq ($(filter client minimal, $(JVM_VARIANT)), )
+ JVM_VARIANT_SUBDIR := $(JVM_VARIANT)
+else
+ # Use 'server' as default target directory name for all other variants.
+ JVM_VARIANT_SUBDIR := server
+endif
+JVM_LIB_OUTPUTDIR := $(LIB_OUTPUTDIR)/$(JVM_VARIANT_SUBDIR)
+
################################################################################
# Test if a feature is available in the present build of JVM_VARIANT. Will return
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/make/copy/Copy-java.base.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -0,0 +1,67 @@
+#
+# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+# These include files are currently being copied from the jdk repository for
+# historical reasons. Disable copying from here until this has been cleaned up.
+# The files in hotspot differ slightly from the corresponding files in jdk.
+# See JDK-8167078.
+
+INCLUDE_DST_DIR := $(SUPPORT_OUTPUTDIR)/modules_include/$(MODULE)
+
+################################################################################
+# Copy platform-independent .h files
+$(eval $(call SetupCopyFiles, COPY_INCLUDE_FILES, \
+ SRC := $(HOTSPOT_TOPDIR)/src/share/vm, \
+ DEST := $(INCLUDE_DST_DIR), \
+ FLATTEN := true, \
+ FILES := prims/jni.h code/jvmticmlr.h \
+))
+
+#TARGETS += $(COPY_INCLUDE_FILES)
+
+################################################################################
+# Copy jni_md.h
+
+# This might have been defined in a custom extension
+JNI_MD_H_SRC ?= $(HOTSPOT_TOPDIR)/src/cpu/$(HOTSPOT_TARGET_CPU_ARCH)/vm/jni_$(HOTSPOT_TARGET_CPU_ARCH).h
+
+ifeq ($(OPENJDK_TARGET_OS), macosx)
+ # NOTE: This should most likely be darwin, but the old hotspot build uses bsd
+ JNI_MD_SUBDIR := bsd
+else ifeq ($(OPENJDK_TARGET_OS), windows)
+ JNI_MD_SUBDIR := win32
+else
+ JNI_MD_SUBDIR := $(OPENJDK_TARGET_OS)
+endif
+
+# SetupCopyFiles is not used here since it's non-trivial to copy a single
+# file with a different target name.
+$(INCLUDE_DST_DIR)/$(JNI_MD_SUBDIR)/jni_md.h: $(JNI_MD_H_SRC)
+ $(call LogInfo, Copying hotspot/dist/include/$(JNI_MD_SUBDIR)/jni_md.h)
+ $(install-file)
+
+#TARGETS += $(INCLUDE_DST_DIR)/$(JNI_MD_SUBDIR)/jni_md.h
+
+################################################################################
--- a/hotspot/make/gensrc/GenerateSources.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/gensrc/GenerateSources.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -47,7 +47,7 @@
# The Xusage.txt file needs to have platform specific path separator
$(eval $(call SetupTextFileProcessing, CREATE_XUSAGE, \
SOURCE_FILES := $(HOTSPOT_TOPDIR)/src/share/vm/Xusage.txt, \
- OUTPUT_FILE := $(JVM_SUPPORT_DIR)/misc/Xusage.txt, \
+ OUTPUT_FILE := $(JVM_LIB_OUTPUTDIR)/Xusage.txt, \
REPLACEMENTS := separated by ;> => separated by $(PATH_SEP)> ; , \
))
--- a/hotspot/make/gensrc/GensrcJvmti.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/gensrc/GensrcJvmti.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -129,6 +129,21 @@
TARGETS += $(JVMTI_OUTPUTDIR)/jvmtiEnvRecommended.cpp
################################################################################
+# Disable copy of jvmti.h from hotspot until this has been cleared up. The file
+# is currently being copied from the jdk repository. See JDK-8167078.
+# Copy jvmti.h to include dir
+
+# The file is the same regardless of jvm variant. Only let one do the copy.
+#ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
+# $(eval $(call SetupCopyFiles, COPY_JVMTI_H, \
+# DEST := $(SUPPORT_OUTPUTDIR)/modules_include/java.base, \
+# FILES := $(JVMTI_OUTPUTDIR)/jvmti.h, \
+# ))
+
+# TARGETS += $(COPY_JVMTI_H)
+#endif
+
+################################################################################
# Create trace files in gensrc/tracefiles
TRACE_OUTPUTDIR := $(JVM_VARIANT_OUTPUTDIR)/gensrc/tracefiles
--- a/hotspot/make/lib/CompileDtracePostJvm.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/lib/CompileDtracePostJvm.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -180,7 +180,7 @@
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DTRACE, \
LIBRARY := jvm_dtrace, \
- OUTPUT_DIR := $(LIBJVM_DTRACE_OUTPUTDIR), \
+ OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(HOTSPOT_TOPDIR)/src/os/solaris/dtrace, \
INCLUDE_FILES := jvm_dtrace.c, \
CFLAGS := -m64 -G -mt -KPIC, \
@@ -197,7 +197,7 @@
# the old build.
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM_DB, \
LIBRARY := jvm_db, \
- OUTPUT_DIR := $(LIBJVM_DB_OUTPUTDIR), \
+ OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(HOTSPOT_TOPDIR)/src/os/solaris/dtrace, \
INCLUDE_FILES := libjvm_db.c, \
CFLAGS := -I$(JVM_VARIANT_OUTPUTDIR)/gensrc -I$(DTRACE_SUPPORT_DIR) \
--- a/hotspot/make/lib/CompileJvm.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/lib/CompileJvm.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -174,13 +174,6 @@
JVM_RCFLAGS += -D"HS_FILEDESC=$(HOTSPOT_VM_DISTRO) $(RC_DESC)$(JVM_VARIANT) VM"
endif
-ifeq ($(OPENJDK_TARGET_OS), macosx)
- # NOTE: The old build did not strip binaries on macosx.
- JVM_STRIP_SYMBOLS := false
-else
- JVM_STRIP_SYMBOLS := true
-endif
-
JVM_OPTIMIZATION ?= HIGHEST_JVM
################################################################################
@@ -189,7 +182,7 @@
$(eval $(call SetupNativeCompilation, BUILD_LIBJVM, \
TOOLCHAIN := TOOLCHAIN_LINK_CXX, \
LIBRARY := jvm, \
- OUTPUT_DIR := $(JVM_OUTPUTDIR), \
+ OUTPUT_DIR := $(JVM_LIB_OUTPUTDIR), \
SRC := $(JVM_SRC_DIRS), \
EXCLUDES := $(JVM_EXCLUDES), \
EXCLUDE_FILES := $(JVM_EXCLUDE_FILES), \
@@ -211,7 +204,6 @@
OBJECT_DIR := $(JVM_OUTPUTDIR)/objs, \
MAPFILE := $(JVM_MAPFILE), \
USE_MAPFILE_FOR_SYMBOLS := true, \
- STRIP_SYMBOLS := $(JVM_STRIP_SYMBOLS), \
EMBED_MANIFEST := true, \
RC_FLAGS := $(JVM_RCFLAGS), \
VERSIONINFO_RESOURCE := $(HOTSPOT_TOPDIR)/src/os/windows/vm/version.rc, \
@@ -219,6 +211,18 @@
PRECOMPILED_HEADER_EXCLUDE := $(JVM_PRECOMPILED_HEADER_EXCLUDE), \
))
+ifeq ($(OPENJDK_TARGET_OS), windows)
+ # It doesn't matter which jvm.lib file gets exported, but we need
+ # to pick just one.
+ ifeq ($(JVM_VARIANT), $(firstword $(JVM_VARIANTS)))
+ $(eval $(call SetupCopyFiles, COPY_JVM_LIB, \
+ DEST := $(LIB_OUTPUTDIR), \
+ FILES :=$(JVM_VARIANT_OUTPUTDIR)/libjvm/objs/jvm.lib, \
+ ))
+ TARGETS += $(COPY_JVM_LIB)
+ endif
+endif
+
# AIX warning explanation:
# 1500-010 : (W) WARNING in ...: Infinite loop. Program may not stop.
# There are several infinite loops in the vm, so better suppress.
--- a/hotspot/make/lib/CompileLibjsig.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/lib/CompileLibjsig.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -34,7 +34,6 @@
ifneq ($(OPENJDK_TARGET_OS), windows)
ifeq ($(STATIC_BUILD), false)
- LIBJSIG_STRIP_SYMBOLS := true
ifeq ($(OPENJDK_TARGET_OS), linux)
LIBJSIG_CFLAGS := -fPIC -D_GNU_SOURCE -D_REENTRANT $(EXTRA_CFLAGS)
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE) $(EXTRA_CFLAGS)
@@ -72,8 +71,6 @@
else ifeq ($(OPENJDK_TARGET_OS), macosx)
LIBJSIG_CFLAGS := -m64 -D_GNU_SOURCE -pthread -mno-omit-leaf-frame-pointer -mstack-alignment=16 -fPIC
LIBJSIG_LDFLAGS := $(LDFLAGS_HASH_STYLE)
- # NOTE: This lib is not stripped on macosx in old build. Looks like a mistake.
- LIBJSIG_STRIP_SYMBOLS := false
else
$(error Unknown target OS $(OPENJDK_TARGET_OS) in CompileLibjsig.gmk)
endif
@@ -84,20 +81,71 @@
LIBJSIG_LDFLAGS += $(SHARED_LIBRARY_FLAGS)
+ LIB_OUTPUTDIR := $(call FindLibDirForModule, java.base)
+
$(eval $(call SetupNativeCompilation, BUILD_LIBJSIG, \
LIBRARY := jsig, \
EXTRA_FILES := $(LIBJSIG_SRC_FILE), \
- OUTPUT_DIR := $(LIBJSIG_OUTPUTDIR), \
+ OUTPUT_DIR := $(LIB_OUTPUTDIR), \
LANG := C, \
CFLAGS := $(LIBJSIG_CFLAGS) $(LIBJSIG_CPU_FLAGS), \
LDFLAGS := $(LIBJSIG_LDFLAGS) $(LIBJSIG_CPU_FLAGS), \
LIBS := $(LIBJSIG_LIBS), \
MAPFILE := $(LIBJSIG_MAPFILE), \
OBJECT_DIR := $(LIBJSIG_OUTPUTDIR)/objs, \
- STRIP_SYMBOLS := $(LIBJSIG_STRIP_SYMBOLS), \
))
TARGETS += $(BUILD_LIBJSIG)
+
+ ############################################################################
+ # Create symlinks in each variant sub dir
+ ifeq ($(OPENJDK_TARGET_OS), macosx)
+ DEBUG_INFO_SUFFIX := $(SHARED_LIBRARY_SUFFIX).dSYM
+ else
+ DEBUG_INFO_SUFFIX := .debuginfo
+ endif
+
+ # $1 variant subdir
+ define CreateSymlinks
+ # Always symlink from libdir/variant/libjsig.so -> ../libjsig.so and
+ # the corresponding debuginfo.
+ $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig): \
+ $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
+ $$(call MakeDir, $$(@D))
+ $(RM) $$@
+ $(LN) -s ../$$(@F) $$@
+
+ TARGETS += $(LIB_OUTPUTDIR)/$1/$(call SHARED_LIBRARY,jsig)
+
+ ifeq ($(COPY_DEBUG_SYMBOLS), true)
+ $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX): \
+ $(LIB_OUTPUTDIR)/$(call SHARED_LIBRARY,jsig)
+ $$(call MakeDir, $$(@D))
+ $(RM) $$@
+ $(LN) -s ../$$(@F) $$@
+
+ TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX)
+
+ ifeq ($(ZIP_EXTERNAL_DEBUG_SYMBOLS), true)
+ $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz: \
+ $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig$(DEBUG_INFO_SUFFIX)
+ $(CD) $$(@D) && $(ZIP) -q -y $$@ $$(basename $$(@F))$(DEBUG_INFO_SUFFIX)
+
+ TARGETS += $(LIB_OUTPUTDIR)/$1/$(LIBRARY_PREFIX)jsig.diz
+ endif
+ endif
+ endef
+
+ # The subdir is the same as the variant for client and minimal, for all
+ # others it's server.
+ VARIANT_SUBDIRS := $(filter client minimal, $(JVM_VARIANTS)) \
+ $(if $(filter-out client minimal, $(JVM_VARIANTS)), server)
+ $(foreach v, $(VARIANT_SUBDIRS), $(eval $(call CreateSymlinks,$v)))
+
+ ############################################################################
+
+ include CopyToExplodedJdk.gmk
+
endif
endif
--- a/hotspot/make/lib/CompileLibraries.gmk Wed Jul 05 22:17:45 2017 +0200
+++ b/hotspot/make/lib/CompileLibraries.gmk Wed Oct 05 10:49:49 2016 +0200
@@ -41,6 +41,8 @@
include lib/CompileGtest.gmk
endif
+include CopyToExplodedJdk.gmk
+
all: $(TARGETS)
.PHONY: all