LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File java-1.7.0-openjdk-arm-ftbfs.patch of Package java-1_7_0-openjdk (Project openSUSE:Factory:ARM)

diff -up openjdk/hotspot/make/linux/makefiles/defs.make.sav openjdk/hotspot/make/linux/makefiles/defs.make
--- openjdk/hotspot/make/linux/makefiles/defs.make.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/make/linux/makefiles/defs.make	2012-03-08 10:39:44.567935704 -0500
@@ -184,8 +184,10 @@ EXPORT_LIST += $(EXPORT_DOCS_DIR)/platfo
 
 # client and server subdirectories have symbolic links to ../libjsig.so
 EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so
-ifneq ($(OBJCOPY),)
-  EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+ifneq ($(ZERO_BUILD), true)
+  ifneq ($(OBJCOPY),)
+    EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+  endif
 endif
 
 EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
@@ -194,8 +196,10 @@ EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARC
 ifndef BUILD_CLIENT_ONLY
 EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
 EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
-  ifneq ($(OBJCOPY),)
-    EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+  ifneq ($(ZERO_BUILD), true)
+    ifneq ($(OBJCOPY),)
+      EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+    endif
   endif
 endif
 
@@ -215,9 +219,11 @@ ADD_SA_BINARIES/x86   = $(EXPORT_JRE_LIB
                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
 ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
                         $(EXPORT_LIB_DIR)/sa-jdi.jar 
-ifneq ($(OBJCOPY),)
-  ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
-  ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ifneq ($(ZERO_BUILD), true)
+  ifneq ($(OBJCOPY),)
+    ADD_SA_BINARIES/x86   += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+    ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+  endif
 endif
 ADD_SA_BINARIES/ppc   = 
 ADD_SA_BINARIES/ia64  = 
diff -up openjdk/hotspot/make/linux/platform_zero.in.sav openjdk/hotspot/make/linux/platform_zero.in
--- openjdk/hotspot/make/linux/platform_zero.in.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/make/linux/platform_zero.in	2012-03-08 10:39:44.567935704 -0500
@@ -14,4 +14,4 @@ compiler = gcc
 
 gnu_dis_arch = zero
 
-sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"
+sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DTARGET_ARCH_NYI_6939861=1 -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"
diff -up openjdk/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp.sav openjdk/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp
--- openjdk/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/src/cpu/zero/vm/methodHandles_zero.hpp	2012-03-08 10:39:44.567935704 -0500
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2011 Red Hat, Inc.
+ * Copyright 2011, 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -29,7 +29,6 @@ enum /* platform_dependent_constants */
   adapter_code_size = 0
 };
 
-#define TARGET_ARCH_NYI_6939861 
 // ..#ifdef TARGET_ARCH_NYI_6939861
 // ..  // Here are some backward compatible declarations until the 6939861 ports are updated.
 // ..  #define _adapter_flyby    (_EK_LIMIT + 10)
@@ -69,3 +68,19 @@ enum /* platform_dependent_constants */
 // ..
 // ..  static void trace_method_handle(MacroAssembler* _masm, const char* adaptername) PRODUCT_RETURN;
 // ..#endif //TARGET_ARCH_NYI_6939861
+
+class RicochetFrame : public ResourceObj {
+  friend class MethodHandles;
+ private:
+  /*
+    RF field            x86                 SPARC
+    sender_pc           *(rsp+0)            I7-0x8
+    sender_link         rbp                 I6+BIAS
+    exact_sender_sp     rsi/r13             I5_savedSP
+    conversion          *(rcx+&amh_conv)    L5_conv
+    saved_args_base     rax                 L4_sab (cf. Gargs = G4)
+    saved_args_layout   #NULL               L3_sal
+    saved_target        *(rcx+&mh_vmtgt)    L2_stgt
+    continuation        #STUB_CON           L1_cont
+   */
+};
diff -up openjdk/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp.sav openjdk/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp
--- openjdk/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/src/cpu/zero/vm/sharedRuntime_zero.cpp	2012-03-08 10:39:44.567935704 -0500
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2007, 2008, 2009, 2010, 2011 Red Hat, Inc.
+ * Copyright 2007, 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,6 +47,7 @@
 #endif
 
 
+
 int SharedRuntime::java_calling_convention(const BasicType *sig_bt,
                                            VMRegPair *regs,
                                            int total_args_passed,
@@ -96,19 +97,21 @@ uint SharedRuntime::out_preserve_stack_s
   ShouldNotCallThis();
 }
 
+JRT_LEAF(void, zero_stub())
+  ShouldNotCallThis();
+JRT_END
+
+
 static RuntimeStub* generate_empty_runtime_stub(const char* name) {
-  CodeBuffer buffer(name, 0, 0);
-  return RuntimeStub::new_runtime_stub(name, &buffer, 0, 0, NULL, false);
+  return CAST_FROM_FN_PTR(RuntimeStub*,zero_stub);
 }
 
 static SafepointBlob* generate_empty_safepoint_blob() {
-  CodeBuffer buffer("handler_blob", 0, 0);
-  return SafepointBlob::create(&buffer, NULL, 0);
+  return NULL;
 }
 
 static DeoptimizationBlob* generate_empty_deopt_blob() {
-  CodeBuffer buffer("handler_blob", 0, 0);
-  return DeoptimizationBlob::create(&buffer, NULL, 0, 0, 0, 0);
+  return NULL;
 }
 
 void SharedRuntime::generate_deopt_blob() {
@@ -123,6 +126,7 @@ RuntimeStub* SharedRuntime::generate_res
   return generate_empty_runtime_stub("resolve_blob");
 }
 
+
 int SharedRuntime::c_calling_convention(const BasicType *sig_bt,
                                          VMRegPair *regs,
                                          int total_args_passed) {
diff -up openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp.sav openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp
--- openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/src/share/vm/runtime/vmStructs.cpp	2012-03-08 10:39:44.568935688 -0500
@@ -818,10 +818,10 @@ static inline uint64_t cast_uint64_t(siz
   /* CodeBlobs (NOTE: incomplete, but only a little) */                                                                              \
   /***************************************************/                                                                              \
                                                                                                                                      \
-  X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_pc,                                     address))                   \
-  X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _exact_sender_sp,                              intptr_t*))                  \
-  X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_link,                                  intptr_t*))                  \
-  X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _saved_args_base,                              intptr_t*))                  \
+  NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_pc,                                     address)))                   \
+  NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _exact_sender_sp,                              intptr_t*)))                  \
+  NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _sender_link,                                  intptr_t*)))                  \
+  NOT_ZERO(X86_ONLY(nonstatic_field(MethodHandles::RicochetFrame, _saved_args_base,                              intptr_t*)))                  \
                                                                                                                                      \
      static_field(SharedRuntime,               _ricochet_blob,                                RicochetBlob*)                         \
                                                                                                                                      \
@@ -2526,7 +2526,7 @@ static inline uint64_t cast_uint64_t(siz
   /* frame              */                                                \
   /**********************/                                                \
                                                                           \
-  X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset))      \
+  NOT_ZERO(X86_ONLY(declare_constant(frame::entry_frame_call_wrapper_offset)))      \
   declare_constant(frame::pc_return_offset)                               \
                                                                           \
   /*************/                                                         \
diff -up openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp.sav openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp
--- openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/src/share/vm/shark/sharkCompiler.cpp	2012-03-08 10:39:44.568935688 -0500
@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2008, 2009, 2010, 2011 Red Hat, Inc.
+ * Copyright 2008, 2009, 2010, 2011, 2012 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -319,7 +319,7 @@ void SharkCompiler::free_compiled_method
   // finish with the exception of the VM thread, so we can consider
   // ourself the owner of the execution engine lock even though we
   // can't actually acquire it at this time.
-  assert(Thread::current()->is_VM_thread(), "must be called by VM thread");
+  assert(JavaThread::current()->thread_state() == _thread_in_vm, "must run in vm mode");
   assert(SafepointSynchronize::is_at_safepoint(), "must be at safepoint");
 
   SharkEntry *entry = (SharkEntry *) code;
diff -up openjdk/hotspot/src/share/vm/utilities/macros.hpp.sav openjdk/hotspot/src/share/vm/utilities/macros.hpp
--- openjdk/hotspot/src/share/vm/utilities/macros.hpp.sav	2012-02-14 16:11:12.000000000 -0500
+++ openjdk/hotspot/src/share/vm/utilities/macros.hpp	2012-03-08 10:39:44.569935671 -0500
@@ -169,6 +169,22 @@
 #define NOT_WIN64(code) code
 #endif
 
+#if defined(ZERO)
+#define ZERO_ONLY(code) code
+#define NOT_ZERO(code)
+#else
+#define ZERO_ONLY(code) 
+#define NOT_ZERO(code) code
+#endif
+
+#if defined(SHARK)
+#define SHARK_ONLY(code) code
+#define NOT_SHARK(code)
+#else
+#define SHARK_ONLY(code) 
+#define NOT_SHARK(code) code
+#endif
+
 #if defined(IA32) || defined(AMD64)
 #define X86
 #define X86_ONLY(code) code