rpms/java-1.6.0-openjdk/F-9 java-1.6.0-openjdk-sparc-ptracefix.patch, NONE, 1.1 java-1.6.0-openjdk-sparc-trapsfix.patch, NONE, 1.1 java-1.6.0-openjdk-sparc64-INSTALL_ARCH_DIR.patch, NONE, 1.1 java-1.6.0-openjdk-sparc64-linux.patch, NONE, 1.1 java-1.6.0-openjdk.spec, 1.46, 1.47

Tom Callaway (spot) fedora-extras-commits at redhat.com
Sun Jun 8 11:55:30 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/java-1.6.0-openjdk/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8037

Modified Files:
	java-1.6.0-openjdk.spec 
Added Files:
	java-1.6.0-openjdk-sparc-ptracefix.patch 
	java-1.6.0-openjdk-sparc-trapsfix.patch 
	java-1.6.0-openjdk-sparc64-INSTALL_ARCH_DIR.patch 
	java-1.6.0-openjdk-sparc64-linux.patch 
Log Message:
enable sparc/sparc64 builds

java-1.6.0-openjdk-sparc-ptracefix.patch:

--- NEW FILE java-1.6.0-openjdk-sparc-ptracefix.patch ---
diff -up icedtea6-1.2/openjdk/hotspot/agent/src/os/linux/libproc.h.BAD icedtea6-1.2/openjdk/hotspot/agent/src/os/linux/libproc.h
--- icedtea6-1.2/openjdk/hotspot/agent/src/os/linux/libproc.h.BAD	2008-05-29 19:03:34.000000000 -0400
+++ icedtea6-1.2/openjdk/hotspot/agent/src/os/linux/libproc.h	2008-05-29 19:01:45.000000000 -0400
@@ -34,14 +34,25 @@
 
 #if defined(sparc) || defined(sparcv9)
 /*
-  If _LP64 is defined ptrace.h should be taken from /usr/include/asm-sparc64
-  otherwise it should be from /usr/include/asm-sparc
-  These two files define pt_regs structure differently
+  Taken from asm-sparc/ptrace.h and asm-sparc64/ptrace.h
 */ 
 #ifdef _LP64
-#include "asm-sparc64/ptrace.h"
+struct pt_regs {
+	unsigned long u_regs[16]; /* globals and ins */
+	unsigned long tstate;
+	unsigned long tpc;
+	unsigned long tnpc;
+	unsigned int y;
+	unsigned int fprs;
+};
 #else
-#include "asm-sparc/ptrace.h"
+struct pt_regs {
+	unsigned long psr;
+	unsigned long pc;
+	unsigned long npc;
+	unsigned long y;
+	unsigned long u_regs[16]; /* globals and ins */
+};
 #endif
 
 #endif //sparc or sparcv9

java-1.6.0-openjdk-sparc-trapsfix.patch:

--- NEW FILE java-1.6.0-openjdk-sparc-trapsfix.patch ---
diff -up icedtea6-1.2/openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD icedtea6-1.2/openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp
--- icedtea6-1.2/openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp.BAD	2008-05-28 11:49:06.000000000 -0500
+++ icedtea6-1.2/openjdk/hotspot/src/os_cpu/linux_sparc/vm/assembler_linux_sparc.cpp	2008-05-28 11:51:56.000000000 -0500
@@ -25,7 +25,16 @@
 #include "incls/_precompiled.incl"
 #include "incls/_assembler_linux_sparc.cpp.incl"
 
-#include <asm-sparc/traps.h>
+/* Headers for 32bit sparc with a 32bit userland end up in asm/
+ * Headers for 32bit sparc with a 64bit userland end up in asm-sparc/
+ * There is no traps.h in asm-sparc64/
+ */
+
+#if defined(__sparc__) && defined(__arch64__)
+# include <asm-sparc/traps.h>
+#else 
+# include <asm/traps.h>
+#endif
 
 bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
   // Since the linux kernel resides at the low end of

java-1.6.0-openjdk-sparc64-INSTALL_ARCH_DIR.patch:

--- NEW FILE java-1.6.0-openjdk-sparc64-INSTALL_ARCH_DIR.patch ---
diff -up icedtea6-1.2/configure.sparc64 icedtea6-1.2/configure
--- icedtea6-1.2/configure.sparc64	2008-05-30 14:58:10.000000000 -0400
+++ icedtea6-1.2/configure	2008-05-30 14:59:54.000000000 -0400
@@ -735,6 +735,7 @@ WITH_OPENJDK_FALSE
 PARALLEL_JOBS
 BUILD_ARCH_DIR
 INSTALL_ARCH_DIR
+JRE_ARCH_DIR
 JAVA
 JAVAC
 JAVAH
@@ -5971,23 +5972,33 @@ fi
     x86_64-*-*)
       BUILD_ARCH_DIR=amd64
       INSTALL_ARCH_DIR=amd64
+      JRE_ARCH_DIR=amd64
       ;;
     i?86-*-*)
       BUILD_ARCH_DIR=i586
       INSTALL_ARCH_DIR=i386
+      JRE_ARCH_DIR=i386
       ;;
     arm*-*-*)
       BUILD_ARCH_DIR=arm
       INSTALL_ARCH_DIR=arm
+      JRE_ARCH_DIR=arm
+      ;;
+    sparc64-*-*)
+      BUILD_ARCH_DIR=sparcv9
+      INSTALL_ARCH_DIR=sparcv9
+      JRE_ARCH_DIR=sparc64
       ;;
     *)
       BUILD_ARCH_DIR=`uname -m`
       INSTALL_ARCH_DIR=$BUILD_ARCH_DIR
+      JRE_ARCH_DIR=$INSTALL_ARCH_DIR
       ;;
   esac
 
 
 
+
 if test "${with_openjdk}" == true
 then
   JAVA=$SYSTEM_OPENJDK_DIR/bin/java
@@ -12906,6 +12917,7 @@ WITH_OPENJDK_FALSE!$WITH_OPENJDK_FALSE$a
 PARALLEL_JOBS!$PARALLEL_JOBS$ac_delim
 BUILD_ARCH_DIR!$BUILD_ARCH_DIR$ac_delim
 INSTALL_ARCH_DIR!$INSTALL_ARCH_DIR$ac_delim
+JRE_ARCH_DIR!$JRE_ARCH_DIR$ac_delim
 JAVA!$JAVA$ac_delim
 JAVAC!$JAVAC$ac_delim
 JAVAH!$JAVAH$ac_delim
@@ -12975,7 +12987,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff -up icedtea6-1.2/Makefile.am.sparc64 icedtea6-1.2/Makefile.am
--- icedtea6-1.2/Makefile.am.sparc64	2008-05-30 14:58:10.000000000 -0400
+++ icedtea6-1.2/Makefile.am	2008-05-30 14:58:10.000000000 -0400
@@ -495,8 +495,13 @@ stamps/bootstrap-directory-ecj.stamp:
 	if test -d $(SYSTEM_GCJ_DIR); \
 	then \
 	  mkdir -p bootstrap/ecj/jre/lib; \
-	  ln -sf $(SYSTEM_GCJ_DIR)/jre/lib/$(INSTALL_ARCH_DIR) \
-	    bootstrap/ecj/jre/lib/; \
+	  ln -sf $(SYSTEM_GCJ_DIR)/jre/lib/$(JRE_ARCH_DIR) \
+	    bootstrap/ecj/jre/lib/; \
+	  if ! test -d /jre/lib/$(INSTALL_ARCH_DIR); \
+	  then \
+	    ln -sf ./$(JRE_ARCH_DIR) \
+	      bootstrap/ecj/jre/lib/$(INSTALL_ARCH_DIR); \
+	  fi; \
 	  mkdir -p bootstrap/ecj/include; \
 	  for i in $(SYSTEM_GCJ_DIR)/include/*; do \
 	    test -r $$i | continue; \
diff -up icedtea6-1.2/Makefile.in.sparc64 icedtea6-1.2/Makefile.in
--- icedtea6-1.2/Makefile.in.sparc64	2008-05-30 14:58:10.000000000 -0400
+++ icedtea6-1.2/Makefile.in	2008-05-30 14:58:10.000000000 -0400
@@ -138,6 +138,7 @@ JAR = @JAR@
 JAVA = @JAVA@
 JAVAC = @JAVAC@
 JAVAH = @JAVAH@
+JRE_ARCH_DIR = @JRE_ARCH_DIR@
 LDFLAGS = @LDFLAGS@
 LIBFFI_CFLAGS = @LIBFFI_CFLAGS@
 LIBFFI_LIBS = @LIBFFI_LIBS@
@@ -987,8 +988,13 @@ stamps/bootstrap-directory-ecj.stamp:
 	if test -d $(SYSTEM_GCJ_DIR); \
 	then \
 	  mkdir -p bootstrap/ecj/jre/lib; \
-	  ln -sf $(SYSTEM_GCJ_DIR)/jre/lib/$(INSTALL_ARCH_DIR) \
-	    bootstrap/ecj/jre/lib/; \
+	  ln -sf $(SYSTEM_GCJ_DIR)/jre/lib/$(JRE_ARCH_DIR) \
+	    bootstrap/ecj/jre/lib/; \
+	  if ! test -d bootstrap/ecj/jre/lib/$(INSTALL_ARCH_DIR); \
+	  then \
+	     ln -sf ./$(JRE_ARCH_DIR) \
+	       bootstrap/ecj/jre/lib/$(INSTALL_ARCH_DIR); \
+	  fi; \
 	  mkdir -p bootstrap/ecj/include; \
 	  for i in $(SYSTEM_GCJ_DIR)/include/*; do \
 	    test -r $$i | continue; \

java-1.6.0-openjdk-sparc64-linux.patch:

--- NEW FILE java-1.6.0-openjdk-sparc64-linux.patch ---
diff -up icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/sparcv9.make
--- icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/sparcv9.make.BAD	2008-05-29 15:48:44.000000000 -0400
+++ icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/sparcv9.make	2008-05-29 15:48:39.000000000 -0400
@@ -0,0 +1,27 @@
+#
+# Copyright 1999-2005 Sun Microsystems, Inc.  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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#  
+#
+
+# TLS helper, assembled from .s file
+# Not included in includeDB because it has no dependencies
+Obj_Files += linux_sparc.o
diff -up icedtea6-1.2/openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD icedtea6-1.2/openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp
--- icedtea6-1.2/openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp.BAD	2008-05-29 16:25:10.000000000 -0400
+++ icedtea6-1.2/openjdk/hotspot/src/cpu/sparc/vm/c1_LIRGenerator_sparc.cpp	2008-05-29 16:32:11.000000000 -0400
@@ -225,7 +225,7 @@ LIR_Address* LIRGenerator::emit_array_ad
 
 void LIRGenerator::increment_counter(address counter, int step) {
   LIR_Opr pointer = new_register(T_INT);
-  __ move(LIR_OprFact::intConst((int)counter), pointer);
+  __ move(LIR_OprFact::intConst((int)*counter), pointer);
   LIR_Address* addr = new LIR_Address(pointer, 0, T_INT);
   increment_counter(addr, step);
 }
@@ -1106,20 +1106,12 @@ void LIRGenerator::trace_block_entry(Blo
 
 void LIRGenerator::volatile_field_store(LIR_Opr value, LIR_Address* address,
                                         CodeEmitInfo* info) {
-#ifdef _LP64
-  __ store_mem_reg(value, address, info);
-#else
   __ volatile_store_mem_reg(value, address, info);
-#endif
 }
 
 void LIRGenerator::volatile_field_load(LIR_Address* address, LIR_Opr result,
                                        CodeEmitInfo* info) {
-#ifdef _LP64
-  __ load_mem_reg(address, result, info);
-#else
   __ volatile_load_mem_reg(address, result, info);
-#endif
 }
 
 
diff -up icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/defs.make.BAD icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/defs.make
--- icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/defs.make.BAD	2008-05-30 07:03:37.000000000 -0400
+++ icedtea6-1.2/openjdk/hotspot/build/linux/makefiles/defs.make	2008-05-30 07:03:45.000000000 -0400
@@ -58,8 +58,8 @@ ifeq ($(ARCH), ia64)
   HS_ARCH         = ia64
 endif
 
-# sparc
-ifneq (,$(filter $(ARCH), sparc sparc64))
+# sparc64
+ifeq ($(ARCH), sparc64)
   ifeq ($(ARCH_DATA_MODEL), 64)
     ARCH_DATA_MODEL  = 64
     MAKE_ARGS        += LP64=1
@@ -73,6 +73,14 @@ ifneq (,$(filter $(ARCH), sparc sparc64)
   HS_ARCH            = sparc
 endif
 
+# sparc
+ifeq ($(ARCH), sparc)
+  ARCH_DATA_MODEL  = 32
+  PLATFORM         = linux-sparc
+  VM_PLATFORM      = linux_sparc
+  HS_ARCH          = sparc
+endif
+
 # x86_64
 ifeq ($(ARCH), x86_64) 
   ifeq ($(ARCH_DATA_MODEL), 64)


Index: java-1.6.0-openjdk.spec
===================================================================
RCS file: /cvs/pkgs/rpms/java-1.6.0-openjdk/F-9/java-1.6.0-openjdk.spec,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- java-1.6.0-openjdk.spec	31 May 2008 15:12:09 -0000	1.46
+++ java-1.6.0-openjdk.spec	8 Jun 2008 11:54:49 -0000	1.47
@@ -41,8 +41,20 @@
 %define archbuild ia64
 %define archinstall ia64
 %else
+# 32 bit sparc, optimized for v9
+%ifarch sparcv9
+%define archbuild sparc
+%define archinstall sparc
+%else
+# 64 bit sparc
+%ifarch sparc64
+%define archbuild sparcv9
+%define archinstall sparcv9
+%else
 %define archbuild zero
 %define archinstall zero
+%endif 
+%endif
 %endif
 %endif
 %endif
@@ -111,7 +123,7 @@
 
 Name:    java-%{javaver}-%{origin}
 Version: %{javaver}.%{buildver}
-Release: 0.15.%{openjdkver}%{?dist}
+Release: 0.16.%{openjdkver}%{?dist}
 # java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons,
 # and this change was brought into RHEL-4.  java-1.5.0-ibm packages
 # also included the epoch in their virtual provides.  This created a
@@ -141,6 +153,10 @@
 # applications.
 Patch0:   java-1.6.0-openjdk-optflags.patch
 Patch1:   java-1.6.0-openjdk-java-access-bridge-tck.patch
+Patch2:   java-1.6.0-openjdk-sparc-trapsfix.patch
+Patch3:   java-1.6.0-openjdk-sparc64-linux.patch
+Patch4:   java-1.6.0-openjdk-sparc-ptracefix.patch
+Patch5:   java-1.6.0-openjdk-sparc64-INSTALL_ARCH_DIR.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -335,17 +351,24 @@
 %setup -q -n icedtea6-%{icedteaver} -T -D -a 6
 %setup -q -n icedtea6-%{icedteaver} -T -D -a 2
 %patch0
+%patch5 -p1 -b .sparc64
 cp %{SOURCE4} .
 cp %{SOURCE5} .
 cp %{SOURCE7} .
 
 %build
 # Build IcedTea and OpenJDK.
+%ifarch sparc64
+export ARCH_DATA_MODEL=64
+%endif
 ./configure %{icedteaopt} --with-openjdk-src-zip=%{SOURCE1}
 %if %{gcjbootstrap}
 make stamps/patch-ecj.stamp
 %endif
 make stamps/patch.stamp
+patch -l -p1 < %{PATCH2}
+patch -l -p1 < %{PATCH3}
+patch -l -p1 < %{PATCH4}
 make
 
 # Build cacerts file.
@@ -876,6 +899,9 @@
 %{_jvmdir}/%{jredir}/lib/%{archinstall}/gcjwebplugin.so
 
 %changelog
+* Sat Jun  7 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 1:1.6.0-0.16.b09
+- enable sparc/sparc64 builds
+
 * Sat May 31 2008 Thomas Fitzsimmons <fitzsim at redhat.com> - 1:1.6.0.0-0.15.b09
 - Fix keytool location passed to generate-cacerts.pl.
 




More information about the fedora-extras-commits mailing list