Date: 22 Nov 2002 10:20:12 +0100 From: "Georg-W. Koltermann" <g.w.k@web.de> To: Bill Huey <billh@gnuppy.monkey.org> Cc: freebsd-java@FreeBSD.ORG Subject: Re: [SUCCESS] Trying to compile HotSpot on 4.7-STABLE -- with patch Message-ID: <1037956813.417.12.camel@hunter.muc.macsch.com> In-Reply-To: <1037901021.81842.163.camel@hunter.muc.macsch.com> References: <1037283323.18267.30.camel@hunter.muc.macsch.com> <20021115003621.GA3359@gnuppy.monkey.org> <1037615069.439.27.camel@hunter.muc.macsch.com> <20021118105502.GA3955@gnuppy.monkey.org> <1037901021.81842.163.camel@hunter.muc.macsch.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
> ...
> I'll attach my patch. It does the following things:
Oops, here is the patch now. Note that in order to actually use
hotspot, you must call it as "java -hotspot" and also edit
jdk1.3.1/jre/lib/jvm.cfg to move "-classic" to the bottom again.
I couldn't figure out how to force hotspot when -classic is the default
in jvm.cfg.
--
Georg.
[-- Attachment #2 --]
diff -urN common/Defs-bsd.gmk common/Defs-bsd.gmk
--- common/Defs-bsd.gmk Thu Nov 21 14:35:47 2002
+++ common/Defs-bsd.gmk Mon Nov 18 15:24:27 2002
@@ -32,9 +32,9 @@
AR = $(USRBIN_PATH)ar
AS = $(USRBIN_PATH)as
CAT = $(UNIXCOMMAND_PATH)cat
-CC = $(COMPILER_PATH)gcc
-CPP = $(COMPILER_PATH)gcc -E
-CXX = $(COMPILER_PATH)g++
+CC = gcc32
+CPP = gcc32 -E
+CXX = g++32
CD = cd # intrinsic unix command
CHMOD = $(UNIXCOMMAND_PATH)chmod
CMP = $(USRBIN_PATH)cmp
diff -urN ../src/solaris/bin/java_wrapper_bsd.sh ../src/solaris/bin/java_wrapper_bsd.sh
--- ../src/solaris/bin/java_wrapper_bsd.sh Thu Nov 21 14:35:46 2002
+++ ../src/solaris/bin/java_wrapper_bsd.sh Thu Nov 21 16:38:40 2002
@@ -92,10 +92,10 @@
ttype=native_threads
shift 1
else
- if [ -d ${jre}/lib/${proc}/hotspot ]; then
- vmtype=hotspot
- ttype=native_threads
- else
+## if [ -d ${jre}/lib/${proc}/hotspot ]; then
+## vmtype=hotspot
+## ttype=native_threads
+## else
vmtype=classic
if [ ${THREADS_FLAG:-${DEFAULT_THREADS_FLAG}} = native ]
then
@@ -103,7 +103,7 @@
else
ttype=green_threads
fi
- fi
+## fi
fi
fi
fi
diff -urN ../src/solaris/hpi/native_threads/src/threads_bsd.c ../src/solaris/hpi/native_threads/src/threads_bsd.c
--- ../src/solaris/hpi/native_threads/src/threads_bsd.c Thu Nov 21 14:35:46 2002
+++ ../src/solaris/hpi/native_threads/src/threads_bsd.c Wed Nov 20 13:53:54 2002
@@ -284,6 +284,7 @@
"susp boundless"
};
+enum pthread_susp { a_one, a_two, a_three }; /* gwk, dummy */
char *getSuspendStateString(enum pthread_susp suspendState)
{
if (suspendState < ANALRETENTIVE)
@@ -292,7 +293,7 @@
return &SuspendList[ANALRETENTIVE-1][0];
}
-#define SATAN (21 + 1) /* for the error string at the end of the list */
+#define SATAN (22 + 1) /* for the error string at the end of the list */
char SignalList [SATAN][16]
=
@@ -318,7 +319,8 @@
"PS_DEAD",
"PS_DEADLCK",
"PS_STATE_MAX",
- "PS_REQUEST_WAITING_SUSPENDED",
+/* "PS_REQUEST_WAITING_SUSPENDED", gwk */
+ "PS_REQUEST_WSUS",
"boundless"
};
@@ -527,6 +529,7 @@
if (thread->state != PS_SUSPENDED)
dumpThreadLogStates(thread);
+#if 0 /* gwk */
switch ((int)thread->ctxtype)
{
case CTX_JB_NOSIG: /* 0) jmp_buf context without signal mask for blocking IO, etc... */
@@ -551,6 +554,7 @@
#endif
break;
}
+#endif /* gwk */
#ifdef DEBUG_BSD_NATIVE_THREADS
TermFailed:
diff -urN ../../hotspot1.3.1/build/linux/makefiles/gcc32.make ../../hotspot1.3.1/build/linux/makefiles/gcc32.make
--- ../../hotspot1.3.1/build/linux/makefiles/gcc32.make Thu Jan 1 01:00:00 1970
+++ ../../hotspot1.3.1/build/linux/makefiles/gcc32.make Wed Nov 20 14:22:40 2002
@@ -0,0 +1,131 @@
+
+# put the *.o files in the a.out, not the shared library
+LINK_INTO = $(LINK_INTO/$(VERSION))
+LINK_INTO/debug = AOUT
+#LINK_INTO/optimized = AOUT
+LINK_INTO/optimized = LIBJVM
+
+# apply this setting to link into the shared library even in the debug version:
+LINK_INTO = LIBJVM
+
+# If MAKE_OPTO is null, then we will compile with the -DOPTO.
+# That switch, despite its name, has the effect of __disabling__ OPTO.
+$(MAKE_OPTO)CFLAGS += -DOPTO
+
+#CFLAGS += -v
+
+# The flags to use for an Optimized g++ build
+#OPT_CFLAGS += -O3
+
+OPT_CFLAGS += -O0
+
+CFLAGS += -fPIC
+CFLAGS += -Winline
+CFLAGS += -fwritable-strings
+CFLAGS += -fno-rtti
+CFLAGS += -fhandle-exceptions
+CFLAGS += -D__STDC__=1 -D_LARGEFILE64_SOURCE -DTEMPLATE_TABLE_BUG
+CFLAGS += -D__GNU__ -D_REENTRANT
+CFLAGS += -fcheck-new
+
+#--billh
+CFLAGS += -D__FreeBSD__
+#-D__GNUC__
+
+# Set GCC_SAVE_TEMPS=-save-temps to keep temporary files (.ii, .s).
+CFLAGS += $(GCC_SAVE_TEMPS)
+
+OPT_CFLAGS += -O0
+# -O1
+#OPT_CFLAGS += -fdefer-pop
+OPT_CFLAGS += -fthread-jumps
+OPT_CFLAGS += -fdelayed-branch
+OPT_CFLAGS += -fomit-frame-pointer
+OPT_CFLAGS += -fguess-branch-probability
+OPT_CFLAGS += -fcprop-registers
+# END
+
+OPT_CFLAGS += -ffloat-store
+OPT_CFLAGS += -fno-default-inline
+OPT_CFLAGS += -fno-defer-pop
+#bad, causes abort()
+#OPT_CFLAGS += -ftrapv
+OPT_CFLAGS += -fno-inline
+OPT_CFLAGS += -fkeep-static-consts
+OPT_CFLAGS += -fmerge-constants
+OPT_CFLAGS += -fmerge-all-constants
+OPT_CFLAGS += -fno-function-cse
+OPT_CFLAGS += -ffast-math
+# END
+
+# -O2
+OPT_CFLAGS += -foptimize-sibling-calls
+OPT_CFLAGS += -fcse-follow-jumps
+OPT_CFLAGS += -fcse-skip-blocks
+OPT_CFLAGS += -fgcse-sm
+OPT_CFLAGS += -fgcse-lm
+OPT_CFLAGS += -fgcse
+
+OPT_CFLAGS += -fexpensive-optimizations
+OPT_CFLAGS += -fstrength-reduce
+OPT_CFLAGS += -frerun-cse-after-loop
+OPT_CFLAGS += -frerun-loop-opt
+OPT_CFLAGS += -fcaller-saves
+OPT_CFLAGS += -fforce-addr
+OPT_CFLAGS += -fforce-mem
+OPT_CFLAGS += -fpeephole2
+##
+OPT_CFLAGS += -fschedule-insns
+OPT_CFLAGS += -fschedule-insns2
+##
+OPT_CFLAGS += -fregmove
+OPT_CFLAGS += -fstrict-aliasing
+OPT_CFLAGS += -fdelete-null-pointer-checks
+OPT_CFLAGS += -freorder-blocks
+# END
+
+OPT_CFLAGS += -fno-gcse
+OPT_CFLAGS += -fdata-sections
+OPT_CFLAGS += -fprefetch-loop-arrays
+OPT_CFLAGS += -fmove-all-movables
+OPT_CFLAGS += -freduce-all-givs
+OPT_CFLAGS += -fno-guess-branch-probability
+
+OPT_CFLAGS += -falign-functions
+OPT_CFLAGS += -falign-labels
+OPT_CFLAGS += -falign-loops
+OPT_CFLAGS += -falign-jumps
+
+OPT_CFLAGS += -fssa
+# END
+
+# -O3
+OPT_CFLAGS += -finline-functions
+OPT_CFLAGS += -frename-registers
+# END
+
+
+
+
+#####
+#harmless
+OPT_CFLAGS += -fmemoize-lookups
+#unneeded
+#OPT_CFLAGS += -fpeephole
+#bad
+# this creates a link error.
+#OPT_CFLAGS += -fkeep-inline-functions
+#
+OPT_CFLAGS += -funroll-loops
+OPT_CFLAGS += -funroll-all-loops
+#####
+
+# Set the environment variable HOTSPARC_HOTSPARC_GENERIC to "true"
+# to inhibit the effect of the previous line on CFLAGS.
+
+CPP = g++32
+CC = gcc32
+
+AOUT_FLAGS += -export-dynamic
+DEBUG_CFLAGS += -g
+
diff -urN ../../hotspot1.3.1/build/linux/platform_i486 ../../hotspot1.3.1/build/linux/platform_i486
--- ../../hotspot1.3.1/build/linux/platform_i486 Thu Nov 21 17:35:21 2002
+++ ../../hotspot1.3.1/build/linux/platform_i486 Wed Nov 20 14:20:54 2002
@@ -6,7 +6,7 @@
lib_arch = i386
-compiler = gcc31
+compiler = gcc32
gnu_dis_arch = i386
diff -urN ../../hotspot1.3.1/build/linux/platform_i486.gwk ../../hotspot1.3.1/build/linux/platform_i486.gwk
--- ../../hotspot1.3.1/build/linux/platform_i486.gwk Thu Jan 1 01:00:00 1970
+++ ../../hotspot1.3.1/build/linux/platform_i486.gwk Wed Nov 20 14:20:27 2002
@@ -0,0 +1,16 @@
+os_family = linux
+
+arch = i486
+
+os_arch = linux_i486
+
+lib_arch = i386
+
+compiler = gcc31
+
+gnu_dis_arch = i386
+
+sysdefs = -DLINUX -D_GNU_SOURCE -DIA32 -D_USE_PTHREAD_SPECIFIC -pthread -D_THREAD_SAFE
+
+mark_style = alignment
+
diff -urN ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp
--- ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp Thu Jan 1 01:00:00 1970
+++ ../../hotspot1.3.1/src/share/vm/utilities/globalDefinitions_gcc32.hpp Wed Nov 20 14:25:03 2002
@@ -0,0 +1,139 @@
+/*
+ * @(#)globalDefinitions_gcc.hpp 1.18 01/02/09 14:48:11
+ *
+ * Copyright 1993-2001 by Sun Microsystems, Inc.,
+ * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
+ * All rights reserved.
+ *
+ * This software is the confidential and proprietary information
+ * of Sun Microsystems, Inc. ("Confidential Information"). You
+ * shall not disclose such Confidential Information and shall use
+ * it only in accordance with the terms of the license agreement
+ * you entered into with Sun.
+ */
+
+// CopyrightVersion 1.2
+
+// This file holds compiler-dependent includes,
+// globally used constants & types, class (forward)
+// declarations and a few frequently used utility functions.
+
+# include <ctype.h>
+# include <string.h>
+# include <stdarg.h>
+# include <stddef.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <wchar.h>
+
+#ifdef SOLARIS
+# include <ieeefp.h>
+#endif
+
+# include <math.h>
+# include <time.h>
+# include <fcntl.h>
+# include <pthread.h>
+
+# include <limits.h>
+# include <errno.h>
+
+
+#ifdef LINUX
+# include <inttypes.h>
+# include <signal.h>
+# include <ucontext.h>
+# include <sys/time.h>
+
+#else
+
+// Compiler-specific primitive types
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+
+typedef signed char int8_t;
+typedef signed short int16_t;
+typedef signed int int32_t;
+typedef signed long long int64_t;
+
+#endif /*LINUX*/
+
+// <sys/trap.h> promises that the system will not use traps 16-31
+#define ST_RESERVED_FOR_USER_0 0x10
+
+// Additional Java basic types
+
+typedef unsigned char jubyte;
+typedef unsigned short jushort;
+typedef unsigned int juint;
+typedef unsigned long long julong;
+
+//----------------------------------------------------------------------------------------------------
+// Special (possibly not-portable) casts
+// Cast floats into same-size integers and vice-versa w/o changing bit-pattern
+// %%%%%% These seem like standard C++ to me--how about factoring them out? - Ungar
+
+inline jint jint_cast (jfloat x) { return *(jint* )&x; }
+inline jlong jlong_cast (jdouble x) { return *(jlong* )&x; }
+
+inline jfloat jfloat_cast (jint x) { return *(jfloat* )&x; }
+inline jdouble jdouble_cast(jlong x) { return *(jdouble*)&x; }
+
+//----------------------------------------------------------------------------------------------------
+// Constant for jlong (specifying an long long canstant is C++ compiler specific)
+
+#ifdef LINUX //-billh
+const int64_t min_jlong = 0x8000000000000000LL;
+const int64_t max_jlong = 0x7fffffffffffffffLL;
+#else
+const jlong min_jlong = 0x8000000000000000L;
+const jlong max_jlong = 0x7fffffffffffffffL;
+#endif
+
+//----------------------------------------------------------------------------------------------------
+// Debugging
+
+#define DEBUG_EXCEPTION ::abort();
+
+extern "C" void breakpoint();
+#define BREAKPOINT ::breakpoint()
+
+// checking for nanness
+
+inline int g_isnan(float f) { return isnanf(f); }
+#if defined(SOLARIS) || defined(BSD4_4)
+inline int g_isnan(double f) { return isnand(f); }
+#elif LINUX
+inline int g_isnan(double f) { return isnan(f); }
+#else
+#error "missing platform-speicfic definition here"
+#endif
+
+
+// Checking for finiteness
+
+inline int g_isfinite(jfloat f) { return finite(f); }
+inline int g_isfinite(jdouble f) { return finite(f); }
+
+
+// Wide characters
+
+inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); }
+
+
+#ifdef PRODUCT
+const int Interpreter_Code_Size = 55 * 1024;
+#else
+const int Interpreter_Code_Size = 75 * 1024;
+#endif
+
+// Portability macros
+#define PRAGMA_INTERFACE #pragma interface
+#define PRAGMA_IMPLEMENTATION #pragma implementation
+#if !defined(LINUX) && !defined(BSD4_4)
+#define PRAGMA_IMPLEMENTATION_(arg) #pragma implementation(arg)
+#endif /*LINUX*/
+#define VALUE_OBJ_CLASS_SPEC
+
diff -urN ../src/solaris/bin/jvm.cfg ../src/solaris/bin/jvm.cfg
--- ../src/solaris/bin/jvm.cfg Sun May 6 14:26:52 2001
+++ ../src/solaris/bin/jvm.cfg Thu Nov 21 18:43:54 2002
@@ -8,7 +8,7 @@
# List of JVMs that can be used as the first option to java, javac, etc.
# Order is important -- first in this list is the default JVM.
#
+-classic
-client
-hotspot
-server
--classic
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1037956813.417.12.camel>
