提交 395466b5 编写于 作者: T twisti

Merge

...@@ -151,32 +151,43 @@ else ...@@ -151,32 +151,43 @@ else
$(MAKE_ARGS) BUILD_FLAVOR=product docs $(MAKE_ARGS) BUILD_FLAVOR=product docs
endif endif
# Output directories
C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1
C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2
MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1
ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero
SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark
# Build variation of hotspot # Build variation of hotspot
$(C1_VM_TARGETS): $(C1_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT) $(MAKE) BUILD_DIR=$(C1_DIR) BUILD_FLAVOR=$(@:%1=%) VM_TARGET=$@ generic_build1 $(ALT_OUT)
$(C2_VM_TARGETS): $(C2_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT) $(MAKE) BUILD_DIR=$(C2_DIR) BUILD_FLAVOR=$@ VM_TARGET=$@ generic_build2 $(ALT_OUT)
$(ZERO_VM_TARGETS): $(ZERO_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \ $(MAKE) BUILD_DIR=$(ZERO_DIR) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
generic_buildzero $(ALT_OUT)
$(SHARK_VM_TARGETS): $(SHARK_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ \ $(MAKE) BUILD_DIR=$(SHARK_DIR) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
generic_buildshark $(ALT_OUT)
$(MINIMAL1_VM_TARGETS): $(MINIMAL1_VM_TARGETS):
$(CD) $(GAMMADIR)/make; \ $(CD) $(GAMMADIR)/make; \
$(MAKE) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ \ $(MAKE) BUILD_DIR=$(MINIMAL1_DIR) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ generic_buildminimal1 $(ALT_OUT)
generic_buildminimal1 $(ALT_OUT)
# Install hotspot script in build directory
HOTSPOT_SCRIPT=$(BUILD_DIR)/$(BUILD_FLAVOR)/hotspot
$(HOTSPOT_SCRIPT): $(GAMMADIR)/make/hotspot.script
$(QUIETLY) $(MKDIR) -p $(BUILD_DIR)/$(BUILD_FLAVOR)
$(QUIETLY) cat $< | sed -e 's|@@LIBARCH@@|$(LIBARCH)|g' | sed -e 's|@@JDK_IMPORT_PATH@@|$(JDK_IMPORT_PATH)|g' > $@
$(QUIETLY) chmod +x $@
# Build compiler1 (client) rule, different for platforms # Build compiler1 (client) rule, different for platforms
generic_build1: generic_build1: $(HOTSPOT_SCRIPT)
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
ifeq ($(OSNAME),windows) ifeq ($(OSNAME),windows)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
...@@ -201,7 +212,7 @@ else ...@@ -201,7 +212,7 @@ else
endif endif
# Build compiler2 (server) rule, different for platforms # Build compiler2 (server) rule, different for platforms
generic_build2: generic_build2: $(HOTSPOT_SCRIPT)
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
ifeq ($(OSNAME),windows) ifeq ($(OSNAME),windows)
$(CD) $(OUTPUTDIR); \ $(CD) $(OUTPUTDIR); \
...@@ -217,19 +228,19 @@ else ...@@ -217,19 +228,19 @@ else
$(MAKE_ARGS) $(VM_TARGET) $(MAKE_ARGS) $(VM_TARGET)
endif endif
generic_buildzero: generic_buildzero: $(HOTSPOT_SCRIPT)
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
$(CD) $(OUTPUTDIR); \ $(CD) $(OUTPUTDIR); \
$(MAKE) -f $(ABS_OS_MAKEFILE) \ $(MAKE) -f $(ABS_OS_MAKEFILE) \
$(MAKE_ARGS) $(VM_TARGET) $(MAKE_ARGS) $(VM_TARGET)
generic_buildshark: generic_buildshark: $(HOTSPOT_SCRIPT)
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
$(CD) $(OUTPUTDIR); \ $(CD) $(OUTPUTDIR); \
$(MAKE) -f $(ABS_OS_MAKEFILE) \ $(MAKE) -f $(ABS_OS_MAKEFILE) \
$(MAKE_ARGS) $(VM_TARGET) $(MAKE_ARGS) $(VM_TARGET)
generic_buildminimal1: generic_buildminimal1: $(HOTSPOT_SCRIPT)
ifeq ($(JVM_VARIANT_MINIMAL1),true) ifeq ($(JVM_VARIANT_MINIMAL1),true)
$(MKDIR) -p $(OUTPUTDIR) $(MKDIR) -p $(OUTPUTDIR)
ifeq ($(ARCH_DATA_MODEL), 32) ifeq ($(ARCH_DATA_MODEL), 32)
...@@ -252,224 +263,210 @@ endif ...@@ -252,224 +263,210 @@ endif
# Export file rule # Export file rule
generic_export: $(EXPORT_LIST) generic_export: $(EXPORT_LIST)
export_product: export_product:
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%=%) generic_export
generic_export
export_fastdebug: export_fastdebug:
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
EXPORT_SUBDIR=/$(@:export_%=%) \
generic_export
export_debug: export_debug:
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
EXPORT_SUBDIR=/$(@:export_%=%) \
generic_export
export_optimized: export_optimized:
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
EXPORT_SUBDIR=/$(@:export_%=%) \
generic_export
export_product_jdk:: export_product_jdk::
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
VM_SUBDIR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
generic_export
export_optimized_jdk:: export_optimized_jdk::
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
VM_SUBDIR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
generic_export
export_fastdebug_jdk:: export_fastdebug_jdk::
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
VM_SUBDIR=$(@:export_%_jdk=%) \
ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \
generic_export
export_debug_jdk:: export_debug_jdk::
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) VM_SUBDIR=$(@:export_%_jdk=%) \ $(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \
generic_export
# Export file copy rules # Export file copy rules
XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
DOCS_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_docs DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1/$(VM_SUBDIR) C1_BUILD_DIR =$(C1_DIR)/$(BUILD_FLAVOR)
C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2/$(VM_SUBDIR) C2_BUILD_DIR =$(C2_DIR)/$(BUILD_FLAVOR)
MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1/$(VM_SUBDIR) MINIMAL1_BUILD_DIR=$(MINIMAL1_DIR)/$(BUILD_FLAVOR)
ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero/$(VM_SUBDIR) ZERO_BUILD_DIR =$(ZERO_DIR)/$(BUILD_FLAVOR)
SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark/$(VM_SUBDIR) SHARK_BUILD_DIR =$(SHARK_DIR)/$(BUILD_FLAVOR)
# Server (C2) # Server (C2)
ifeq ($(JVM_VARIANT_SERVER), true) ifeq ($(JVM_VARIANT_SERVER), true)
# Common # Common
$(EXPORT_SERVER_DIR)/%.diz: $(C2_DIR)/%.diz $(EXPORT_SERVER_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.jar: $(C2_DIR)/../generated/%.jar $(EXPORT_LIB_DIR)/%.jar: $(C2_BUILD_DIR)/../generated/%.jar
$(install-file) $(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(C2_DIR)/../generated/jvmtifiles/% $(EXPORT_INCLUDE_DIR)/%: $(C2_BUILD_DIR)/../generated/jvmtifiles/%
$(install-file) $(install-file)
# Windows # Windows
$(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll $(EXPORT_SERVER_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb $(EXPORT_SERVER_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map $(EXPORT_SERVER_DIR)/%.map: $(C2_BUILD_DIR)/%.map
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.lib: $(C2_DIR)/%.lib $(EXPORT_LIB_DIR)/%.lib: $(C2_BUILD_DIR)/%.lib
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_DIR)/%.diz $(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_DIR)/%.dll $(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_DIR)/%.pdb $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.map: $(C2_DIR)/%.map $(EXPORT_JRE_BIN_DIR)/%.map: $(C2_BUILD_DIR)/%.map
$(install-file) $(install-file)
# Unix # Unix
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_DIR)/%.debuginfo $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_DIR)/%.debuginfo $(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_DIR)/%.debuginfo $(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_DIR)/%.diz $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/64/%.diz: $(C2_DIR)/%.diz $(EXPORT_SERVER_DIR)/64/%.diz: $(C2_BUILD_DIR)/%.diz
$(install-file) $(install-file)
endif endif
# Client (C1) # Client (C1)
ifeq ($(JVM_VARIANT_CLIENT), true) ifeq ($(JVM_VARIANT_CLIENT), true)
# Common # Common
$(EXPORT_CLIENT_DIR)/%.diz: $(C1_DIR)/%.diz $(EXPORT_CLIENT_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.jar: $(C1_DIR)/../generated/%.jar $(EXPORT_LIB_DIR)/%.jar: $(C1_BUILD_DIR)/../generated/%.jar
$(install-file) $(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(C1_DIR)/../generated/jvmtifiles/% $(EXPORT_INCLUDE_DIR)/%: $(C1_BUILD_DIR)/../generated/jvmtifiles/%
$(install-file) $(install-file)
# Windows # Windows
$(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll $(EXPORT_CLIENT_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb $(EXPORT_CLIENT_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map $(EXPORT_CLIENT_DIR)/%.map: $(C1_BUILD_DIR)/%.map
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.lib: $(C1_DIR)/%.lib $(EXPORT_LIB_DIR)/%.lib: $(C1_BUILD_DIR)/%.lib
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_DIR)/%.diz $(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_DIR)/%.dll $(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_DIR)/%.pdb $(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.map: $(C1_DIR)/%.map $(EXPORT_JRE_BIN_DIR)/%.map: $(C1_BUILD_DIR)/%.map
$(install-file) $(install-file)
# Unix # Unix
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_DIR)/%.debuginfo $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_DIR)/%.debuginfo $(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_DIR)/%.debuginfo $(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_DIR)/%.diz $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_DIR)/%.diz $(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
endif endif
# Minimal1 # Minimal1
ifeq ($(JVM_VARIANT_MINIMAL1), true) ifeq ($(JVM_VARIANT_MINIMAL1), true)
# Common # Common
$(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz $(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_DIR)/../generated/%.jar $(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_BUILD_DIR)/../generated/%.jar
$(install-file) $(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_DIR)/../generated/jvmtifiles/% $(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_BUILD_DIR)/../generated/jvmtifiles/%
$(install-file) $(install-file)
# Windows # Windows
$(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll $(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb $(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_DIR)/%.map $(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
$(install-file) $(install-file)
$(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_DIR)/%.lib $(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_BUILD_DIR)/%.lib
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz $(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll $(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb $(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
$(install-file) $(install-file)
$(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_DIR)/%.map $(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
$(install-file) $(install-file)
# Unix # Unix
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_MINIMAL_DIR)/64/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo $(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo $(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_DIR)/%.diz $(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
$(install-file) $(install-file)
endif endif
# Zero # Zero
ifeq ($(JVM_VARIANT_ZERO), true) ifeq ($(JVM_VARIANT_ZERO), true)
# Common # Common
$(EXPORT_LIB_DIR)/%.jar: $(ZERO_DIR)/../generated/%.jar $(EXPORT_LIB_DIR)/%.jar: $(ZERO_BUILD_DIR)/../generated/%.jar
$(install-file) $(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(ZERO_DIR)/../generated/jvmtifiles/% $(EXPORT_INCLUDE_DIR)/%: $(ZERO_BUILD_DIR)/../generated/jvmtifiles/%
$(install-file) $(install-file)
# Unix # Unix
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_DIR)/%.debuginfo $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_DIR)/%.diz $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_DIR)/%.debuginfo $(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.diz: $(ZERO_DIR)/%.diz $(EXPORT_SERVER_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
$(install-file) $(install-file)
endif endif
# Shark # Shark
ifeq ($(JVM_VARIANT_ZEROSHARK), true) ifeq ($(JVM_VARIANT_ZEROSHARK), true)
# Common # Common
$(EXPORT_LIB_DIR)/%.jar: $(SHARK_DIR)/../generated/%.jar $(EXPORT_LIB_DIR)/%.jar: $(SHARK_BUILD_DIR)/../generated/%.jar
$(install-file) $(install-file)
$(EXPORT_INCLUDE_DIR)/%: $(SHARK_DIR)/../generated/jvmtifiles/% $(EXPORT_INCLUDE_DIR)/%: $(SHARK_BUILD_DIR)/../generated/jvmtifiles/%
$(install-file) $(install-file)
# Unix # Unix
$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_DIR)/%.debuginfo $(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_DIR)/%.diz $(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX) $(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_DIR)/%.debuginfo $(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_BUILD_DIR)/%.debuginfo
$(install-file) $(install-file)
$(EXPORT_SERVER_DIR)/%.diz: $(SHARK_DIR)/%.diz $(EXPORT_SERVER_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
$(install-file) $(install-file)
endif endif
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
# adlc.make - # adlc.make -
# jvmti.make - generate JVMTI bindings from the spec (JSR-163) # jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives # sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# #
# The makefiles are split this way so that "make foo" will run faster by not # The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm. # having to read the dependency files for the vm.
...@@ -129,9 +128,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) ...@@ -129,9 +128,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
# dtrace.make is used on BSD versions that implement Dtrace (like MacOS X) # dtrace.make is used on BSD versions that implement Dtrace (like MacOS X)
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make \ BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make dtrace.make
jvmti.make sa.make dtrace.make \
env.sh env.csh jdkpath.sh
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
...@@ -354,33 +351,6 @@ dtrace.make: $(BUILDTREE_MAKE) ...@@ -354,33 +351,6 @@ dtrace.make: $(BUILDTREE_MAKE)
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
) > $@ ) > $@
env.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "JAVA_HOME=$(JDK_IMPORT_PATH)"; }; \
{ \
echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \
} | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \
echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \
echo "export JAVA_HOME CLASSPATH HOTSPOT_BUILD_USER"; \
) > $@
env.csh: env.sh
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "setenv JAVA_HOME \"$(JDK_IMPORT_PATH)\""; }; \
sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
) > $@
jdkpath.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo "JDK=${JAVA_HOME}"; \
) > $@
FORCE: FORCE:
.PHONY: all FORCE .PHONY: all FORCE
#
# Copyright (c) 2005, 2012, 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.
#
# 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.
#
#
# Rules to build gamma launcher, used by vm.make
LAUNCHER_SCRIPT = hotspot
LAUNCHER = gamma
LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
LAUNCHERFLAGS := $(ARCHFLAG) \
-I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
-I$(LAUNCHERDIR_SHARE) \
-DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
-DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
-DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
-DARCH=\"$(LIBARCH)\" \
-DGAMMA \
-DLAUNCHER_TYPE=\"gamma\" \
-DLINK_INTO_$(LINK_INTO) \
$(TARGET_DEFINES)
# Give the launcher task_for_pid() privileges so that it can be used to run JStack, JInfo, et al.
LFLAGS_LAUNCHER += -sectcreate __TEXT __info_plist $(GAMMADIR)/src/os/bsd/launcher/Info-privileged.plist
ifeq ($(LINK_INTO),AOUT)
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
LAUNCHER_MAPFILE = mapfile_reorder
LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o
LFLAGS_LAUNCHER += -L`pwd`
# The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
# freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting
# the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM
# first. Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is
# statically linked with CoreFoundation framework libs. Unfortunately, gamma's
# unique searchpath results in some unresolved symbols in the framework
# libraries, because JDK libraries are inadvertently discovered first on the
# searchpath, e.g. libjpeg. On Mac OS X, filenames are case *insensitive*.
# So, the actual filename collision is libjpeg.dylib and libJPEG.dylib.
# To resolve this, gamma needs to also statically link with the CoreFoundation
# framework libraries.
ifeq ($(OS_VENDOR),Darwin)
LFLAGS_LAUNCHER += -framework CoreFoundation
endif
LIBS_LAUNCHER += -l$(JVM) $(LIBS)
endif
LINK_LAUNCHER = $(LINK.CC)
LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CXX/PRE_HOOK)
LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CXX/POST_HOOK)
LAUNCHER_OUT = launcher
SUFFIXES += .d
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPFILES)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
# Sign the launcher with the development certificate (if present) so that it can be used
# to run JStack, JInfo, et al.
$(QUIETLY) -codesign -s openjdk_codesign $@
$(LAUNCHER): $(LAUNCHER_SCRIPT)
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
$(QUIETLY) chmod +x $@
...@@ -328,9 +328,6 @@ install_jvm: $(LIBJVM) ...@@ -328,9 +328,6 @@ install_jvm: $(LIBJVM)
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Other files # Other files
# Gamma launcher
include $(MAKEFILES_DIR)/launcher.make
# Signal interposition library # Signal interposition library
include $(MAKEFILES_DIR)/jsig.make include $(MAKEFILES_DIR)/jsig.make
......
...@@ -72,6 +72,7 @@ EMACS=emacs ...@@ -72,6 +72,7 @@ EMACS=emacs
REL_MYDIR=`dirname $0` REL_MYDIR=`dirname $0`
MYDIR=`cd $REL_MYDIR && pwd` MYDIR=`cd $REL_MYDIR && pwd`
#
# Look whether the user wants to run inside gdb # Look whether the user wants to run inside gdb
case "$1" in case "$1" in
-gdb) -gdb)
...@@ -95,16 +96,14 @@ case "$1" in ...@@ -95,16 +96,14 @@ case "$1" in
;; ;;
esac esac
JDK= if [ "${ALT_JAVA_HOME}" != "" ]; then
if [ "${ALT_JAVA_HOME}" = "" ]; then JDK=${ALT_JAVA_HOME%%/jre}
. ${MYDIR}/jdkpath.sh
else else
JDK=${ALT_JAVA_HOME%%/jre}; JDK=@@JDK_IMPORT_PATH@@
fi fi
if [ "${JDK}" = "" ]; then if [ "${JDK}" = "" ]; then
echo Failed to find JDK. ALT_JAVA_HOME is not set or ./jdkpath.sh is empty or not found. echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
exit 1
fi fi
# We will set the LD_LIBRARY_PATH as follows: # We will set the LD_LIBRARY_PATH as follows:
...@@ -142,12 +141,12 @@ else ...@@ -142,12 +141,12 @@ else
export LD_LIBRARY_PATH export LD_LIBRARY_PATH
fi fi
JPARMS="$@ $JAVA_ARGS"; JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
# Locate the gamma development launcher # Locate the java launcher
LAUNCHER=${MYDIR}/gamma LAUNCHER=$JDK/bin/java
if [ ! -x $LAUNCHER ] ; then if [ ! -x $LAUNCHER ] ; then
echo Error: Cannot find the gamma development launcher \"$LAUNCHER\" echo Error: Cannot find the java launcher \"$LAUNCHER\"
exit 1 exit 1
fi fi
...@@ -166,9 +165,10 @@ set args $JPARMS ...@@ -166,9 +165,10 @@ set args $JPARMS
file $LAUNCHER file $LAUNCHER
directory $GDBSRCDIR directory $GDBSRCDIR
# Get us to a point where we can set breakpoints in libjvm.so # Get us to a point where we can set breakpoints in libjvm.so
break InitializeJVM set breakpoint pending on
break JNI_CreateJavaVM
run run
# Stop in InitializeJVM # Stop in JNI_CreateJavaVM
delete 1 delete 1
# We can now set breakpoints wherever we like # We can now set breakpoints wherever we like
EOF EOF
...@@ -199,7 +199,7 @@ case "$MODE" in ...@@ -199,7 +199,7 @@ case "$MODE" in
rm -f $GDBSCR rm -f $GDBSCR
;; ;;
dbx) dbx)
$DBX -s $HOME/.dbxrc $LAUNCHER $JPARMS $DBX -s $HOME/.dbxrc -c "loadobject -load libjvm.so; stop in JNI_CreateJavaVM; run $JPARMS; delete all" $LAUNCHER
;; ;;
valgrind) valgrind)
echo Warning: Defaulting to 16Mb heap to make Valgrind run faster, use -Xmx for larger heap echo Warning: Defaulting to 16Mb heap to make Valgrind run faster, use -Xmx for larger heap
......
...@@ -134,14 +134,14 @@ jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}} ...@@ -134,14 +134,14 @@ jprt.my.windows.x64=${jprt.my.windows.x64.${jprt.tools.default.release}}
jprt.build.targets.standard= \ jprt.build.targets.standard= \
${jprt.my.solaris.sparc}-{product|fastdebug}, \ ${jprt.my.solaris.sparc}-{product|fastdebug}, \
${jprt.my.solaris.sparcv9}-{product|fastdebug}, \ ${jprt.my.solaris.sparcv9}-{product|fastdebug|optimized}, \
${jprt.my.solaris.i586}-{product|fastdebug}, \ ${jprt.my.solaris.i586}-{product|fastdebug}, \
${jprt.my.solaris.x64}-{product|fastdebug}, \ ${jprt.my.solaris.x64}-{product|fastdebug}, \
${jprt.my.linux.i586}-{product|fastdebug}, \ ${jprt.my.linux.i586}-{product|fastdebug}, \
${jprt.my.linux.x64}-{product|fastdebug}, \ ${jprt.my.linux.x64}-{product|fastdebug|optimized}, \
${jprt.my.macosx.x64}-{product|fastdebug}, \ ${jprt.my.macosx.x64}-{product|fastdebug}, \
${jprt.my.windows.i586}-{product|fastdebug}, \ ${jprt.my.windows.i586}-{product|fastdebug}, \
${jprt.my.windows.x64}-{product|fastdebug}, \ ${jprt.my.windows.x64}-{product|fastdebug|optimized}, \
${jprt.my.linux.armvh}-{product|fastdebug} ${jprt.my.linux.armvh}-{product|fastdebug}
jprt.build.targets.open= \ jprt.build.targets.open= \
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
# adlc.make - # adlc.make -
# jvmti.make - generate JVMTI bindings from the spec (JSR-163) # jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives # sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# #
# The makefiles are split this way so that "make foo" will run faster by not # The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm. # having to read the dependency files for the vm.
...@@ -123,8 +122,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) ...@@ -123,8 +122,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
# For dependencies and recursive makes. # For dependencies and recursive makes.
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \ BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
env.sh env.csh jdkpath.sh
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
...@@ -349,33 +347,6 @@ sa.make: $(BUILDTREE_MAKE) ...@@ -349,33 +347,6 @@ sa.make: $(BUILDTREE_MAKE)
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
) > $@ ) > $@
env.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "JAVA_HOME=$(JDK_IMPORT_PATH)"; }; \
{ \
echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \
} | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \
echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \
echo "export JAVA_HOME CLASSPATH HOTSPOT_BUILD_USER"; \
) > $@
env.csh: env.sh
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "setenv JAVA_HOME \"$(JDK_IMPORT_PATH)\""; }; \
sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
) > $@
jdkpath.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo "JDK=${JAVA_HOME}"; \
) > $@
FORCE: FORCE:
.PHONY: all FORCE .PHONY: all FORCE
#
# Copyright (c) 2005, 2012, 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.
#
# 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.
#
#
# Rules to build gamma launcher, used by vm.make
LAUNCHER_SCRIPT = hotspot
LAUNCHER = gamma
LAUNCHERDIR := $(GAMMADIR)/src/os/posix/launcher
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
LAUNCHERFLAGS := $(ARCHFLAG) \
-I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
-I$(LAUNCHERDIR_SHARE) \
-DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
-DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
-DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
-DARCH=\"$(LIBARCH)\" \
-DGAMMA \
-DLAUNCHER_TYPE=\"gamma\" \
-DLINK_INTO_$(LINK_INTO) \
$(TARGET_DEFINES)
ifeq ($(LINK_INTO),AOUT)
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
LAUNCHER_MAPFILE = mapfile_reorder
LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
LFLAGS_LAUNCHER += $(SONAMEFLAG:SONAME=$(LIBJVM)) $(STATIC_LIBGCC)
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o
LFLAGS_LAUNCHER += -L `pwd`
LIBS_LAUNCHER += -l$(JVM) $(LIBS)
endif
LINK_LAUNCHER = $(LINK.CC)
LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CXX/PRE_HOOK)
LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CXX/POST_HOOK)
LAUNCHER_OUT = launcher
SUFFIXES += .d
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPFILES)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
$(LAUNCHER): $(LAUNCHER_SCRIPT)
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
$(QUIETLY) chmod +x $@
...@@ -372,9 +372,6 @@ install_jvm: $(LIBJVM) ...@@ -372,9 +372,6 @@ install_jvm: $(LIBJVM)
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Other files # Other files
# Gamma launcher
include $(MAKEFILES_DIR)/launcher.make
# Signal interposition library # Signal interposition library
include $(MAKEFILES_DIR)/jsig.make include $(MAKEFILES_DIR)/jsig.make
......
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
# adlc.make - # adlc.make -
# jvmti.make - generate JVMTI bindings from the spec (JSR-163) # jvmti.make - generate JVMTI bindings from the spec (JSR-163)
# sa.make - generate SA jar file and natives # sa.make - generate SA jar file and natives
# env.[ck]sh - environment settings
# #
# The makefiles are split this way so that "make foo" will run faster by not # The makefiles are split this way so that "make foo" will run faster by not
# having to read the dependency files for the vm. # having to read the dependency files for the vm.
...@@ -116,8 +115,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS)) ...@@ -116,8 +115,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
# For dependencies and recursive makes. # For dependencies and recursive makes.
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make \ BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
env.sh env.csh jdkpath.sh
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \ BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT) ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
...@@ -339,33 +337,6 @@ sa.make: $(BUILDTREE_MAKE) ...@@ -339,33 +337,6 @@ sa.make: $(BUILDTREE_MAKE)
echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \ echo "include \$$(GAMMADIR)/make/$(OS_FAMILY)/makefiles/$(@F)"; \
) > $@ ) > $@
env.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "JAVA_HOME=$(JDK_IMPORT_PATH)"; }; \
{ \
echo "CLASSPATH=$${CLASSPATH:+$$CLASSPATH:}.:\$${JAVA_HOME}/jre/lib/rt.jar:\$${JAVA_HOME}/jre/lib/i18n.jar"; \
} | sed s:$${JAVA_HOME:--------}:\$${JAVA_HOME}:g; \
echo "HOTSPOT_BUILD_USER=\"$${LOGNAME:-$$USER} in `basename $(GAMMADIR)`\""; \
echo "export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"; \
) > $@
env.csh: env.sh
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
{ echo "setenv JAVA_HOME \"$(JDK_IMPORT_PATH)\""; }; \
sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=/setenv \1 /p' $?; \
) > $@
jdkpath.sh: $(BUILDTREE_MAKE)
@echo Creating $@ ...
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo "JDK=${JAVA_HOME}"; \
) > $@
FORCE: FORCE:
.PHONY: all FORCE .PHONY: all FORCE
#
# Copyright (c) 2005, 2012, 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.
#
# 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.
#
#
# Rules to build gamma launcher, used by vm.make
LAUNCHER_SCRIPT = hotspot
LAUNCHER = gamma
LAUNCHERDIR = $(GAMMADIR)/src/os/posix/launcher
LAUNCHERDIR_SHARE := $(GAMMADIR)/src/share/tools/launcher
LAUNCHERFLAGS = $(ARCHFLAG) \
-I$(LAUNCHERDIR) -I$(GAMMADIR)/src/share/vm/prims \
-I$(LAUNCHERDIR_SHARE) \
-DFULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
-DJDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
-DJDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
-DARCH=\"$(LIBARCH)\" \
-DGAMMA \
-DLAUNCHER_TYPE=\"gamma\" \
-DLINK_INTO_$(LINK_INTO) \
$(TARGET_DEFINES)
ifeq ($(LINK_INTO),AOUT)
LAUNCHER.o = launcher.o $(JVM_OBJ_FILES)
LAUNCHER_MAPFILE = mapfile_extended
LFLAGS_LAUNCHER$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LAUNCHER_MAPFILE))
LIBS_LAUNCHER += $(LIBS)
else
LAUNCHER.o = launcher.o
LFLAGS_LAUNCHER += -L `pwd`
LIBS_LAUNCHER += -l$(JVM) $(LIBS)
endif
LINK_LAUNCHER = $(LINK.CXX)
LINK_LAUNCHER/PRE_HOOK = $(LINK_LIB.CXX/PRE_HOOK)
LINK_LAUNCHER/POST_HOOK = $(LINK_LIB.CXX/POST_HOOK)
ifeq ("${Platform_compiler}", "sparcWorks")
# Enable the following LAUNCHERFLAGS addition if you need to compare the
# built ELF objects.
#
# The -g option makes static data global and the "-W0,-noglobal"
# option tells the compiler to not globalize static data using a unique
# globalization prefix. Instead force the use of a static globalization
# prefix based on the source filepath so the objects from two identical
# compilations are the same.
#
# Note: The blog says to use "-W0,-xglobalstatic", but that doesn't
# seem to work. I got "-W0,-noglobal" from Kelly and that works.
#LAUNCHERFLAGS += -W0,-noglobal
endif # Platform_compiler == sparcWorks
LAUNCHER_OUT = launcher
SUFFIXES += .d
SOURCES := $(shell find $(LAUNCHERDIR) -name "*.c")
SOURCES_SHARE := $(shell find $(LAUNCHERDIR_SHARE) -name "*.c")
OBJS := $(patsubst $(LAUNCHERDIR)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES)) $(patsubst $(LAUNCHERDIR_SHARE)/%.c,$(LAUNCHER_OUT)/%.o,$(SOURCES_SHARE))
DEPFILES := $(patsubst %.o,%.d,$(OBJS))
-include $(DEPFILES)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR_SHARE)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER_OUT)/%.o: $(LAUNCHERDIR)/%.c
$(QUIETLY) [ -d $(LAUNCHER_OUT) ] || { mkdir -p $(LAUNCHER_OUT); }
$(QUIETLY) $(CC) -g -o $@ -c $< -MMD $(LAUNCHERFLAGS) $(CXXFLAGS)
$(LAUNCHER): $(OBJS) $(LIBJVM) $(LAUNCHER_MAPFILE)
ifeq ($(filter -sbfast -xsbfast, $(CFLAGS_BROWSE)),)
$(QUIETLY) echo Linking launcher...
$(QUIETLY) $(LINK_LAUNCHER/PRE_HOOK)
$(QUIETLY) $(LINK_LAUNCHER) $(LFLAGS_LAUNCHER) -o $@ $(sort $(OBJS)) $(LIBS_LAUNCHER)
$(QUIETLY) $(LINK_LAUNCHER/POST_HOOK)
endif # filter -sbfast -xsbfast
$(LAUNCHER): $(LAUNCHER_SCRIPT)
$(LAUNCHER_SCRIPT): $(LAUNCHERDIR)/launcher.script
$(QUIETLY) sed -e 's/@@LIBARCH@@/$(LIBARCH)/g' $< > $@
$(QUIETLY) chmod +x $@
...@@ -338,9 +338,6 @@ install_jvm: $(LIBJVM) ...@@ -338,9 +338,6 @@ install_jvm: $(LIBJVM)
#---------------------------------------------------------------------- #----------------------------------------------------------------------
# Other files # Other files
# Gamma launcher
include $(MAKEFILES_DIR)/launcher.make
# Signal interposition library # Signal interposition library
include $(MAKEFILES_DIR)/jsig.make include $(MAKEFILES_DIR)/jsig.make
......
...@@ -33,7 +33,7 @@ GENERATED=../generated ...@@ -33,7 +33,7 @@ GENERATED=../generated
BUILD_PCH_FILE=_build_pch_file.obj BUILD_PCH_FILE=_build_pch_file.obj
!endif !endif
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
!include ../local.make !include ../local.make
!include compile.make !include compile.make
...@@ -71,4 +71,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def ...@@ -71,4 +71,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
!include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make !include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
...@@ -33,7 +33,7 @@ GENERATED=../generated ...@@ -33,7 +33,7 @@ GENERATED=../generated
BUILD_PCH_FILE=_build_pch_file.obj BUILD_PCH_FILE=_build_pch_file.obj
!endif !endif
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
!include ../local.make !include ../local.make
!include compile.make !include compile.make
...@@ -70,4 +70,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def ...@@ -70,4 +70,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
!include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make !include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
#
# Copyright (c) 2010, 2012, 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.
#
# 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.
#
#
LAUNCHER_FLAGS=$(CXX_FLAGS) $(ARCHFLAG) \
/D FULL_VERSION=\"$(HOTSPOT_RELEASE_VERSION)\" \
/D JDK_MAJOR_VERSION=\"$(JDK_MAJOR_VERSION)\" \
/D JDK_MINOR_VERSION=\"$(JDK_MINOR_VERSION)\" \
/D GAMMA \
/D LAUNCHER_TYPE=\"gamma\" \
/D _CRT_SECURE_NO_WARNINGS \
/D _CRT_SECURE_NO_DEPRECATE \
/D LINK_INTO_LIBJVM \
/I $(WorkSpace)\src\os\windows\launcher \
/I $(WorkSpace)\src\share\tools\launcher \
/I $(WorkSpace)\src\share\vm\prims \
/I $(WorkSpace)\src\share\vm \
/I $(WorkSpace)\src\cpu\$(Platform_arch)\vm \
/I $(WorkSpace)\src\os\windows\vm
LD_FLAGS=/manifest $(HS_INTERNAL_NAME).lib kernel32.lib user32.lib /nologo /machine:$(MACHINE) /map /debug /subsystem:console
!if "$(COMPILER_NAME)" == "VS2005"
# This VS2005 compiler has /GS as a default and requires bufferoverflowU.lib
# on the link command line, otherwise we get missing __security_check_cookie
# externals at link time. Even with /GS-, you need bufferoverflowU.lib.
BUFFEROVERFLOWLIB = bufferoverflowU.lib
LD_FLAGS = $(LD_FLAGS) $(BUFFEROVERFLOWLIB)
!endif
!if "$(COMPILER_NAME)" == "VS2010" && "$(BUILDARCH)" == "i486"
LD_FLAGS = /SAFESEH $(LD_FLAGS)
!endif
LAUNCHERDIR = $(WorkSpace)/src/os/windows/launcher
LAUNCHERDIR_SHARE = $(WorkSpace)/src/share/tools/launcher
OUTDIR = launcher
{$(LAUNCHERDIR)}.c{$(OUTDIR)}.obj:
-mkdir $(OUTDIR) 2>NUL >NUL
$(CXX) $(LAUNCHER_FLAGS) /c /Fo$@ $<
{$(LAUNCHERDIR_SHARE)}.c{$(OUTDIR)}.obj:
-mkdir $(OUTDIR) 2>NUL >NUL
$(CXX) $(LAUNCHER_FLAGS) /c /Fo$@ $<
$(OUTDIR)\*.obj: $(LAUNCHERDIR)\*.c $(LAUNCHERDIR)\*.h $(LAUNCHERDIR_SHARE)\*.c $(LAUNCHERDIR_SHARE)\*.h
launcher: $(OUTDIR)\java.obj $(OUTDIR)\java_md.obj $(OUTDIR)\jli_util.obj
echo $(JAVA_HOME) > jdkpath.txt
$(LD) $(LD_FLAGS) /out:hotspot.exe $**
...@@ -32,7 +32,7 @@ GENERATED=../generated ...@@ -32,7 +32,7 @@ GENERATED=../generated
BUILD_PCH_FILE=_build_pch_file.obj BUILD_PCH_FILE=_build_pch_file.obj
!endif !endif
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
!include ../local.make !include ../local.make
!include compile.make !include compile.make
...@@ -73,4 +73,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def ...@@ -73,4 +73,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
!include $(WorkSpace)/make/windows/makefiles/shared.make !include $(WorkSpace)/make/windows/makefiles/shared.make
!include $(WorkSpace)/make/windows/makefiles/sa.make !include $(WorkSpace)/make/windows/makefiles/sa.make
!include $(WorkSpace)/make/windows/makefiles/launcher.make
...@@ -59,7 +59,6 @@ ProjectCreatorIncludesPRIVATE=\ ...@@ -59,7 +59,6 @@ ProjectCreatorIncludesPRIVATE=\
-relativeSrcInclude src \ -relativeSrcInclude src \
-absoluteSrcInclude $(HOTSPOTBUILDSPACE) \ -absoluteSrcInclude $(HOTSPOTBUILDSPACE) \
-ignorePath $(HOTSPOTBUILDSPACE) \ -ignorePath $(HOTSPOTBUILDSPACE) \
-ignorePath launcher \
-ignorePath share\vm\adlc \ -ignorePath share\vm\adlc \
-ignorePath share\vm\shark \ -ignorePath share\vm\shark \
-ignorePath share\tools \ -ignorePath share\tools \
...@@ -105,7 +104,6 @@ ProjectCreatorIDEOptions=\ ...@@ -105,7 +104,6 @@ ProjectCreatorIDEOptions=\
-define ALIGN_STACK_FRAMES \ -define ALIGN_STACK_FRAMES \
-define VM_LITTLE_ENDIAN \ -define VM_LITTLE_ENDIAN \
-prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) set JAVA_HOME=$(HOTSPOTJDKDIST) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LD_VER)" \ -prelink "" "Generating vm.def..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) set JAVA_HOME=$(HOTSPOTJDKDIST) $(HOTSPOTMKSHOME)\sh $(HOTSPOTWORKSPACE)\make\windows\build_vm_def.sh $(LD_VER)" \
-postbuild "" "Building hotspot.exe..." "cd $(HOTSPOTBUILDSPACE)\%f\%b set HOTSPOTMKSHOME=$(HOTSPOTMKSHOME) nmake -f $(HOTSPOTWORKSPACE)\make\windows\projectfiles\common\Makefile LOCAL_MAKE=$(HOTSPOTBUILDSPACE)\%f\local.make JAVA_HOME=$(HOTSPOTJDKDIST) launcher" \
-ignoreFile jsig.c \ -ignoreFile jsig.c \
-ignoreFile jvmtiEnvRecommended.cpp \ -ignoreFile jvmtiEnvRecommended.cpp \
-ignoreFile jvmtiEnvStub.cpp \ -ignoreFile jvmtiEnvStub.cpp \
......
...@@ -65,7 +65,6 @@ JvmtiOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\jvmtifiles ...@@ -65,7 +65,6 @@ JvmtiOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\jvmtifiles
!endif !endif
HS_INTERNAL_NAME=jvm HS_INTERNAL_NAME=jvm
!include $(HOTSPOTWORKSPACE)/make/windows/makefiles/launcher.make
default:: $(AdditionalTargets) $(JvmtiGeneratedFiles) default:: $(AdditionalTargets) $(JvmtiGeneratedFiles)
......
此差异已折叠。
/*
* Copyright (c) 1999, 2013, 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.
*
* 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.
*
*/
#ifndef JAVA_MD_H
#define JAVA_MD_H
#include <limits.h>
#include <unistd.h>
#include <sys/param.h>
#ifndef GAMMA
#include "manifest_info.h"
#endif
#include "jli_util.h"
#define PATH_SEPARATOR ':'
#define FILESEP "/"
#define FILE_SEPARATOR '/'
#define IS_FILE_SEPARATOR(c) ((c) == '/')
#ifndef MAXNAMELEN
#define MAXNAMELEN PATH_MAX
#endif
#ifdef JAVA_ARGS
/*
* ApplicationHome is prepended to each of these entries; the resulting
* strings are concatenated (separated by PATH_SEPARATOR) and used as the
* value of -cp option to the launcher.
*/
#ifndef APP_CLASSPATH
#define APP_CLASSPATH { "/lib/tools.jar", "/classes" }
#endif
#endif
#ifdef HAVE_GETHRTIME
/*
* Support for doing cheap, accurate interval timing.
*/
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
#else
#define CounterGet() (0)
#define Counter2Micros(counts) (1)
#endif /* HAVE_GETHRTIME */
#ifdef _LP64
#define JLONG_FORMAT "%ld"
#else
#define JLONG_FORMAT "%lld"
#endif
/*
* Function prototypes.
*/
#ifndef GAMMA
char *LocateJRE(manifest_info *info);
void ExecJRE(char *jre, char **argv);
#endif
int UnsetEnv(char *name);
#endif
此差异已折叠。
/*
* Copyright (c) 1999, 2013, 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.
*
* 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.
*
*/
#ifndef JAVA_MD_H
#define JAVA_MD_H
#include <jni.h>
#include <windows.h>
#include <io.h>
#ifndef GAMMA
#include "manifest_info.h"
#endif
#include "jli_util.h"
#ifdef GAMMA
#define stricmp _stricmp
#define strnicmp _strnicmp
#define snprintf _snprintf
#define strdup _strdup
#endif
#define PATH_SEPARATOR ';'
#define FILESEP "\\"
#define FILE_SEPARATOR '\\'
#define IS_FILE_SEPARATOR(c) ((c) == '\\' || (c) == '/')
#define MAXPATHLEN MAX_PATH
#define MAXNAMELEN MAX_PATH
#ifdef JAVA_ARGS
/*
* ApplicationHome is prepended to each of these entries; the resulting
* strings are concatenated (separated by PATH_SEPARATOR) and used as the
* value of -cp option to the launcher.
*/
#ifndef APP_CLASSPATH
#define APP_CLASSPATH { "\\lib\\tools.jar", "\\classes" }
#endif
#endif
/*
* Support for doing cheap, accurate interval timing.
*/
extern jlong CounterGet(void);
extern jlong Counter2Micros(jlong counts);
#ifdef JAVAW
#define main _main
extern int _main(int argc, char **argv);
#endif
#define JLONG_FORMAT "%I64d"
/*
* Function prototypes.
*/
#ifndef GAMMA
char *LocateJRE(manifest_info *info);
void ExecJRE(char *jre, char **argv);
#endif
int UnsetEnv(char *name);
#endif
...@@ -65,6 +65,7 @@ class BuildConfig { ...@@ -65,6 +65,7 @@ class BuildConfig {
String sourceBase = getFieldString(null, "SourceBase"); String sourceBase = getFieldString(null, "SourceBase");
String buildSpace = getFieldString(null, "BuildSpace"); String buildSpace = getFieldString(null, "BuildSpace");
String outDir = buildBase; String outDir = buildBase;
String jdkTargetRoot = getFieldString(null, "JdkTargetRoot");
put("Id", flavourBuild); put("Id", flavourBuild);
put("OutputDir", outDir); put("OutputDir", outDir);
...@@ -72,6 +73,7 @@ class BuildConfig { ...@@ -72,6 +73,7 @@ class BuildConfig {
put("BuildBase", buildBase); put("BuildBase", buildBase);
put("BuildSpace", buildSpace); put("BuildSpace", buildSpace);
put("OutputDll", outDir + Util.sep + outDll); put("OutputDll", outDir + Util.sep + outDll);
put("JdkTargetRoot", jdkTargetRoot);
context = new String [] {flavourBuild, flavour, build, null}; context = new String [] {flavourBuild, flavour, build, null};
} }
......
...@@ -98,11 +98,6 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 { ...@@ -98,11 +98,6 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
tagV(cfg.getV("LinkerFlags")); tagV(cfg.getV("LinkerFlags"));
endTag(); endTag();
startTag("PostBuildEvent");
tagData("Message", BuildConfig.getFieldString(null, "PostbuildDescription"));
tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace("\t", "\r\n")));
endTag();
startTag("PreLinkEvent"); startTag("PreLinkEvent");
tagData("Message", BuildConfig.getFieldString(null, "PrelinkDescription")); tagData("Message", BuildConfig.getFieldString(null, "PrelinkDescription"));
tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace("\t", "\r\n"))); tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace("\t", "\r\n")));
...@@ -141,7 +136,9 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 { ...@@ -141,7 +136,9 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
for (BuildConfig cfg : allConfigs) { for (BuildConfig cfg : allConfigs) {
startTag(cfg, "PropertyGroup"); startTag(cfg, "PropertyGroup");
tagData("LocalDebuggerCommand", "$(TargetDir)/hotspot.exe"); tagData("LocalDebuggerCommand", cfg.get("JdkTargetRoot") + "\\bin\\java.exe");
tagData("LocalDebuggerCommandArguments", "-XXaltjvm=$(TargetDir) -Dsun.java.launcher=gamma");
tagData("LocalDebuggerEnvironment", "JAVA_HOME=" + cfg.get("JdkTargetRoot"));
endTag(); endTag();
} }
......
此差异已折叠。
/*
* Copyright (c) 1999, 2013, 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.
*
* 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.
*
*/
#ifndef _JAVA_H_
#define _JAVA_H_
/*
* Get system specific defines.
*/
#include "jni.h"
#include "java_md.h"
#include "jli_util.h"
/*
* Pointers to the needed JNI invocation API, initialized by LoadJavaVM.
*/
typedef jint (JNICALL *CreateJavaVM_t)(JavaVM **pvm, void **env, void *args);
typedef jint (JNICALL *GetDefaultJavaVMInitArgs_t)(void *args);
typedef struct {
CreateJavaVM_t CreateJavaVM;
GetDefaultJavaVMInitArgs_t GetDefaultJavaVMInitArgs;
} InvocationFunctions;
/*
* Prototypes for launcher functions in the system specific java_md.c.
*/
jboolean
LoadJavaVM(const char *jvmpath, InvocationFunctions *ifn);
void
GetXUsagePath(char *buf, jint bufsize);
jboolean
GetApplicationHome(char *buf, jint bufsize);
const char *
GetArch();
void CreateExecutionEnvironment(int *_argc,
char ***_argv,
char jrepath[],
jint so_jrepath,
char jvmpath[],
jint so_jvmpath,
char **original_argv);
/*
* Report an error message to stderr or a window as appropriate. The
* flag always is set to JNI_TRUE if message is to be reported to both
* strerr and windows and set to JNI_FALSE if the message should only
* be sent to a window.
*/
void ReportErrorMessage(char * message, jboolean always);
void ReportErrorMessage2(char * format, char * string, jboolean always);
/*
* Report an exception which terminates the vm to stderr or a window
* as appropriate.
*/
void ReportExceptionDescription(JNIEnv * env);
jboolean RemovableMachineDependentOption(char * option);
void PrintMachineDependentOptions();
/*
* Block current thread and continue execution in new thread
*/
int ContinueInNewThread(int (JNICALL *continuation)(void *),
jlong stack_size, void * args);
/* sun.java.launcher.* platform properties. */
void SetJavaLauncherPlatformProps(void);
/*
* Functions defined in java.c and used in java_md.c.
*/
jint ReadKnownVMs(const char *jrepath, char * arch, jboolean speculative);
char *CheckJvmType(int *argc, char ***argv, jboolean speculative);
void AddOption(char *str, void *info);
/*
* Make launcher spit debug output.
*/
extern jboolean _launcher_debug;
#endif /* _JAVA_H_ */
/*
* Copyright (c) 1999, 2010, 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.
*
* 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.
*
*/
#include <stdio.h>
#include <string.h>
#include "jli_util.h"
#ifdef GAMMA
#ifdef TARGET_OS_FAMILY_windows
#define strdup _strdup
#endif
#endif
/*
* Returns a pointer to a block of at least 'size' bytes of memory.
* Prints error message and exits if the memory could not be allocated.
*/
void *
JLI_MemAlloc(size_t size)
{
void *p = malloc(size);
if (p == 0) {
perror("malloc");
exit(1);
}
return p;
}
/*
* Equivalent to realloc(size).
* Prints error message and exits if the memory could not be reallocated.
*/
void *
JLI_MemRealloc(void *ptr, size_t size)
{
void *p = realloc(ptr, size);
if (p == 0) {
perror("realloc");
exit(1);
}
return p;
}
/*
* Wrapper over strdup(3C) which prints an error message and exits if memory
* could not be allocated.
*/
char *
JLI_StringDup(const char *s1)
{
char *s = strdup(s1);
if (s == NULL) {
perror("strdup");
exit(1);
}
return s;
}
/*
* Very equivalent to free(ptr).
* Here to maintain pairing with the above routines.
*/
void
JLI_MemFree(void *ptr)
{
free(ptr);
}
/*
* Copyright (c) 1999, 2010, 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.
*
* 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.
*
*/
#ifndef _JLI_UTIL_H
#define _JLI_UTIL_H
#include <stdlib.h>
void *JLI_MemAlloc(size_t size);
void *JLI_MemRealloc(void *ptr, size_t size);
char *JLI_StringDup(const char *s1);
void JLI_MemFree(void *ptr);
#endif /* _JLI_UTIL_H */
此差异已折叠。
此差异已折叠。
此差异已折叠。
...@@ -217,10 +217,14 @@ public: ...@@ -217,10 +217,14 @@ public:
ciInstanceKlass* implementor(); ciInstanceKlass* implementor();
// Is the defining class loader of this class the default loader? // Is the defining class loader of this class the default loader?
bool uses_default_loader(); bool uses_default_loader() const;
bool is_java_lang_Object() const; bool is_java_lang_Object() const;
BasicType box_klass_type() const;
bool is_box_klass() const;
bool is_boxed_value_offset(int offset) const;
// Is this klass in the given package? // Is this klass in the given package?
bool is_in_package(const char* packagename) { bool is_in_package(const char* packagename) {
return is_in_package(packagename, (int) strlen(packagename)); return is_in_package(packagename, (int) strlen(packagename));
......
此差异已折叠。
...@@ -298,6 +298,8 @@ class ciMethod : public ciMetadata { ...@@ -298,6 +298,8 @@ class ciMethod : public ciMetadata {
bool is_initializer () const; bool is_initializer () const;
bool can_be_statically_bound() const { return _can_be_statically_bound; } bool can_be_statically_bound() const { return _can_be_statically_bound; }
void dump_replay_data(outputStream* st); void dump_replay_data(outputStream* st);
bool is_boxing_method() const;
bool is_unboxing_method() const;
// Print the bytecodes of this method. // Print the bytecodes of this method.
void print_codes_on(outputStream* st); void print_codes_on(outputStream* st);
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册