8008772: remove gamma launcher
Reviewed-by: kvn, neliasso, ctornqvi
This commit is contained in:
parent
149097fbb7
commit
7c367a6025
@ -151,32 +151,43 @@ else
|
||||
$(MAKE_ARGS) BUILD_FLAVOR=product docs
|
||||
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
|
||||
$(C1_VM_TARGETS):
|
||||
$(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):
|
||||
$(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):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ \
|
||||
generic_buildzero $(ALT_OUT)
|
||||
$(MAKE) BUILD_DIR=$(ZERO_DIR) BUILD_FLAVOR=$(@:%zero=%) VM_TARGET=$@ generic_buildzero $(ALT_OUT)
|
||||
|
||||
$(SHARK_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ \
|
||||
generic_buildshark $(ALT_OUT)
|
||||
$(MAKE) BUILD_DIR=$(SHARK_DIR) BUILD_FLAVOR=$(@:%shark=%) VM_TARGET=$@ generic_buildshark $(ALT_OUT)
|
||||
|
||||
$(MINIMAL1_VM_TARGETS):
|
||||
$(CD) $(GAMMADIR)/make; \
|
||||
$(MAKE) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ \
|
||||
generic_buildminimal1 $(ALT_OUT)
|
||||
$(MAKE) BUILD_DIR=$(MINIMAL1_DIR) BUILD_FLAVOR=$(@:%minimal1=%) VM_TARGET=$@ 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
|
||||
generic_build1:
|
||||
generic_build1: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
ifeq ($(OSNAME),windows)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
@ -201,7 +212,7 @@ else
|
||||
endif
|
||||
|
||||
# Build compiler2 (server) rule, different for platforms
|
||||
generic_build2:
|
||||
generic_build2: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
ifeq ($(OSNAME),windows)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
@ -217,19 +228,19 @@ else
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
endif
|
||||
|
||||
generic_buildzero:
|
||||
generic_buildzero: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
$(MAKE) -f $(ABS_OS_MAKEFILE) \
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
|
||||
generic_buildshark:
|
||||
generic_buildshark: $(HOTSPOT_SCRIPT)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
$(CD) $(OUTPUTDIR); \
|
||||
$(MAKE) -f $(ABS_OS_MAKEFILE) \
|
||||
$(MAKE_ARGS) $(VM_TARGET)
|
||||
|
||||
generic_buildminimal1:
|
||||
generic_buildminimal1: $(HOTSPOT_SCRIPT)
|
||||
ifeq ($(JVM_VARIANT_MINIMAL1),true)
|
||||
$(MKDIR) -p $(OUTPUTDIR)
|
||||
ifeq ($(ARCH_DATA_MODEL), 32)
|
||||
@ -252,224 +263,210 @@ endif
|
||||
|
||||
# Export file rule
|
||||
generic_export: $(EXPORT_LIST)
|
||||
|
||||
export_product:
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) generic_export
|
||||
export_fastdebug:
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \
|
||||
EXPORT_SUBDIR=/$(@:export_%=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
|
||||
export_debug:
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \
|
||||
EXPORT_SUBDIR=/$(@:export_%=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
|
||||
export_optimized:
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) VM_SUBDIR=$(@:export_%=%) \
|
||||
EXPORT_SUBDIR=/$(@:export_%=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%=%) EXPORT_SUBDIR=/$(@:export_%=%) generic_export
|
||||
|
||||
export_product_jdk::
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \
|
||||
VM_SUBDIR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
|
||||
export_optimized_jdk::
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \
|
||||
VM_SUBDIR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR) generic_export
|
||||
export_fastdebug_jdk::
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) \
|
||||
VM_SUBDIR=$(@:export_%_jdk=%) \
|
||||
ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
|
||||
export_debug_jdk::
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) VM_SUBDIR=$(@:export_%_jdk=%) \
|
||||
ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) \
|
||||
generic_export
|
||||
$(MAKE) BUILD_FLAVOR=$(@:export_%_jdk=%) ALT_EXPORT_PATH=$(JDK_IMAGE_DIR)/$(@:export_%_jdk=%) generic_export
|
||||
|
||||
# Export file copy rules
|
||||
XUSAGE=$(HS_SRC_DIR)/share/vm/Xusage.txt
|
||||
DOCS_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_docs
|
||||
C1_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1/$(VM_SUBDIR)
|
||||
C2_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2/$(VM_SUBDIR)
|
||||
MINIMAL1_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_minimal1/$(VM_SUBDIR)
|
||||
ZERO_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_zero/$(VM_SUBDIR)
|
||||
SHARK_DIR =$(OUTPUTDIR)/$(VM_PLATFORM)_shark/$(VM_SUBDIR)
|
||||
DOCS_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_docs
|
||||
C1_BUILD_DIR =$(C1_DIR)/$(BUILD_FLAVOR)
|
||||
C2_BUILD_DIR =$(C2_DIR)/$(BUILD_FLAVOR)
|
||||
MINIMAL1_BUILD_DIR=$(MINIMAL1_DIR)/$(BUILD_FLAVOR)
|
||||
ZERO_BUILD_DIR =$(ZERO_DIR)/$(BUILD_FLAVOR)
|
||||
SHARK_BUILD_DIR =$(SHARK_DIR)/$(BUILD_FLAVOR)
|
||||
|
||||
# Server (C2)
|
||||
ifeq ($(JVM_VARIANT_SERVER), true)
|
||||
# Common
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(C2_DIR)/%.diz
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(C2_DIR)/../generated/%.jar
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(C2_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(C2_DIR)/../generated/jvmtifiles/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(C2_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# Windows
|
||||
$(EXPORT_SERVER_DIR)/%.dll: $(C2_DIR)/%.dll
|
||||
$(EXPORT_SERVER_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.pdb: $(C2_DIR)/%.pdb
|
||||
$(EXPORT_SERVER_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.map: $(C2_DIR)/%.map
|
||||
$(EXPORT_SERVER_DIR)/%.map: $(C2_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(C2_DIR)/%.lib
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(C2_BUILD_DIR)/%.lib
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_DIR)/%.diz
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_DIR)/%.dll
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C2_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_DIR)/%.pdb
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C2_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(C2_DIR)/%.map
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(C2_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
# 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)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(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)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_DIR)/%.debuginfo
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_DIR)/%.debuginfo
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_DIR)/%.debuginfo
|
||||
$(EXPORT_SERVER_DIR)/64/%.debuginfo: $(C2_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_DIR)/%.diz
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C2_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/64/%.diz: $(C2_DIR)/%.diz
|
||||
$(EXPORT_SERVER_DIR)/64/%.diz: $(C2_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Client (C1)
|
||||
ifeq ($(JVM_VARIANT_CLIENT), true)
|
||||
# Common
|
||||
$(EXPORT_CLIENT_DIR)/%.diz: $(C1_DIR)/%.diz
|
||||
$(EXPORT_CLIENT_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(C1_DIR)/../generated/%.jar
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(C1_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(C1_DIR)/../generated/jvmtifiles/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(C1_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# Windows
|
||||
$(EXPORT_CLIENT_DIR)/%.dll: $(C1_DIR)/%.dll
|
||||
$(EXPORT_CLIENT_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_CLIENT_DIR)/%.pdb: $(C1_DIR)/%.pdb
|
||||
$(EXPORT_CLIENT_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_CLIENT_DIR)/%.map: $(C1_DIR)/%.map
|
||||
$(EXPORT_CLIENT_DIR)/%.map: $(C1_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(C1_DIR)/%.lib
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(C1_BUILD_DIR)/%.lib
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_DIR)/%.diz
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_DIR)/%.dll
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(C1_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_DIR)/%.pdb
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(C1_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(C1_DIR)/%.map
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(C1_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
# 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)
|
||||
$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(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)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_DIR)/%.debuginfo
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_DIR)/%.debuginfo
|
||||
$(EXPORT_CLIENT_DIR)/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_DIR)/%.debuginfo
|
||||
$(EXPORT_CLIENT_DIR)/64/%.debuginfo: $(C1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_DIR)/%.diz
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(C1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_DIR)/%.diz
|
||||
$(EXPORT_CLIENT_DIR)/64/%.diz: $(C1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Minimal1
|
||||
ifeq ($(JVM_VARIANT_MINIMAL1), true)
|
||||
# Common
|
||||
$(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz
|
||||
$(EXPORT_MINIMAL_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_DIR)/../generated/%.jar
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(MINIMAL1_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_DIR)/../generated/jvmtifiles/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(MINIMAL1_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# Windows
|
||||
$(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll
|
||||
$(EXPORT_MINIMAL_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb
|
||||
$(EXPORT_MINIMAL_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_DIR)/%.map
|
||||
$(EXPORT_MINIMAL_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_DIR)/%.lib
|
||||
$(EXPORT_LIB_DIR)/%.lib: $(MINIMAL1_BUILD_DIR)/%.lib
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz
|
||||
$(EXPORT_JRE_BIN_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_DIR)/%.dll
|
||||
$(EXPORT_JRE_BIN_DIR)/%.dll: $(MINIMAL1_BUILD_DIR)/%.dll
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_DIR)/%.pdb
|
||||
$(EXPORT_JRE_BIN_DIR)/%.pdb: $(MINIMAL1_BUILD_DIR)/%.pdb
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_DIR)/%.map
|
||||
$(EXPORT_JRE_BIN_DIR)/%.map: $(MINIMAL1_BUILD_DIR)/%.map
|
||||
$(install-file)
|
||||
# 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)
|
||||
$(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(EXPORT_MINIMAL_DIR)/%.$(LIBRARY_SUFFIX): $(MINIMAL1_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(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)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo
|
||||
$(EXPORT_MINIMAL_DIR)/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_DIR)/%.debuginfo
|
||||
$(EXPORT_MINIMAL_DIR)/64/%.debuginfo: $(MINIMAL1_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_DIR)/%.diz
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_DIR)/%.diz
|
||||
$(EXPORT_MINIMAL_DIR)/64/%.diz: $(MINIMAL1_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Zero
|
||||
ifeq ($(JVM_VARIANT_ZERO), true)
|
||||
# Common
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(ZERO_DIR)/../generated/%.jar
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(ZERO_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(ZERO_DIR)/../generated/jvmtifiles/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(ZERO_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# 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)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_DIR)/%.debuginfo
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_DIR)/%.diz
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_DIR)/%.debuginfo
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(ZERO_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(ZERO_DIR)/%.diz
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(ZERO_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
# Shark
|
||||
ifeq ($(JVM_VARIANT_ZEROSHARK), true)
|
||||
# Common
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(SHARK_DIR)/../generated/%.jar
|
||||
$(EXPORT_LIB_DIR)/%.jar: $(SHARK_BUILD_DIR)/../generated/%.jar
|
||||
$(install-file)
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(SHARK_DIR)/../generated/jvmtifiles/%
|
||||
$(EXPORT_INCLUDE_DIR)/%: $(SHARK_BUILD_DIR)/../generated/jvmtifiles/%
|
||||
$(install-file)
|
||||
# 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)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_DIR)/%.debuginfo
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.debuginfo): $(SHARK_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_DIR)/%.diz
|
||||
$(EXPORT_JRE_LIB_ARCH_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_BUILD_DIR)/%.$(LIBRARY_SUFFIX)
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_DIR)/%.debuginfo
|
||||
$(EXPORT_SERVER_DIR)/%.debuginfo: $(SHARK_BUILD_DIR)/%.debuginfo
|
||||
$(install-file)
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(SHARK_DIR)/%.diz
|
||||
$(EXPORT_SERVER_DIR)/%.diz: $(SHARK_BUILD_DIR)/%.diz
|
||||
$(install-file)
|
||||
endif
|
||||
|
||||
|
@ -49,7 +49,6 @@
|
||||
# adlc.make -
|
||||
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
|
||||
# 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
|
||||
# having to read the dependency files for the vm.
|
||||
@ -129,9 +128,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
BUILDTREE_MAKE = $(GAMMADIR)/make/$(OS_FAMILY)/makefiles/buildtree.make
|
||||
|
||||
# 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 \
|
||||
jvmti.make sa.make dtrace.make \
|
||||
env.sh env.csh jdkpath.sh
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make dtrace.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
@ -354,33 +351,6 @@ dtrace.make: $(BUILDTREE_MAKE)
|
||||
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:
|
||||
|
||||
.PHONY: all FORCE
|
||||
|
@ -1,115 +0,0 @@
|
||||
#
|
||||
# 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)
|
||||
#----------------------------------------------------------------------
|
||||
# Other files
|
||||
|
||||
# Gamma launcher
|
||||
include $(MAKEFILES_DIR)/launcher.make
|
||||
|
||||
# Signal interposition library
|
||||
include $(MAKEFILES_DIR)/jsig.make
|
||||
|
||||
|
@ -72,6 +72,7 @@ EMACS=emacs
|
||||
REL_MYDIR=`dirname $0`
|
||||
MYDIR=`cd $REL_MYDIR && pwd`
|
||||
|
||||
#
|
||||
# Look whether the user wants to run inside gdb
|
||||
case "$1" in
|
||||
-gdb)
|
||||
@ -95,16 +96,14 @@ case "$1" in
|
||||
;;
|
||||
esac
|
||||
|
||||
JDK=
|
||||
if [ "${ALT_JAVA_HOME}" = "" ]; then
|
||||
. ${MYDIR}/jdkpath.sh
|
||||
if [ "${ALT_JAVA_HOME}" != "" ]; then
|
||||
JDK=${ALT_JAVA_HOME%%/jre}
|
||||
else
|
||||
JDK=${ALT_JAVA_HOME%%/jre};
|
||||
JDK=@@JDK_IMPORT_PATH@@
|
||||
fi
|
||||
|
||||
if [ "${JDK}" = "" ]; then
|
||||
echo Failed to find JDK. ALT_JAVA_HOME is not set or ./jdkpath.sh is empty or not found.
|
||||
exit 1
|
||||
echo "Failed to find JDK. Either ALT_JAVA_HOME is not set or JDK_IMPORT_PATH is empty."
|
||||
fi
|
||||
|
||||
# We will set the LD_LIBRARY_PATH as follows:
|
||||
@ -142,12 +141,12 @@ else
|
||||
export LD_LIBRARY_PATH
|
||||
fi
|
||||
|
||||
JPARMS="$@ $JAVA_ARGS";
|
||||
JPARMS="-Dsun.java.launcher=gamma -XXaltjvm=$MYDIR $@ $JAVA_ARGS";
|
||||
|
||||
# Locate the gamma development launcher
|
||||
LAUNCHER=${MYDIR}/gamma
|
||||
# Locate the java launcher
|
||||
LAUNCHER=$JDK/bin/java
|
||||
if [ ! -x $LAUNCHER ] ; then
|
||||
echo Error: Cannot find the gamma development launcher \"$LAUNCHER\"
|
||||
echo Error: Cannot find the java launcher \"$LAUNCHER\"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -166,9 +165,10 @@ set args $JPARMS
|
||||
file $LAUNCHER
|
||||
directory $GDBSRCDIR
|
||||
# Get us to a point where we can set breakpoints in libjvm.so
|
||||
break InitializeJVM
|
||||
set breakpoint pending on
|
||||
break JNI_CreateJavaVM
|
||||
run
|
||||
# Stop in InitializeJVM
|
||||
# Stop in JNI_CreateJavaVM
|
||||
delete 1
|
||||
# We can now set breakpoints wherever we like
|
||||
EOF
|
||||
@ -199,7 +199,7 @@ case "$MODE" in
|
||||
rm -f $GDBSCR
|
||||
;;
|
||||
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)
|
||||
echo Warning: Defaulting to 16Mb heap to make Valgrind run faster, use -Xmx for larger heap
|
@ -49,7 +49,6 @@
|
||||
# adlc.make -
|
||||
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
|
||||
# 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
|
||||
# having to read the dependency files for the vm.
|
||||
@ -123,8 +122,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
# For dependencies and recursive makes.
|
||||
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 \
|
||||
env.sh env.csh jdkpath.sh
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
@ -349,33 +347,6 @@ sa.make: $(BUILDTREE_MAKE)
|
||||
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:
|
||||
|
||||
.PHONY: all FORCE
|
||||
|
@ -1,93 +0,0 @@
|
||||
#
|
||||
# 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)
|
||||
#----------------------------------------------------------------------
|
||||
# Other files
|
||||
|
||||
# Gamma launcher
|
||||
include $(MAKEFILES_DIR)/launcher.make
|
||||
|
||||
# Signal interposition library
|
||||
include $(MAKEFILES_DIR)/jsig.make
|
||||
|
||||
|
@ -49,7 +49,6 @@
|
||||
# adlc.make -
|
||||
# jvmti.make - generate JVMTI bindings from the spec (JSR-163)
|
||||
# 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
|
||||
# having to read the dependency files for the vm.
|
||||
@ -116,8 +115,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
|
||||
# For dependencies and recursive makes.
|
||||
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 \
|
||||
env.sh env.csh jdkpath.sh
|
||||
BUILDTREE_TARGETS = Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
|
||||
|
||||
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OS_FAMILY) \
|
||||
ARCH=$(ARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) VARIANT=$(VARIANT)
|
||||
@ -339,33 +337,6 @@ sa.make: $(BUILDTREE_MAKE)
|
||||
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:
|
||||
|
||||
.PHONY: all FORCE
|
||||
|
@ -1,108 +0,0 @@
|
||||
#
|
||||
# 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)
|
||||
#----------------------------------------------------------------------
|
||||
# Other files
|
||||
|
||||
# Gamma launcher
|
||||
include $(MAKEFILES_DIR)/launcher.make
|
||||
|
||||
# Signal interposition library
|
||||
include $(MAKEFILES_DIR)/jsig.make
|
||||
|
||||
|
@ -33,7 +33,7 @@ GENERATED=../generated
|
||||
BUILD_PCH_FILE=_build_pch_file.obj
|
||||
!endif
|
||||
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
|
||||
|
||||
!include ../local.make
|
||||
!include compile.make
|
||||
@ -71,4 +71,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
|
||||
!include $(WorkSpace)/make/windows/makefiles/shared.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/sa.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/launcher.make
|
||||
|
@ -33,7 +33,7 @@ GENERATED=../generated
|
||||
BUILD_PCH_FILE=_build_pch_file.obj
|
||||
!endif
|
||||
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
|
||||
|
||||
!include ../local.make
|
||||
!include compile.make
|
||||
@ -70,4 +70,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
|
||||
!include $(WorkSpace)/make/windows/makefiles/shared.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/sa.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/launcher.make
|
||||
|
@ -1,73 +0,0 @@
|
||||
#
|
||||
# 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
|
||||
BUILD_PCH_FILE=_build_pch_file.obj
|
||||
!endif
|
||||
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) launcher checkAndBuildSA
|
||||
default:: $(BUILD_PCH_FILE) $(AOUT) checkAndBuildSA
|
||||
|
||||
!include ../local.make
|
||||
!include compile.make
|
||||
@ -73,4 +73,3 @@ $(AOUT): $(Res_Files) $(Obj_Files) vm.def
|
||||
|
||||
!include $(WorkSpace)/make/windows/makefiles/shared.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/sa.make
|
||||
!include $(WorkSpace)/make/windows/makefiles/launcher.make
|
||||
|
@ -59,7 +59,6 @@ ProjectCreatorIncludesPRIVATE=\
|
||||
-relativeSrcInclude src \
|
||||
-absoluteSrcInclude $(HOTSPOTBUILDSPACE) \
|
||||
-ignorePath $(HOTSPOTBUILDSPACE) \
|
||||
-ignorePath launcher \
|
||||
-ignorePath share\vm\adlc \
|
||||
-ignorePath share\vm\shark \
|
||||
-ignorePath share\tools \
|
||||
@ -105,7 +104,6 @@ ProjectCreatorIDEOptions=\
|
||||
-define ALIGN_STACK_FRAMES \
|
||||
-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)" \
|
||||
-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 jvmtiEnvRecommended.cpp \
|
||||
-ignoreFile jvmtiEnvStub.cpp \
|
||||
|
@ -65,7 +65,6 @@ JvmtiOutDir=$(HOTSPOTBUILDSPACE)\$(Variant)\generated\jvmtifiles
|
||||
!endif
|
||||
|
||||
HS_INTERNAL_NAME=jvm
|
||||
!include $(HOTSPOTWORKSPACE)/make/windows/makefiles/launcher.make
|
||||
|
||||
default:: $(AdditionalTargets) $(JvmtiGeneratedFiles)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* 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
|
File diff suppressed because it is too large
Load Diff
@ -1,83 +0,0 @@
|
||||
/*
|
||||
* 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 {
|
||||
String sourceBase = getFieldString(null, "SourceBase");
|
||||
String buildSpace = getFieldString(null, "BuildSpace");
|
||||
String outDir = buildBase;
|
||||
String jdkTargetRoot = getFieldString(null, "JdkTargetRoot");
|
||||
|
||||
put("Id", flavourBuild);
|
||||
put("OutputDir", outDir);
|
||||
@ -72,6 +73,7 @@ class BuildConfig {
|
||||
put("BuildBase", buildBase);
|
||||
put("BuildSpace", buildSpace);
|
||||
put("OutputDll", outDir + Util.sep + outDll);
|
||||
put("JdkTargetRoot", jdkTargetRoot);
|
||||
|
||||
context = new String [] {flavourBuild, flavour, build, null};
|
||||
}
|
||||
|
@ -98,11 +98,6 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
|
||||
tagV(cfg.getV("LinkerFlags"));
|
||||
endTag();
|
||||
|
||||
startTag("PostBuildEvent");
|
||||
tagData("Message", BuildConfig.getFieldString(null, "PostbuildDescription"));
|
||||
tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PostbuildCommand").replace("\t", "\r\n")));
|
||||
endTag();
|
||||
|
||||
startTag("PreLinkEvent");
|
||||
tagData("Message", BuildConfig.getFieldString(null, "PrelinkDescription"));
|
||||
tagData("Command", cfg.expandFormat(BuildConfig.getFieldString(null, "PrelinkCommand").replace("\t", "\r\n")));
|
||||
@ -141,7 +136,9 @@ public class WinGammaPlatformVC10 extends WinGammaPlatformVC7 {
|
||||
|
||||
for (BuildConfig cfg : allConfigs) {
|
||||
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();
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,110 +0,0 @@
|
||||
/*
|
||||
* 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_ */
|
@ -1,89 +0,0 @@
|
||||
|
||||
/*
|
||||
* 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);
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* 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 */
|
@ -1,496 +0,0 @@
|
||||
/*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Class-Path Wildcards
|
||||
*
|
||||
* The syntax for wildcards is a single asterisk. The class path
|
||||
* foo/"*", e.g., loads all jar files in the directory named foo.
|
||||
* (This requires careful quotation when used in shell scripts.)
|
||||
*
|
||||
* Only files whose names end in .jar or .JAR are matched.
|
||||
* Files whose names end in .zip, or which have a particular
|
||||
* magic number, regardless of filename extension, are not
|
||||
* matched.
|
||||
*
|
||||
* Files are considered regardless of whether or not they are
|
||||
* "hidden" in the UNIX sense, i.e., have names beginning with '.'.
|
||||
*
|
||||
* A wildcard only matches jar files, not class files in the same
|
||||
* directory. If you want to load both class files and jar files from
|
||||
* a single directory foo then you can say foo:foo/"*", or foo/"*":foo
|
||||
* if you want the jar files to take precedence.
|
||||
*
|
||||
* Subdirectories are not searched recursively, i.e., foo/"*" only
|
||||
* looks for jar files in foo, not in foo/bar, foo/baz, etc.
|
||||
*
|
||||
* Expansion of wildcards is done early, prior to the invocation of a
|
||||
* program's main method, rather than late, during the class-loading
|
||||
* process itself. Each element of the input class path containing a
|
||||
* wildcard is replaced by the (possibly empty) sequence of elements
|
||||
* generated by enumerating the jar files in the named directory. If
|
||||
* the directory foo contains a.jar, b.jar, and c.jar,
|
||||
* e.g., then the class path foo/"*" is expanded into
|
||||
* foo/a.jar:foo/b.jar:foo/c.jar, and that string would be the value
|
||||
* of the system property java.class.path.
|
||||
*
|
||||
* The order in which the jar files in a directory are enumerated in
|
||||
* the expanded class path is not specified and may vary from platform
|
||||
* to platform and even from moment to moment on the same machine. A
|
||||
* well-constructed application should not depend upon any particular
|
||||
* order. If a specific order is required then the jar files can be
|
||||
* enumerated explicitly in the class path.
|
||||
*
|
||||
* The CLASSPATH environment variable is not treated any differently
|
||||
* from the -classpath (equiv. -cp) command-line option,
|
||||
* i.e. wildcards are honored in all these cases.
|
||||
*
|
||||
* Class-path wildcards are not honored in the Class-Path jar-manifest
|
||||
* header.
|
||||
*
|
||||
* Class-path wildcards are honored not only by the Java launcher but
|
||||
* also by most other command-line tools that accept class paths, and
|
||||
* in particular by javac and javadoc.
|
||||
*
|
||||
* Class-path wildcards are not honored in any other kind of path, and
|
||||
* especially not in the bootstrap class path, which is a mere
|
||||
* artifact of our implementation and not something that developers
|
||||
* should use.
|
||||
*
|
||||
* Classpath wildcards are only expanded in the Java launcher code,
|
||||
* supporting the use of wildcards on the command line and in the
|
||||
* CLASSPATH environment variable. We do not support the use of
|
||||
* wildcards by applications that embed the JVM.
|
||||
*/
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include "java.h" /* Strictly for PATH_SEPARATOR/FILE_SEPARATOR */
|
||||
#include "jli_util.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else /* Unix */
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#endif /* Unix */
|
||||
|
||||
static int
|
||||
exists(const char* filename)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
return _access(filename, 0) == 0;
|
||||
#else
|
||||
return access(filename, F_OK) == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#define NEW_(TYPE) ((TYPE) JLI_MemAlloc(sizeof(struct TYPE##_)))
|
||||
|
||||
/*
|
||||
* Wildcard directory iteration.
|
||||
* WildcardIterator_for(wildcard) returns an iterator.
|
||||
* Each call to that iterator's next() method returns the basename
|
||||
* of an entry in the wildcard's directory. The basename's memory
|
||||
* belongs to the iterator. The caller is responsible for prepending
|
||||
* the directory name and file separator, if necessary.
|
||||
* When done with the iterator, call the close method to clean up.
|
||||
*/
|
||||
typedef struct WildcardIterator_* WildcardIterator;
|
||||
|
||||
#ifdef _WIN32
|
||||
struct WildcardIterator_
|
||||
{
|
||||
HANDLE handle;
|
||||
char *firstFile; /* Stupid FindFirstFile...FindNextFile */
|
||||
};
|
||||
|
||||
static WildcardIterator
|
||||
WildcardIterator_for(const char *wildcard)
|
||||
{
|
||||
WIN32_FIND_DATA find_data;
|
||||
WildcardIterator it = NEW_(WildcardIterator);
|
||||
HANDLE handle = FindFirstFile(wildcard, &find_data);
|
||||
if (handle == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
it->handle = handle;
|
||||
it->firstFile = find_data.cFileName;
|
||||
return it;
|
||||
}
|
||||
|
||||
static char *
|
||||
WildcardIterator_next(WildcardIterator it)
|
||||
{
|
||||
WIN32_FIND_DATA find_data;
|
||||
if (it->firstFile != NULL) {
|
||||
char *firstFile = it->firstFile;
|
||||
it->firstFile = NULL;
|
||||
return firstFile;
|
||||
}
|
||||
return FindNextFile(it->handle, &find_data)
|
||||
? find_data.cFileName : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
WildcardIterator_close(WildcardIterator it)
|
||||
{
|
||||
if (it) {
|
||||
FindClose(it->handle);
|
||||
JLI_MemFree(it->firstFile);
|
||||
JLI_MemFree(it);
|
||||
}
|
||||
}
|
||||
|
||||
#else /* Unix */
|
||||
struct WildcardIterator_
|
||||
{
|
||||
DIR *dir;
|
||||
};
|
||||
|
||||
static WildcardIterator
|
||||
WildcardIterator_for(const char *wildcard)
|
||||
{
|
||||
DIR *dir;
|
||||
int wildlen = strlen(wildcard);
|
||||
if (wildlen < 2) {
|
||||
dir = opendir(".");
|
||||
} else {
|
||||
char *dirname = JLI_StringDup(wildcard);
|
||||
dirname[wildlen - 1] = '\0';
|
||||
dir = opendir(dirname);
|
||||
JLI_MemFree(dirname);
|
||||
}
|
||||
if (dir == NULL)
|
||||
return NULL;
|
||||
else {
|
||||
WildcardIterator it = NEW_(WildcardIterator);
|
||||
it->dir = dir;
|
||||
return it;
|
||||
}
|
||||
}
|
||||
|
||||
static char *
|
||||
WildcardIterator_next(WildcardIterator it)
|
||||
{
|
||||
struct dirent* dirp = readdir(it->dir);
|
||||
return dirp ? dirp->d_name : NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
WildcardIterator_close(WildcardIterator it)
|
||||
{
|
||||
if (it) {
|
||||
closedir(it->dir);
|
||||
JLI_MemFree(it);
|
||||
}
|
||||
}
|
||||
#endif /* Unix */
|
||||
|
||||
static int
|
||||
equal(const char *s1, const char *s2)
|
||||
{
|
||||
return strcmp(s1, s2) == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* FileList ADT - a dynamic list of C filenames
|
||||
*/
|
||||
struct FileList_
|
||||
{
|
||||
char **files;
|
||||
int size;
|
||||
int capacity;
|
||||
};
|
||||
typedef struct FileList_ *FileList;
|
||||
|
||||
static FileList
|
||||
FileList_new(int capacity)
|
||||
{
|
||||
FileList fl = NEW_(FileList);
|
||||
fl->capacity = capacity;
|
||||
fl->files = (char **) JLI_MemAlloc(capacity * sizeof(fl->files[0]));
|
||||
fl->size = 0;
|
||||
return fl;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WILDCARD
|
||||
static void
|
||||
FileList_print(FileList fl)
|
||||
{
|
||||
int i;
|
||||
putchar('[');
|
||||
for (i = 0; i < fl->size; i++) {
|
||||
if (i > 0) printf(", ");
|
||||
printf("\"%s\"",fl->files[i]);
|
||||
}
|
||||
putchar(']');
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
FileList_free(FileList fl)
|
||||
{
|
||||
if (fl) {
|
||||
if (fl->files) {
|
||||
int i;
|
||||
for (i = 0; i < fl->size; i++)
|
||||
JLI_MemFree(fl->files[i]);
|
||||
JLI_MemFree(fl->files);
|
||||
}
|
||||
JLI_MemFree(fl);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FileList_ensureCapacity(FileList fl, int capacity)
|
||||
{
|
||||
if (fl->capacity < capacity) {
|
||||
while (fl->capacity < capacity)
|
||||
fl->capacity *= 2;
|
||||
fl->files = JLI_MemRealloc(fl->files,
|
||||
fl->capacity * sizeof(fl->files[0]));
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
FileList_add(FileList fl, char *file)
|
||||
{
|
||||
FileList_ensureCapacity(fl, fl->size+1);
|
||||
fl->files[fl->size++] = file;
|
||||
}
|
||||
|
||||
static void
|
||||
FileList_addSubstring(FileList fl, const char *beg, int len)
|
||||
{
|
||||
char *filename = (char *) JLI_MemAlloc(len+1);
|
||||
memcpy(filename, beg, len);
|
||||
filename[len] = '\0';
|
||||
FileList_ensureCapacity(fl, fl->size+1);
|
||||
fl->files[fl->size++] = filename;
|
||||
}
|
||||
|
||||
static char *
|
||||
FileList_join(FileList fl, char sep)
|
||||
{
|
||||
int i;
|
||||
int size;
|
||||
char *path;
|
||||
char *p;
|
||||
for (i = 0, size = 1; i < fl->size; i++)
|
||||
size += strlen(fl->files[i]) + 1;
|
||||
|
||||
path = JLI_MemAlloc(size);
|
||||
|
||||
for (i = 0, p = path; i < fl->size; i++) {
|
||||
int len = strlen(fl->files[i]);
|
||||
if (i > 0) *p++ = sep;
|
||||
memcpy(p, fl->files[i], len);
|
||||
p += len;
|
||||
}
|
||||
*p = '\0';
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
static FileList
|
||||
FileList_split(const char *path, char sep)
|
||||
{
|
||||
const char *p, *q;
|
||||
int len = strlen(path);
|
||||
int count;
|
||||
FileList fl;
|
||||
for (count = 1, p = path; p < path + len; p++)
|
||||
count += (*p == sep);
|
||||
fl = FileList_new(count);
|
||||
for (p = path;;) {
|
||||
for (q = p; q <= path + len; q++) {
|
||||
if (*q == sep || *q == '\0') {
|
||||
FileList_addSubstring(fl, p, q - p);
|
||||
if (*q == '\0')
|
||||
return fl;
|
||||
p = q + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
isJarFileName(const char *filename)
|
||||
{
|
||||
int len = strlen(filename);
|
||||
return (len >= 4) &&
|
||||
(filename[len - 4] == '.') &&
|
||||
(equal(filename + len - 3, "jar") ||
|
||||
equal(filename + len - 3, "JAR")) &&
|
||||
/* Paranoia: Maybe filename is "DIR:foo.jar" */
|
||||
(strchr(filename, PATH_SEPARATOR) == NULL);
|
||||
}
|
||||
|
||||
static char *
|
||||
wildcardConcat(const char *wildcard, const char *basename)
|
||||
{
|
||||
int wildlen = strlen(wildcard);
|
||||
int baselen = strlen(basename);
|
||||
char *filename = (char *) JLI_MemAlloc(wildlen + baselen);
|
||||
/* Replace the trailing '*' with basename */
|
||||
memcpy(filename, wildcard, wildlen-1);
|
||||
memcpy(filename+wildlen-1, basename, baselen+1);
|
||||
return filename;
|
||||
}
|
||||
|
||||
static FileList
|
||||
wildcardFileList(const char *wildcard)
|
||||
{
|
||||
const char *basename;
|
||||
FileList fl = FileList_new(16);
|
||||
WildcardIterator it = WildcardIterator_for(wildcard);
|
||||
if (it == NULL) {
|
||||
FileList_free(fl);
|
||||
return NULL;
|
||||
}
|
||||
while ((basename = WildcardIterator_next(it)) != NULL)
|
||||
if (isJarFileName(basename))
|
||||
FileList_add(fl, wildcardConcat(wildcard, basename));
|
||||
WildcardIterator_close(it);
|
||||
return fl;
|
||||
}
|
||||
|
||||
static int
|
||||
isWildcard(const char *filename)
|
||||
{
|
||||
int len = strlen(filename);
|
||||
return (len > 0) &&
|
||||
(filename[len - 1] == '*') &&
|
||||
(len == 1 || IS_FILE_SEPARATOR(filename[len - 2])) &&
|
||||
(! exists(filename));
|
||||
}
|
||||
|
||||
static void
|
||||
FileList_expandWildcards(FileList fl)
|
||||
{
|
||||
int i, j;
|
||||
for (i = 0; i < fl->size; i++) {
|
||||
if (isWildcard(fl->files[i])) {
|
||||
FileList expanded = wildcardFileList(fl->files[i]);
|
||||
if (expanded != NULL && expanded->size > 0) {
|
||||
JLI_MemFree(fl->files[i]);
|
||||
FileList_ensureCapacity(fl, fl->size + expanded->size);
|
||||
for (j = fl->size - 1; j >= i+1; j--)
|
||||
fl->files[j+expanded->size-1] = fl->files[j];
|
||||
for (j = 0; j < expanded->size; j++)
|
||||
fl->files[i+j] = expanded->files[j];
|
||||
i += expanded->size - 1;
|
||||
fl->size += expanded->size - 1;
|
||||
/* fl expropriates expanded's elements. */
|
||||
expanded->size = 0;
|
||||
}
|
||||
FileList_free(expanded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
JLI_WildcardExpandClasspath(const char *classpath)
|
||||
{
|
||||
char *expanded;
|
||||
FileList fl;
|
||||
|
||||
if (strchr(classpath, '*') == NULL)
|
||||
return classpath;
|
||||
fl = FileList_split(classpath, PATH_SEPARATOR);
|
||||
FileList_expandWildcards(fl);
|
||||
expanded = FileList_join(fl, PATH_SEPARATOR);
|
||||
FileList_free(fl);
|
||||
if (getenv("_JAVA_LAUNCHER_DEBUG") != 0)
|
||||
printf("Expanded wildcards:\n"
|
||||
" before: \"%s\"\n"
|
||||
" after : \"%s\"\n",
|
||||
classpath, expanded);
|
||||
return expanded;
|
||||
}
|
||||
|
||||
#ifdef DEBUG_WILDCARD
|
||||
static void
|
||||
wildcardExpandArgv(const char ***argv)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; (*argv)[i]; i++) {
|
||||
if (equal((*argv)[i], "-cp") ||
|
||||
equal((*argv)[i], "-classpath")) {
|
||||
i++;
|
||||
(*argv)[i] = wildcardExpandClasspath((*argv)[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
debugPrintArgv(char *argv[])
|
||||
{
|
||||
int i;
|
||||
putchar('[');
|
||||
for (i = 0; argv[i]; i++) {
|
||||
if (i > 0) printf(", ");
|
||||
printf("\"%s\"", argv[i]);
|
||||
}
|
||||
printf("]\n");
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
argv[0] = "java";
|
||||
wildcardExpandArgv((const char***)&argv);
|
||||
debugPrintArgv(argv);
|
||||
/* execvp("java", argv); */
|
||||
return 0;
|
||||
}
|
||||
#endif /* DEBUG_WILDCARD */
|
||||
|
||||
/* Cute little perl prototype implementation....
|
||||
|
||||
my $sep = ($^O =~ /^(Windows|cygwin)/) ? ";" : ":";
|
||||
|
||||
sub expand($) {
|
||||
opendir DIR, $_[0] or return $_[0];
|
||||
join $sep, map {"$_[0]/$_"} grep {/\.(jar|JAR)$/} readdir DIR;
|
||||
}
|
||||
|
||||
sub munge($) {
|
||||
join $sep,
|
||||
map {(! -r $_ and s/[\/\\]+\*$//) ? expand $_ : $_} split $sep, $_[0];
|
||||
}
|
||||
|
||||
for (my $i = 0; $i < @ARGV - 1; $i++) {
|
||||
$ARGV[$i+1] = munge $ARGV[$i+1] if $ARGV[$i] =~ /^-c(p|lasspath)$/;
|
||||
}
|
||||
|
||||
$ENV{CLASSPATH} = munge $ENV{CLASSPATH} if exists $ENV{CLASSPATH};
|
||||
@ARGV = ("java", @ARGV);
|
||||
print "@ARGV\n";
|
||||
exec @ARGV;
|
||||
|
||||
*/
|
@ -1,34 +0,0 @@
|
||||
/*
|
||||
* 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 WILDCARD_H_
|
||||
#define WILDCARD_H_
|
||||
|
||||
#ifdef EXPAND_CLASSPATH_WILDCARDS
|
||||
const char *JLI_WildcardExpandClasspath(const char *classpath);
|
||||
#else
|
||||
#define JLI_WildcardExpandClasspath(s) (s)
|
||||
#endif
|
||||
|
||||
#endif /* include guard */
|
Loading…
x
Reference in New Issue
Block a user