Mercurial > hg > release > icedtea6-1.4.1
changeset 334:7130794f3f47
2007-11-07 Gary Benson <gbenson@redhat.com>
* patches/icedtea-bytecodeInterpreter.patch: New file.
* patches/icedtea-signature-iterator.patch: Likewise.
* patches/icedtea-signed-types.patch: Likewise.
* patches/icedtea-test-atomic-operations.patch: Likewise.
* patches/icedtea-core-build.patch: Likewise.
* patches/icedtea-linker-options.patch: Likewise.
* patches/icedtea-ports.patch: Likewise.
* Makefile.am (ICEDTEA_PATCHES): Added the above.
* Makefile.in: Regenerated.
author | Gary Benson <gbenson@redhat.com> |
---|---|
date | Thu, 08 Nov 2007 17:37:58 +0000 |
parents | cd2a405502f1 |
children | 460ca073dc80 |
files | ChangeLog Makefile.am Makefile.in patches/icedtea-bytecodeInterpreter.patch patches/icedtea-core-build.patch patches/icedtea-linker-options.patch patches/icedtea-ports.patch patches/icedtea-signature-iterator.patch patches/icedtea-signed-types.patch patches/icedtea-test-atomic-operations.patch |
diffstat | 10 files changed, 713 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Nov 08 10:57:58 2007 -0500 +++ b/ChangeLog Thu Nov 08 17:37:58 2007 +0000 @@ -1,3 +1,15 @@ +2007-11-07 Gary Benson <gbenson@redhat.com> + + * patches/icedtea-bytecodeInterpreter.patch: New file. + * patches/icedtea-signature-iterator.patch: Likewise. + * patches/icedtea-signed-types.patch: Likewise. + * patches/icedtea-test-atomic-operations.patch: Likewise. + * patches/icedtea-core-build.patch: Likewise. + * patches/icedtea-linker-options.patch: Likewise. + * patches/icedtea-ports.patch: Likewise. + * Makefile.am (ICEDTEA_PATCHES): Added the above. + * Makefile.in: Regenerated. + 2007-11-07 Lillian Angel <langel@redhat.com> * Makefile.am: Removed docs patch.
--- a/Makefile.am Thu Nov 08 10:57:58 2007 -0500 +++ b/Makefile.am Thu Nov 08 17:37:58 2007 +0000 @@ -186,6 +186,13 @@ patches/icedtea-javafiles.patch \ patches/icedtea-bytecodeInterpreterWithChecks.patch \ patches/icedtea-corba.patch \ + patches/icedtea-bytecodeInterpreter.patch \ + patches/icedtea-signature-iterator.patch \ + patches/icedtea-signed-types.patch \ + patches/icedtea-test-atomic-operations.patch \ + patches/icedtea-core-build.patch \ + patches/icedtea-linker-options.patch \ + patches/icedtea-ports.patch \ $(FAST_BUILD_PATCH) \ $(DISTRIBUTION_PATCHES)
--- a/Makefile.in Thu Nov 08 10:57:58 2007 -0500 +++ b/Makefile.in Thu Nov 08 17:37:58 2007 +0000 @@ -305,6 +305,13 @@ patches/icedtea-javafiles.patch \ patches/icedtea-bytecodeInterpreterWithChecks.patch \ patches/icedtea-corba.patch \ + patches/icedtea-bytecodeInterpreter.patch \ + patches/icedtea-signature-iterator.patch \ + patches/icedtea-signed-types.patch \ + patches/icedtea-test-atomic-operations.patch \ + patches/icedtea-core-build.patch \ + patches/icedtea-linker-options.patch \ + patches/icedtea-ports.patch \ $(FAST_BUILD_PATCH) \ $(DISTRIBUTION_PATCHES)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-bytecodeInterpreter.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,36 @@ +diff -r b3238230c1ef openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp +--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp Fri Nov 02 10:14:32 2007 +0000 ++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.hpp Fri Nov 02 10:15:45 2007 +0000 +@@ -63,7 +63,6 @@ union frame_manager_message { + }; + + class BytecodeInterpreter : StackObj { +-friend class SharedRuntime; + friend class AbstractInterpreterGenerator; + friend class CppInterpreterGenerator; + friend class InterpreterGenerator; +diff -r bae119bcbcd0 openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp +--- openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Fri Nov 02 15:08:47 2007 +0000 ++++ openjdk/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp Fri Nov 02 15:21:08 2007 +0000 +@@ -521,16 +521,16 @@ BytecodeInterpreter::run(interpreterStat + + /* 0xC0 */ &&opc_checkcast, &&opc_instanceof, &&opc_monitorenter, &&opc_monitorexit, + /* 0xC4 */ &&opc_wide, &&opc_multianewarray, &&opc_ifnull, &&opc_ifnonnull, +-/* 0xC8 */ &&opc_goto_w, &&opc_jsr_w, &&opc_breakpoint, &&opc_fast_igetfield, +-/* 0xCC */ &&opc_fastagetfield,&&opc_fast_aload_0, &&opc_fast_iaccess_0, &&opc__fast_aaccess_0, +- +-/* 0xD0 */ &&opc_fast_linearswitch, &&opc_fast_binaryswitch, &&opc_return_register_finalizer, &&opc_default, ++/* 0xC8 */ &&opc_goto_w, &&opc_jsr_w, &&opc_breakpoint, &&opc_default, ++/* 0xCC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, ++ ++/* 0xD0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, + /* 0xD4 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, + /* 0xD8 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, + /* 0xDC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, + + /* 0xE0 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, +-/* 0xE4 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, ++/* 0xE4 */ &&opc_default, &&opc_return_register_finalizer, &&opc_default, &&opc_default, + /* 0xE8 */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, + /* 0xEC */ &&opc_default, &&opc_default, &&opc_default, &&opc_default, +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-core-build.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,151 @@ +diff -ru openjdk.orig/control/make/hotspot-rules.gmk openjdk/control/make/hotspot-rules.gmk +--- openjdk.orig/control/make/hotspot-rules.gmk 2007-10-12 08:45:09.000000000 +0100 ++++ openjdk/control/make/hotspot-rules.gmk 2007-11-08 09:40:57.000000000 +0000 +@@ -75,6 +75,11 @@ + HOTSPOT_TARGET = all_fastdebug + endif + ++# Use the special build targets on PPC for now ++ifneq ($(findstring ppc,$(ARCH)),) ++ HOTSPOT_TARGET := $(HOTSPOT_TARGET)core ++endif ++ + HOTSPOT_BUILD_ARGUMENTS += $(COMMON_BUILD_ARGUMENTS) + HOTSPOT_BUILD_ARGUMENTS += ALT_OUTPUTDIR=$(HOTSPOT_OUTPUTDIR) + HOTSPOT_BUILD_ARGUMENTS += ALT_EXPORT_PATH=$(HOTSPOT_EXPORT_PATH) +diff -ru openjdk.orig/hotspot/make/Makefile openjdk/hotspot/make/Makefile +--- openjdk.orig/hotspot/make/Makefile 2007-10-12 08:45:12.000000000 +0100 ++++ openjdk/hotspot/make/Makefile 2007-11-08 09:40:57.000000000 +0000 +@@ -91,6 +91,15 @@ + all_debug: jvmg jvmg1 jvmgkernel docs export_debug + all_optimized: optimized optimized1 optimizedkernel docs export_optimized + ++# Core (non-compiler) targets made available with this Makefile ++CORE_VM_TARGETS=productcore fastdebugcore optimizedcore jvmgcore ++ ++allcore: all_productcore all_fastdebugcore ++all_productcore: productcore docs export_product ++all_fastdebugcore: fastdebugcore docs export_fastdebug ++all_debugcore: jvmgcore docs export_debug ++all_optimizedcore: optimizedcore docs export_optimized ++ + # Do everything + world: all create_jdk + +@@ -117,6 +126,10 @@ + $(CD) $(GAMMADIR)/make; \ + $(MAKE) VM_TARGET=$@ generic_buildkernel $(ALT_OUT) + ++$(CORE_VM_TARGETS): ++ $(CD) $(GAMMADIR)/make; \ ++ $(MAKE) VM_TARGET=$@ generic_build2 $(ALT_OUT) ++ + # Build compiler1 (client) rule, different for platforms + generic_build1: + $(MKDIR) -p $(OUTPUTDIR) +@@ -207,17 +220,24 @@ + C1_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler1 + C2_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_compiler2 + KERNEL_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_kernel ++CORE_BASE_DIR=$(OUTPUTDIR)/$(VM_PLATFORM)_core + C1_DIR=$(C1_BASE_DIR)/$(VM_SUBDIR) + C2_DIR=$(C2_BASE_DIR)/$(VM_SUBDIR) + KERNEL_DIR=$(KERNEL_BASE_DIR)/$(VM_SUBDIR) ++CORE_DIR=$(CORE_BASE_DIR)/$(VM_SUBDIR) + +-# Misc files and generated files need to come from C1 or C2 area +-ifeq ($(ARCH_DATA_MODEL), 32) +- MISC_DIR=$(C1_DIR) +- GEN_DIR=$(C1_BASE_DIR)/generated ++# Misc files and generated files need to come from the correct area ++ifneq ($(findstring ppc,$(ARCH)),) ++ MISC_DIR=$(CORE_DIR) ++ GEN_DIR=$(CORE_BASE_DIR)/generated + else +- MISC_DIR=$(C2_DIR) +- GEN_DIR=$(C2_BASE_DIR)/generated ++ ifeq ($(ARCH_DATA_MODEL), 32) ++ MISC_DIR=$(C1_DIR) ++ GEN_DIR=$(C1_BASE_DIR)/generated ++ else ++ MISC_DIR=$(C2_DIR) ++ GEN_DIR=$(C2_BASE_DIR)/generated ++ endif + endif + + # Bin files (windows) +@@ -268,8 +288,13 @@ + $(install-file) + $(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so + $(install-file) ++ifneq ($(findstring ppc,$(ARCH)),) ++$(EXPORT_SERVER_DIR)/%.so: $(CORE_DIR)/%.so ++ $(install-file) ++else + $(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so + $(install-file) ++endif + $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so + $(install-file) + endif +diff -ru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2007-10-12 08:46:18.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2007-11-08 09:40:57.000000000 +0000 +@@ -95,8 +95,12 @@ + #ifdef TIERED + #define VMTYPE "Server" + #else ++#if defined(COMPILER1) || defined(COMPILER2) + #define VMTYPE COMPILER1_PRESENT("Client") \ + COMPILER2_PRESENT("Server") ++#else ++ #define VMTYPE "Core" ++#endif // COMPILER1 || COMPILER2 + #endif // TIERED + #endif // KERNEL + +diff -ru openjdk.orig/j2se/make/java/redist/Makefile openjdk/j2se/make/java/redist/Makefile +--- openjdk.orig/j2se/make/java/redist/Makefile 2007-10-12 08:54:05.000000000 +0100 ++++ openjdk/j2se/make/java/redist/Makefile 2007-11-08 09:40:57.000000000 +0000 +@@ -94,8 +94,14 @@ + endif + endif # INCLUDE_SA + +-# Hotspot client is only available on 32-bit builds +-ifeq ($(ARCH_DATA_MODEL), 32) ++# Include the client VM on platforms where it is supported. ++INCLUDE_CLIENT := $(shell if [ -r $(HOTSPOT_CLIENT_PATH)/$(JVM_NAME) ]; then \ ++ $(ECHO) true; \ ++ else \ ++ $(ECHO) false; \ ++ fi) ++ ++ifeq ($(INCLUDE_CLIENT), true) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVM_NAME) \ + $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt + endif +@@ -119,8 +125,7 @@ + $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMMAP_NAME) \ + $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMPDB_NAME) + +-# Hotspot client is only available on 32-bit builds +-ifeq ($(ARCH_DATA_MODEL), 32) ++ifeq ($(INCLUDE_CLIENT), true) + IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMMAP_NAME) \ + $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(JVMPDB_NAME) + endif +@@ -158,10 +163,11 @@ + IMPORT_LIST += $(LIB_LOCATION)/$(SERVER_LOCATION)/$(JVMDB_NAME) + endif + +-ifeq ($(ARCH_DATA_MODEL), 32) +- +-IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) ++ifeq ($(INCLUDE_CLIENT), true) ++ IMPORT_LIST += $(LIB_LOCATION)/$(CLIENT_LOCATION)/$(LIBJSIG_NAME) ++endif + ++ifeq ($(ARCH_DATA_MODEL), 32) + ifeq ($(PLATFORM), solaris) + # solaris vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv solaris +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-linker-options.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,48 @@ +diff -ru openjdk.orig/corba/make/common/Defs-linux.gmk openjdk/corba/make/common/Defs-linux.gmk +--- openjdk.orig/corba/make/common/Defs-linux.gmk 2007-11-08 13:45:46.000000000 +0000 ++++ openjdk/corba/make/common/Defs-linux.gmk 2007-11-08 13:44:13.000000000 +0000 +@@ -196,7 +196,7 @@ + + EXTRA_LIBS += -lc + +-LDFLAGS_DEFS_OPTION = -z defs ++LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs + LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) + + # +diff -ru openjdk.orig/j2se/make/common/Defs-linux.gmk openjdk/j2se/make/common/Defs-linux.gmk +--- openjdk.orig/j2se/make/common/Defs-linux.gmk 2007-11-08 13:45:46.000000000 +0000 ++++ openjdk/j2se/make/common/Defs-linux.gmk 2007-11-08 13:43:52.000000000 +0000 +@@ -204,7 +204,7 @@ + + EXTRA_LIBS += -lc + +-LDFLAGS_DEFS_OPTION = -z defs ++LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs + LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) + + # +diff -ru openjdk.orig/j2se/make/common/Program.gmk openjdk/j2se/make/common/Program.gmk +--- openjdk.orig/j2se/make/common/Program.gmk 2007-11-08 13:45:46.000000000 +0000 ++++ openjdk/j2se/make/common/Program.gmk 2007-11-08 13:42:44.000000000 +0000 +@@ -85,7 +85,7 @@ + endif + endif + ifeq ($(PLATFORM), linux) +- LDFLAGS += -lz -z origin ++ LDFLAGS += -lz -Wl,-z -Wl,origin + LDFLAGS += -Wl,--allow-shlib-undefined + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../jre/lib/$(LIBARCH)/jli +diff -ru openjdk.orig/j2se/make/java/instrument/Makefile openjdk/j2se/make/java/instrument/Makefile +--- openjdk.orig/j2se/make/java/instrument/Makefile 2007-11-08 13:45:46.000000000 +0000 ++++ openjdk/j2se/make/java/instrument/Makefile 2007-11-08 13:42:25.000000000 +0000 +@@ -109,7 +109,7 @@ + LDFLAGS += -R \$$ORIGIN/jli + endif + ifeq ($(PLATFORM), linux) +- LDFLAGS += -z origin ++ LDFLAGS += -Wl,-z -Wl,origin + LDFLAGS += -Wl,--allow-shlib-undefined + LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli + endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-ports.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,359 @@ +diff -ru openjdk.orig/hotspot/build/linux/makefiles/buildtree.make openjdk/hotspot/build/linux/makefiles/buildtree.make +--- openjdk.orig/hotspot/build/linux/makefiles/buildtree.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/buildtree.make 2007-11-08 11:36:15.000000000 +0000 +@@ -317,6 +317,8 @@ + DATA_MODE/sparcv9 = 64 + DATA_MODE/amd64 = 64 + DATA_MODE/ia64 = 64 ++DATA_MODE/ppc = 32 ++DATA_MODE/ppc64 = 64 + + JAVA_FLAG/32 = -d32 + JAVA_FLAG/64 = -d64 +diff -ru openjdk.orig/hotspot/build/linux/makefiles/defs.make openjdk/hotspot/build/linux/makefiles/defs.make +--- openjdk.orig/hotspot/build/linux/makefiles/defs.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/defs.make 2007-11-08 11:36:15.000000000 +0000 +@@ -87,6 +87,21 @@ + HS_ARCH = x86 + endif + ++# ppc and ppc64 ++ifneq ($(findstring ppc,$(ARCH)),) ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ ARCH_DATA_MODEL = 64 ++ MAKE_ARGS += LP64=1 ++ PLATFORM = linux-ppc64 ++ VM_PLATFORM = linux_ppc64 ++ else ++ ARCH_DATA_MODEL = 32 ++ PLATFORM = linux-ppc ++ VM_PLATFORM = linux_ppc ++ endif ++ HS_ARCH = ppc ++endif ++ + JDK_INCLUDE_SUBDIR=linux + + # FIXUP: The subdirectory for a debug build is NOT the same on all platforms +@@ -94,20 +109,16 @@ + + EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html + EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server ++EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so + EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so +-ifeq ($(ARCH_DATA_MODEL), 32) +- EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so ++ifneq ($(HS_ARCH), ppc) ++ ifeq ($(ARCH_DATA_MODEL), 32) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.so ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so ++ endif + EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar +-else +- ifeq ($(ARCH),ia64) +- else +- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so +- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar +- endif + endif +diff -ru openjdk.orig/hotspot/build/linux/makefiles/gcc.make openjdk/hotspot/build/linux/makefiles/gcc.make +--- openjdk.orig/hotspot/build/linux/makefiles/gcc.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/gcc.make 2007-11-08 11:36:15.000000000 +0000 +@@ -73,6 +73,8 @@ + ARCHFLAG/ia64 = + ARCHFLAG/sparc = -m32 -mcpu=v9 + ARCHFLAG/sparcv9 = -m64 -mcpu=v9 ++ARCHFLAG/ppc = -m32 ++ARCHFLAG/ppc64 = -m64 + + CFLAGS += $(ARCHFLAG) + AOUT_FLAGS += $(ARCHFLAG) +diff -ru openjdk.orig/hotspot/build/linux/makefiles/sa.make openjdk/hotspot/build/linux/makefiles/sa.make +--- openjdk.orig/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/sa.make 2007-11-08 11:36:15.000000000 +0000 +@@ -51,10 +51,10 @@ + SA_PROPERTIES = $(SA_CLASSDIR)/sa.properties + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or PPC. + + all: +- if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "ppc" ] ; then \ + $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ + fi + +diff -ru openjdk.orig/hotspot/build/linux/makefiles/saproc.make openjdk/hotspot/build/linux/makefiles/saproc.make +--- openjdk.orig/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/build/linux/makefiles/saproc.make 2007-11-08 11:36:15.000000000 +0000 +@@ -44,10 +44,10 @@ + DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC) + + # if $(AGENT_DIR) does not exist, we don't build SA +-# also, we don't build SA on Itanium. ++# also, we don't build SA on Itanium or PPC. + + checkAndBuildSA: +- $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" ] ; then \ ++ $(QUIETLY) if [ -d $(AGENT_DIR) -a "$(SRCARCH)" != "ia64" -a "$(SRCARCH)" != "ppc" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +diff -ru openjdk.orig/hotspot/make/defs.make openjdk/hotspot/make/defs.make +--- openjdk.orig/hotspot/make/defs.make 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/make/defs.make 2007-11-08 11:36:15.000000000 +0000 +@@ -191,15 +191,17 @@ + + # Use uname output for SRCARCH, but deal with platform differences. If ARCH + # is not explicitly listed below, it is treated as x86. +- SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64,$(ARCH))) ++ SRCARCH = $(ARCH/$(filter sparc sparc64 ia64 amd64 x86_64 ppc ppc64,$(ARCH))) + ARCH/ = x86 + ARCH/sparc = sparc + ARCH/sparc64= sparc + ARCH/ia64 = ia64 + ARCH/amd64 = x86 + ARCH/x86_64 = x86 ++ ARCH/ppc = ppc ++ ARCH/ppc64 = ppc + +- # BUILDARCH is usually the same as SRCARCH, except for sparcv9 ++ # BUILDARCH is usually the same as SRCARCH, except for sparcv9 and ppc64 + BUILDARCH = $(SRCARCH) + ifeq ($(BUILDARCH), x86) + ifdef LP64 +@@ -208,10 +210,13 @@ + BUILDARCH = i486 + endif + endif +- ifeq ($(BUILDARCH), sparc) +- ifdef LP64 ++ ifdef LP64 ++ ifeq ($(BUILDARCH), sparc) + BUILDARCH = sparcv9 + endif ++ ifeq ($(BUILDARCH), ppc) ++ BUILDARCH = ppc64 ++ endif + endif + + # LIBARCH is 1:1 mapping from BUILDARCH +@@ -221,8 +226,10 @@ + LIBARCH/sparc = sparc + LIBARCH/sparcv9 = sparcv9 + LIBARCH/ia64 = ia64 ++ LIBARCH/ppc = ppc ++ LIBARCH/ppc64 = ppc64 + +- LP64_ARCH = sparcv9 amd64 ia64 ++ LP64_ARCH = sparcv9 amd64 ia64 ppc64 + endif + + # Required make macro settings for all platforms +diff -ru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2007-11-08 11:36:15.000000000 +0000 +@@ -174,6 +174,12 @@ + # else + static char cpu_arch[] = "sparc"; + # endif ++#elif defined(PPC) ++# ifdef _LP64 ++static char cpu_arch[] = "ppc64"; ++# else ++static char cpu_arch[] = "ppc"; ++# endif + #else + #error Add appropriate cpu_arch setting + #endif +@@ -2375,7 +2381,8 @@ + // format has been changed), we'll use the largest page size supported by + // the processor. + +- _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) SPARC_ONLY(4 * M); ++ _large_page_size = IA32_ONLY(4 * M) AMD64_ONLY(2 * M) IA64_ONLY(256 * M) ++ SPARC_ONLY(4 * M) PPC_ONLY(16 * M); + + FILE *fp = fopen("/proc/meminfo", "r"); + if (fp) { +diff -ru openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp openjdk/hotspot/src/share/vm/runtime/mutex.hpp +--- openjdk.orig/hotspot/src/share/vm/runtime/mutex.hpp 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/mutex.hpp 2007-11-08 11:36:15.000000000 +0000 +@@ -64,19 +64,15 @@ + } ; + + // Endian-ness ... index of least-significant byte in SplitWord.Bytes[] +-#ifdef AMD64 // little ++#if defined(IA32) || defined(AMD64) || defined(IA64) // little + #define _LSBINDEX 0 + #else +-#if IA32 // little +- #define _LSBINDEX 0 +-#else +-#ifdef SPARC // big ++#if defined(SPARC) || defined(PPC) // big + #define _LSBINDEX (sizeof(intptr_t)-1) + #else + #error "unknown architecture" + #endif + #endif +-#endif + + class ParkEvent ; + +diff -ru openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp openjdk/hotspot/src/share/vm/runtime/vm_version.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/vm_version.cpp 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/vm_version.cpp 2007-11-08 11:36:15.000000000 +0000 +@@ -150,7 +150,8 @@ + #define CPU IA32_ONLY("x86") \ + IA64_ONLY("ia64") \ + AMD64_ONLY("amd64") \ +- SPARC_ONLY("sparc") ++ SPARC_ONLY("sparc") \ ++ PPC_ONLY("ppc") + + const char *Abstract_VM_Version::vm_platform_string() { + return OS "-" CPU; +diff -ru openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp openjdk/hotspot/src/share/vm/utilities/macros.hpp +--- openjdk.orig/hotspot/src/share/vm/utilities/macros.hpp 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/macros.hpp 2007-11-08 11:36:15.000000000 +0000 +@@ -179,6 +179,14 @@ + #define NOT_SPARC(code) code + #endif + ++#ifdef PPC ++#define PPC_ONLY(code) code ++#define NOT_PPC(code) ++#else ++#define PPC_ONLY(code) ++#define NOT_PPC(code) code ++#endif ++ + #define FIX_THIS(code) report_assertion_failure("FIX_THIS",__FILE__, __LINE__, "") + + #define define_pd_global(type, name, value) const type pd_##name = value; +diff -ru openjdk.orig/j2se/make/common/Defs-linux.gmk openjdk/j2se/make/common/Defs-linux.gmk +--- openjdk.orig/j2se/make/common/Defs-linux.gmk 2007-11-08 11:35:35.000000000 +0000 ++++ openjdk/j2se/make/common/Defs-linux.gmk 2007-11-08 11:36:15.000000000 +0000 +@@ -109,6 +109,10 @@ + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 + LDFLAGS_COMMON_sparc += -m32 -mcpu=v9 ++CFLAGS_REQUIRED_ppc += -m32 ++LDFLAGS_COMMON_ppc += -m32 ++CFLAGS_REQUIRED_ppc64 += -m64 ++LDFLAGS_COMMON_ppc64 += -m64 + CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) + LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) + +diff -ru openjdk.orig/j2se/make/common/shared/Compiler-gcc.gmk openjdk/j2se/make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/j2se/make/common/shared/Compiler-gcc.gmk 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/j2se/make/common/shared/Compiler-gcc.gmk 2007-11-08 11:36:15.000000000 +0000 +@@ -74,13 +74,13 @@ + # sparc or sparcv9 + REQUIRED_CC_VER = 4.0 + REQUIRED_GCC_VER = 4.0.* +- else +- ifeq ($(ARCH_DATA_MODEL), 32) ++ endif ++ ifeq ($(ARCH), i586) + # i586 + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 3.2.1* + REQUIRED_GCC_VER_INT = 3.2.1-7a +- else ++ endif + ifeq ($(ARCH), amd64) + # amd64 + REQUIRED_CC_VER = 3.2 +@@ -91,7 +91,10 @@ + REQUIRED_CC_VER = 3.2 + REQUIRED_GCC_VER = 2.9[56789].* + endif +- endif ++ ifneq ("$(findstring ppc,$(ARCH))", "") ++ # ppc or ppc64 ++ REQUIRED_CC_VER = 3.2 ++ REQUIRED_GCC_VER = 3.2.* + endif + # Option used to create a shared library + SHARED_LIBRARY_FLAG = -shared -mimpure-text +diff -ru openjdk.orig/j2se/make/common/shared/Platform.gmk openjdk/j2se/make/common/shared/Platform.gmk +--- openjdk.orig/j2se/make/common/shared/Platform.gmk 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/j2se/make/common/shared/Platform.gmk 2007-11-08 11:36:15.000000000 +0000 +@@ -203,6 +203,9 @@ + sparc*) \ + echo sparc \ + ;; \ ++ ppc*) \ ++ echo ppc \ ++ ;; \ + *) \ + echo $(mach) \ + ;; \ +@@ -211,19 +214,25 @@ + ARCH_FAMILY := $(ARCH) + + # Linux builds may be 32-bit or 64-bit data model. +- ifeq ($(ARCH), sparc) +- # Linux sparc build can be either 32-bit or 64-bit. ++ ifneq ($(filter sparc ppc,$(ARCH)),) ++ # Linux sparc and ppc builds can be either 32-bit or 64-bit. + # Default to 32, but allow explicit setting to 32 or 64. + ifndef ARCH_DATA_MODEL + ARCH_DATA_MODEL=32 + endif +- ifeq ($(ARCH_DATA_MODEL), 32) +- ARCH=sparc +- else +- ARCH=sparcv9 ++ ifeq ($(ARCH_DATA_MODEL), 64) ++ archExpr = case "$(ARCH)" in \ ++ sparc) \ ++ echo sparcv9 \ ++ ;; \ ++ ppc) \ ++ echo ppc64 \ ++ ;; \ ++ esac ++ ARCH := $(shell $(archExpr)) + endif + else +- # i586 is 32-bit, amd64 is 64-bit ++ # i586 is 32-bit, amd64 and ia64 are 64-bit + ifndef ARCH_DATA_MODEL + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 +diff -ru openjdk.orig/j2se/make/javax/sound/SoundDefs.gmk openjdk/j2se/make/javax/sound/SoundDefs.gmk +--- openjdk.orig/j2se/make/javax/sound/SoundDefs.gmk 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/j2se/make/javax/sound/SoundDefs.gmk 2007-11-08 11:36:15.000000000 +0000 +@@ -71,6 +71,10 @@ + CPPFLAGS += -DX_ARCH=X_AMD64 + endif # ARCH amd64 + ++ifeq ($(ARCH), ppc) ++ CPPFLAGS += -DX_ARCH=X_PPC ++endif # ARCH ppc ++ + + # files needed for MIDI i/o + MIDIFILES_c = \ +diff -ru openjdk.orig/j2se/src/share/native/com/sun/media/sound/SoundDefs.h openjdk/j2se/src/share/native/com/sun/media/sound/SoundDefs.h +--- openjdk.orig/j2se/src/share/native/com/sun/media/sound/SoundDefs.h 2007-11-08 11:34:54.000000000 +0000 ++++ openjdk/j2se/src/share/native/com/sun/media/sound/SoundDefs.h 2007-11-08 11:36:15.000000000 +0000 +@@ -38,6 +38,7 @@ + #define X_SPARCV9 3 + #define X_IA64 4 + #define X_AMD64 5 ++#define X_PPC 6 + + // ********************************** + // Make sure you set X_PLATFORM and X_ARCH defines correctly.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-signature-iterator.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,44 @@ +diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp +--- openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp Fri Nov 02 09:42:25 2007 +0000 ++++ openjdk/hotspot/src/share/vm/interpreter/oopMapCache.cpp Fri Nov 02 09:44:37 2007 +0000 +@@ -284,7 +284,7 @@ class MaskFillerForNative: public Native + public: + void pass_int() { /* ignore */ } + void pass_long() { /* ignore */ } +-#ifdef _LP64 ++#if defined(_LP64) || defined(PPC) + void pass_float() { /* ignore */ } + #endif + void pass_double() { /* ignore */ } +diff -r ee6af95bc459 openjdk/hotspot/src/share/vm/runtime/signature.hpp +--- openjdk/hotspot/src/share/vm/runtime/signature.hpp Fri Nov 02 09:42:25 2007 +0000 ++++ openjdk/hotspot/src/share/vm/runtime/signature.hpp Fri Nov 02 09:48:28 2007 +0000 +@@ -278,11 +278,14 @@ class NativeSignatureIterator: public Si + + void do_bool () { pass_int(); _jni_offset++; _offset++; } + void do_char () { pass_int(); _jni_offset++; _offset++; } ++#if defined(_LP64) || defined(PPC) ++ void do_float () { pass_float(); _jni_offset++; _offset++; } ++#else ++ void do_float () { pass_int(); _jni_offset++; _offset++; } ++#endif + #ifdef _LP64 +- void do_float () { pass_float(); _jni_offset++; _offset++; } + void do_double() { pass_double(); _jni_offset++; _offset += 2; } + #else +- void do_float () { pass_int(); _jni_offset++; _offset++; } + void do_double() { pass_double(); _jni_offset += 2; _offset += 2; } + #endif + void do_byte () { pass_int(); _jni_offset++; _offset++; } +@@ -306,8 +309,10 @@ class NativeSignatureIterator: public Si + virtual void pass_int() = 0; + virtual void pass_long() = 0; + virtual void pass_object() = 0; ++#if defined(_LP64) || defined(PPC) ++ virtual void pass_float() = 0; ++#endif + #ifdef _LP64 +- virtual void pass_float() = 0; + virtual void pass_double() = 0; + #else + virtual void pass_double() { pass_long(); } // may be same as long
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-signed-types.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,24 @@ +diff -r 9523b5ae0184 openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp +--- openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp Fri Nov 02 09:26:45 2007 +0000 ++++ openjdk/hotspot/src/share/vm/asm/codeBuffer.hpp Fri Nov 02 09:39:12 2007 +0000 +@@ -84,7 +84,7 @@ class CodeSection VALUE_OBJ_CLASS_SPEC { + address _locs_point; // last relocated position (grows upward) + bool _locs_own; // did I allocate the locs myself? + bool _frozen; // no more expansion of this section +- char _index; // my section number (SECT_INST, etc.) ++ signed char _index; // my section number (SECT_INST, etc.) + CodeBuffer* _outer; // enclosing CodeBuffer + + // (Note: _locs_point used to be called _last_reloc_offset.) +diff -r 9523b5ae0184 openjdk/hotspot/src/share/vm/utilities/ostream.cpp +--- openjdk/hotspot/src/share/vm/utilities/ostream.cpp Fri Nov 02 09:26:45 2007 +0000 ++++ openjdk/hotspot/src/share/vm/utilities/ostream.cpp Fri Nov 02 09:37:53 2007 +0000 +@@ -832,7 +832,7 @@ bool networkStream::connect(const char * + server.sin_port = htons(port); + + server.sin_addr.s_addr = inet_addr(ip); +- if (server.sin_addr.s_addr == (unsigned long)-1) { ++ if (server.sin_addr.s_addr == (in_addr_t)-1) { + #ifdef _WINDOWS + struct hostent* host = hpi::get_host_by_name((char*)ip); + #else
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-test-atomic-operations.patch Thu Nov 08 17:37:58 2007 +0000 @@ -0,0 +1,25 @@ +diff -r d384f5a5bd0c hotspot/src/share/vm/prims/jni.cpp +--- openjdk/hotspot/src/share/vm/prims/jni.cpp Mon Aug 06 13:11:51 2007 +0100 ++++ openjdk/hotspot/src/share/vm/prims/jni.cpp Fri Sep 14 09:58:33 2007 +0100 +@@ -3212,6 +3212,21 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_ + jint result = JNI_ERR; + DT_RETURN_MARK(CreateJavaVM, jint, (const jint&)result); + ++ // We're about to use Atomic::xchg for locking. On Aztec platforms ++ // this is implemented using the GCC builtin __sync_lock_test_and_set ++ // which is not guaranteed to do what we're using it for on all ++ // platforms. So we check it works before doing anything else. ++#ifdef ASSERT ++ { ++ jint a = 0xCAFEBABE; ++ jint b = Atomic::xchg(0xC0FFEE, &a); ++ void *c = &a; ++ void *d = Atomic::xchg_ptr(&b, &c); ++ assert(a == 0xC0FFEE && b == (jint) 0xCAFEBABE, "Atomic::xchg() works"); ++ assert(c == &b && d == &a, "Atomic::xchg_ptr() works"); ++ } ++#endif // ASSERT ++ + // At the moment it's only possible to have one Java VM, + // since some of the runtime state is in global variables. +