Update to early access build 122. okay jasper@

This commit is contained in:
kurt 2011-01-11 15:47:49 +00:00
parent cb283eb0c6
commit 5e80958cdb
191 changed files with 4261 additions and 2303 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.39 2010/11/27 11:54:53 espie Exp $
# $OpenBSD: Makefile,v 1.40 2011/01/11 15:47:49 kurt Exp $
SHARED_ONLY= Yes
ONLY_FOR_ARCHS= i386 amd64
@ -6,14 +6,21 @@ ONLY_FOR_ARCHS= i386 amd64
COMMENT-main= Java2(TM) SE Dev Kit v${V} Early Access ${B}
COMMENT-jre= Java2(TM) SE Runtime Environment v${V} Early Access ${B}
V= 1.7.0.00
B= b72
DISTFILES= openjdk-7-ea-src-${B}-17_sep_2009.zip \
jibx_1_1_5.zip:0
B= b122
PKGNAME= jdk-${V}
PKGNAME-main= jdk-${V}${B}
REVISION-main = 2
PKGNAME-jre= jre-${V}${B}
REVISION-jre = 2
# see openjdk/jaxp/jaxp.properties & openjdk/jaxws/jaxws.properties
# in ${WRKDIR} for names and download locations of extra distfiles
JDK_SRC= openjdk-7-ea-src-${B}-16_dec_2010.zip
JAXP_SRC= jaxp-1_4_4.zip
JAXWS_SRC= jdk7-jaxws2_2-2010_08_19.zip
JAF_SRC= jdk7-jaf-2010_08_19.zip
DISTFILES= ${JDK_SRC} ${JAXP_SRC}:0 ${JAXWS_SRC}:1 ${JAF_SRC}:1
EXTRACT_ONLY= ${JDK_SRC}
CATEGORIES= devel/jdk java
@ -27,8 +34,13 @@ HOMEPAGE= http://openjdk.java.net/
MASTER_SITES= http://www.java.net/download/openjdk/jdk7/promoted/${B}/ \
http://openbsd.dead-parrot.de/distfiles/ \
http://www.phil.uu.nl/~lievisse/distfiles/
MASTER_SITES0= ${MASTER_SITE_SOURCEFORGE:=jibx/} \
http://distfiles.nl/
MASTER_SITES0= https://jaxp.dev.java.net/files/documents/913/152561/ \
http://icedtea.classpath.org/download/drops/ \
http://openbsd.dead-parrot.de/distfiles/ \
http://distfiles.nl/
MASTER_SITES1= http://java.net/downloads/jax-ws/JDK7/ \
http://icedtea.classpath.org/download/drops/ \
http://openbsd.dead-parrot.de/distfiles/ \
http://distfiles.nl/
@ -61,14 +73,14 @@ BUILD_DEPENDS+= devel/apache-ant \
archivers/unzip \
print/cups
MODULES= converters/libiconv
WANTLIB= X11 Xext Xi Xtst c freetype m pthread sndio stdc++ z
WANTLIB= X11 Xext Xi Xtst Xrender c freetype m pthread sndio stdc++ z
USE_GMAKE= Yes
MAKE_ENV= ALT_BOOTDIR=${ALT_BOOTDIR} \
ALT_FREETYPE_HEADERS_PATH=${X11BASE}/include \
ALT_FREETYPE_LIB_PATH=${X11BASE}/lib \
ALT_JIBX_LIBS_PATH=${WRKDIR}/jibx/lib \
ALT_DROPS_DIR=${DISTDIR} \
ALT_PACKAGE_PATH=${LOCALBASE} \
ALT_X11_PATH=${X11BASE} \
ANT_HOME=${LOCALBASE} \
@ -112,6 +124,7 @@ COPYDIRS= hotspot/agent/src/os/linux \
hotspot/src/os/linux/launcher \
hotspot/src/os/linux/vm \
hotspot/src/os_cpu/linux_x86/vm \
hotspot/src/os_cpu/linux_zero/vm \
hotspot/make/linux \
hotspot/make/linux/makefiles \
jdk/src/linux/doc/man \

View File

@ -1,10 +1,20 @@
MD5 (jibx_1_1_5.zip) = TPKb03SeWFUXse6cYgiBWA==
MD5 (openjdk-7-ea-src-b72-17_sep_2009.zip) = RicClG7zanoB4RDBjRUHrQ==
RMD160 (jibx_1_1_5.zip) = 3BhilCjejkwjDl8f6+EG0LiES50=
RMD160 (openjdk-7-ea-src-b72-17_sep_2009.zip) = VtsbXMEoynnpP9tTgtNdycLss+8=
SHA1 (jibx_1_1_5.zip) = Brcns4OQOq7pIyh9kK1MEG42L9I=
SHA1 (openjdk-7-ea-src-b72-17_sep_2009.zip) = 8PFrkz7k/rC+9B+ypgc1a7xzZsI=
SHA256 (jibx_1_1_5.zip) = Eh2+W3M4CB/78JzRF1r+XhhipjZz9GfVYOCrTCf7Pxc=
SHA256 (openjdk-7-ea-src-b72-17_sep_2009.zip) = KVyBLnNqC9JorzdlNFaldVABHahKnJyY/vZ6NMGW9B4=
SIZE (jibx_1_1_5.zip) = 6788994
SIZE (openjdk-7-ea-src-b72-17_sep_2009.zip) = 94044483
MD5 (jaxp-1_4_4.zip) = LECnWDksSr8tWfNVJA30ag==
MD5 (jdk7-jaf-2010_08_19.zip) = GNFd/XERfarbMyrwA9CCEg==
MD5 (jdk7-jaxws2_2-2010_08_19.zip) = h3XM79O0+i3eUVXsS35M6w==
MD5 (openjdk-7-ea-src-b122-16_dec_2010.zip) = mue188ReSPqHOJdEU3zJBQ==
RMD160 (jaxp-1_4_4.zip) = BeceSONiyaJxmjWaJnV5Lgc5kK8=
RMD160 (jdk7-jaf-2010_08_19.zip) = +637t4HcKqjPo4S41c1hhSLlUSg=
RMD160 (jdk7-jaxws2_2-2010_08_19.zip) = 6Wd/TPncbKOwATI+AhNQnBlkPb0=
RMD160 (openjdk-7-ea-src-b122-16_dec_2010.zip) = 8j9xg/sCj5gGpa8ffBWhCx+kgTA=
SHA1 (jaxp-1_4_4.zip) = IN7vgFtAbmyjzqzzhrcdUFYX3qo=
SHA1 (jdk7-jaf-2010_08_19.zip) = Y+qXDc8Sn7u6OaEy2Pca3Rn78fA=
SHA1 (jdk7-jaxws2_2-2010_08_19.zip) = I7N8JKCufnRshU3TJZE1XyRCG3M=
SHA1 (openjdk-7-ea-src-b122-16_dec_2010.zip) = R2qqIqc+SVA0We5xiUDvpgfI3R4=
SHA256 (jaxp-1_4_4.zip) = ELIDvsW3092PUVqeCY+Aq8MW+vl3vMIgtW7+Pcbp5ek=
SHA256 (jdk7-jaf-2010_08_19.zip) = 5q7+39u0Zz6AGVg9E0T7FiuU4bEDgsNiNk27/ViJwJ4=
SHA256 (jdk7-jaxws2_2-2010_08_19.zip) = uId6r7sVo0i6vK7k7jcvs+LqAoL4/pPTBicv0k14R94=
SHA256 (openjdk-7-ea-src-b122-16_dec_2010.zip) = H2HGuDsLDBUWa/Dkhroj0yAsoOyh+GV4TYgB5nGw+44=
SIZE (jaxp-1_4_4.zip) = 5972577
SIZE (jdk7-jaf-2010_08_19.zip) = 70613
SIZE (jdk7-jaxws2_2-2010_08_19.zip) = 5893692
SIZE (openjdk-7-ea-src-b122-16_dec_2010.zip) = 85656129

View File

@ -1,128 +0,0 @@
$OpenBSD: patch-corba_make_common_Defs-bsd_gmk,v 1.3 2009/06/10 19:01:09 kurt Exp $
--- corba/make/common/Defs-bsd.gmk.orig Sat May 30 11:21:13 2009
+++ corba/make/common/Defs-bsd.gmk Tue Jun 2 10:41:33 2009
@@ -40,18 +40,12 @@
# Get shared JDK settings
include $(BUILDDIR)/common/shared/Defs.gmk
-# Part of INCREMENTAL_BUILD mechanism.
-# Compiler emits things like: path/file.o: file.h
-# We want something like: relative_path/file.o relative_path/file.d: file.h
-CC_DEPEND = -MM
-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
-
ifndef PLATFORM_SRC
PLATFORM_SRC = $(TOPDIR)/src/solaris
endif # PLATFORM_SRC
# platform specific include files
-PLATFORM_INCLUDE_NAME = $(PLATFORM)
+PLATFORM_INCLUDE_NAME = $(OS_NAME)
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# suffix used for make dependencies files.
@@ -92,8 +86,14 @@ endif
# We need this frame pointer to make it easy to walk the stacks.
# This should be the default on X86, but ia64 and amd64 may not have this
# as the default.
-CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64 += -m64
+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586 += -m32
+ifeq ($(OS_VENDOR),Apple)
+ # 16-byte stack re-alignment on 32-bit Darwin
+ CFLAGS_REQUIRED_i586 += -mstackrealign
+endif
CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
@@ -168,7 +168,7 @@ ifeq ($(FASTDEBUG), true)
CXXFLAGS_DBG += $(CC_LOWER_OPT)
endif
-CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \
+CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
ifeq ($(ARCH_DATA_MODEL), 64)
@@ -178,33 +178,15 @@ endif
CPPFLAGS_OPT =
CPPFLAGS_DBG = -DDEBUG
-ifdef LIBRARY
- # Libraries need to locate other libraries at runtime, and you can tell
- # a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
- # buried inside the .so. The $ORIGIN says to look relative to where
- # the library itself is and it can be followed with relative paths from
- # that. By default we always look in $ORIGIN, optionally we add relative
- # paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
- # On Bsd we add a flag -z origin, not sure if this is necessary, but
- # doesn't seem to hurt.
- # The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
- # Try: 'readelf -d lib*.so' to see these settings in a library.
- #
- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
-endif
-
-EXTRA_LIBS += -lc
-
-LDFLAGS_DEFS_OPTION = -z defs
-LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
-
#
# -L paths for finding and -ljava
#
-LDFLAGS_OPT = -Xlinker -O1
LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
+
+ifneq ($(OS_VENDOR), Apple)
+LDFLAGS_OPT = -Xlinker -O1
LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
+endif
#
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
@@ -235,13 +217,9 @@ endif
#
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
-#
-# Support for Quantify.
-#
-ifdef QUANTIFY
-QUANTIFY_CMD = quantify
-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+# Darwin does not support linker map files.
+ifeq ($(OS_VENDOR), Apple)
+LDNOMAP=true
endif
#
@@ -270,7 +248,9 @@ override HAVE_ALTZONE = false
override HAVE_FILIOH = false
override HAVE_GETHRTIME = false
override HAVE_GETHRVTIME = false
+ifeq ($(OS_VENDOR),Apple)
override HAVE_SIGIGNORE = true
+endif
override LEX_LIBRARY = -lfl
ifeq ($(STATIC_CXX),true)
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
@@ -282,12 +262,8 @@ override LIBSOCKET =
override LIBTHREAD =
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
-override OPENWIN_HOME = /usr/X11R6
-ifeq ($(ARCH), amd64)
-override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
-else
+override OPENWIN_HOME = $(X11_PATH)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib
-endif
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-corba_make_common_Defs-linux_gmk,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- corba/make/common/Defs-linux.gmk.orig Thu May 14 23:22:22 2009
+++ corba/make/common/Defs-linux.gmk Thu May 14 23:15:04 2009
@@ -282,7 +282,7 @@ override LIBSOCKET =
override LIBTHREAD =
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
-override OPENWIN_HOME = /usr/X11R6
+override OPENWIN_HOME = $(X11_PATH)
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-corba_make_common_Defs_gmk,v 1.3 2009/05/23 03:03:24 kurt Exp $
--- corba/make/common/Defs.gmk.orig Fri May 8 03:29:39 2009
+++ corba/make/common/Defs.gmk Thu May 14 23:15:04 2009
$OpenBSD: patch-corba_make_common_Defs_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- corba/make/common/Defs.gmk.orig Thu Oct 28 20:16:47 2010
+++ corba/make/common/Defs.gmk Mon Nov 1 13:15:37 2010
@@ -53,6 +53,28 @@ endif
_OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH)
@ -30,13 +30,3 @@ $OpenBSD: patch-corba_make_common_Defs_gmk,v 1.3 2009/05/23 03:03:24 kurt Exp $
#
# Get platform definitions
#
@@ -97,6 +119,9 @@ ifdef PROGRAM
LDLIBS_COMMON = -ldl
endif
+ ifeq ($(PLATFORM), bsd)
+ LDLIBS_COMMON = -pthread
+ endif
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-corba_make_common_Mapfile-vers_gmk,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- corba/make/common/Mapfile-vers.gmk.orig Tue Feb 26 21:48:18 2008
+++ corba/make/common/Mapfile-vers.gmk Tue Feb 26 21:49:03 2008
@@ -77,7 +77,7 @@ endif
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?

View File

@ -1,27 +0,0 @@
$OpenBSD: patch-corba_make_common_shared_Compiler-gcc_gmk,v 1.3 2009/10/07 01:53:54 kurt Exp $
--- corba/make/common/shared/Compiler-gcc.gmk.orig Thu Sep 17 03:47:23 2009
+++ corba/make/common/shared/Compiler-gcc.gmk Sun Sep 27 10:51:12 2009
@@ -94,6 +94,23 @@ ifeq ($(PLATFORM), linux)
endif
+ifeq ($(PLATFORM), bsd)
+ # Settings specific to BSD
+ CC = $(COMPILER_PATH)gcc
+ CPP = $(COMPILER_PATH)gcc -E
+ CXX = $(COMPILER_PATH)g++
+ REQUIRED_CC_VER = 3.2
+
+# Option used to create a shared library
+ifeq ($(OS_VENDOR), Apple)
+ SHARED_LIBRARY_FLAG = -dynamiclib
+else
+ SHARED_LIBRARY_FLAG = -shared
+endif
+
+ SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 )
+endif
+
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-corba_make_common_shared_Compiler_gmk,v 1.2 2009/05/23 03:03:24 kurt Exp $
--- corba/make/common/shared/Compiler.gmk.orig Fri May 8 03:29:39 2009
+++ corba/make/common/shared/Compiler.gmk Thu May 14 23:15:23 2009
@@ -42,6 +42,11 @@ ifeq ($(PLATFORM), linux)
override CC_VERSION = gcc
endif
+# BSD uses GNU compilers by default
+ifeq ($(PLATFORM), bsd)
+ override CC_VERSION = gcc
+endif
+
# Get the compiler specific settings
include $(BUILDDIR)/common/shared/Compiler-$(CC_VERSION).gmk

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.3 2009/01/16 16:49:29 kurt Exp $
--- corba/make/common/shared/Defs-bsd.gmk.orig Sun Jan 11 21:36:06 2009
+++ corba/make/common/shared/Defs-bsd.gmk Sun Jan 11 21:41:48 2009
$OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- corba/make/common/shared/Defs-bsd.gmk.orig Mon Nov 1 13:15:32 2010
+++ corba/make/common/shared/Defs-bsd.gmk Mon Nov 1 13:16:09 2010
@@ -54,7 +54,7 @@ $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && p
endef
@ -10,7 +10,7 @@ $OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.3 2009/01/16 16:49:29
# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
# NOTE: Must end with / so that it could be empty, allowing PATH usage.
@@ -107,7 +107,7 @@ endif
@@ -99,7 +99,7 @@ endif
ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
else

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:29 kurt Exp $
--- corba/make/common/shared/Defs-utils.gmk.orig Fri Dec 19 03:41:17 2008
+++ corba/make/common/shared/Defs-utils.gmk Wed Jan 14 12:26:56 2009
$OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- corba/make/common/shared/Defs-utils.gmk.orig Fri Aug 13 03:17:47 2010
+++ corba/make/common/shared/Defs-utils.gmk Mon Oct 25 18:38:15 2010
@@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux)
UTILS_DEVTOOL_PATH=$(USRBIN_PATH)
endif
@ -15,7 +15,7 @@ $OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:2
ifeq ($(PLATFORM),solaris)
UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH)
@@ -199,3 +206,32 @@ ifeq ($(PLATFORM),solaris)
@@ -198,3 +205,34 @@ ifeq ($(PLATFORM),solaris)
ECHO = /usr/bin/echo
endif
@ -43,7 +43,9 @@ $OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:2
+ else
+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip
+ endif
+ ifneq ($(OS_VENDOR), OpenBSD)
+ ifeq ($(OS_VENDOR), OpenBSD)
+ NAWK = $(UTILS_USR_BIN_PATH)awk
+ else
+ CPIO = $(UTILS_USR_BIN_PATH)cpio
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $
--- corba/make/common/shared/Platform.gmk.orig Thu Sep 17 03:47:23 2009
+++ corba/make/common/shared/Platform.gmk Mon Oct 5 14:53:53 2009
@@ -262,6 +262,89 @@ ifeq ($(SYSTEM_UNAME), Linux)
$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.6 2011/01/11 15:47:49 kurt Exp $
--- corba/make/common/shared/Platform.gmk.orig Thu Oct 28 20:16:47 2010
+++ corba/make/common/shared/Platform.gmk Mon Nov 1 13:16:10 2010
@@ -231,6 +231,101 @@ ifeq ($(SYSTEM_UNAME), Linux)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2)
endif
@ -9,14 +9,14 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54
+ PLATFORM = bsd
+ OS_NAME = freebsd
+ OS_VENDOR = FreeBSD
+ REQUIRED_OS_VERSION = 6.0
+ REQUIRED_OS_VERSION = 6.0
+endif
+
+ifeq ($(SYSTEM_UNAME), Darwin)
+ PLATFORM = bsd
+ OS_NAME = darwin
+ OS_VENDOR = Apple
+ REQUIRED_OS_VERSION = 8.0
+ REQUIRED_OS_VERSION = 8.0
+endif
+
+ifeq ($(SYSTEM_UNAME), NetBSD)
@ -42,6 +42,18 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54
+ i[3-9]86) \
+ echo i586 \
+ ;; \
+ sparc64) \
+ echo sparcv9 \
+ ;; \
+ sparc*) \
+ echo sparc \
+ ;; \
+ x86_64) \
+ echo amd64 \
+ ;; \
+ "Power Macintosh") \
+ echo ppc \
+ ;; \
+ *) \
+ echo $(mach) \
+ ;; \
@ -58,8 +70,8 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54
+ endif
+ endif
+
+ # i586 and sparc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc))
+ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc ppc))
+ ARCH_DATA_MODEL=32
+ else
+ ARCH_DATA_MODEL=64
@ -91,10 +103,10 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
@@ -411,6 +494,18 @@ else
LOW_MEMORY_MACHINE := true
MAX_VM_MEMORY := 384
MIN_VM_MEMORY := 128
@@ -379,6 +474,18 @@ ifndef MAX_VM_MEMORY
export MIN_VM_MEMORY
export LOW_MEMORY_MACHINE
export MAX_VM_MEMORY
+endif
+
+# for OpenBSD/i386 limit to 736 max

View File

@ -1,22 +0,0 @@
$OpenBSD: patch-corba_make_sun_corba_core_Makefile,v 1.1 2008/03/19 18:05:43 kurt Exp $
--- corba/make/sun/corba/core/Makefile.orig Thu Nov 8 12:46:43 2007
+++ corba/make/sun/corba/core/Makefile Thu Nov 8 12:48:02 2007
@@ -53,10 +53,18 @@ include $(CORBA_JMK_DIRECTORY)sun_corba.jmk
ifdef STANDALONE_CORBA_WS
# FIXUP: What is this all about?
OTHER_LDFLAGS=-L$(BOOTDIR)/jre/lib/$(ARCH) -L$(BOOTDIR)/jre/lib/$(LIBARCH)/native_threads -ljvm
+ifeq ($(PLATFORM), bsd)
+OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME)
+else
OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM)
+endif
else
OTHER_LDLIBS=$(JVMLIB)
+ifeq ($(PLATFORM), bsd)
+OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME)
+else
OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM)
+endif
endif

View File

@ -1,180 +0,0 @@
$OpenBSD: patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- corba/src/share/native/com/sun/corba/se/internal/io/ioser.c.orig Thu May 14 23:14:21 2009
+++ corba/src/share/native/com/sun/corba/se/internal/io/ioser.c Thu May 14 23:13:00 2009
@@ -24,6 +24,7 @@
*/
#include "jni.h"
+#include <stdint.h>
#include "com_sun_corba_se_internal_io_IIOPInputStream.h"
#include "com_sun_corba_se_internal_io_IIOPOutputStream.h"
@@ -643,7 +644,7 @@ JNIEXPORT jclass JNICALL Java_com_sun_corba_se_interna
JNIEXPORT jobject JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getObjectFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetObjectField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetObjectField(env, obj, (jfieldID)(intptr_t)fieldID);
}
/*
@@ -654,7 +655,7 @@ JNIEXPORT jobject JNICALL Java_com_sun_corba_se_intern
JNIEXPORT jboolean JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getBooleanFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetBooleanField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetBooleanField(env, obj, (jfieldID)(intptr_t)fieldID);
}
/*
@@ -665,7 +666,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_corba_se_inter
JNIEXPORT jbyte JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getByteFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetByteField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetByteField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -677,7 +678,7 @@ JNIEXPORT jbyte JNICALL Java_com_sun_corba_se_internal
JNIEXPORT jchar JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getCharFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetCharField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetCharField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -689,7 +690,7 @@ JNIEXPORT jchar JNICALL Java_com_sun_corba_se_internal
JNIEXPORT jshort JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getShortFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetShortField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetShortField(env, obj, (jfieldID)(intptr_t)fieldID);
}
/*
@@ -700,7 +701,7 @@ JNIEXPORT jshort JNICALL Java_com_sun_corba_se_interna
JNIEXPORT jint JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getIntFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetIntField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetIntField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -713,7 +714,7 @@ JNIEXPORT jint JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getLongFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetLongField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetLongField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -725,7 +726,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal
JNIEXPORT jfloat JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getFloatFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetFloatField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetFloatField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -737,7 +738,7 @@ JNIEXPORT jfloat JNICALL Java_com_sun_corba_se_interna
JNIEXPORT jdouble JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getDoubleFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID)
{
- return (*env)->GetDoubleField(env, obj, (jfieldID)fieldID);
+ return (*env)->GetDoubleField(env, obj, (jfieldID)(intptr_t)fieldID);
}
@@ -751,7 +752,7 @@ JNIEXPORT jdouble JNICALL Java_com_sun_corba_se_intern
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setObjectFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jobject v)
{
- (*env)->SetObjectField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetObjectField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -762,7 +763,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setBooleanFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jboolean v)
{
- (*env)->SetBooleanField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetBooleanField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -773,7 +774,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setByteFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jbyte v)
{
- (*env)->SetByteField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetByteField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -784,7 +785,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setCharFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jchar v)
{
- (*env)->SetCharField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetCharField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -795,7 +796,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setShortFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jshort v)
{
- (*env)->SetShortField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetShortField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -806,7 +807,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setIntFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jint v)
{
- (*env)->SetIntField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetIntField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -817,7 +818,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setLongFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jlong v)
{
- (*env)->SetLongField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetLongField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -828,7 +829,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setFloatFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jfloat v)
{
- (*env)->SetFloatField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetFloatField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -839,7 +840,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_
JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setDoubleFieldOpt
(JNIEnv *env, jobject this, jobject obj, jlong fieldID, jdouble v)
{
- (*env)->SetDoubleField(env, obj, (jfieldID)fieldID, v);
+ (*env)->SetDoubleField(env, obj, (jfieldID)(intptr_t)fieldID, v);
}
/*
@@ -858,5 +859,5 @@ JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal
(*env)->ReleaseStringUTFChars(env, fieldName, strFieldName);
(*env)->ReleaseStringUTFChars(env, fieldSig, strFieldSig);
- return (jlong)fieldID;
+ return (jlong)(intptr_t)fieldID;
}

View File

@ -1,12 +1,8 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_Makefile,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/agent/src/os/bsd/Makefile.orig Tue Jun 2 13:00:17 2009
+++ hotspot/agent/src/os/bsd/Makefile Tue Jun 2 13:01:26 2009
@@ -19,10 +19,10 @@
# 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.
-#
+#
$OpenBSD: patch-hotspot_agent_src_os_bsd_Makefile,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/Makefile.orig Mon Oct 25 18:02:17 2010
+++ hotspot/agent/src/os/bsd/Makefile Mon Oct 25 18:40:03 2010
@@ -22,7 +22,7 @@
#
#
-ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi )

View File

@ -1,7 +1,12 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_libproc_impl_c,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/agent/src/os/bsd/libproc_impl.c.orig Tue Jun 2 13:04:27 2009
+++ hotspot/agent/src/os/bsd/libproc_impl.c Tue Jun 2 13:04:34 2009
@@ -178,6 +178,9 @@ lib_info* add_lib_info_fd(struct ps_prochandle* ph, co
$OpenBSD: patch-hotspot_agent_src_os_bsd_libproc_impl_c,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/libproc_impl.c.orig Mon Oct 25 18:02:17 2010
+++ hotspot/agent/src/os/bsd/libproc_impl.c Mon Oct 25 18:40:51 2010
@@ -174,10 +174,13 @@ lib_info* add_lib_info_fd(struct ps_prochandle* ph, co
return NULL;
}
- newlib->symtab = build_symtab(newlib->fd, libname);
+ newlib->symtab = build_symtab(newlib->fd);
if (newlib->symtab == NULL) {
print_debug("symbol table build failed for %s\n", newlib->name);
}

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/agent/src/os/bsd/ps_core.c.orig Tue Jun 2 13:06:41 2009
+++ hotspot/agent/src/os/bsd/ps_core.c Tue Jun 2 13:21:01 2009
$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/ps_core.c.orig Mon Oct 25 18:02:17 2010
+++ hotspot/agent/src/os/bsd/ps_core.c Mon Oct 25 18:42:03 2010
@@ -142,6 +142,7 @@ static map_info* add_class_share_map_info(struct ps_pr
map->next = ph->core->class_share_maps;
@ -264,7 +264,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur
if (read_interp_segments(ph) != true)
return false;
@@ -870,14 +880,14 @@ static bool read_shared_lib_info(struct ps_prochandle*
@@ -870,26 +880,23 @@ static bool read_shared_lib_info(struct ps_prochandle*
// address mentioned in shared object and the actual virtual base where runtime
// linker loaded it. We use "base diff" in read_lib_segments call below.
@ -281,7 +281,21 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur
&lib_name_addr, sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read address of shared object name\n");
return false;
@@ -921,7 +931,7 @@ static bool read_shared_lib_info(struct ps_prochandle*
}
// read name of the shared object
- lib_name[0] = '\0';
- if (lib_name_addr != 0 &&
- read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
+ if (read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) {
print_debug("can't read shared object name\n");
- // don't let failure to read the name stop opening the file. If something is really wrong
- // it will fail later.
+ return false;
}
if (lib_name[0] != '\0') {
@@ -924,7 +931,7 @@ static bool read_shared_lib_info(struct ps_prochandle*
}
// read next link_map address
@ -290,7 +304,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur
&link_map_addr, sizeof(uintptr_t)) != PS_OK) {
print_debug("can't read next link in link_map\n");
return false;
@@ -935,7 +945,6 @@ static bool read_shared_lib_info(struct ps_prochandle*
@@ -938,7 +945,6 @@ static bool read_shared_lib_info(struct ps_prochandle*
struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) {
ELF_EHDR core_ehdr;
ELF_EHDR exec_ehdr;

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/agent/src/os/bsd/ps_proc.c.orig Tue Jun 2 13:07:59 2009
+++ hotspot/agent/src/os/bsd/ps_proc.c Tue Jun 2 13:20:36 2009
$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/ps_proc.c.orig Mon Nov 1 13:14:52 2010
+++ hotspot/agent/src/os/bsd/ps_proc.c Mon Nov 1 13:31:53 2010
@@ -22,21 +22,23 @@
*
*/
@ -33,7 +33,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur
// This file has the libproc implementation specific to live process
// For core files, refer to ps_core.c
@@ -50,251 +52,359 @@ static inline uintptr_t align(uintptr_t ptr, size_t si
@@ -50,255 +52,359 @@ static inline uintptr_t align(uintptr_t ptr, size_t si
// read "size" bytes of data from "addr" within the target process.
// unlike the standard ptrace() function, process_read_data() can handle
@ -408,7 +408,11 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur
- if (nwords > 5 && find_lib(ph, word[5]) == false) {
- intptr_t base;
- lib_info* lib;
-#ifdef _LP64
- sscanf(word[0], "%lx", &base);
-#else
- sscanf(word[0], "%x", &base);
-#endif
- if ((lib = add_lib_info(ph, word[5], (uintptr_t)base)) == NULL)
+ for (i = 0; i < cnt; i++) {
+ kve = &freep[i];
@ -533,7 +537,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur
};
// attach to the process. One and only one exposed stuff
@@ -321,21 +431,14 @@ struct ps_prochandle* Pgrab(pid_t pid) {
@@ -325,21 +431,14 @@ struct ps_prochandle* Pgrab(pid_t pid) {
// read library info and symbol tables, must do this before attaching threads,
// as the symbols in the pthread library will be used to figure out
// the list of threads within the same process.

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/agent/src/os/bsd/symtab.c.orig Tue Jun 2 13:08:54 2009
+++ hotspot/agent/src/os/bsd/symtab.c Tue Jun 2 13:09:00 2009
$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/symtab.c.orig Mon Oct 25 18:02:17 2010
+++ hotspot/agent/src/os/bsd/symtab.c Mon Oct 25 18:42:22 2010
@@ -23,10 +23,10 @@
*/
@ -13,30 +13,303 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt
#include "symtab.h"
#include "salibelf.h"
@@ -56,7 +56,6 @@ typedef struct symtab {
// read symbol table from given fd.
struct symtab* build_symtab(int fd) {
@@ -53,276 +53,9 @@ typedef struct symtab {
struct hsearch_data *hash_table;
} symtab_t;
-
-// Directory that contains global debuginfo files. In theory it
-// should be possible to change this, but in a Java environment there
-// is no obvious place to put a user interface to do it. Maybe this
-// could be set with an environment variable.
-static const char debug_file_directory[] = "/usr/lib/debug";
-
-/* The CRC used in gnu_debuglink, retrieved from
- http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files. */
-unsigned int gnu_debuglink_crc32 (unsigned int crc,
- unsigned char *buf, size_t len)
-{
- static const unsigned int crc32_table[256] =
- {
- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419,
- 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4,
- 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07,
- 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de,
- 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856,
- 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9,
- 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4,
- 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b,
- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3,
- 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a,
- 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599,
- 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924,
- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190,
- 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f,
- 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e,
- 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01,
- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed,
- 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950,
- 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3,
- 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2,
- 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a,
- 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5,
- 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010,
- 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f,
- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17,
- 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6,
- 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615,
- 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8,
- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344,
- 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb,
- 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a,
- 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5,
- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1,
- 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c,
- 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef,
- 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236,
- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe,
- 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31,
- 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c,
- 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713,
- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b,
- 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242,
- 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1,
- 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c,
- 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278,
- 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7,
- 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66,
- 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9,
- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605,
- 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8,
- 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b,
- 0x2d02ef8d
- };
- unsigned char *end;
-
- crc = ~crc & 0xffffffff;
- for (end = buf + len; buf < end; ++buf)
- crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8);
- return ~crc & 0xffffffff;
-}
-
-/* Open a debuginfo file and check its CRC. If it exists and the CRC
- matches return its fd. */
-static int
-open_debug_file (const char *pathname, unsigned int crc)
-{
- unsigned int file_crc = 0;
- unsigned char buffer[8 * 1024];
-
- int fd = pathmap_open(pathname);
-
- if (fd < 0)
- return -1;
-
- lseek(fd, 0, SEEK_SET);
-
- for (;;) {
- int len = read(fd, buffer, sizeof buffer);
- if (len <= 0)
- break;
- file_crc = gnu_debuglink_crc32(file_crc, buffer, len);
- }
-
- if (crc == file_crc)
- return fd;
- else {
- close(fd);
- return -1;
- }
-}
-
-/* Find an ELF section. */
-static struct elf_section *find_section_by_name(char *name,
- int fd,
- ELF_EHDR *ehdr,
- ELF_SHDR *shbuf,
- struct elf_section *scn_cache)
-{
- ELF_SHDR* cursct = NULL;
- char *strtab;
- int cnt;
-
- if (scn_cache[ehdr->e_shstrndx].c_data == NULL) {
- if ((scn_cache[ehdr->e_shstrndx].c_data
- = read_section_data(fd, ehdr, cursct)) == NULL) {
- return NULL;
- }
- }
-
- strtab = scn_cache[ehdr->e_shstrndx].c_data;
-
- for (cursct = shbuf, cnt = 0;
- cnt < ehdr->e_shnum;
- cnt++, cursct++) {
- if (strcmp(cursct->sh_name + strtab, name) == 0) {
- scn_cache[cnt].c_data = read_section_data(fd, ehdr, cursct);
- return &scn_cache[cnt];
- }
- }
-
- return NULL;
-}
-
-/* Look for a ".gnu_debuglink" section. If one exists, try to open a
- suitable debuginfo file. */
-static int open_file_from_debug_link(const char *name,
- int fd,
- ELF_EHDR *ehdr,
- ELF_SHDR *shbuf,
- struct elf_section *scn_cache)
-{
- int debug_fd;
- struct elf_section *debug_link = find_section_by_name(".gnu_debuglink", fd, ehdr,
- shbuf, scn_cache);
- if (debug_link == NULL)
- return -1;
- char *debug_filename = debug_link->c_data;
- int offset = (strlen(debug_filename) + 4) >> 2;
- static unsigned int crc;
- crc = ((unsigned int*)debug_link->c_data)[offset];
- char *debug_pathname = malloc(strlen(debug_filename)
- + strlen(name)
- + strlen(".debug/")
- + strlen(debug_file_directory)
- + 2);
- strcpy(debug_pathname, name);
- char *last_slash = strrchr(debug_pathname, '/');
- if (last_slash == NULL)
- return -1;
-
- /* Look in the same directory as the object. */
- strcpy(last_slash+1, debug_filename);
-
- debug_fd = open_debug_file(debug_pathname, crc);
- if (debug_fd >= 0) {
- free(debug_pathname);
- return debug_fd;
- }
-
- /* Look in a subdirectory named ".debug". */
- strcpy(last_slash+1, ".debug/");
- strcat(last_slash, debug_filename);
-
- debug_fd = open_debug_file(debug_pathname, crc);
- if (debug_fd >= 0) {
- free(debug_pathname);
- return debug_fd;
- }
-
- /* Look in /usr/lib/debug + the full pathname. */
- strcpy(debug_pathname, debug_file_directory);
- strcat(debug_pathname, name);
- last_slash = strrchr(debug_pathname, '/');
- strcpy(last_slash+1, debug_filename);
-
- debug_fd = open_debug_file(debug_pathname, crc);
- if (debug_fd >= 0) {
- free(debug_pathname);
- return debug_fd;
- }
-
- free(debug_pathname);
- return -1;
-}
-
-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo);
-
-/* Look for a ".gnu_debuglink" section. If one exists, try to open a
- suitable debuginfo file and read a symbol table from it. */
-static struct symtab *build_symtab_from_debug_link(const char *name,
- int fd,
- ELF_EHDR *ehdr,
- ELF_SHDR *shbuf,
- struct elf_section *scn_cache)
-{
- fd = open_file_from_debug_link(name, fd, ehdr, shbuf, scn_cache);
-
- if (fd >= 0) {
- struct symtab *symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false);
- close(fd);
- return symtab;
- }
-
- return NULL;
-}
-
-// Given a build_id, find the associated debuginfo file
-static char *
-build_id_to_debug_filename (size_t size, unsigned char *data)
-{
- char *filename, *s;
-
- filename = malloc(strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
- + 2 * size + (sizeof ".debug" - 1) + 1);
- s = filename + sprintf (filename, "%s/.build-id/", debug_file_directory);
- if (size > 0)
- {
- size--;
- s += sprintf (s, "%02x", *data++);
- }
- if (size > 0)
- *s++ = '/';
- while (size-- > 0)
- s += sprintf (s, "%02x", *data++);
- strcpy (s, ".debug");
-
- return filename;
-}
-
-// Read a build ID note. Try to open any associated debuginfo file
-// and return its symtab
-static struct symtab* build_symtab_from_build_id(Elf64_Nhdr *note)
-{
- int fd;
- struct symtab *symtab = NULL;
-
- unsigned char *bytes
- = (unsigned char*)(note+1) + note->n_namesz;
- unsigned char *filename
- = (build_id_to_debug_filename (note->n_descsz, bytes));
-
- fd = pathmap_open(filename);
- if (fd >= 0) {
- symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false);
- close(fd);
- }
- free(filename);
-
- return symtab;
-}
-
-// read symbol table from given fd. If try_debuginfo) is true, also
-// try to open an associated debuginfo file
-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo) {
+// read symbol table from given fd.
+struct symtab* build_symtab(int fd) {
ELF_EHDR ehdr;
- char *names = NULL;
struct symtab* symtab = NULL;
// Reading of elf header
@@ -65,7 +64,9 @@ struct symtab* build_symtab(int fd) {
@@ -331,8 +64,9 @@ static struct symtab* build_symtab_internal(int fd, co
ELF_SHDR* shbuf = NULL;
ELF_SHDR* cursct = NULL;
ELF_PHDR* phbuf = NULL;
- ELF_PHDR* phdr = NULL;
- int sym_section = SHT_DYNSYM;
+ int symtab_found = 0;
+ int dynsym_found = 0;
+ uint32_t symsection = SHT_SYMTAB;
uintptr_t baseaddr = (uintptr_t)-1;
@@ -90,18 +91,30 @@ struct symtab* build_symtab(int fd) {
@@ -357,23 +91,30 @@ static struct symtab* build_symtab_internal(int fd, co
for (cursct = shbuf, cnt = 0; cnt < ehdr.e_shnum; cnt++) {
scn_cache[cnt].c_shdr = cursct;
- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB) {
- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB
- || cursct->sh_type == SHT_NOTE || cursct->sh_type == SHT_DYNSYM) {
+ if (cursct->sh_type == SHT_SYMTAB ||
+ cursct->sh_type == SHT_STRTAB ||
+ cursct->sh_type == SHT_DYNSYM) {
@ -44,6 +317,10 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt
goto quit;
}
}
- if (cursct->sh_type == SHT_SYMTAB) {
- // Full symbol table available so use that
- sym_section = cursct->sh_type;
- }
+
+ if (cursct->sh_type == SHT_SYMTAB)
+ symtab_found++;
@ -60,8 +337,66 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt
for (cnt = 1; cnt < ehdr.e_shnum; cnt++) {
ELF_SHDR *shdr = scn_cache[cnt].c_shdr;
- if (shdr->sh_type == SHT_SYMTAB) {
- if (shdr->sh_type == sym_section) {
+ if (shdr->sh_type == symsection) {
ELF_SYM *syms;
int j, n, rslt;
size_t size;
@@ -435,45 +176,6 @@ static struct symtab* build_symtab_internal(int fd, co
}
}
- // Look for a separate debuginfo file.
- if (try_debuginfo) {
-
- // We prefer a debug symtab to an object's own symtab, so look in
- // the debuginfo file. We stash a copy of the old symtab in case
- // there is no debuginfo.
- struct symtab* prev_symtab = symtab;
- symtab = NULL;
-
-#ifdef NT_GNU_BUILD_ID
- // First we look for a Build ID
- for (cursct = shbuf, cnt = 0;
- symtab == NULL && cnt < ehdr.e_shnum;
- cnt++) {
- if (cursct->sh_type == SHT_NOTE) {
- Elf64_Nhdr *note = (Elf64_Nhdr *)scn_cache[cnt].c_data;
- if (note->n_type == NT_GNU_BUILD_ID) {
- symtab = build_symtab_from_build_id(note);
- }
- }
- cursct++;
- }
-#endif
-
- // Then, if that doesn't work, the debug link
- if (symtab == NULL) {
- symtab = build_symtab_from_debug_link(filename, fd, &ehdr, shbuf,
- scn_cache);
- }
-
- // If we still haven't found a symtab, use the object's own symtab.
- if (symtab != NULL) {
- if (prev_symtab != NULL)
- destroy_symtab(prev_symtab);
- } else {
- symtab = prev_symtab;
- }
- }
-
quit:
if (shbuf) free(shbuf);
if (phbuf) free(phbuf);
@@ -487,11 +189,6 @@ quit:
}
return symtab;
}
-
-struct symtab* build_symtab(int fd, const char *filename) {
- return build_symtab_internal(fd, filename, /* try_debuginfo */ true);
-}
-
void destroy_symtab(struct symtab* symtab) {
if (!symtab) return;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_h,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/agent/src/os/bsd/symtab.h.orig Mon Oct 25 18:43:18 2010
+++ hotspot/agent/src/os/bsd/symtab.h Mon Oct 25 18:43:25 2010
@@ -32,7 +32,7 @@
struct symtab;
// build symbol table for a given ELF file descriptor
-struct symtab* build_symtab(int fd, const char *filename);
+struct symtab* build_symtab(int fd);
// destroy the symbol table
void destroy_symtab(struct symtab* symtab);

View File

@ -1,31 +1,42 @@
$OpenBSD: patch-hotspot_make_Makefile,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- hotspot/make/Makefile.orig Fri May 15 16:44:15 2009
+++ hotspot/make/Makefile Fri May 15 16:45:03 2009
@@ -265,6 +265,19 @@ endif
# Shared Library
$OpenBSD: patch-hotspot_make_Makefile,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/Makefile.orig Thu Oct 28 20:17:00 2010
+++ hotspot/make/Makefile Mon Nov 1 13:32:18 2010
@@ -321,28 +321,28 @@ endif
ifneq ($(OSNAME),windows)
+ifeq ($(OSNAME),bsd)
+# BSD-specific LIBRARY_SUFFIX build option
ifeq ($(ZERO_BUILD), true)
ifeq ($(SHARK_BUILD), true)
-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
-$(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so
+$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
else
-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
-$(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so
+$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
endif
else
-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
$(install-file)
-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
+$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
$(install-file)
-$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
+$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
$(install-file)
-$(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so
+$(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
$(install-file)
-$(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so
+$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
$(install-file)
-$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
+$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX)
+ $(install-file)
+else
$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so
$(install-file)
$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so
@@ -275,6 +288,7 @@ $(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so
$(install-file)
$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so
$(install-file)
+endif
endif
endif
# Jar file (sa-jdi.jar)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_Makefile,v 1.2 2009/05/23 03:03:24 kurt Exp $
--- hotspot/make/bsd/Makefile.orig Fri May 15 16:25:28 2009
+++ hotspot/make/bsd/Makefile Fri May 15 16:56:20 2009
@@ -203,7 +203,8 @@ checks: check_os_version check_j2se_version
$OpenBSD: patch-hotspot_make_bsd_Makefile,v 1.3 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/Makefile.orig Tue Jan 4 18:25:17 2011
+++ hotspot/make/bsd/Makefile Tue Jan 4 18:25:19 2011
@@ -230,7 +230,8 @@ checks: check_os_version check_j2se_version
# Solaris 2.5.1, 2.6).
# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok.

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_buildtree_make,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- hotspot/make/bsd/makefiles/buildtree.make.orig Fri May 15 16:59:31 2009
+++ hotspot/make/bsd/makefiles/buildtree.make Fri May 15 16:59:59 2009
@@ -277,10 +277,11 @@ env.sh: $(BUILDTREE_MAKE)
$OpenBSD: patch-hotspot_make_bsd_makefiles_buildtree_make,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/buildtree.make.orig Mon Oct 25 18:02:18 2010
+++ hotspot/make/bsd/makefiles/buildtree.make Mon Oct 25 18:15:44 2010
@@ -287,10 +287,11 @@ env.sh: $(BUILDTREE_MAKE)
[ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \
{ \
echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_cscope_make,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/cscope.make.orig Mon Oct 25 18:45:11 2010
+++ hotspot/make/bsd/makefiles/cscope.make Mon Oct 25 18:45:18 2010
@@ -71,7 +71,7 @@ endif
# OS-specific files for other systems are excluded by default. Use CS_OS=yes
# to include platform-specific files for other platforms.
ifndef CS_OS
-CS_OS = bsd macos solaris win32
+CS_OS = linux macos solaris win32 bsd
CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS}))
endif

View File

@ -1,22 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 kurt Exp $
--- hotspot/make/bsd/makefiles/defs.make.orig Sat May 30 11:21:10 2009
+++ hotspot/make/bsd/makefiles/defs.make Tue Jun 2 12:37:10 2009
@@ -28,6 +28,14 @@
SLASH_JAVA ?= /java
+# Library suffix
+OS_VENDOR:=$(shell uname -s)
+ifeq ($(OS_VENDOR),Darwin)
+ LIBRARY_SUFFIX=dylib
+else
+ LIBRARY_SUFFIX=so
+endif
+
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
ARCH:=$(shell uname -m)
PATH_SEP = :
@@ -61,8 +69,8 @@ ifeq ($(ARCH), sparc64)
$OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/defs.make.orig Mon Nov 1 13:15:17 2010
+++ hotspot/make/bsd/makefiles/defs.make Mon Nov 1 13:32:58 2010
@@ -72,8 +72,8 @@ ifeq ($(ARCH), sparc64)
HS_ARCH = sparc
endif
@ -27,7 +12,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 k
ifeq ($(ARCH_DATA_MODEL), 64)
ARCH_DATA_MODEL = 64
MAKE_ARGS += LP64=1
@@ -74,17 +82,27 @@ ifeq ($(ARCH), x86_64)
@@ -85,17 +85,27 @@ ifeq ($(ARCH), x86_64)
PLATFORM = bsd-i586
VM_PLATFORM = bsd_i486
HS_ARCH = x86
@ -62,30 +47,63 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 k
+ endif
endif
# ARM
@@ -116,39 +126,45 @@ endif
JDK_INCLUDE_SUBDIR=bsd
@@ -95,19 +113,13 @@ VM_DEBUG=jvmg
+# Library suffix
+OS_VENDOR:=$(shell uname -s)
+ifeq ($(OS_VENDOR),Darwin)
+ LIBRARY_SUFFIX=dylib
+else
+ LIBRARY_SUFFIX=so
+endif
+
# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
VM_DEBUG=jvmg
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
# client and server subdirectories have symbolic links to ../libjsig.so
-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
ifndef BUILD_CLIENT_ONLY
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.$(LIBRARY_SUFFIX)
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
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
- 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
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
endif
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)
+EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar
ifneq ($(ZERO_BUILD), true)
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)/libjvm.so
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
endif
endif
# Serviceability Binaries
# No SA Support for PPC, IA64, ARM or zero
-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
- $(EXPORT_LIB_DIR)/sa-jdi.jar
-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
- $(EXPORT_LIB_DIR)/sa-jdi.jar
-ADD_SA_BINARIES/ppc =
-ADD_SA_BINARIES/ia64 =
-ADD_SA_BINARIES/arm =
-ADD_SA_BINARIES/zero =
+ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
+ $(EXPORT_LIB_DIR)/sa-jdi.jar
+ADD_SA_BINARIES/ppc =
+ADD_SA_BINARIES/ia64 =
+ADD_SA_BINARIES/arm =
+ADD_SA_BINARIES/zero =
EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH))
-
-

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 kurt Exp $
--- hotspot/make/bsd/makefiles/gcc.make.orig Wed May 20 17:32:15 2009
+++ hotspot/make/bsd/makefiles/gcc.make Wed May 20 17:32:19 2009
@@ -22,12 +22,15 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.3 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/gcc.make.orig Mon Nov 1 13:15:17 2010
+++ hotspot/make/bsd/makefiles/gcc.make Mon Nov 1 13:33:24 2010
@@ -22,18 +22,22 @@
#
#
@ -10,17 +10,24 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku
#------------------------------------------------------------------------
# CC, CPP & AS
ifdef ALT_COMPILER_PATH
+CXX = $(ALT_COMPILER_PATH)/g++
CPP = $(ALT_COMPILER_PATH)/g++
CC = $(ALT_COMPILER_PATH)/gcc
else
-CPP = g++
-CC = gcc
-AS = $(CC) -c
+CXX ?= g++
+CPP = $(CXX)
+CPP = $(CXX)
+CC ?= gcc
endif
-AS = $(CC) -c
+AS = $(CC) -c -x assembler-with-cpp
# -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
# prints the numbers (e.g. "2.95", "3.2.1")
@@ -55,7 +58,7 @@ VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO))
@@ -67,7 +71,7 @@ endif
CFLAGS += $(VM_PICFLAG)
CFLAGS += -fno-rtti
CFLAGS += -fno-exceptions
@ -29,29 +36,23 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku
CFLAGS += -fcheck-new
ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))
@@ -65,6 +68,12 @@ ARCHFLAG/ia64 =
@@ -76,10 +80,12 @@ ARCHFLAG/amd64 = -m64
ARCHFLAG/ia64 =
ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
-ARCHFLAG/arm = -fsigned-char
ARCHFLAG/zero = $(ZERO_ARCHFLAG)
-ifndef E500V2
-ARCHFLAG/ppc = -mcpu=powerpc
+
+# Darwin-specific build flags
+ifeq ($(OS_VENDOR), Darwin)
+ # Ineffecient 16-byte stack re-alignment on Darwin/IA32
+ ARCHFLAG/i486 += -mstackrealign
+endif
+
CFLAGS += $(ARCHFLAG)
AOUT_FLAGS += $(ARCHFLAG)
LFLAGS += $(ARCHFLAG)
@@ -83,7 +92,7 @@ else
endif
# Compiler warnings are treated as errors
-WARNINGS_ARE_ERRORS = -Werror
+#WARNINGS_ARE_ERRORS = -Werror
# Except for a few acceptable ones
# Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit
@@ -98,7 +107,12 @@ endif
CFLAGS += $(ARCHFLAG)
@@ -124,7 +130,12 @@ endif
CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS)
# Special cases
CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@))
@ -64,7 +65,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku
# The flags to use for an Optimized g++ build
OPT_CFLAGS += -O3
@@ -133,28 +147,40 @@ ifeq ($(BUILDARCH), ia64)
@@ -159,28 +170,40 @@ ifeq ($(BUILDARCH), ia64)
LFLAGS += -Wl,-relax
endif

View File

@ -1,22 +1,28 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.3 2009/10/07 01:53:54 kurt Exp $
--- hotspot/make/bsd/makefiles/jsig.make.orig Sat Sep 26 10:00:44 2009
+++ hotspot/make/bsd/makefiles/jsig.make Sat Sep 26 10:21:25 2009
@@ -26,8 +26,13 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/jsig.make.orig Mon Oct 25 18:02:18 2010
+++ hotspot/make/bsd/makefiles/jsig.make Mon Oct 25 18:46:39 2010
@@ -25,11 +25,16 @@
# Rules to build signal interposition library, used by vm.make
# libjsig[_g].so: signal interposition library
JSIG = jsig$(G_SUFFIX)
-JSIG = jsig
-LIBJSIG = lib$(JSIG).so
+JSIG = jsig
+JSIG_G = $(JSIG)$(G_SUFFIX)
-JSIG_G = $(JSIG)$(G_SUFFIX)
-LIBJSIG_G = lib$(JSIG_G).so
+ifeq ($(OS_VENDOR), Darwin)
+ LIBJSIG = lib$(JSIG).dylib
+ LIBJSIG = lib$(JSIG).dylib
+ LIBJSIG_G = lib$(JSIG_G).dylib
+else
+ LIBJSIG = lib$(JSIG).so
+ LIBJSIG = lib$(JSIG).so
+ LIBJSIG_G = lib$(JSIG_G).so
+endif
+
JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG)
@@ -39,7 +44,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
@@ -42,7 +47,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
# cause problems with interposing. See CR: 6466665
# LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
@ -25,12 +31,12 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.3 2009/10/07 01:53:54 k
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
@@ -49,7 +54,7 @@ endif
@@ -52,7 +57,7 @@ endif
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl
+ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
$(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
install_jsig: $(LIBJSIG)
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_launcher_make,v 1.1 2009/06/10 19:01:09 kurt Exp $
--- hotspot/make/bsd/makefiles/launcher.make.orig Tue Jun 2 12:37:33 2009
+++ hotspot/make/bsd/makefiles/launcher.make Tue Jun 2 12:37:40 2009
@@ -44,7 +44,7 @@ ifeq ($(LINK_INTO),AOUT)
$OpenBSD: patch-hotspot_make_bsd_makefiles_launcher_make,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/launcher.make.orig Mon Oct 25 18:02:18 2010
+++ hotspot/make/bsd/makefiles/launcher.make Mon Oct 25 18:15:44 2010
@@ -46,7 +46,7 @@ ifeq ($(LINK_INTO),AOUT)
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.3 2009/05/23 03:27:41 kurt Exp $
--- hotspot/make/bsd/makefiles/sa.make.orig Sat May 16 22:21:37 2009
+++ hotspot/make/bsd/makefiles/sa.make Sat May 16 22:22:26 2009
@@ -42,8 +42,8 @@ SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar
$OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/sa.make.orig Mon Nov 1 13:15:18 2010
+++ hotspot/make/bsd/makefiles/sa.make Mon Nov 1 13:16:13 2010
@@ -45,8 +45,8 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules
# gnumake 3.78.1 does not accept the *s that
# are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them
@ -10,5 +10,5 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.3 2009/05/23 03:27:41 kur
+AGENT_FILES1 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1))
+AGENT_FILES2 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2))
SA_CLASSDIR = $(GENERATED)/saclasses
AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list
AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list

View File

@ -1,16 +1,24 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54 kurt Exp $
--- hotspot/make/bsd/makefiles/saproc.make.orig Sat Sep 26 10:00:44 2009
+++ hotspot/make/bsd/makefiles/saproc.make Sat Sep 26 10:22:44 2009
@@ -26,18 +26,30 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/saproc.make.orig Mon Oct 25 18:02:18 2010
+++ hotspot/make/bsd/makefiles/saproc.make Mon Oct 25 18:47:00 2010
@@ -25,23 +25,34 @@
# Rules to build serviceability agent library, used by vm.make
# libsaproc[_g].so: serviceability agent
SAPROC = saproc$(G_SUFFIX)
-
-SAPROC = saproc
-LIBSAPROC = lib$(SAPROC).so
-
+SAPROC = saproc
SAPROC_G = $(SAPROC)$(G_SUFFIX)
-LIBSAPROC_G = lib$(SAPROC_G).so
+ifeq ($(OS_VENDOR), Darwin)
+ LIBSAPROC = lib$(SAPROC).dylib
+ LIBSAPROC = lib$(SAPROC).dylib
+ LIBSAPROC_G = lib$(SAPROC_G).dylib
+else
+ LIBSAPROC = lib$(SAPROC).so
+ LIBSAPROC = lib$(SAPROC).so
+ LIBSAPROC_G = lib$(SAPROC_G).so
+endif
+
AGENT_DIR = $(GAMMADIR)/agent
@ -33,7 +41,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54
SAMAPFILE = $(SASRCDIR)/mapfile
@@ -56,7 +68,10 @@ checkAndBuildSA:
@@ -60,7 +71,10 @@ checkAndBuildSA:
$(MAKE) -f vm.make $(LIBSAPROC); \
fi
@ -45,7 +53,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54
$(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
$(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \
@@ -69,12 +84,12 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
@@ -73,12 +87,12 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE)
-I$(SASRCDIR) \
-I$(GENERATED) \
-I$(BOOT_JAVA_HOME)/include \
@ -57,6 +65,6 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54
-o $@ \
- -lthread_db
+ $(SALIBS)
$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
install_saproc: checkAndBuildSA
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kurt Exp $
--- hotspot/make/bsd/makefiles/vm.make.orig Sun Sep 27 09:39:51 2009
+++ hotspot/make/bsd/makefiles/vm.make Sun Sep 27 10:41:35 2009
@@ -86,6 +86,10 @@ CPPFLAGS = \
$OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/vm.make.orig Mon Nov 1 13:15:19 2010
+++ hotspot/make/bsd/makefiles/vm.make Mon Nov 1 13:33:41 2010
@@ -90,6 +90,10 @@ CPPFLAGS = \
${JRE_VERSION} \
${VM_DISTRO}
@ -12,39 +12,64 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN/BYFILE)
@@ -95,7 +99,7 @@ CFLAGS += $(CFLAGS/NOEX)
# Extra flags from gnumake's invocation or environment
@@ -100,7 +104,7 @@ CFLAGS += $(CFLAGS/NOEX)
CFLAGS += $(EXTRA_CFLAGS)
LFLAGS += $(EXTRA_CFLAGS)
-LIBS += -lm -ldl -lpthread
+LIBS += -lm -pthread
# By default, link the *.o into the library, not the executable.
LINK_INTO$(LINK_INTO) = LIBJVM
@@ -110,7 +114,12 @@ include $(MAKEFILES_DIR)/dtrace.make
@@ -114,9 +118,15 @@ include $(MAKEFILES_DIR)/dtrace.make
#----------------------------------------------------------------------
# JVM
JVM = jvm$(G_SUFFIX)
-LIBJVM = lib$(JVM).so
-JVM = jvm
-LIBJVM = lib$(JVM).so
-LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
+JVM = jvm
+ifeq ($(OS_VENDOR), Darwin)
+ LIBJVM = lib$(JVM).dylib
+ CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
+ LIBJVM = lib$(JVM).dylib
+ LIBJVM_G = lib$(JVM)$(G_SUFFIX).dylib
+ CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE
+else
+ LIBJVM = lib$(JVM).so
+ LIBJVM = lib$(JVM).so
+ LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
+endif
JVM_OBJ_FILES = $(Obj_Files)
@@ -124,7 +133,7 @@ mapfile_reorder : mapfile $(REORDERFILE)
rm -f $@
cat $^ > $@
@@ -137,15 +147,7 @@ mapfile_reorder : mapfile $(REORDERFILE)
vm.def: $(Res_Files) $(Obj_Files)
sh $(GAMMADIR)/make/bsd/makefiles/build_vm_def.sh *.o > $@
-STATIC_CXX = true
-ifeq ($(SHARK_BUILD), true)
- STATIC_CXX = false
-else
- ifeq ($(ZERO_LIBARCH), ppc64)
- STATIC_CXX = false
- else
- STATIC_CXX = true
- endif
-endif
+STATIC_CXX = false
ifeq ($(LINK_INTO),AOUT)
LIBJVM.o =
@@ -142,14 +151,14 @@ else
@@ -157,14 +159,21 @@ else
LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE))
LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM))
+ ifeq ($(OS_VENDOR), Darwin)
+ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.
+ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/..
+ LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F)
+ endif
+
# JVM is statically linked with libgcc[_s] and libstdc++; this is needed to
# get around library dependency and compatibility issues. Must use gcc not
# g++ to link.
ifeq ($(STATIC_CXX), true)
LFLAGS_VM += $(STATIC_LIBGCC)
LIBS_VM += $(STATIC_STDCXX)
@ -55,13 +80,15 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur
endif
LIBS_VM += $(LIBS)
@@ -177,7 +186,6 @@ ifeq ($(SHARK_BUILD), true)
LIBS_VM += $(LLVM_LIBS)
endif
-LINK_VM = $(LINK_LIB.c)
# rule for building precompiled header
$(PRECOMPILED_HEADER): $(Precompiled_Files)
@@ -177,11 +186,6 @@ $(LD_SCRIPT): $(LIBJVM_MAPFILE)
@@ -205,11 +213,6 @@ $(LD_SCRIPT): $(LIBJVM_MAPFILE)
LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT)
endif
@ -73,19 +100,21 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur
$(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(QUIETLY) { \
echo Linking vm...; \
@@ -190,15 +194,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \
@@ -219,17 +222,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT)
$(LINK_LIB.CC/POST_HOOK) \
rm -f $@.1; ln -s $@ $@.1; \
- if [ -x /usr/sbin/sebsdenabled ] ; then \
- /usr/sbin/sebsdenabled; \
- if [ $$? = 0 ] ; then \
- /usr/bin/chcon -t textrel_shlib_t $@; \
- if [ $$? != 0 ]; then \
- echo "ERROR: Cannot chcon $@"; \
- fi \
- fi \
- fi \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
- if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \
- if [ -x /usr/sbin/sebsdenabled ] ; then \
- /usr/sbin/sebsdenabled; \
- if [ $$? = 0 ] ; then \
- /usr/bin/chcon -t textrel_shlib_t $@; \
- if [ $$? != 0 ]; then \
- echo "ERROR: Cannot chcon $@"; \
- fi \
- fi \
- fi \
- fi \
}
DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)

View File

@ -0,0 +1,27 @@
$OpenBSD: patch-hotspot_make_bsd_makefiles_zeroshark_make,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/makefiles/zeroshark.make.orig Mon Oct 25 18:52:01 2010
+++ hotspot/make/bsd/makefiles/zeroshark.make Mon Oct 25 18:52:08 2010
@@ -40,4 +40,23 @@ ifeq ($(ARCH_DATA_MODEL), 64)
CFLAGS += -D_LP64=1
endif
+# Specify the path to the FFI headers
+ifdef ALT_PACKAGE_PATH
+ PACKAGE_PATH = $(ALT_PACKAGE_PATH)
+else
+ ifeq ($(OS_VENDOR),Apple)
+ PACKAGE_PATH = /opt/local
+ else
+ ifeq ($(OS_VENDOR),NetBSD)
+ PACKAGE_PATH = /usr/pkg
+ LIBS += -Wl,-R${PACKAGE_PATH}/lib
+ else
+ PACKAGE_PATH = /usr/local
+ endif
+ endif
+endif
+
+CFLAGS += -I$(PACKAGE_PATH)/include
+LIBS += -L$(PACKAGE_PATH)/lib -lffi
+
OPT_CFLAGS/compactingPermGenGen.o = -O1

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-hotspot_make_bsd_platform_amd64_suncc,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/platform_amd64.suncc.orig Mon Oct 25 18:53:09 2010
+++ hotspot/make/bsd/platform_amd64.suncc Mon Oct 25 18:53:15 2010
@@ -14,4 +14,4 @@ compiler = sparcWorks
gnu_dis_arch = amd64
-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DAMD64
+sysdefs = -D_ALLBSD_SOURCE -DSPARC_WORKS -D_GNU_SOURCE -DAMD64

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-hotspot_make_bsd_platform_i486_suncc,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/platform_i486.suncc.orig Mon Oct 25 18:53:32 2010
+++ hotspot/make/bsd/platform_i486.suncc Mon Oct 25 18:53:39 2010
@@ -14,4 +14,4 @@ compiler = sparcWorks
gnu_dis_arch = i386
-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32
+sysdefs = -D_ALLBSD_SOURCE -DSPARC_WORKS -D_GNU_SOURCE -DIA32

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-hotspot_make_bsd_platform_ia64,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/platform_ia64.orig Mon Oct 25 18:53:53 2010
+++ hotspot/make/bsd/platform_ia64 Mon Oct 25 18:54:00 2010
@@ -10,6 +10,6 @@ compiler = gcc
gnu_dis_arch = ia64
-sysdefs = -DLINUX -D_GNU_SOURCE -DIA64 -DCC_INTERP
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA64 -DCC_INTERP
mark_style = alignment

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-hotspot_make_bsd_platform_sparcv9,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/platform_sparcv9.orig Mon Oct 25 18:54:12 2010
+++ hotspot/make/bsd/platform_sparcv9 Mon Oct 25 18:54:20 2010
@@ -12,4 +12,4 @@ lib_arch = sparcv9
compiler = gcc
-sysdefs = -DLINUX -D_GNU_SOURCE -DSPARC
+sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DSPARC

View File

@ -0,0 +1,9 @@
$OpenBSD: patch-hotspot_make_bsd_platform_zero_in,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/bsd/platform_zero.in.orig Mon Oct 25 18:54:32 2010
+++ hotspot/make/bsd/platform_zero.in Mon Oct 25 18:54:40 2010
@@ -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 = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\"

View File

@ -0,0 +1,45 @@
$OpenBSD: patch-hotspot_make_linux_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/linux/makefiles/defs.make.orig Thu Oct 28 20:17:00 2010
+++ hotspot/make/linux/makefiles/defs.make Mon Nov 1 13:33:56 2010
@@ -116,33 +116,36 @@ endif
JDK_INCLUDE_SUBDIR=linux
+# Library suffix
+LIBRARY_SUFFIX=so
+
# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
VM_DEBUG=jvmg
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
# client and server subdirectories have symbolic links to ../libjsig.so
-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
ifndef BUILD_CLIENT_ONLY
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
endif
ifneq ($(ZERO_BUILD), true)
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)/libjvm.so
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
endif
endif
# Serviceability Binaries
# No SA Support for PPC, IA64, ARM or zero
-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
$(EXPORT_LIB_DIR)/sa-jdi.jar
-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \
+ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
$(EXPORT_LIB_DIR)/sa-jdi.jar
ADD_SA_BINARIES/ppc =
ADD_SA_BINARIES/ia64 =

View File

@ -0,0 +1,54 @@
$OpenBSD: patch-hotspot_make_solaris_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/solaris/makefiles/defs.make.orig Thu Oct 28 20:17:00 2010
+++ hotspot/make/solaris/makefiles/defs.make Mon Nov 1 13:34:05 2010
@@ -61,34 +61,37 @@ endif
JDK_INCLUDE_SUBDIR=solaris
+# Library suffix
+LIBRARY_SUFFIX=so
+
# FIXUP: The subdirectory for a debug build is NOT the same on all platforms
VM_DEBUG=jvmg
EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html
-# client and server subdirectories have symbolic links to ../libjsig.so
-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so
+# client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX)
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
ifneq ($(BUILD_CLIENT_ONLY),true)
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.so
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.so
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
endif
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)/libjvm.so
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.so
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.so
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.so
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.so
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
ifneq ($(BUILD_CLIENT_ONLY), true)
- EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.so
- EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.so
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
endif
endif
-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so
+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar

View File

@ -0,0 +1,44 @@
$OpenBSD: patch-hotspot_make_windows_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/make/windows/makefiles/defs.make.orig Mon Oct 25 19:04:10 2010
+++ hotspot/make/windows/makefiles/defs.make Mon Oct 25 19:04:16 2010
@@ -109,6 +109,9 @@ endif
JDK_INCLUDE_SUBDIR=win32
+# Library suffix
+LIBRARY_SUFFIX=dll
+
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
# and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make.
@@ -172,26 +175,26 @@ endif
EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
-EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.dll
+EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb
EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map
EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.dll
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map
# kernel vm
EXPORT_KERNEL_DIR = $(EXPORT_JRE_BIN_DIR)/kernel
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/Xusage.txt
- EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.dll
+ EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.pdb
EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.map
endif
ifeq ($(BUILD_WIN_SA), 1)
- EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.dll
+ EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb
EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map
EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/cpu/sparc/vm/globals_sparc.hpp.orig Tue Jan 4 18:51:43 2011
+++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp Tue Jan 4 18:52:04 2011
@@ -63,4 +63,8 @@ define_pd_global(intx, PreInflateSpin, 40); //
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
+#ifdef _ALLBSD_SOURCE
+define_pd_global(bool, UseMembar, true);
+#else
define_pd_global(bool, UseMembar, false);
+#endif

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp,v 1.3 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp.orig Fri Oct 29 14:46:06 2010
+++ hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Fri Oct 29 14:46:13 2010
@@ -469,8 +469,8 @@ int LIR_Assembler::emit_unwind_handler() {
// Fetch the exception from TLS and clear out exception related thread state
__ get_thread(rsi);
__ movptr(rax, Address(rsi, JavaThread::exception_oop_offset()));
- __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD);
- __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD);
+ __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (intptr_t)NULL_WORD);
+ __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (intptr_t)NULL_WORD);
__ bind(_unwind_handler_entry);
__ verify_not_null_oop(rax);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_src_cpu_x86_vm_globals_x86_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/cpu/x86/vm/globals_x86.hpp.orig Tue Jan 4 18:52:24 2011
+++ hotspot/src/cpu/x86/vm/globals_x86.hpp Tue Jan 4 18:52:45 2011
@@ -64,4 +64,8 @@ define_pd_global(intx, PreInflateSpin, 10);
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
+#ifdef _ALLBSD_SOURCE
+define_pd_global(bool, UseMembar, true);
+#else
define_pd_global(bool, UseMembar, false);
+#endif

View File

@ -1,46 +1,16 @@
$OpenBSD: patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp,v 1.4 2009/10/07 01:53:54 kurt Exp $
--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp.orig Thu Sep 17 03:48:09 2009
+++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Sat Sep 26 10:00:47 2009
@@ -452,10 +452,10 @@ void InterpreterMacroAssembler::store_ptr_and_tag(int
void InterpreterMacroAssembler::tag_local(frame::Tag tag, int n) {
if (TaggedStackInterpreter) {
if (tag == frame::TagCategory2) {
- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n+1)), (int32_t)frame::TagValue);
- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)frame::TagValue);
+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n+1)), (intptr_t)frame::TagValue);
+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (intptr_t)frame::TagValue);
} else {
- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)tag);
+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (intptr_t)tag);
}
}
}
@@ -464,12 +464,12 @@ void InterpreterMacroAssembler::tag_local(frame::Tag t
if (TaggedStackInterpreter) {
if (tag == frame::TagCategory2) {
movptr(Address(rdi, idx, Interpreter::stackElementScale(),
- Interpreter::local_tag_offset_in_bytes(1)), (int32_t)frame::TagValue);
+ Interpreter::local_tag_offset_in_bytes(1)), (intptr_t)frame::TagValue);
movptr(Address(rdi, idx, Interpreter::stackElementScale(),
- Interpreter::local_tag_offset_in_bytes(0)), (int32_t)frame::TagValue);
+ Interpreter::local_tag_offset_in_bytes(0)), (intptr_t)frame::TagValue);
} else {
movptr(Address(rdi, idx, Interpreter::stackElementScale(),
- Interpreter::local_tag_offset_in_bytes(0)), (int32_t)tag);
+ Interpreter::local_tag_offset_in_bytes(0)), (intptr_t)tag);
}
}
}
@@ -1315,7 +1315,7 @@ void InterpreterMacroAssembler::record_klass_in_profil
$OpenBSD: patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp.orig Fri Aug 13 03:28:18 2010
+++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Mon Oct 25 18:15:45 2010
@@ -1153,7 +1153,7 @@ void InterpreterMacroAssembler::record_klass_in_profil
int recvr_offset = in_bytes(VirtualCallData::receiver_offset(start_row));
set_mdp_data_at(mdp, recvr_offset, receiver);
int count_offset = in_bytes(VirtualCallData::receiver_count_offset(start_row));
- movptr(reg2, (int32_t)DataLayout::counter_increment);
+ movptr(reg2, (intptr_t)DataLayout::counter_increment);
set_mdp_data_at(mdp, count_offset, reg2);
jmp(done);
}
@@ -1456,7 +1456,7 @@ void InterpreterMacroAssembler::profile_switch_case(Re
if (start_row > 0) {
jmp(done);
@@ -1296,7 +1296,7 @@ void InterpreterMacroAssembler::profile_switch_case(Re
test_method_data_pointer(mdp, profile_continue);
// Build the base (index * per_case_size_in_bytes()) + case_array_offset_in_bytes()

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_src_cpu_zero_vm_globals_zero_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/cpu/zero/vm/globals_zero.hpp.orig Tue Jan 4 18:53:00 2011
+++ hotspot/src/cpu/zero/vm/globals_zero.hpp Tue Jan 4 18:53:18 2011
@@ -46,4 +46,8 @@ define_pd_global(intx, StackShadowPages, 5 LP64_O
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
+#ifdef _ALLBSD_SOURCE
+define_pd_global(bool, UseMembar, true);
+#else
define_pd_global(bool, UseMembar, false);
+#endif

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- hotspot/src/os/bsd/launcher/java_md.c.orig Fri May 15 17:19:44 2009
+++ hotspot/src/os/bsd/launcher/java_md.c Fri May 15 17:58:17 2009
$OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os/bsd/launcher/java_md.c.orig Mon Nov 1 13:14:58 2010
+++ hotspot/src/os/bsd/launcher/java_md.c Mon Nov 1 13:16:15 2010
@@ -45,8 +45,15 @@
#include "version_comp.h"
#endif
@ -17,7 +17,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
#ifndef GAMMA /* launcher.make defines ARCH */
@@ -112,7 +119,7 @@ extern char **environ;
@@ -116,7 +123,7 @@ extern char **environ;
* A collection of useful strings. One should think of these as #define
* entries, but actual strings can be more efficient (with many compilers).
*/
@ -26,7 +26,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
static const char *system_dir = "/usr/java";
static const char *user_dir = "/java";
#else /* Solaris */
@@ -456,10 +463,10 @@ CreateExecutionEnvironment(int *_argcp,
@@ -460,10 +467,10 @@ CreateExecutionEnvironment(int *_argcp,
* If not on Solaris, assume only a single LD_LIBRARY_PATH
* variable.
*/
@ -39,7 +39,16 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
/*
* On bsd, if a binary is running as sgid or suid, glibc sets
* LD_LIBRARY_PATH to the empty string for security purposes. (In
@@ -483,7 +490,7 @@ CreateExecutionEnvironment(int *_argcp,
@@ -476,7 +483,7 @@ CreateExecutionEnvironment(int *_argcp,
* return from the function now. Getting the right libraries to
* be found must be handled through other mechanisms.
*/
- if((getgid() != getegid()) || (getuid() != geteuid()) ) {
+ if(issetugid()) {
return;
}
#endif
@@ -487,7 +494,7 @@ CreateExecutionEnvironment(int *_argcp,
new_runpath = MemAlloc( ((runpath!=NULL)?strlen(runpath):0) +
2*strlen(jrepath) + 2*strlen(arch) +
strlen(jvmpath) + 52);
@ -48,7 +57,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
/*
@@ -498,7 +505,7 @@ CreateExecutionEnvironment(int *_argcp,
@@ -502,7 +509,7 @@ CreateExecutionEnvironment(int *_argcp,
/* jvmpath, ((running != wanted)?((wanted==64)?"/"BIG_ARCH:"/.."):""), */
@ -57,7 +66,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
"%s:"
"%s/lib/%s:"
"%s/../lib/%s",
@@ -836,7 +843,7 @@ GetXUsagePath(char *buf, jint bufsize)
@@ -840,7 +847,7 @@ GetXUsagePath(char *buf, jint bufsize)
jboolean
GetApplicationHome(char *buf, jint bufsize)
{
@ -66,7 +75,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
char *execname = GetExecname();
if (execname) {
strncpy(buf, execname, bufsize-1);
@@ -1005,7 +1012,7 @@ SetExecname(char **argv)
@@ -1009,7 +1016,7 @@ SetExecname(char **argv)
}
}
}
@ -75,7 +84,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
{
const char* self = "/proc/self/exe";
char buf[PATH_MAX+1];
@@ -1015,7 +1022,7 @@ SetExecname(char **argv)
@@ -1019,7 +1026,7 @@ SetExecname(char **argv)
exec_path = strdup(buf);
}
}
@ -84,7 +93,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
{
/* Not implemented */
}
@@ -1220,7 +1227,7 @@ get_cpuid(uint32_t arg,
@@ -1224,7 +1231,7 @@ get_cpuid(uint32_t arg,
#endif /* __sun && i586 */
@ -93,7 +102,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
/*
* A utility method for asking the CPU about itself.
@@ -1286,7 +1293,7 @@ get_cpuid(uint32_t arg,
@@ -1290,7 +1297,7 @@ get_cpuid(uint32_t arg,
#endif
}
@ -102,7 +111,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
#ifdef i586
/*
@@ -1465,7 +1472,7 @@ solaris_i586_ServerClassMachine(void) {
@@ -1469,7 +1476,7 @@ solaris_i586_ServerClassMachine(void) {
#endif /* __sun && i586 */
@ -111,7 +120,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
/* The definition of a server-class machine for bsd-i586 */
jboolean
@@ -1496,7 +1503,7 @@ bsd_i586_ServerClassMachine(void) {
@@ -1500,7 +1507,7 @@ bsd_i586_ServerClassMachine(void) {
return result;
}
@ -120,7 +129,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24
/* Dispatch to the platform-specific definition of "server-class" */
jboolean
@@ -1506,7 +1513,7 @@ ServerClassMachine(void) {
@@ -1510,7 +1517,7 @@ ServerClassMachine(void) {
result = solaris_sparc_ServerClassMachine();
#elif defined(__sun) && defined(i586)
result = solaris_i586_ServerClassMachine();

View File

@ -1,47 +1,7 @@
$OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03:03:24 kurt Exp $
--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp.orig Fri May 15 16:25:27 2009
+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp Fri May 15 17:25:06 2009
@@ -179,32 +179,19 @@ int BsdAttachListener::init() {
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
- // FIXME: Prior to b39 the tool-side API expected to find the well
- // known file in the working directory. To allow this libjvm.so work with
- // a pre-b39 SDK we create it in the working directory if
- // +StartAttachListener is used is used. All unit tests for this feature
- // currently used this flag. Once b39 SDK has been promoted we can remove
- // this code.
- if (StartAttachListener) {
- sprintf(path, ".java_pid%d", os::current_process_id());
- strcpy(addr.sun_path, path);
- ::unlink(path);
- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
- }
+ sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id());
+ strcpy(addr.sun_path, path);
+ ::unlink(path);
+ res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
if (res == -1) {
- sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id());
- strcpy(addr.sun_path, path);
- ::unlink(path);
- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr));
- }
- if (res == -1) {
RESTARTABLE(::close(listener), res);
return -1;
}
set_path(path);
- // put in listen mode and set permission
- if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1)) {
+ // put in listen mode and set permission and ownership
+ if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1) ||
+ (::chown(path, geteuid(), getegid()) == -1)) {
RESTARTABLE(::close(listener), res);
::unlink(path);
set_path(NULL);
@@ -330,6 +317,15 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
$OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.4 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp.orig Mon Nov 1 13:14:58 2010
+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp Mon Nov 1 13:16:15 2010
@@ -334,6 +334,15 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
// get the credentials of the peer and check the effective uid/guid
// - check with jeff on this.
@ -57,7 +17,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03
struct ucred cred_info;
socklen_t optlen = sizeof(cred_info);
if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) {
@@ -337,10 +333,13 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
@@ -341,10 +350,13 @@ BsdAttachOperation* BsdAttachListener::dequeue() {
RESTARTABLE(::close(s), res);
continue;
}
@ -72,23 +32,25 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03
int res;
RESTARTABLE(::close(s), res);
continue;
@@ -460,15 +459,12 @@ bool AttachListener::is_init_trigger() {
@@ -464,16 +476,13 @@ bool AttachListener::is_init_trigger() {
if (init_at_startup() || is_initialized()) {
return false; // initialized at startup or already initialized
}
- char fn[32];
- char fn[PATH_MAX+1];
- sprintf(fn, ".attach_pid%d", os::current_process_id());
+ char path[PATH_MAX + 1];
int ret;
- struct stat64 st;
- RESTARTABLE(::stat64(fn, &st), ret);
- if (ret == -1) {
- sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id());
- snprintf(fn, sizeof(fn), "%s/.attach_pid%d",
- os::get_temp_directory(), os::current_process_id());
- RESTARTABLE(::stat64(fn, &st), ret);
- }
+ struct stat st;
+
+ sprintf(path, "%s/.attach_pid%d", os::get_temp_directory(), os::current_process_id());
+ snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d",
+ os::get_temp_directory(), os::current_process_id());
+ RESTARTABLE(::stat(path, &st), ret);
if (ret == 0) {
// simple check to avoid starting the attach mechanism when

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt Exp $
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig Sat May 30 10:11:57 2009
+++ hotspot/src/os/bsd/vm/os_bsd.cpp Sat May 30 10:15:08 2009
@@ -42,18 +42,40 @@
$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.12 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig Tue Jan 4 18:25:16 2011
+++ hotspot/src/os/bsd/vm/os_bsd.cpp Tue Jan 4 18:34:25 2011
@@ -46,20 +46,42 @@
# include <sys/utsname.h>
# include <sys/socket.h>
# include <sys/wait.h>
@ -21,11 +21,14 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
+#endif
# include <sys/ipc.h>
# include <sys/shm.h>
+
+#ifndef __APPLE__
# include <link.h>
+#endif
-# include <link.h>
# include <stdint.h>
# include <inttypes.h>
+#ifndef __APPLE__
+# include <link.h>
+#endif
+
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+# include <elf.h>
+#endif
@ -42,7 +45,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
#define MAX_PATH (2 * K)
// for timer info max values which include all bits
@@ -64,19 +86,25 @@
@@ -70,19 +92,25 @@
// global variables
julong os::Bsd::_physical_memory = 0;
@ -68,7 +71,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
static jlong initial_time_count=0;
@@ -94,8 +122,6 @@ static pid_t _initial_pid = 0;
@@ -100,8 +128,6 @@ static pid_t _initial_pid = 0;
static int SR_signum = SIGUSR2;
sigset_t SR_sigset;
@ -77,7 +80,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
////////////////////////////////////////////////////////////////////////////////
// utility functions
@@ -108,11 +134,16 @@ julong os::available_memory() {
@@ -114,11 +140,16 @@ julong os::available_memory() {
}
julong os::Bsd::available_memory() {
@ -94,7 +97,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
julong os::physical_memory() {
@@ -160,6 +191,7 @@ bool os::have_special_privileges() {
@@ -166,6 +197,7 @@ bool os::have_special_privileges() {
}
@ -102,15 +105,15 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
#ifndef SYS_gettid
// i386: 224, ia64: 1105, amd64: 186, sparc 143
#ifdef __ia64__
@@ -174,6 +206,7 @@ bool os::have_special_privileges() {
@@ -180,6 +212,7 @@ bool os::have_special_privileges() {
#error define gettid for the arch
#endif
#endif
+#endif
// Cpu architecture string
#if defined(IA64)
@@ -193,6 +226,7 @@ static char cpu_arch[] = "sparc";
#if defined(ZERO)
@@ -205,6 +238,7 @@ static char cpu_arch[] = "sparc";
#endif
@ -118,7 +121,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// pid_t gettid()
//
// Returns the kernel thread id of the currently running thread. Kernel
@@ -219,8 +253,48 @@ static bool unsafe_chroot_detected = false;
@@ -231,8 +265,49 @@ static bool unsafe_chroot_detected = false;
static const char *unstable_chroot_error = "/proc file system not found.\n"
"Java may be unstable running multithreaded in a chroot "
"environment on Bsd when /proc filesystem is not mounted.";
@ -135,11 +138,12 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
+ mib[0] = CTL_HW;
+ mib[1] = HW_NCPU;
+ len = sizeof(cpu_val);
+ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1)
+ _processor_count = cpu_val;
+
+ if (_processor_count < 1)
+ _processor_count = 1; // fallback
+ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) {
+ set_processor_count(cpu_val);
+ }
+ else {
+ set_processor_count(1); // fallback
+ }
+
+ /* get physical memory via hw.usermem sysctl (hw.usermem is used
+ * instead of hw.physmem because we need size of allocatable memory
@ -164,18 +168,18 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
+}
+#else
+void os::Bsd::initialize_system_info() {
_processor_count = sysconf(_SC_NPROCESSORS_CONF);
if (_processor_count == 1) {
set_processor_count(sysconf(_SC_NPROCESSORS_CONF));
if (processor_count() == 1) {
pid_t pid = os::Bsd::gettid();
@@ -236,6 +310,7 @@ void os::Bsd::initialize_system_info() {
@@ -248,6 +323,7 @@ void os::Bsd::initialize_system_info() {
_physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE);
assert(_processor_count > 0, "bsd error");
assert(processor_count() > 0, "bsd error");
}
+#endif
void os::init_system_properties_values() {
// char arch[12];
@@ -279,9 +354,7 @@ void os::init_system_properties_values() {
@@ -291,9 +367,7 @@ void os::init_system_properties_values() {
* ...
* 7: The default directories, normally /lib and /usr/lib.
*/
@ -186,7 +190,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
#define DEFAULT_LIBPATH "/lib:/usr/lib"
#endif
@@ -360,7 +433,11 @@ void os::init_system_properties_values() {
@@ -372,7 +446,11 @@ void os::init_system_properties_values() {
* should always exist (until the legacy problem cited above is
* addressed).
*/
@ -198,7 +202,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (v != NULL) {
char *t = ld_library_path;
/* That's +1 for the colon and +1 for the trailing '\0' */
@@ -519,6 +596,7 @@ void os::Bsd::hotspot_sigmask(Thread* thread) {
@@ -531,6 +609,7 @@ void os::Bsd::hotspot_sigmask(Thread* thread) {
}
}
@ -206,7 +210,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
//////////////////////////////////////////////////////////////////////////////
// detecting pthread library
@@ -682,6 +760,7 @@ bool os::Bsd::manually_expand_stack(JavaThread * t, ad
@@ -694,6 +773,7 @@ bool os::Bsd::manually_expand_stack(JavaThread * t, ad
}
return false;
}
@ -214,7 +218,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
//////////////////////////////////////////////////////////////////////////////
// create new thread
@@ -690,6 +769,9 @@ static address highest_vm_reserved_address();
@@ -702,6 +782,9 @@ static address highest_vm_reserved_address();
// check if it's safe to start a new thread
static bool _thread_safety_check(Thread* thread) {
@ -224,7 +228,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack()) {
// Fixed stack BsdThreads (SuSE Bsd/x86, and some versions of Redhat)
// Heap is mmap'ed at lower end of memory space. Thread stacks are
@@ -723,6 +805,7 @@ static bool _thread_safety_check(Thread* thread) {
@@ -735,6 +818,7 @@ static bool _thread_safety_check(Thread* thread) {
// here, that means enough space has been reserved for stack.
return true;
}
@ -232,7 +236,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// Thread start routine for all newly created threads
@@ -750,6 +833,10 @@ static void *java_start(Thread *thread) {
@@ -762,6 +846,10 @@ static void *java_start(Thread *thread) {
return NULL;
}
@ -243,7 +247,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread->set_thread_id(os::Bsd::gettid());
@@ -759,6 +846,7 @@ static void *java_start(Thread *thread) {
@@ -771,6 +859,7 @@ static void *java_start(Thread *thread) {
thread->set_lgrp_id(lgrp_id);
}
}
@ -251,7 +255,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// initialize signal mask for this thread
os::Bsd::hotspot_sigmask(thread);
@@ -839,17 +927,22 @@ bool os::create_thread(Thread* thread, ThreadType thr_
@@ -853,17 +942,22 @@ bool os::create_thread(Thread* thread, ThreadType thr_
// let pthread_create() pick the default value.
}
@ -274,7 +278,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
pthread_t tid;
int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread);
@@ -863,7 +956,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_
@@ -877,7 +971,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_
// Need to clean up stuff we've allocated so far
thread->set_osthread(NULL);
delete osthread;
@ -284,7 +288,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
return false;
}
@@ -879,9 +974,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_
@@ -893,9 +989,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_
}
}
@ -296,7 +300,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// Aborted due to thread limit being reached
@@ -919,7 +1016,11 @@ bool os::create_attached_thread(JavaThread* thread) {
@@ -933,7 +1031,11 @@ bool os::create_attached_thread(JavaThread* thread) {
}
// Store pthread info into the OSThread
@ -308,7 +312,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
osthread->set_pthread_id(::pthread_self());
// initialize floating point control register
@@ -930,6 +1031,7 @@ bool os::create_attached_thread(JavaThread* thread) {
@@ -944,6 +1046,7 @@ bool os::create_attached_thread(JavaThread* thread) {
thread->set_osthread(osthread);
@ -316,7 +320,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (UseNUMA) {
int lgrp_id = os::numa_get_group_id();
if (lgrp_id != -1) {
@@ -956,6 +1058,7 @@ bool os::create_attached_thread(JavaThread* thread) {
@@ -970,6 +1073,7 @@ bool os::create_attached_thread(JavaThread* thread) {
os::Bsd::manually_expand_stack(jt, addr);
osthread->clear_expanding_stack();
}
@ -324,7 +328,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// initialize signal mask for this thread
// and save the caller's signal mask
@@ -1014,6 +1117,7 @@ extern "C" Thread* get_thread() {
@@ -1028,6 +1132,7 @@ extern "C" Thread* get_thread() {
//////////////////////////////////////////////////////////////////////////////
// initial thread
@ -332,7 +336,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// Check if current thread is the initial thread, similar to Solaris thr_main.
bool os::Bsd::is_initial_thread(void) {
char dummy;
@@ -1247,6 +1351,7 @@ void os::Bsd::capture_initial_stack(size_t max_size) {
@@ -1264,6 +1369,7 @@ void os::Bsd::capture_initial_stack(size_t max_size) {
_initial_thread_stack_size = align_size_down(_initial_thread_stack_size, page_size());
_initial_thread_stack_bottom = (address)stack_top - _initial_thread_stack_size;
}
@ -340,7 +344,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
////////////////////////////////////////////////////////////////////////////////
// time support
@@ -1268,9 +1373,7 @@ jlong os::elapsed_frequency() {
@@ -1285,9 +1391,7 @@ jlong os::elapsed_frequency() {
return (1000 * 1000);
}
@ -351,7 +355,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
bool os::supports_vtime() { return false; }
bool os::enable_vtime() { return false; }
bool os::vtime_enabled() { return false; }
@@ -1290,7 +1393,22 @@ jlong os::javaTimeMillis() {
@@ -1307,7 +1411,22 @@ jlong os::javaTimeMillis() {
#define CLOCK_MONOTONIC (1)
#endif
@ -374,7 +378,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// we do dlopen's in this particular order due to bug in bsd
// dynamical loader (see 6348968) leading to crash on exit
void* handle = dlopen("librt.so.1", RTLD_LAZY);
@@ -1325,7 +1443,9 @@ void os::Bsd::clock_init() {
@@ -1342,7 +1461,9 @@ void os::Bsd::clock_init() {
}
}
}
@ -384,7 +388,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
#ifndef SYS_clock_getres
#if defined(IA32) || defined(AMD64)
@@ -1364,6 +1484,7 @@ void os::Bsd::fast_thread_clock_init() {
@@ -1383,6 +1504,7 @@ void os::Bsd::fast_thread_clock_init() {
_pthread_getcpuclockid = pthread_getcpuclockid_func;
}
}
@ -392,7 +396,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
jlong os::javaTimeNanos() {
if (Bsd::supports_monotonic_clock()) {
@@ -1514,8 +1635,15 @@ int os::current_process_id() {
@@ -1533,8 +1655,15 @@ int os::current_process_id() {
// DLL functions
@ -406,10 +410,10 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
+const char* os::dll_file_extension() { return JNI_LIB_SUFFIX; }
+
const char* os::get_temp_directory() { return "/tmp/"; }
static bool file_exists(const char* filename) {
@@ -1532,13 +1660,13 @@ void os::dll_build_name(char* buffer, size_t buflen,
const char* os::get_temp_directory() {
const char *prop = Arguments::get_property("java.io.tmpdir");
return prop == NULL ? "/tmp" : prop;
@@ -1554,13 +1683,13 @@ void os::dll_build_name(char* buffer, size_t buflen,
const size_t pnamelen = pname ? strlen(pname) : 0;
// Quietly truncate on buffer overflow. Should be an error.
@ -425,7 +429,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
} else if (strchr(pname, *os::path_separator()) != NULL) {
int n;
char** pelements = split_path(pname, &n);
@@ -1547,7 +1675,8 @@ void os::dll_build_name(char* buffer, size_t buflen,
@@ -1569,7 +1698,8 @@ void os::dll_build_name(char* buffer, size_t buflen,
if (pelements[i] == NULL || strlen(pelements[i]) == 0) {
continue; // skip the empty path values
}
@ -435,7 +439,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (file_exists(buffer)) {
break;
}
@@ -1562,7 +1691,7 @@ void os::dll_build_name(char* buffer, size_t buflen,
@@ -1584,7 +1714,7 @@ void os::dll_build_name(char* buffer, size_t buflen,
FREE_C_HEAP_ARRAY(char*, pelements);
}
} else {
@ -444,7 +448,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
}
@@ -1603,6 +1732,23 @@ bool os::dll_address_to_function_name(address addr, ch
@@ -1625,6 +1755,23 @@ bool os::dll_address_to_function_name(address addr, ch
}
}
@ -468,7 +472,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
struct _address_to_library_name {
address addr; // input : memory address
size_t buflen; // size of fname
@@ -1677,11 +1823,27 @@ bool os::dll_address_to_library_name(address addr, cha
@@ -1699,11 +1846,27 @@ bool os::dll_address_to_library_name(address addr, cha
return false;
}
}
@ -496,14 +500,22 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
void * os::dll_load(const char *filename, char *ebuf, int ebuflen)
{
void * result= ::dlopen(filename, RTLD_LAZY);
@@ -1734,6 +1896,18 @@ void * os::dll_load(const char *filename, char *ebuf,
@@ -1756,6 +1919,26 @@ void * os::dll_load(const char *filename, char *ebuf,
#define EM_486 6 /* Intel 80486 */
#endif
+ #ifndef EM_MIPS_RS3_LE
+ #define EM_MIPS_RS3_LE 10 /* MIPS */
+ #endif
+
+ #ifndef EM_PPC64
+ #define EM_PPC64 21 /* PowerPC64 */
+ #endif
+
+ #ifndef EM_S390
+ #define EM_S390 22 /* IBM System/390 */
+ #endif
+
+ #ifndef EM_IA_64
+ #define EM_IA_64 50 /* HP/Intel IA-64 */
+ #endif
@ -515,7 +527,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
static const arch_t arch_array[]={
{EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
{EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"},
@@ -1814,17 +1988,11 @@ void * os::dll_load(const char *filename, char *ebuf,
@@ -1859,17 +2042,11 @@ void * os::dll_load(const char *filename, char *ebuf,
return NULL;
}
@ -536,7 +548,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
@@ -1847,7 +2015,51 @@ bool _print_ascii_file(const char* filename, outputStr
@@ -1892,7 +2069,51 @@ bool _print_ascii_file(const char* filename, outputStr
void os::print_dll_info(outputStream *st) {
st->print_cr("Dynamic libraries:");
@ -588,7 +600,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
char fname[32];
pid_t pid = os::Bsd::gettid();
@@ -1856,6 +2068,7 @@ void os::print_dll_info(outputStream *st) {
@@ -1901,6 +2122,7 @@ void os::print_dll_info(outputStream *st) {
if (!_print_ascii_file(fname, st)) {
st->print("Can not get library information for pid = %d\n", pid);
}
@ -596,7 +608,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
@@ -1888,6 +2101,7 @@ void os::print_os_info(outputStream* st) {
@@ -1935,6 +2157,7 @@ void os::print_os_info(outputStream* st) {
st->print(name.machine);
st->cr();
@ -604,7 +616,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// Print warning if unsafe chroot environment detected
if (unsafe_chroot_detected) {
st->print("WARNING!! ");
@@ -1902,6 +2116,7 @@ void os::print_os_info(outputStream* st) {
@@ -1949,6 +2172,7 @@ void os::print_os_info(outputStream* st) {
st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed");
}
st->cr();
@ -612,7 +624,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// rlimit
st->print("rlimit:");
@@ -1927,6 +2142,7 @@ void os::print_os_info(outputStream* st) {
@@ -1974,6 +2198,7 @@ void os::print_os_info(outputStream* st) {
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
else st->print("%d", rlim.rlim_cur);
@ -620,15 +632,20 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
st->print(", AS ");
getrlimit(RLIMIT_AS, &rlim);
if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity");
@@ -1939,6 +2155,7 @@ void os::print_os_info(outputStream* st) {
@@ -1986,11 +2211,7 @@ void os::print_os_info(outputStream* st) {
os::loadavg(loadavg, 3);
st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]);
st->cr();
-
- // meminfo
- st->print("\n/proc/meminfo:\n");
- _print_ascii_file("/proc/meminfo", st);
- st->cr();
+#endif
}
void os::print_memory_info(outputStream* st) {
@@ -1946,18 +2163,22 @@ void os::print_memory_info(outputStream* st) {
@@ -1998,19 +2219,28 @@ void os::print_memory_info(outputStream* st) {
st->print("Memory:");
st->print(" %dk page", os::vm_page_size()>>10);
@ -649,9 +666,15 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
((jlong)si.freeswap * si.mem_unit) >> 10);
+#endif
st->cr();
+
+ // meminfo
+ st->print("\n/proc/meminfo:\n");
+ _print_ascii_file("/proc/meminfo", st);
+ st->cr();
}
@@ -2184,19 +2405,29 @@ int os::sigexitnum_pd() {
// Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific
@@ -2252,19 +2482,29 @@ int os::sigexitnum_pd() {
static volatile jint pending_signals[NSIG+1] = { 0 };
// Bsd(POSIX) specific hand shaking semaphore.
@ -683,7 +706,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
static int check_pending_signals(bool wait) {
@@ -2218,7 +2449,7 @@ static int check_pending_signals(bool wait) {
@@ -2286,7 +2526,7 @@ static int check_pending_signals(bool wait) {
do {
thread->set_suspend_equivalent();
// cleared by handle_special_suspend_equivalent_condition() or java_suspend_self()
@ -692,7 +715,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// were we externally suspended while we were waiting?
threadIsSuspended = thread->handle_special_suspend_equivalent_condition();
@@ -2229,7 +2460,7 @@ static int check_pending_signals(bool wait) {
@@ -2297,7 +2537,7 @@ static int check_pending_signals(bool wait) {
// while suspended because that would surprise the thread that
// suspended us.
//
@ -701,7 +724,20 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
thread->java_suspend_self();
}
@@ -2301,9 +2532,14 @@ void bsd_wrap_code(char* base, size_t size) {
@@ -2341,10 +2581,10 @@ void bsd_wrap_code(char* base, size_t size) {
return;
}
- char buf[PATH_MAX+1];
+ char buf[PATH_MAX + 1];
int num = Atomic::add(1, &cnt);
- snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d",
+ snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d",
os::get_temp_directory(), os::current_process_id(), num);
unlink(buf);
@@ -2370,9 +2610,14 @@ void bsd_wrap_code(char* base, size_t size) {
// problem.
bool os::commit_memory(char* addr, size_t size, bool exec) {
int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE;
@ -716,7 +752,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
bool os::commit_memory(char* addr, size_t size, size_t alignment_hint,
@@ -2319,36 +2555,27 @@ void os::free_memory(char *addr, size_t bytes) {
@@ -2388,36 +2633,27 @@ void os::free_memory(char *addr, size_t bytes) {
}
void os::numa_make_global(char *addr, size_t bytes) {
@ -758,7 +794,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
bool os::get_page_info(char *start, page_info* info) {
@@ -2359,6 +2586,7 @@ char *os::scan_pages(char *start, char* end, page_info
@@ -2428,6 +2664,7 @@ char *os::scan_pages(char *start, char* end, page_info
return end;
}
@ -766,27 +802,119 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
extern "C" void numa_warn(int number, char *where, ...) { }
extern "C" void numa_error(char *where) { }
@@ -2460,11 +2688,18 @@ os::Bsd::numa_available_func_t os::Bsd::_numa_availabl
@@ -2529,104 +2766,26 @@ os::Bsd::numa_available_func_t os::Bsd::_numa_availabl
os::Bsd::numa_tonode_memory_func_t os::Bsd::_numa_tonode_memory;
os::Bsd::numa_interleave_memory_func_t os::Bsd::_numa_interleave_memory;
unsigned long* os::Bsd::_numa_all_nodes;
+#endif
bool os::uncommit_memory(char* addr, size_t size) {
- return ::mmap(addr, size, PROT_NONE,
+#ifdef __OpenBSD__
+ // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD
+ return ::mprotect(addr, size, PROT_NONE) == 0;
+#else
+ return ::mmap(addr, size,
+ PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0)
!= MAP_FAILED;
uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE,
MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0);
return res != (uintptr_t) MAP_FAILED;
+#endif
}
static address _highest_vm_reserved_address = NULL;
@@ -2568,6 +2803,9 @@ bool os::unguard_memory(char* addr, size_t size) {
-// Bsd uses a growable mapping for the stack, and if the mapping for
-// the stack guard pages is not removed when we detach a thread the
-// stack cannot grow beyond the pages where the stack guard was
-// mapped. If at some point later in the process the stack expands to
-// that point, the Bsd kernel cannot expand the stack any further
-// because the guard pages are in the way, and a segfault occurs.
-//
-// However, it's essential not to split the stack region by unmapping
-// a region (leaving a hole) that's already part of the stack mapping,
-// so if the stack mapping has already grown beyond the guard pages at
-// the time we create them, we have to truncate the stack mapping.
-// So, we need to know the extent of the stack mapping when
-// create_stack_guard_pages() is called.
-
-// Find the bounds of the stack mapping. Return true for success.
-//
-// We only need this for stacks that are growable: at the time of
-// writing thread stacks don't use growable mappings (i.e. those
-// creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this
-// only applies to the main thread.
-static bool
-get_stack_bounds(uintptr_t *bottom, uintptr_t *top)
-{
- FILE *f = fopen("/proc/self/maps", "r");
- if (f == NULL)
- return false;
-
- while (!feof(f)) {
- size_t dummy;
- char *str = NULL;
- ssize_t len = getline(&str, &dummy, f);
- if (len == -1) {
- fclose(f);
- return false;
- }
-
- if (len > 0 && str[len-1] == '\n') {
- str[len-1] = 0;
- len--;
- }
-
- static const char *stack_str = "[stack]";
- if (len > (ssize_t)strlen(stack_str)
- && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) {
- if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) {
- uintptr_t sp = (uintptr_t)__builtin_frame_address(0);
- if (sp >= *bottom && sp <= *top) {
- free(str);
- fclose(f);
- return true;
- }
- }
- }
- free(str);
- }
- fclose(f);
- return false;
-}
-
-// If the (growable) stack mapping already extends beyond the point
-// where we're going to put our guard pages, truncate the mapping at
-// that point by munmap()ping it. This ensures that when we later
-// munmap() the guard pages we don't leave a hole in the stack
-// mapping. This only affects the main/initial thread, but guard
-// against future OS changes
bool os::create_stack_guard_pages(char* addr, size_t size) {
- uintptr_t stack_extent, stack_base;
- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true);
- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
- assert(os::Bsd::is_initial_thread(),
- "growable stack in non-initial thread");
- if (stack_extent < (uintptr_t)addr)
- ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent);
- }
-
return os::commit_memory(addr, size);
}
// If this is a growable mapping, remove the guard pages entirely by
-// munmap()ping them. If not, just call uncommit_memory(). This only
-// affects the main/initial thread, but guard against future OS changes
+// munmap()ping them. If not, just call uncommit_memory().
bool os::remove_stack_guard_pages(char* addr, size_t size) {
- uintptr_t stack_extent, stack_base;
- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true);
- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) {
- assert(os::Bsd::is_initial_thread(),
- "growable stack in non-initial thread");
-
- return ::munmap(addr, size) == 0;
- }
-
return os::uncommit_memory(addr, size);
}
@@ -2731,6 +2890,9 @@ bool os::unguard_memory(char* addr, size_t size) {
static size_t _large_page_size = 0;
bool os::large_page_init() {
@ -796,7 +924,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (!UseLargePages) return false;
if (LargePageSizeInBytes) {
@@ -2622,6 +2860,7 @@ bool os::large_page_init() {
@@ -2788,6 +2950,7 @@ bool os::large_page_init() {
// We optimistically assume the support is available. If later it turns out
// not true, VM will automatically switch to use regular page size.
return true;
@ -804,7 +932,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
#ifndef SHM_HUGETLB
@@ -2798,7 +3037,7 @@ char* os::attempt_reserve_memory_at(size_t bytes, char
@@ -2964,7 +3127,7 @@ char* os::attempt_reserve_memory_at(size_t bytes, char
}
size_t os::read(int fd, void *buf, unsigned int nBytes) {
@ -813,7 +941,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// TODO-FIXME: reconcile Solaris' os::sleep with the bsd variation.
@@ -2934,9 +3173,47 @@ void os::loop_breaker(int attempts) {
@@ -3100,9 +3263,47 @@ void os::loop_breaker(int attempts) {
// this reason, the code should not be used as default (ThreadPriorityPolicy=0).
// It is only used when ThreadPriorityPolicy=1 and requires root privilege.
@ -861,7 +989,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
4, // 1 MinPriority
3, // 2
2, // 3
@@ -2951,6 +3228,7 @@ int os::java_to_os_priority[MaxPriority + 1] = {
@@ -3117,6 +3318,7 @@ int os::java_to_os_priority[MaxPriority + 1] = {
-5 // 10 MaxPriority
};
@ -869,7 +997,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
static int prio_init() {
if (ThreadPriorityPolicy == 1) {
@@ -2970,8 +3248,28 @@ static int prio_init() {
@@ -3136,8 +3338,28 @@ static int prio_init() {
OSReturn os::set_native_priority(Thread* thread, int newpri) {
if ( !UseThreadPriorities || ThreadPriorityPolicy == 0 ) return OS_OK;
@ -898,7 +1026,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) {
@@ -2981,7 +3279,17 @@ OSReturn os::get_native_priority(const Thread* const t
@@ -3147,7 +3369,17 @@ OSReturn os::get_native_priority(const Thread* const t
}
errno = 0;
@ -916,7 +1044,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR);
}
@@ -3091,7 +3399,7 @@ static int SR_initialize() {
@@ -3257,7 +3489,7 @@ static int SR_initialize() {
/* Get signal number to use for suspend/resume */
if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) {
int sig = ::strtol(s, 0, 10);
@ -925,7 +1053,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
SR_signum = sig;
}
}
@@ -3434,6 +3742,28 @@ void os::Bsd::install_signal_handlers() {
@@ -3601,6 +3833,28 @@ void os::Bsd::install_signal_handlers() {
set_signal_handler(SIGFPE, true);
set_signal_handler(SIGXFSZ, true);
@ -954,7 +1082,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (libjsig_is_loaded) {
// Tell libjsig jvm finishes setting signal handlers
(*end_signal_setting)();
@@ -3454,6 +3784,7 @@ void os::Bsd::install_signal_handlers() {
@@ -3621,6 +3875,7 @@ void os::Bsd::install_signal_handlers() {
}
}
@ -962,7 +1090,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// This is the fastest way to get thread cpu time on Bsd.
// Returns cpu time (user+sys) for any thread, not only for current.
// POSIX compliant clocks are implemented in the kernels 2.6.16+.
@@ -3468,6 +3799,7 @@ jlong os::Bsd::fast_thread_cpu_time(clockid_t clockid)
@@ -3635,6 +3890,7 @@ jlong os::Bsd::fast_thread_cpu_time(clockid_t clockid)
return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec;
}
@ -970,7 +1098,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
/////
// glibc on Bsd platform uses non-documented flag
@@ -3689,13 +4021,13 @@ void os::init(void) {
@@ -3856,13 +4112,13 @@ void os::init(void) {
_initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid();
@ -984,9 +1112,9 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
- Bsd::set_page_size(sysconf(_SC_PAGESIZE));
+ Bsd::set_page_size(getpagesize());
if (Bsd::page_size() == -1) {
fatal1("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno));
}
@@ -3708,7 +4040,16 @@ void os::init(void) {
fatal(err_msg("os_bsd.cpp: os::init: sysconf failed (%s)",
strerror(errno)));
@@ -3876,7 +4132,16 @@ void os::init(void) {
Bsd::clock_init();
initial_time_count = os::elapsed_counter();
@ -1004,7 +1132,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// To install functions for atexit system call
@@ -3721,7 +4062,9 @@ extern "C" {
@@ -3889,7 +4154,9 @@ extern "C" {
// this is called _after_ the global arguments have been parsed
jint os::init_2(void)
{
@ -1014,7 +1142,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// Allocate a single page and mark it as readable for safepoint polling
address polling_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0);
@@ -3770,6 +4113,7 @@ jint os::init_2(void)
@@ -3947,6 +4214,7 @@ jint os::init_2(void)
JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes,
vm_page_size()));
@ -1022,7 +1150,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
Bsd::capture_initial_stack(JavaThread::stack_size_at_create());
Bsd::libpthread_init();
@@ -3792,6 +4136,7 @@ jint os::init_2(void)
@@ -3969,6 +4237,7 @@ jint os::init_2(void)
UseNUMA = true;
}
}
@ -1030,7 +1158,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (MaxFDLimit) {
// set the number of file descriptors to max. print out error
@@ -3803,6 +4148,14 @@ jint os::init_2(void)
@@ -3980,6 +4249,14 @@ jint os::init_2(void)
perror("os::init_2 getrlimit failed");
} else {
nbr_files.rlim_cur = nbr_files.rlim_max;
@ -1045,7 +1173,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
status = setrlimit(RLIMIT_NOFILE, &nbr_files);
if (status != 0) {
if (PrintMiscellaneous && (Verbose || WizardMode))
@@ -3811,8 +4164,10 @@ jint os::init_2(void)
@@ -3988,8 +4265,10 @@ jint os::init_2(void)
}
}
@ -1056,7 +1184,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// Initialize HPI.
jint hpi_result = hpi::initialize();
@@ -3860,11 +4215,15 @@ void os::make_polling_page_readable(void) {
@@ -4040,11 +4319,15 @@ void os::make_polling_page_readable(void) {
};
int os::active_processor_count() {
@ -1072,7 +1200,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
bool os::distribute_processes(uint length, uint* distribution) {
@@ -3906,6 +4265,9 @@ ExtendedPC os::get_thread_pc(Thread* thread) {
@@ -4086,6 +4369,9 @@ ExtendedPC os::get_thread_pc(Thread* thread) {
int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime)
{
@ -1082,7 +1210,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (is_NPTL()) {
return pthread_cond_timedwait(_cond, _mutex, _abstime);
} else {
@@ -3921,6 +4283,7 @@ int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond
@@ -4101,6 +4387,7 @@ int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond
#endif // IA64
return status;
}
@ -1090,7 +1218,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
////////////////////////////////////////////////////////////////////////////////
@@ -4056,17 +4419,17 @@ int os::create_binary_file(const char* path, bool rewr
@@ -4233,17 +4520,17 @@ int os::create_binary_file(const char* path, bool rewr
if (!rewrite_existing) {
oflags |= O_EXCL;
}
@ -1111,7 +1239,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// Map a block of memory.
@@ -4116,6 +4479,7 @@ bool os::unmap_memory(char* addr, size_t bytes) {
@@ -4293,6 +4580,7 @@ bool os::unmap_memory(char* addr, size_t bytes) {
return munmap(addr, bytes) == 0;
}
@ -1119,7 +1247,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time);
static clockid_t thread_cpu_clockid(Thread* thread) {
@@ -4127,6 +4491,7 @@ static clockid_t thread_cpu_clockid(Thread* thread) {
@@ -4304,6 +4592,7 @@ static clockid_t thread_cpu_clockid(Thread* thread) {
assert(rc == 0, "pthread_getcpuclockid is expected to return 0 code");
return clockid;
}
@ -1127,7 +1255,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// current_thread_cpu_time(bool) and thread_cpu_time(Thread*, bool)
// are used by JVM M&M and JVMTI to get user+sys or user CPU time
@@ -4136,39 +4501,71 @@ static clockid_t thread_cpu_clockid(Thread* thread) {
@@ -4313,39 +4602,71 @@ static clockid_t thread_cpu_clockid(Thread* thread) {
// the fast estimate available on the platform.
jlong os::current_thread_cpu_time() {
@ -1199,7 +1327,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
//
// -1 on error.
//
@@ -4257,6 +4654,7 @@ static jlong slow_thread_cpu_time(Thread *thread, bool
@@ -4435,6 +4756,7 @@ static jlong slow_thread_cpu_time(Thread *thread, bool
return (jlong)user_time * (1000000000 / clock_tics_per_sec);
}
}
@ -1207,7 +1335,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) {
info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits
@@ -4273,7 +4671,13 @@ void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr
@@ -4451,7 +4773,13 @@ void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr
}
bool os::is_thread_cpu_time_supported() {
@ -1221,7 +1349,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
}
// System loadavg support. Returns -1 if load average cannot be obtained.
@@ -4406,7 +4810,7 @@ jdk_pthread_sigmask(int how , const sigset_t* newmask,
@@ -4584,7 +4912,7 @@ jdk_pthread_sigmask(int how , const sigset_t* newmask,
// abstime will be the absolute timeout time
// TODO: replace compute_abstime() with unpackTime()
@ -1230,7 +1358,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (millis < 0) millis = 0;
struct timeval now;
int status = gettimeofday(&now, NULL);
@@ -4458,7 +4862,7 @@ void os::PlatformEvent::park() { // AKA "down()"
@@ -4636,7 +4964,7 @@ void os::PlatformEvent::park() { // AKA "down()"
status = pthread_cond_wait(_cond, _mutex);
// for some reason, under 2.7 lwp_cond_wait() may return ETIME ...
// Treat this the same as if the wait was interrupted
@ -1239,7 +1367,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
assert_status(status == 0 || status == EINTR, status, "cond_wait");
}
-- _nParked ;
@@ -4516,10 +4920,10 @@ int os::PlatformEvent::park(jlong millis) {
@@ -4694,10 +5022,10 @@ int os::PlatformEvent::park(jlong millis) {
pthread_cond_init (_cond, NULL) ;
}
assert_status(status == 0 || status == EINTR ||
@ -1252,7 +1380,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// We consume and ignore EINTR and spurious wakeups.
}
--_nParked ;
@@ -4611,7 +5015,7 @@ void os::PlatformEvent::unpark() {
@@ -4789,7 +5117,7 @@ void os::PlatformEvent::unpark() {
* years from "now".
*/
@ -1261,16 +1389,16 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
assert (time > 0, "convertTime");
struct timeval now;
@@ -4670,7 +5074,7 @@ void Parker::park(bool isAbsolute, jlong time) {
@@ -4849,7 +5177,7 @@ void Parker::park(bool isAbsolute, jlong time) {
}
// Next, demultiplex/decode time arguments
- timespec absTime;
+ struct timespec absTime;
if (time < 0) { // don't wait at all
if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all
return;
}
@@ -4723,7 +5127,7 @@ void Parker::park(bool isAbsolute, jlong time) {
@@ -4903,7 +5231,7 @@ void Parker::park(bool isAbsolute, jlong time) {
}
}
assert_status(status == 0 || status == EINTR ||
@ -1279,7 +1407,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
status, "cond_timedwait");
#ifdef ASSERT
@@ -4765,16 +5169,14 @@ void Parker::unpark() {
@@ -4946,16 +5274,14 @@ void Parker::unpark() {
}
@ -1301,7 +1429,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
// Run the specified command in a separate process. Return its exit value,
// or -1 on failure (e.g. can't fork a new process).
// Unlike system(), this function can be called from signal handler. It
@@ -4787,8 +5189,7 @@ int os::fork_and_exec(char* cmd) {
@@ -4968,8 +5294,7 @@ int os::fork_and_exec(char* cmd) {
// separate process to execve. Make a direct syscall to fork process.
// On IA64 there's no fork syscall, we have to use fork() and hope for
// the best...
@ -1311,7 +1439,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt
if (pid < 0) {
// fork failed
@@ -4804,8 +5205,7 @@ int os::fork_and_exec(char* cmd) {
@@ -4985,8 +5310,7 @@ int os::fork_and_exec(char* cmd) {
// in the new process, so make a system call directly.
// IA64 should use normal execve() from glibc to match the glibc fork()
// above.

View File

@ -0,0 +1,49 @@
$OpenBSD: patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os/bsd/vm/vtune_bsd.cpp.orig Mon Oct 25 19:20:23 2010
+++ hotspot/src/os/bsd/vm/vtune_bsd.cpp Mon Oct 25 19:20:29 2010
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 1999, 2007, 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 "incls/_precompiled.incl"
+#include "incls/_vtune_bsd.cpp.incl"
+
+// empty implementation
+
+void VTune::start_GC() {}
+void VTune::end_GC() {}
+void VTune::start_class_load() {}
+void VTune::end_class_load() {}
+void VTune::exit() {}
+void VTune::register_stub(const char* name, address start, address end) {}
+
+void VTune::create_nmethod(nmethod* nm) {}
+void VTune::delete_nmethod(nmethod* nm) {}
+
+void vtune_init() {}
+
+
+// Reconciliation History
+// vtune_solaris.cpp 1.8 99/07/12 23:54:21
+// End

View File

@ -1,12 +1,9 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:03:24 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s.orig Fri May 15 16:25:28 2009
+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s Fri May 15 17:42:58 2009
@@ -19,8 +19,19 @@
# 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.
-#
+#
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.3 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s.orig Mon Oct 25 18:02:18 2010
+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s Mon Oct 25 19:20:46 2010
@@ -21,6 +21,17 @@
# questions.
#
+
+#ifdef __APPLE__
@ -136,7 +133,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
@@ -354,8 +385,8 @@ cs_CopyLeft:
@@ -355,8 +386,8 @@ cs_CopyLeft:
# void* to,
# size_t count)
.p2align 4,,15
@ -147,7 +144,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
@@ -431,10 +462,10 @@ acs_CopyLeft:
@@ -432,10 +463,10 @@ acs_CopyLeft:
# Equivalent to
# arrayof_conjoint_jints
.p2align 4,,15
@ -162,7 +159,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
pushl %esi
movl 4+12(%esp),%ecx # count
pushl %edi
@@ -494,7 +525,7 @@ ci_CopyLeft:
@@ -497,7 +528,7 @@ ci_CopyLeft:
#
# count treated as signed
#
@ -171,7 +168,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
# while (--count >= 0) {
# *to++ = *from++;
# }
@@ -504,8 +535,8 @@ ci_CopyLeft:
@@ -507,8 +538,8 @@ ci_CopyLeft:
# }
# }
.p2align 4,,15
@ -182,7 +179,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
movl 4+8(%esp),%ecx # count
movl 4+0(%esp),%eax # from
movl 4+4(%esp),%edx # to
@@ -533,8 +564,8 @@ cla_CopyLeft:
@@ -536,8 +567,8 @@ cla_CopyLeft:
# void* to,
# size_t count)
.p2align 4,,15
@ -193,7 +190,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0
pushl %esi
movl 4+12(%esp),%ecx
pushl %edi
@@ -632,8 +663,8 @@ mmx_acs_CopyLeft:
@@ -635,8 +666,8 @@ mmx_acs_CopyLeft:
# bool is_MP)
#
.p2align 4,,15

View File

@ -1,8 +1,8 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s,v 1.1 2009/05/23 03:03:24 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s.orig Fri May 15 17:43:50 2009
+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s Fri May 15 17:44:04 2009
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s.orig Mon Oct 25 18:02:18 2010
+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s Mon Oct 25 18:15:45 2010
@@ -21,6 +21,14 @@
# have any questions.
# questions.
#
+#ifdef __APPLE__

View File

@ -0,0 +1,29 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp.orig Mon Oct 25 19:21:21 2010
+++ hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Mon Oct 25 19:21:36 2010
@@ -22,9 +22,10 @@
*
*/
+//
// Sets the default values for platform dependent flags used by the runtime system.
// (see globals.hpp)
-
+//
define_pd_global(bool, DontYieldALot, false);
#ifdef AMD64
define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default
@@ -38,10 +39,11 @@ define_pd_global(intx, VMThreadStackSize, 512);
#endif // AMD64
define_pd_global(intx, CompilerThreadStackSize, 0);
+define_pd_global(intx, SurvivorRatio, 8);
-define_pd_global(uintx,JVMInvokeMethodSlack, 8192);
+define_pd_global(uintx, JVMInvokeMethodSlack, 8192);
// Only used on 64 bit platforms
-define_pd_global(uintx,HeapBaseMinAddress, 2*G);
+define_pd_global(uintx, HeapBaseMinAddress, 2*G);
// Only used on 64 bit Windows platforms
define_pd_global(bool, UseVectoredExceptions, false);

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig Fri May 15 16:25:28 2009
+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Sat May 16 16:49:25 2009
$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig Tue Jan 4 18:25:16 2011
+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Tue Jan 4 19:03:34 2011
@@ -44,23 +44,202 @@
# include <sys/wait.h>
# include <pwd.h>
@ -422,7 +422,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03
+ int rslt = pthread_stackseg_np(pthread_self(), &ss);
+
+ if (rslt != 0)
+ fatal1("pthread_stackseg_np failed with err = %d", rslt);
+ fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt));
+
+ *bottom = (address)((char *)ss.ss_sp - ss.ss_size);
+ *size = ss.ss_size;
@ -433,12 +433,12 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03
+
+ // JVM needs to know exact stack location, abort if it fails
+ if (rslt != 0)
+ fatal1("pthread_attr_init failed with err = %d", rslt);
+ fatal(err_msg("pthread_attr_init failed with err = %d", rslt));
+
+ rslt = pthread_attr_get_np(pthread_self(), &attr);
+
+ if (rslt != 0)
+ fatal1("pthread_attr_get_np failed with err = %d", rslt);
+ fatal(err_msg("pthread_attr_get_np failed with err = %d", rslt));
+
+ if (pthread_attr_getstackaddr(&attr, (void **)bottom) != 0 ||
+ pthread_attr_getstacksize(&attr, size) != 0) {
@ -499,11 +499,11 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03
+ st->print(", R15=" INTPTR_FORMAT, uc->context_r15);
st->cr();
- st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]);
- st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
- st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]);
- st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]);
+ st->print( "RIP=" INTPTR_FORMAT, uc->context_rip);
+ st->print(", EFL=" INTPTR_FORMAT, uc->context_flags);
+ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags);
+ st->print(", ERR=" INTPTR_FORMAT, uc->context_err);
st->cr();
- st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]);
@ -528,10 +528,66 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03
+ st->print(", EDI=" INTPTR_FORMAT, uc->context_edi);
st->cr();
- st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]);
- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2);
- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]);
- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2);
+ st->print( "EIP=" INTPTR_FORMAT, uc->context_eip);
+ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags);
#endif // AMD64
st->cr();
st->cr();
@@ -791,31 +1051,31 @@ void os::print_register_info(outputStream *st, void *c
// this is only for the "general purpose" registers
#ifdef AMD64
- st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]);
- st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]);
- st->print("RCX="); print_location(st, uc->uc_mcontext.gregs[REG_RCX]);
- st->print("RDX="); print_location(st, uc->uc_mcontext.gregs[REG_RDX]);
- st->print("RSP="); print_location(st, uc->uc_mcontext.gregs[REG_RSP]);
- st->print("RBP="); print_location(st, uc->uc_mcontext.gregs[REG_RBP]);
- st->print("RSI="); print_location(st, uc->uc_mcontext.gregs[REG_RSI]);
- st->print("RDI="); print_location(st, uc->uc_mcontext.gregs[REG_RDI]);
- st->print("R8 ="); print_location(st, uc->uc_mcontext.gregs[REG_R8]);
- st->print("R9 ="); print_location(st, uc->uc_mcontext.gregs[REG_R9]);
- st->print("R10="); print_location(st, uc->uc_mcontext.gregs[REG_R10]);
- st->print("R11="); print_location(st, uc->uc_mcontext.gregs[REG_R11]);
- st->print("R12="); print_location(st, uc->uc_mcontext.gregs[REG_R12]);
- st->print("R13="); print_location(st, uc->uc_mcontext.gregs[REG_R13]);
- st->print("R14="); print_location(st, uc->uc_mcontext.gregs[REG_R14]);
- st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]);
+ st->print("RAX="); print_location(st, uc->context_rax);
+ st->print("RBX="); print_location(st, uc->context_rbx);
+ st->print("RCX="); print_location(st, uc->context_rcx);
+ st->print("RDX="); print_location(st, uc->context_rdx);
+ st->print("RSP="); print_location(st, uc->context_rsp);
+ st->print("RBP="); print_location(st, uc->context_rbp);
+ st->print("RSI="); print_location(st, uc->context_rsi);
+ st->print("RDI="); print_location(st, uc->context_rdi);
+ st->print("R8 ="); print_location(st, uc->context_r8);
+ st->print("R9 ="); print_location(st, uc->context_r9);
+ st->print("R10="); print_location(st, uc->context_r10);
+ st->print("R11="); print_location(st, uc->context_r11);
+ st->print("R12="); print_location(st, uc->context_r12);
+ st->print("R13="); print_location(st, uc->context_r13);
+ st->print("R14="); print_location(st, uc->context_r14);
+ st->print("R15="); print_location(st, uc->context_r15);
#else
- st->print("EAX="); print_location(st, uc->uc_mcontext.gregs[REG_EAX]);
- st->print("EBX="); print_location(st, uc->uc_mcontext.gregs[REG_EBX]);
- st->print("ECX="); print_location(st, uc->uc_mcontext.gregs[REG_ECX]);
- st->print("EDX="); print_location(st, uc->uc_mcontext.gregs[REG_EDX]);
- st->print("ESP="); print_location(st, uc->uc_mcontext.gregs[REG_ESP]);
- st->print("EBP="); print_location(st, uc->uc_mcontext.gregs[REG_EBP]);
- st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[REG_ESI]);
- st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[REG_EDI]);
+ st->print("EAX="); print_location(st, uc->context_eax);
+ st->print("EBX="); print_location(st, uc->context_ebx);
+ st->print("ECX="); print_location(st, uc->context_ecx);
+ st->print("EDX="); print_location(st, uc->context_edx);
+ st->print("ESP="); print_location(st, uc->context_esp);
+ st->print("EBP="); print_location(st, uc->context_ebp);
+ st->print("ESI="); print_location(st, uc->context_esi);
+ st->print("EDI="); print_location(st, uc->context_edi);
#endif // AMD64
st->cr();

View File

@ -0,0 +1,660 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp.orig Fri Oct 29 11:43:00 2010
+++ hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp Fri Oct 29 12:02:31 2010
@@ -23,137 +23,442 @@
*
*/
-// Implementation of class atomic
+#include <sys/types.h>
+#ifdef __NetBSD__
+#include <sys/atomic.h>
+#elif __FreeBSD__
-#ifdef M68K
+#include <sys/types.h>
+#ifndef SPARC
+#include <machine/atomic.h>
+#else
/*
- * __m68k_cmpxchg
+ * On FreeBSD/sparc64, <machine/atomic.h> pulls in <machine/cpufunc.h>
+ * which includes definitions which cause conflicts with various
+ * definitions within HotSpot source. To avoid that, pull in those
+ * definitions verbatim instead of including the header. Yuck.
+ */
+
+/*-
+ * Copyright (c) 1998 Doug Rabson.
+ * Copyright (c) 2001 Jake Burkholder.
+ * All rights reserved.
*
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Returns newval on success and oldval if no exchange happened.
- * This implementation is processor specific and works on
- * 68020 68030 68040 and 68060.
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
*
- * It will not work on ColdFire, 68000 and 68010 since they lack the CAS
- * instruction.
- * Using a kernelhelper would be better for arch complete implementation.
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
*
*/
-static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) {
- int ret;
- __asm __volatile ("cas%.l %0,%2,%1"
- : "=d" (ret), "+m" (*(ptr))
- : "d" (newval), "0" (oldval));
- return ret;
-}
+#include <machine/asi.h>
-/* Perform an atomic compare and swap: if the current value of `*PTR'
- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of
- `*PTR' before the operation.*/
-static inline int m68k_compare_and_swap(volatile int *ptr,
- int oldval,
- int newval) {
- for (;;) {
- int prev = *ptr;
- if (prev != oldval)
- return prev;
+/*
+ * Membar operand macros for use in other macros when # is a special
+ * character. Keep these in sync with what the hardware expects.
+ */
+#define M_LoadLoad (0)
+#define M_StoreLoad (1)
+#define M_LoadStore (2)
+#define M_StoreStore (3)
- if (__m68k_cmpxchg (prev, newval, ptr) == newval)
- // Success.
- return prev;
+#define CMASK_SHIFT (4)
+#define MMASK_SHIFT (0)
- // We failed even though prev == oldval. Try again.
- }
-}
+#define CMASK_GEN(bit) ((1 << (bit)) << CMASK_SHIFT)
+#define MMASK_GEN(bit) ((1 << (bit)) << MMASK_SHIFT)
-/* Atomically add an int to memory. */
-static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) {
- for (;;) {
- // Loop until success.
+#define LoadLoad MMASK_GEN(M_LoadLoad)
+#define StoreLoad MMASK_GEN(M_StoreLoad)
+#define LoadStore MMASK_GEN(M_LoadStore)
+#define StoreStore MMASK_GEN(M_StoreStore)
- int prev = *ptr;
+#define casa(rs1, rs2, rd, asi) ({ \
+ u_int __rd = (uint32_t)(rd); \
+ __asm __volatile("casa [%2] %3, %4, %0" \
+ : "+r" (__rd), "=m" (*rs1) \
+ : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \
+ __rd; \
+})
- if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value)
- return prev + add_value;
- }
-}
+#define casxa(rs1, rs2, rd, asi) ({ \
+ u_long __rd = (uint64_t)(rd); \
+ __asm __volatile("casxa [%2] %3, %4, %0" \
+ : "+r" (__rd), "=m" (*rs1) \
+ : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \
+ __rd; \
+})
-/* Atomically write VALUE into `*PTR' and returns the previous
- contents of `*PTR'. */
-static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) {
- for (;;) {
- // Loop until success.
- int prev = *ptr;
+#define membar(mask) do { \
+ __asm __volatile("membar %0" : : "n" (mask) : "memory"); \
+} while (0)
- if (__m68k_cmpxchg (prev, newval, ptr) == prev)
- return prev;
- }
-}
-#endif // M68K
+#ifdef _KERNEL
+#define __ASI_ATOMIC ASI_N
+#else
+#define __ASI_ATOMIC ASI_P
+#endif
-#ifdef ARM
+#define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory")
+#define wmb() mb()
+#define rmb() mb()
/*
- * __kernel_cmpxchg
+ * Various simple arithmetic on memory which is atomic in the presence
+ * of interrupts and multiple processors. See atomic(9) for details.
+ * Note that efficient hardware support exists only for the 32 and 64
+ * bit variants; the 8 and 16 bit versions are not provided and should
+ * not be used in MI code.
*
- * Atomically store newval in *ptr if *ptr is equal to oldval for user space.
- * Return zero if *ptr was changed or non-zero if no exchange happened.
- * The C flag is also set if *ptr was changed to allow for assembly
- * optimization in the calling code.
+ * This implementation takes advantage of the fact that the sparc64
+ * cas instruction is both a load and a store. The loop is often coded
+ * as follows:
*
+ * do {
+ * expect = *p;
+ * new = expect + 1;
+ * } while (cas(p, expect, new) != expect);
+ *
+ * which performs an unnnecessary load on each iteration that the cas
+ * operation fails. Modified as follows:
+ *
+ * expect = *p;
+ * for (;;) {
+ * new = expect + 1;
+ * result = cas(p, expect, new);
+ * if (result == expect)
+ * break;
+ * expect = result;
+ * }
+ *
+ * the return value of cas is used to avoid the extra reload.
+ *
+ * The memory barriers provided by the acq and rel variants are intended
+ * to be sufficient for use of relaxed memory ordering. Due to the
+ * suggested assembly syntax of the membar operands containing a #
+ * character, they cannot be used in macros. The cmask and mmask bits
+ * are hard coded in machine/cpufunc.h and used here through macros.
+ * Hopefully sun will choose not to change the bit numbers.
*/
-typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr);
-#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0)
+#define itype(sz) uint ## sz ## _t
+#define atomic_cas_32(p, e, s) casa(p, e, s, __ASI_ATOMIC)
+#define atomic_cas_64(p, e, s) casxa(p, e, s, __ASI_ATOMIC)
+#define atomic_cas(p, e, s, sz) \
+ atomic_cas_ ## sz(p, e, s)
-/* Perform an atomic compare and swap: if the current value of `*PTR'
- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of
- `*PTR' before the operation.*/
-static inline int arm_compare_and_swap(volatile int *ptr,
- int oldval,
- int newval) {
- for (;;) {
- int prev = *ptr;
- if (prev != oldval)
- return prev;
+#define atomic_cas_acq(p, e, s, sz) ({ \
+ itype(sz) v; \
+ v = atomic_cas(p, e, s, sz); \
+ membar(LoadLoad | LoadStore); \
+ v; \
+})
- if (__kernel_cmpxchg (prev, newval, ptr) == 0)
- // Success.
- return prev;
+#define atomic_cas_rel(p, e, s, sz) ({ \
+ itype(sz) v; \
+ membar(LoadStore | StoreStore); \
+ v = atomic_cas(p, e, s, sz); \
+ v; \
+})
- // We failed even though prev == oldval. Try again.
- }
+#define atomic_op(p, op, v, sz) ({ \
+ itype(sz) e, r, s; \
+ for (e = *(volatile itype(sz) *)p;; e = r) { \
+ s = e op v; \
+ r = atomic_cas_ ## sz(p, e, s); \
+ if (r == e) \
+ break; \
+ } \
+ e; \
+})
+
+#define atomic_op_acq(p, op, v, sz) ({ \
+ itype(sz) t; \
+ t = atomic_op(p, op, v, sz); \
+ membar(LoadLoad | LoadStore); \
+ t; \
+})
+
+#define atomic_op_rel(p, op, v, sz) ({ \
+ itype(sz) t; \
+ membar(LoadStore | StoreStore); \
+ t = atomic_op(p, op, v, sz); \
+ t; \
+})
+
+#define atomic_load(p, sz) \
+ atomic_cas(p, 0, 0, sz)
+
+#define atomic_load_acq(p, sz) ({ \
+ itype(sz) v; \
+ v = atomic_load(p, sz); \
+ membar(LoadLoad | LoadStore); \
+ v; \
+})
+
+#define atomic_load_clear(p, sz) ({ \
+ itype(sz) e, r; \
+ for (e = *(volatile itype(sz) *)p;; e = r) { \
+ r = atomic_cas(p, e, 0, sz); \
+ if (r == e) \
+ break; \
+ } \
+ e; \
+})
+
+#define atomic_store(p, v, sz) do { \
+ itype(sz) e, r; \
+ for (e = *(volatile itype(sz) *)p;; e = r) { \
+ r = atomic_cas(p, e, v, sz); \
+ if (r == e) \
+ break; \
+ } \
+} while (0)
+
+#define atomic_store_rel(p, v, sz) do { \
+ membar(LoadStore | StoreStore); \
+ atomic_store(p, v, sz); \
+} while (0)
+
+#define ATOMIC_GEN(name, ptype, vtype, atype, sz) \
+ \
+static __inline vtype \
+atomic_add_ ## name(volatile ptype p, atype v) \
+{ \
+ return ((vtype)atomic_op(p, +, v, sz)); \
+} \
+static __inline vtype \
+atomic_add_acq_ ## name(volatile ptype p, atype v) \
+{ \
+ return ((vtype)atomic_op_acq(p, +, v, sz)); \
+} \
+static __inline vtype \
+atomic_add_rel_ ## name(volatile ptype p, atype v) \
+{ \
+ return ((vtype)atomic_op_rel(p, +, v, sz)); \
+} \
+ \
+static __inline int \
+atomic_cmpset_ ## name(volatile ptype p, vtype e, vtype s) \
+{ \
+ return (((vtype)atomic_cas(p, e, s, sz)) == e); \
+} \
+static __inline int \
+atomic_cmpset_acq_ ## name(volatile ptype p, vtype e, vtype s) \
+{ \
+ return (((vtype)atomic_cas_acq(p, e, s, sz)) == e); \
+} \
+static __inline int \
+atomic_cmpset_rel_ ## name(volatile ptype p, vtype e, vtype s) \
+{ \
+ return (((vtype)atomic_cas_rel(p, e, s, sz)) == e); \
+} \
+ \
+static __inline vtype \
+atomic_load_ ## name(volatile ptype p) \
+{ \
+ return ((vtype)atomic_cas(p, 0, 0, sz)); \
+} \
+static __inline vtype \
+atomic_load_acq_ ## name(volatile ptype p) \
+{ \
+ return ((vtype)atomic_cas_acq(p, 0, 0, sz)); \
+} \
+ \
+static __inline void \
+atomic_store_ ## name(volatile ptype p, vtype v) \
+{ \
+ atomic_store(p, v, sz); \
+} \
+static __inline void \
+atomic_store_rel_ ## name(volatile ptype p, vtype v) \
+{ \
+ atomic_store_rel(p, v, sz); \
}
-/* Atomically add an int to memory. */
-static inline int arm_add_and_fetch(volatile int *ptr, int add_value) {
- for (;;) {
- // Loop until a __kernel_cmpxchg succeeds.
+ATOMIC_GEN(int, u_int *, u_int, u_int, 32);
+ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32);
- int prev = *ptr;
+ATOMIC_GEN(long, u_long *, u_long, u_long, 64);
+ATOMIC_GEN(64, uint64_t *, uint64_t, uint64_t, 64);
- if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0)
- return prev + add_value;
- }
+ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64);
+
+#define atomic_fetchadd_int atomic_add_int
+#define atomic_fetchadd_32 atomic_add_32
+#define atomic_fetchadd_long atomic_add_long
+
+#undef ATOMIC_GEN
+#undef atomic_cas
+#undef atomic_cas_acq
+#undef atomic_cas_rel
+#undef atomic_op
+#undef atomic_op_acq
+#undef atomic_op_rel
+#undef atomic_load_acq
+#undef atomic_store_rel
+#undef atomic_load_clear
+#endif
+
+static __inline __attribute__((__always_inline__))
+unsigned int atomic_add_int_nv(volatile unsigned int* dest, unsigned int add_value)
+{
+ atomic_add_acq_int(dest, add_value);
+ return *dest;
}
-/* Atomically write VALUE into `*PTR' and returns the previous
- contents of `*PTR'. */
-static inline int arm_lock_test_and_set(volatile int *ptr, int newval) {
- for (;;) {
- // Loop until a __kernel_cmpxchg succeeds.
- int prev = *ptr;
+static __inline __attribute__((__always_inline__))
+uintptr_t atomic_add_ptr_nv(volatile intptr_t* dest, intptr_t add_value)
+{
+ atomic_add_acq_ptr((volatile uintptr_t*) dest, (uintptr_t) add_value);
+ return *((volatile uintptr_t*) dest);
+}
- if (__kernel_cmpxchg (prev, newval, ptr) == 0)
- return prev;
- }
+static __inline __attribute__((__always_inline__))
+unsigned int
+atomic_swap_uint(volatile unsigned int *dest, unsigned int exchange_value)
+{
+ jint prev = *dest;
+ atomic_store_rel_int(dest, exchange_value);
+ return prev;
}
-#endif // ARM
+static __inline __attribute__((__always_inline__))
+void *
+atomic_swap_ptr(volatile void *dest, void *exchange_value)
+{
+ void *prev = *(void **)dest;
+ atomic_store_rel_ptr((volatile uintptr_t*) dest, (uintptr_t) exchange_value);
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+unsigned int
+atomic_cas_uint(volatile unsigned int *dest, unsigned int compare_value,
+ unsigned int exchange_value)
+{
+ unsigned int prev = *dest;
+ atomic_cmpset_acq_int(dest, compare_value, exchange_value);
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+unsigned long
+atomic_cas_ulong(volatile unsigned long *dest, unsigned long compare_value,
+ unsigned long exchange_value)
+{
+ unsigned long prev = *dest;
+ atomic_cmpset_acq_long(dest, compare_value, exchange_value);
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+void *
+atomic_cas_ptr(volatile void *dest, void *compare_value, void *exchange_value)
+{
+ void *prev = *(void **)dest;
+ atomic_cmpset_acq_ptr((volatile uintptr_t*) dest, (uintptr_t) compare_value, (uintptr_t) exchange_value);
+ return prev;
+}
+
+#elif defined(__APPLE__)
+
+#include <libkern/OSAtomic.h>
+
+static __inline __attribute__((__always_inline__))
+unsigned int
+atomic_add_int_nv(volatile unsigned int *target, int delta) {
+ return (unsigned int) OSAtomicAdd32Barrier(delta, (volatile int32_t *) target);
+}
+
+static __inline __attribute__((__always_inline__))
+void *
+atomic_add_ptr_nv(volatile void *target, ssize_t delta) {
+#ifdef __LP64__
+ return (void *) OSAtomicAdd64Barrier(delta, (volatile int64_t *) target);
+#else
+ return (void *) OSAtomicAdd32Barrier(delta, (volatile int32_t *) target);
+#endif
+}
+
+
+static __inline __attribute__((__always_inline__))
+unsigned int
+atomic_swap_uint(volatile unsigned int *dest, unsigned int exchange_value)
+{
+ /* No xchg support in OSAtomic */
+ unsigned int prev;
+ do {
+ prev = *dest;
+ } while (!OSAtomicCompareAndSwapIntBarrier((int) prev, (int) exchange_value, (volatile int *) dest));
+
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+void *
+atomic_swap_ptr(volatile void *dest, void *exchange_value)
+{
+ /* No xchg support in OSAtomic */
+ void *prev;
+ do {
+ prev = *((void * volatile *) dest);
+ } while (!OSAtomicCompareAndSwapPtrBarrier(prev, exchange_value, (void * volatile *) dest));
+
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+unsigned int
+atomic_cas_uint(volatile unsigned int *dest, unsigned int compare_value,
+ unsigned int exchange_value)
+{
+ unsigned int prev = *dest;
+ OSAtomicCompareAndSwapIntBarrier(compare_value, exchange_value, (volatile int *) dest);
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+unsigned long
+atomic_cas_ulong(volatile unsigned long *dest, unsigned long compare_value,
+ unsigned long exchange_value)
+{
+ unsigned long prev = *dest;
+ OSAtomicCompareAndSwapLongBarrier(compare_value, exchange_value, (volatile long *) dest);
+ return prev;
+}
+
+static __inline __attribute__((__always_inline__))
+void *
+atomic_cas_ptr(volatile void *dest, void *compare_value, void *exchange_value)
+{
+ void *prev = *(void **)dest;
+ OSAtomicCompareAndSwapPtrBarrier(compare_value, exchange_value, (void * volatile *) dest);
+ return prev;
+}
+
+
+#endif
+
inline void Atomic::store(jint store_value, volatile jint* dest) {
*dest = store_value;
}
@@ -163,27 +468,11 @@ inline void Atomic::store_ptr(intptr_t store_value, in
}
inline jint Atomic::add(jint add_value, volatile jint* dest) {
-#ifdef ARM
- return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
- return m68k_add_and_fetch(dest, add_value);
-#else
- return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
+ return (jint)atomic_add_int_nv((volatile unsigned int*) dest, add_value);
}
inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) {
-#ifdef ARM
- return arm_add_and_fetch(dest, add_value);
-#else
-#ifdef M68K
- return m68k_add_and_fetch(dest, add_value);
-#else
- return __sync_add_and_fetch(dest, add_value);
-#endif // M68K
-#endif // ARM
+ return (intptr_t)atomic_add_ptr_nv(dest, add_value);
}
inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) {
@@ -215,79 +504,41 @@ inline void Atomic::dec_ptr(volatile void* dest) {
}
inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) {
-#ifdef ARM
- return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
- return m68k_lock_test_and_set(dest, exchange_value);
-#else
- // __sync_lock_test_and_set is a bizarrely named atomic exchange
- // operation. Note that some platforms only support this with the
- // limitation that the only valid value to store is the immediate
- // constant 1. There is a test for this in JNI_CreateJavaVM().
- return __sync_lock_test_and_set (dest, exchange_value);
-#endif // M68K
-#endif // ARM
+ return (jint)atomic_swap_uint((volatile u_int *)dest, (u_int)exchange_value);
}
inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value,
volatile intptr_t* dest) {
-#ifdef ARM
- return arm_lock_test_and_set(dest, exchange_value);
-#else
-#ifdef M68K
- return m68k_lock_test_and_set(dest, exchange_value);
-#else
- return __sync_lock_test_and_set (dest, exchange_value);
-#endif // M68K
-#endif // ARM
+ return (intptr_t)atomic_swap_ptr((volatile void *)dest,
+ (void *)exchange_value);
}
inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) {
- return (void *) xchg_ptr((intptr_t) exchange_value,
- (volatile intptr_t*) dest);
+ return atomic_swap_ptr(dest, exchange_value);
}
inline jint Atomic::cmpxchg(jint exchange_value,
volatile jint* dest,
jint compare_value) {
-#ifdef ARM
- return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
- return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
- return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
+ return atomic_cas_uint((volatile u_int *)dest, compare_value, exchange_value);
}
inline jlong Atomic::cmpxchg(jlong exchange_value,
volatile jlong* dest,
jlong compare_value) {
-
- return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
+ return atomic_cas_ulong((volatile u_long *)dest, compare_value,
+ exchange_value);
}
inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value,
volatile intptr_t* dest,
intptr_t compare_value) {
-#ifdef ARM
- return arm_compare_and_swap(dest, compare_value, exchange_value);
-#else
-#ifdef M68K
- return m68k_compare_and_swap(dest, compare_value, exchange_value);
-#else
- return __sync_val_compare_and_swap(dest, compare_value, exchange_value);
-#endif // M68K
-#endif // ARM
+ return (intptr_t)atomic_cas_ptr((volatile void *)dest, (void *)compare_value,
+ (void *)exchange_value);
}
inline void* Atomic::cmpxchg_ptr(void* exchange_value,
volatile void* dest,
void* compare_value) {
-
- return (void *) cmpxchg_ptr((intptr_t) exchange_value,
- (volatile intptr_t*) dest,
- (intptr_t) compare_value);
+ return atomic_cas_ptr((volatile void *)dest, compare_value, exchange_value);
}

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_zero/vm/bytes_bsd_zero.inline.hpp.orig Fri Oct 29 12:02:41 2010
+++ hotspot/src/os_cpu/bsd_zero/vm/bytes_bsd_zero.inline.hpp Fri Oct 29 12:02:50 2010
@@ -25,16 +25,23 @@
// Efficient swapping of data bytes from Java byte
// ordering to native byte ordering and vice versa.
-#include <byteswap.h>
+#ifdef __APPLE__
+#include <libkern/OSByteOrder.h>
+#define bswap16(x) OSSwapInt16(x)
+#define bswap32(x) OSSwapInt32(x)
+#define bswap64(x) OSSwapInt64(x)
+#else
+# include <sys/endian.h>
+#endif
inline u2 Bytes::swap_u2(u2 x) {
- return bswap_16(x);
+ return bswap16(x);
}
inline u4 Bytes::swap_u4(u4 x) {
- return bswap_32(x);
+ return bswap32(x);
}
inline u8 Bytes::swap_u8(u8 x) {
- return bswap_64(x);
+ return bswap64(x);
}

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp.orig Fri Oct 29 12:03:21 2010
+++ hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp Fri Oct 29 12:03:27 2010
@@ -40,7 +40,12 @@ typedef void (__kernel_dmb_t) (void);
#else // ARM
+#ifdef __APPLE__
+#include <libkern/OSAtomic.h>
+#define FULL_MEM_BARRIER OSMemoryBarrier()
+#else
#define FULL_MEM_BARRIER __sync_synchronize()
+#endif // __APPLE__
#ifdef PPC

View File

@ -0,0 +1,119 @@
$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp.orig Fri Oct 29 12:03:50 2010
+++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp Fri Oct 29 12:03:57 2010
@@ -23,6 +23,10 @@
*
*/
+#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__)
+# include <pthread_np.h> /* For pthread_attr_get_np */
+#endif
+
// do not include precompiled header file
#include "incls/_os_bsd_zero.cpp.incl"
@@ -145,6 +149,7 @@ JVM_handle_bsd_signal(int sig,
thread->disable_stack_red_zone();
ShouldNotCallThis();
}
+#ifndef _ALLBSD_SOURCE
else {
// Accessing stack address below sp may cause SEGV if
// current thread has MAP_GROWSDOWN stack. This should
@@ -163,6 +168,7 @@ JVM_handle_bsd_signal(int sig,
fatal("recursive segv. expanding stack.");
}
}
+#endif
}
}
@@ -230,6 +236,7 @@ void os::Bsd::init_thread_fpu_state(void) {
// Nothing to do
}
+#ifndef _ALLBSD_SOURCE
int os::Bsd::get_fpu_control_word() {
ShouldNotCallThis();
}
@@ -237,6 +244,7 @@ int os::Bsd::get_fpu_control_word() {
void os::Bsd::set_fpu_control_word(int fpu) {
ShouldNotCallThis();
}
+#endif
bool os::is_allocatable(size_t bytes) {
#ifdef _LP64
@@ -281,7 +289,49 @@ size_t os::Bsd::default_guard_size(os::ThreadType thr_
}
static void current_stack_region(address *bottom, size_t *size) {
+ address stack_bottom;
+ address stack_top;
+ size_t stack_bytes;
+
+#ifdef __APPLE__
+ pthread_t self = pthread_self();
+ stack_top = (address) pthread_get_stackaddr_np(self);
+ stack_bytes = pthread_get_stacksize_np(self);
+ stack_bottom = stack_top - stack_bytes;
+#elif defined(__OpenBSD__)
+ stack_t ss;
+ int rslt = pthread_stackseg_np(pthread_self(), &ss);
+
+ if (rslt != 0)
+ fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt));
+
+ stack_top = (address) ss.ss_sp;
+ stack_bytes = ss.ss_size;
+ stack_bottom = stacktop - stack_bytes;
+#elif defined(_ALLBSD_SOURCE)
pthread_attr_t attr;
+
+ int rslt = pthread_attr_init(&attr);
+
+ // JVM needs to know exact stack location, abort if it fails
+ if (rslt != 0)
+ fatal(err_msg("pthread_attr_init failed with err = %d", rslt));
+
+ rslt = pthread_attr_get_np(pthread_self(), &attr);
+
+ if (rslt != 0)
+ fatal(err_msg("pthread_attr_get_np failed with err = %d", rslt));
+
+ if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 ||
+ pthread_attr_getstacksize(&attr, &stack_bytes) != 0) {
+ fatal("Can not locate current stack attributes!");
+ }
+
+ pthread_attr_destroy(&attr);
+
+ stack_top = stack_bottom + stack_bytes;
+#else /* Linux */
+ pthread_attr_t attr;
int res = pthread_getattr_np(pthread_self(), &attr);
if (res != 0) {
if (res == ENOMEM) {
@@ -292,13 +342,11 @@ static void current_stack_region(address *bottom, size
}
}
- address stack_bottom;
- size_t stack_bytes;
res = pthread_attr_getstack(&attr, (void **) &stack_bottom, &stack_bytes);
if (res != 0) {
fatal(err_msg("pthread_attr_getstack failed with errno = %d", res));
}
- address stack_top = stack_bottom + stack_bytes;
+ stack_top = stack_bottom + stack_bytes;
// The block of memory returned by pthread_attr_getstack() includes
// guard pages where present. We need to trim these off.
@@ -340,6 +388,7 @@ static void current_stack_region(address *bottom, size
stack_bottom = stack_top - stack_bytes;
}
+#endif
assert(os::current_stack_pointer() >= stack_bottom, "should do");
assert(os::current_stack_pointer() < stack_top, "should do");

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-hotspot_src_share_vm_classfile_javaClasses_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/classfile/javaClasses.cpp.orig Fri Oct 29 14:47:34 2010
+++ hotspot/src/share/vm/classfile/javaClasses.cpp Fri Oct 29 14:47:42 2010
@@ -952,7 +952,7 @@ char* java_lang_Throwable::print_stack_element_to_buff
}
nmethod* nm = method->code();
if (WizardMode && nm != NULL) {
- sprintf(buf + (int)strlen(buf), "(nmethod " PTR_FORMAT ")", (intptr_t)nm);
+ sprintf(buf + (int)strlen(buf), "(nmethod " INTPTR_FORMAT ")", (intptr_t)nm);
}
}

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp.orig Fri May 8 03:30:34 2009
+++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Sat May 9 10:15:54 2009
@@ -77,7 +77,7 @@ class BytecodePrinter: public BytecodeClosure {
$OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp.orig Fri Aug 13 03:28:22 2010
+++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Mon Oct 25 19:45:44 2010
@@ -83,7 +83,7 @@ class BytecodePrinter: public BytecodeClosure {
// the incoming method. We could lose a line of trace output.
// This is acceptable in a debug-only feature.
st->cr();
@ -10,10 +10,10 @@ $OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.4 2009/0
method->print_name(st);
st->cr();
_current_method = method();
@@ -90,7 +90,7 @@ class BytecodePrinter: public BytecodeClosure {
code = Bytecodes::code_at(bcp);
@@ -97,7 +97,7 @@ class BytecodePrinter: public BytecodeClosure {
}
int bci = bcp - method->code_base();
_code = code;
int bci = bcp - method->code_base();
- st->print("[%d] ", (int) Thread::current()->osthread()->thread_id());
+ st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id());
if (Verbose) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.1 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/prims/forte.cpp.orig Sat May 16 17:05:01 2009
+++ hotspot/src/share/vm/prims/forte.cpp Sat May 16 17:05:10 2009
@@ -626,6 +626,11 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint de
$OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.2 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/prims/forte.cpp.orig Fri Aug 13 03:28:24 2010
+++ hotspot/src/share/vm/prims/forte.cpp Mon Oct 25 18:15:45 2010
@@ -629,6 +629,11 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint de
// Method to let libcollector know about a dynamically loaded function.
// Because it is weakly bound, the calls become NOP's when the library
// isn't present.
@ -13,7 +13,7 @@ $OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.1 2009/05/23 03:03:25 k
void collector_func_load(char* name,
void* null_argument_1,
void* null_argument_2,
@@ -636,6 +641,7 @@ void collector_func_load(char* name,
@@ -639,6 +644,7 @@ void collector_func_load(char* name,
#pragma weak collector_func_load
#define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \
( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 )

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-hotspot_src_share_vm_runtime_globals_hpp,v 1.5 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/runtime/globals.hpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/runtime/globals.hpp Sat May 9 10:15:54 2009
@@ -316,7 +316,7 @@ class CommandLineFlags {
/* UseMembar is theoretically a temp flag used for memory barrier \
* removal testing. It was supposed to be removed before FCS but has \
* been re-added (see 6401008) */ \
- product(bool, UseMembar, false, \
+ product(bool, UseMembar, true, \
"(Unstable) Issues membars on thread state transitions") \
\
product(bool, PrintCommandLineFlags, false, \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/runtime/os.cpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/runtime/os.cpp Sun May 10 19:23:00 2009
$OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/runtime/os.cpp.orig Thu Dec 16 16:53:09 2010
+++ hotspot/src/share/vm/runtime/os.cpp Wed Jan 5 22:30:08 2011
@@ -79,7 +79,11 @@ char* os::iso8601_time(char* buffer, size_t buffer_len
assert(false, "Failed localtime_pd");
return NULL;
@ -13,3 +13,16 @@ $OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.4 2009/05/23 03:03:25 ku
// If daylight savings time is in effect,
// we are 1 hour East of our time zone
@@ -347,6 +351,12 @@ void* os::native_java_library() {
if (_native_java_library == NULL) {
vm_exit_during_initialization("Unable to load native library", ebuf);
}
+#if defined(__OpenBSD__)
+ // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so
+ // ignore errors
+ dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net");
+ dll_load(buffer, ebuf, sizeof(ebuf));
+#endif
}
static jboolean onLoaded = JNI_FALSE;
if (onLoaded) {

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.6 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/runtime/vm_version.cpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/runtime/vm_version.cpp Fri May 15 17:50:17 2009
@@ -140,7 +140,8 @@ const char* Abstract_VM_Version::vm_release() {
$OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.7 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/runtime/vm_version.cpp.orig Thu Oct 28 20:17:02 2010
+++ hotspot/src/share/vm/runtime/vm_version.cpp Mon Nov 1 13:16:17 2010
@@ -149,7 +149,8 @@ const char* Abstract_VM_Version::vm_release() {
#define OS LINUX_ONLY("linux") \
WINDOWS_ONLY("windows") \
@ -9,5 +9,5 @@ $OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.6 2009/05/23 03:
+ SOLARIS_ONLY("solaris") \
+ BSD_ONLY("bsd")
#define CPU IA32_ONLY("x86") \
IA64_ONLY("ia64") \
#ifdef ZERO
#define CPU ZERO_LIBARCH

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.4 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Fri May 15 17:50:50 2009
$OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.5 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig Thu Oct 28 20:17:03 2010
+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Mon Nov 1 13:16:17 2010
@@ -71,12 +71,25 @@
# include <sys/procfs.h>
# endif
@ -56,7 +56,7 @@ $OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.4 2
// Additional Java basic types
@@ -228,7 +241,9 @@ inline int g_isnan(float f) { return isnanf(f); }
@@ -236,7 +249,9 @@ inline int g_isnan(float f) { return isnanf(f); }
inline int g_isnan(float f) { return isnand(f); }
#endif
inline int g_isnan(double f) { return isnand(f); }

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_share_vm_utilities_macros_hpp,v 1.8 2009/10/07 01:53:54 kurt Exp $
--- hotspot/src/share/vm/utilities/macros.hpp.orig Thu Sep 17 03:48:17 2009
+++ hotspot/src/share/vm/utilities/macros.hpp Sat Sep 26 10:00:47 2009
@@ -148,6 +148,14 @@
$OpenBSD: patch-hotspot_src_share_vm_utilities_macros_hpp,v 1.9 2011/01/11 15:47:49 kurt Exp $
--- hotspot/src/share/vm/utilities/macros.hpp.orig Thu Oct 28 20:17:03 2010
+++ hotspot/src/share/vm/utilities/macros.hpp Mon Nov 1 13:16:17 2010
@@ -158,6 +158,14 @@
#define NOT_WINDOWS(code) code
#endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-hotspot_src_share_vm_utilities_ostream_cpp,v 1.3 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/utilities/ostream.cpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/utilities/ostream.cpp Sat May 9 10:15:54 2009
@@ -827,7 +827,7 @@ bufferedStream::~bufferedStream() {
$OpenBSD: patch-hotspot_src_share_vm_utilities_ostream_cpp,v 1.4 2011/01/11 15:47:50 kurt Exp $
--- hotspot/src/share/vm/utilities/ostream.cpp.orig Fri Aug 13 03:28:25 2010
+++ hotspot/src/share/vm/utilities/ostream.cpp Mon Oct 25 18:15:45 2010
@@ -848,7 +848,7 @@ bufferedStream::~bufferedStream() {
#ifndef PRODUCT

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.6 2009/05/23 03:03:25 kurt Exp $
--- hotspot/src/share/vm/utilities/vmError.cpp.orig Fri May 8 03:30:37 2009
+++ hotspot/src/share/vm/utilities/vmError.cpp Fri May 15 17:51:40 2009
$OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.7 2011/01/11 15:47:50 kurt Exp $
--- hotspot/src/share/vm/utilities/vmError.cpp.orig Thu Dec 16 16:53:14 2010
+++ hotspot/src/share/vm/utilities/vmError.cpp Tue Jan 4 18:25:20 2011
@@ -31,13 +31,18 @@ const char *env_list[] = {
"JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH",
"JAVA_COMPILER", "PATH", "USERNAME",
@ -21,7 +21,7 @@ $OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.6 2009/05/23 03:0
// defined on Windows
"OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR",
@@ -799,7 +804,7 @@ void VMError::report_and_die() {
@@ -875,7 +880,7 @@ void VMError::report_and_die() {
const char* ptr = OnError;
while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){
out.print_raw ("# Executing ");

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/com/sun/java/pack/Makefile.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/com/sun/java/pack/Makefile Sat Sep 26 10:00:47 2009
@@ -61,6 +61,7 @@ vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
$OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.4 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/com/sun/java/pack/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/com/sun/java/pack/Makefile Mon Oct 25 18:15:45 2010
@@ -62,6 +62,7 @@ vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR)
ifeq ($(STANDALONE),true)
@ -9,7 +9,7 @@ $OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 ku
ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME)
ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \
@@ -77,6 +78,10 @@ ifeq ($(STANDALONE),true)
@@ -78,6 +79,10 @@ ifeq ($(STANDALONE),true)
ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION)
OTHER_CXXFLAGS += $(ZINCLUDE)
LDDFLAGS += $(ZIPOBJS)
@ -20,7 +20,7 @@ $OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 ku
else
OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI
OTHER_LDLIBS += $(JVMLIB)
@@ -98,7 +103,11 @@ ifeq ($(PLATFORM), windows)
@@ -99,7 +104,11 @@ ifeq ($(PLATFORM), windows)
RES = $(OBJDIR)/$(PGRM).res
else
LDOUTPUT = -o #Have a space

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/com/sun/nio/Makefile.orig Sun Sep 27 09:46:26 2009
+++ jdk/make/com/sun/nio/Makefile Sun Sep 27 09:46:34 2009
$OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/com/sun/nio/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/com/sun/nio/Makefile Tue Oct 26 10:30:03 2010
@@ -30,7 +30,16 @@
BUILDDIR = ../../..
include $(BUILDDIR)/common/Defs.gmk
@ -15,6 +15,6 @@ $OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp
+endif
+endif
+endif
all build clean clobber::
$(SUBDIRS-loop)
include $(BUILDDIR)/common/Subdirs.gmk
all build clean clobber::

View File

@ -1,13 +1,21 @@
$OpenBSD: patch-jdk_make_com_sun_nio_sctp_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/com/sun/nio/sctp/Makefile.orig Sun Sep 27 09:46:49 2009
+++ jdk/make/com/sun/nio/sctp/Makefile Sun Sep 27 09:47:02 2009
@@ -68,6 +68,9 @@ ifeq ($(PLATFORM), solaris)
#LIBSCTP = -lsctp
OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
endif # PLATFORM
+ifeq ($(PLATFORM), bsd)
$OpenBSD: patch-jdk_make_com_sun_nio_sctp_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/com/sun/nio/sctp/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/com/sun/nio/sctp/Makefile Tue Oct 26 10:30:35 2010
@@ -60,15 +60,11 @@ OTHER_INCLUDES += \
-I$(PLATFORM_SRC)/native/java/net \
-I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders
+OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
+endif
ifeq ($(PLATFORM), linux)
COMPILER_WARNINGS_FATAL=true
-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl
+OTHER_LDLIBS += -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), solaris)
-#LIBSCTP = -lsctp
-OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
-endif # PLATFORM
else # windows
include $(BUILDDIR)/common/Classes.gmk

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_com_sun_security_auth_module_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $
--- jdk/make/com/sun/security/auth/module/Makefile.orig Mon Aug 4 03:43:01 2008
+++ jdk/make/com/sun/security/auth/module/Makefile Wed Aug 13 13:39:36 2008
@@ -67,7 +67,7 @@ ifeq ($(PLATFORM), solaris)
$OpenBSD: patch-jdk_make_com_sun_security_auth_module_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/com/sun/security/auth/module/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/com/sun/security/auth/module/Makefile Mon Oct 25 18:15:45 2010
@@ -68,7 +68,7 @@ ifeq ($(PLATFORM), solaris)
include FILES_c_solaris.gmk
endif # solaris

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_com_sun_tools_attach_Makefile,v 1.1 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/com/sun/tools/attach/Makefile.orig Mon May 18 10:39:47 2009
+++ jdk/make/com/sun/tools/attach/Makefile Mon May 18 10:39:55 2009
@@ -36,6 +36,9 @@ endif
$OpenBSD: patch-jdk_make_com_sun_tools_attach_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/com/sun/tools/attach/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/com/sun/tools/attach/Makefile Mon Oct 25 18:15:45 2010
@@ -37,6 +37,9 @@ endif
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif

View File

@ -1,20 +1,16 @@
$OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/Defs-bsd.gmk.orig Sun Sep 27 09:39:53 2009
+++ jdk/make/common/Defs-bsd.gmk Sun Sep 27 09:48:31 2009
@@ -43,12 +43,6 @@
# Get shared JDK settings
include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
$OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.7 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Defs-bsd.gmk.orig Tue Oct 26 09:56:36 2010
+++ jdk/make/common/Defs-bsd.gmk Tue Oct 26 10:31:46 2010
@@ -25,7 +25,7 @@
-# Part of INCREMENTAL_BUILD mechanism.
-# Compiler emits things like: path/file.o: file.h
-# We want something like: relative_path/file.o relative_path/file.d: file.h
-CC_DEPEND = -MM
-CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
-
ifndef PLATFORM_SRC
PLATFORM_SRC = $(BUILDDIR)/../src/solaris
endif # PLATFORM_SRC
@@ -61,7 +55,7 @@ ifndef OPENJDK
#
# Makefile to specify compiler flags for programs and libraries
-# targeted to Bsd. Should not contain any rules.
+# targeted to BSD. Should not contain any rules.
#
# WARNING: This file is shared with other workspaces.
# So when it includes other files, it must use JDK_TOPDIR.
@@ -61,7 +61,7 @@ ifndef OPENJDK
endif
# platform specific include files
@ -23,33 +19,56 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
# suffix used for make dependencies files.
@@ -109,8 +103,14 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
@@ -109,9 +109,11 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
# We need this frame pointer to make it easy to walk the stacks.
# This should be the default on X86, but ia64 and amd64 may not have this
# as the default.
-CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64 += -m64
+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586 += -m32
+CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
@@ -126,9 +128,13 @@ else
CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
endif
+ifeq ($(OS_VENDOR),Apple)
+ # 16-byte stack re-alignment on 32-bit Darwin
+ CFLAGS_REQUIRED_i586 += -mstackrealign
+endif
CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
@@ -186,7 +186,7 @@ ifeq ($(FASTDEBUG), true)
CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
# If this is a --hash-style=gnu system, use --hash-style=both
-# The gnu .hash section won't work on some Bsd systems like SuSE 10.
+# The gnu .hash section won't work on some Linux systems like SuSE 10.
_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
ifneq ($(_HAS_HASH_STYLE_GNU),)
LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
@@ -165,7 +171,7 @@ ifeq ($(ARCH), amd64)
CFLAGS_COMMON += -pipe
endif
-CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \
+CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
-# Bsd 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
DEBUG_FLAG = -g
ifeq ($(FASTDEBUG), true)
ifeq ($(ARCH_DATA_MODEL), 64)
@@ -202,8 +208,7 @@ ifneq ($(ARCH),alpha)
else
CPP_ARCH_FLAGS += -D_$(ARCH)_
endif
-
-CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \
+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
-D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
ifeq ($(ARCH_DATA_MODEL), 64)
@@ -199,33 +199,15 @@ ifneq ($(PRODUCT), java)
@@ -216,33 +221,37 @@ ifneq ($(PRODUCT), java)
CPPFLAGS_DBG += -DLOGGING
endif
@ -65,13 +84,31 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
- # The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
- # Try: 'readelf -d lib*.so' to see these settings in a library.
- #
- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
-endif
-
+# Libraries need to locate other libraries at runtime, and you can tell
+# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
+# buried inside the .{so,dylib}. The {$ORIGIN,@loader_path/} says to look
+# relative to where the library itself is and it can be followed
+# with relative paths from that. By default we always look in
+# {$ORIGIN,@loader_path/}, optionally we add relative paths if the Makefile
+# sets LD_RUNPATH_EXTRAS to those relative paths.
+# Except on MacOS X we add a flag -z origin, not sure if this is necessary,
+# but doesn't seem to hurt.
+# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
+# See 'man {dyld,rtld}' for more information.
+# Try: 'readelf -d lib*.so' to see these settings in a library.
+#
+ifeq ($(OS_VENDOR), Apple)
+ LDFLAGS_COMMON += -Xlinker -rpath -Xlinker @loader_path/.
+ LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -rpath -Xlinker @loader_path/%)
+ LDFLAGS_COMMON += -Xlinker -install_name -Xlinker @rpath/$(@F)
+else
LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN
LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%)
endif
-EXTRA_LIBS += -lc
-
-LDFLAGS_DEFS_OPTION = -z defs
-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs
-LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION)
-
#
@ -87,7 +124,7 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
#
# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
@@ -247,9 +229,9 @@ AUTOMATIC_PCH_OPTION =
@@ -264,9 +273,9 @@ AUTOMATIC_PCH_OPTION =
ifeq ($(VARIANT), OPT)
ifneq ($(NO_STRIP), true)
ifneq ($(DEBUG_BINARIES), true)
@ -99,24 +136,19 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
endif
endif
endif
@@ -259,13 +241,9 @@ endif
#
LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
@@ -285,6 +294,11 @@ QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-us
LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
endif
-#
-# Support for Quantify.
-#
-ifdef QUANTIFY
-QUANTIFY_CMD = quantify
-QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
-LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+# Darwin does not support linker map files.
+ifeq ($(OS_VENDOR), Apple)
+LDNOMAP=true
endif
+endif
+
#
@@ -294,7 +272,9 @@ override HAVE_ALTZONE = false
# Path and option to link against the VM, if you have to. Note that
# there are libraries that link against only -ljava, but they do get
@@ -311,7 +325,9 @@ override HAVE_ALTZONE = false
override HAVE_FILIOH = false
override HAVE_GETHRTIME = false
override HAVE_GETHRVTIME = false
@ -126,8 +158,11 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
override LEX_LIBRARY = -lfl
ifeq ($(STATIC_CXX),true)
override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
@@ -306,12 +286,8 @@ override LIBSOCKET =
@@ -322,14 +338,11 @@ override LIBPOSIX4 =
override LIBSOCKET =
override LIBNSL =
override LIBTHREAD =
+override LIBDL =
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
-override OPENWIN_HOME = /usr/X11R6
@ -140,11 +175,10 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
override SUN_CMM_SUBDIR =
override THREADS_FLAG = native
@@ -331,6 +307,14 @@ override USE_EXECNAME = true
# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
@@ -350,6 +363,14 @@ override USE_EXECNAME = true
# DPS (Displayable PostScript) is available on Solaris machines
HAVE_DPS = no
+
+ifeq ($(OS_VENDOR), FreeBSD)
+ SYSTEM_ZLIB = true
+endif
@ -152,6 +186,16 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp
+ifeq ($(OS_VENDOR), OpenBSD)
+ SYSTEM_ZLIB = true
+endif
+
#
# Japanese manpages
#
@@ -361,7 +382,7 @@ HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/
SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
# The JDI - Serviceability Agent binding is not currently supported
-# on Bsd-ia64.
+# on ia64.
ifeq ($(ARCH), ia64)
INCLUDE_SA = false
else

View File

@ -1,8 +1,11 @@
$OpenBSD: patch-jdk_make_common_Defs-linux_gmk,v 1.2 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/Defs-linux.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/Defs-linux.gmk Sat Sep 26 10:00:47 2009
@@ -306,7 +306,7 @@ override LIBSOCKET =
$OpenBSD: patch-jdk_make_common_Defs-linux_gmk,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Defs-linux.gmk.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/common/Defs-linux.gmk Tue Oct 26 10:31:57 2010
@@ -322,9 +322,10 @@ override LIBPOSIX4 =
override LIBSOCKET =
override LIBNSL =
override LIBTHREAD =
+override LIBDL = -ldl
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
-override OPENWIN_HOME = /usr/X11R6

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-jdk_make_common_Defs-solaris_gmk,v 1.1 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Defs-solaris.gmk.orig Tue Oct 26 10:32:20 2010
+++ jdk/make/common/Defs-solaris.gmk Tue Oct 26 10:32:27 2010
@@ -648,6 +648,9 @@ LIBSOCKET = -lsocket
# Network Services library
LIBNSL = -lnsl
+# Dynamic Loading library
+LIBDL = -ldl
+
# GLOBAL_KPIC: If set means all libraries are PIC, position independent code
# EXCEPT for select compiles
# If a .o file is compiled non-PIC then it should be forced

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/Defs.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/Defs.gmk Sat Sep 26 10:00:47 2009
@@ -181,6 +181,36 @@ ifdef OPENJDK
$OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.6 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Defs.gmk.orig Thu Dec 16 17:09:55 2010
+++ jdk/make/common/Defs.gmk Tue Jan 4 18:25:20 2011
@@ -186,6 +186,36 @@ ifdef OPENJDK
endif
endif # OPENJDK
@ -38,7 +38,7 @@ $OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $
#
# Get platform definitions
#
@@ -216,6 +246,7 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \
@@ -221,6 +251,7 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \
ifdef ALT_FREETYPE_LIB_PATH
FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
@ -46,7 +46,7 @@ $OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $
else
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
@@ -284,6 +315,10 @@ ifdef PROGRAM
@@ -283,6 +314,10 @@ ifdef PROGRAM
ifeq ($(PLATFORM), linux)
LDLIBS_COMMON = -ldl

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/common/Program.gmk.orig Fri May 8 03:34:14 2009
+++ jdk/make/common/Program.gmk Mon May 18 11:13:27 2009
@@ -67,11 +67,27 @@ endif
$OpenBSD: patch-jdk_make_common_Program_gmk,v 1.4 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Program.gmk.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/common/Program.gmk Mon Oct 25 18:15:45 2010
@@ -65,11 +65,27 @@ endif
# Create a dependency on libjli (Java Launcher Infrastructure)
#
# On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to
@ -30,7 +30,7 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $
ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
OTHER_LDLIBS += -ljli
@@ -180,6 +196,10 @@ else # USE_PTHREADS
@@ -178,6 +194,10 @@ else # USE_PTHREADS
THREADLIBS = $(LIBTHREAD)
endif # USE_PTHREADS
@ -41,7 +41,7 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $
#
# This rule only applies on unix. It supports quantify and its ilk.
#
@@ -248,15 +268,19 @@ endif
@@ -247,15 +267,19 @@ endif
ifneq ($(PLATFORM), windows)
@ -59,5 +59,5 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $
OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
+endif
# this may not be necessary...
ifeq ($(PLATFORM), windows)
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/Release.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/Release.gmk Sat Sep 26 10:00:47 2009
@@ -148,14 +148,13 @@ JRE_MAN_PAGES = \
$OpenBSD: patch-jdk_make_common_Release_gmk,v 1.5 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/Release.gmk.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/common/Release.gmk Mon Oct 25 18:15:45 2010
@@ -154,14 +154,13 @@ JRE_MAN_PAGES = \
tnameserv.1 \
unpack200.1
@ -17,7 +17,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
extcheck.1 \
idlj.1 \
jar.1 \
@@ -194,6 +193,11 @@ ifeq ($(PLATFORM), linux)
@@ -200,6 +199,11 @@ ifeq ($(PLATFORM), linux)
JA_DIRNAME=ja_JP.$(JA_SOURCE_ENCODING)
endif # linux
@ -29,7 +29,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
define copy-man-pages
$(MKDIR) -p $1/man/man1
for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
@@ -326,7 +330,13 @@ ifndef OPENJDK
@@ -332,7 +336,13 @@ ifndef OPENJDK
SOURCE_DIRS += $(CLOSED_SRC)/share/classes
endif
@ -43,7 +43,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
#
# Specific files and directories that will be filtered out from above areas.
#
@@ -984,7 +994,7 @@ initial-image-jdk:: initial-image-jdk-setup \
@@ -1027,7 +1037,7 @@ initial-image-jdk:: initial-image-jdk-setup \
@# generated by the more efficient solaris/windows method of copying files.
@# So for Linux, make use of the -T option (like Solaris' -I option) of
@# obtaining the list of files from a file. MKS tar has no such option.
@ -52,7 +52,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
for d in $(SOURCE_DIRS); do \
$(RM) $(ABS_TEMPDIR)/src-files.list; \
($(CD) $$d && \
@@ -997,7 +1007,7 @@ initial-image-jdk:: initial-image-jdk-setup \
@@ -1040,7 +1050,7 @@ initial-image-jdk:: initial-image-jdk-setup \
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.5 2010/09/03 21:54:39 naddy Exp $
--- jdk/make/common/shared/Defs-utils.gmk.orig Thu Sep 17 01:51:40 2009
+++ jdk/make/common/shared/Defs-utils.gmk Fri Sep 3 14:34:43 2010
$OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.6 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/shared/Defs-utils.gmk.orig Thu Oct 28 20:18:01 2010
+++ jdk/make/common/shared/Defs-utils.gmk Mon Nov 1 13:16:18 2010
@@ -67,6 +67,13 @@ ifeq ($(PLATFORM),windows)
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
endif
@ -15,7 +15,7 @@ $OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.5 2010/09/03 21:54:39
# Utilities
ADB = $(UTILS_COMMAND_PATH)adb
AR = $(UTILS_CCS_BIN_PATH)ar
@@ -203,3 +210,39 @@ ifeq ($(PLATFORM),solaris)
@@ -202,3 +209,39 @@ ifeq ($(PLATFORM),solaris)
ECHO = /usr/bin/echo
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_common_shared_Defs_gmk,v 1.2 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/shared/Defs.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/shared/Defs.gmk Sat Sep 26 10:00:47 2009
@@ -589,8 +589,8 @@ ifeq ($(PLATFORM), solaris)
$OpenBSD: patch-jdk_make_common_shared_Defs_gmk,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/shared/Defs.gmk.orig Thu Oct 28 20:18:01 2010
+++ jdk/make/common/shared/Defs.gmk Mon Nov 1 13:16:18 2010
@@ -613,8 +613,8 @@ ifeq ($(PLATFORM), solaris)
override CC_VERSION = sun
endif

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/shared/Platform.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/shared/Platform.gmk Mon Oct 5 14:54:16 2009
$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.7 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/shared/Platform.gmk.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/common/shared/Platform.gmk Tue Oct 26 10:32:41 2010
@@ -82,7 +82,7 @@ SYSTEM_UNAME := $(shell uname)
SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags
# When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune:
@ -10,7 +10,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku
# Don't define this unless it's not defined
ifndef VARIANT
@@ -211,6 +211,89 @@ ifeq ($(SYSTEM_UNAME), Linux)
@@ -214,6 +214,101 @@ ifeq ($(SYSTEM_UNAME), Linux)
MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' )
endif
@ -51,6 +51,18 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku
+ i[3-9]86) \
+ echo i586 \
+ ;; \
+ sparc64) \
+ echo sparcv9 \
+ ;; \
+ sparc*) \
+ echo sparc \
+ ;; \
+ x86_64) \
+ echo amd64 \
+ ;; \
+ "Power Macintosh") \
+ echo ppc \
+ ;; \
+ *) \
+ echo $(mach) \
+ ;; \
@ -67,8 +79,8 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku
+ endif
+ endif
+
+ # i586 and sparc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc))
+ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc ppc))
+ ARCH_DATA_MODEL=32
+ else
+ ARCH_DATA_MODEL=64
@ -100,7 +112,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
@@ -376,6 +459,14 @@ ifneq ($(PLATFORM), windows)
@@ -404,6 +499,14 @@ ifneq ($(PLATFORM), windows)
ARCH_VM_SUBDIR=jre/lib/$(LIBARCH)
endif
@ -115,7 +127,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku
# Machines with 512Mb or less of real memory are considered low memory
# build machines and adjustments will be made to prevent excessing
# system swapping during the build.
@@ -413,6 +504,18 @@ ifeq ($(JDK_HAS_MEM_INFO),)
@@ -441,6 +544,18 @@ ifeq ($(JDK_HAS_MEM_INFO),)
export LOW_MEMORY_MACHINE
export MAX_VM_MEMORY
export MIN_VM_MEMORY

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/common/shared/Sanity.gmk.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/common/shared/Sanity.gmk Sat Sep 26 10:00:47 2009
$OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.5 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/common/shared/Sanity.gmk.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/common/shared/Sanity.gmk Mon Oct 25 18:15:45 2010
@@ -142,6 +142,11 @@ ifeq ($(PLATFORM), windows)
$(EGREP) "\#define" | $(NAWK) '{print $$3}')
endif
@ -13,7 +13,7 @@ $OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt
# Get the version numbers of what we are using
_MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1)
_ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip')
@@ -862,8 +867,10 @@ endif
@@ -878,8 +883,10 @@ endif
######################################################
# Check for existence of DEVTOOLS_PATH
@ -24,7 +24,7 @@ $OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt
@if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \
$(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \
" Please check your access to \n" \
@@ -871,6 +878,7 @@ sane-devtools_path:
@@ -887,6 +894,7 @@ sane-devtools_path:
" and/or check your value of ALT_DEVTOOLS_PATH. \n" \
"" >> $(ERROR_FILE) ; \
fi

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-jdk_make_docs_Makefile,v 1.2 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/docs/Makefile.orig Fri May 8 03:34:14 2009
+++ jdk/make/docs/Makefile Mon May 18 11:26:14 2009
@@ -214,7 +214,7 @@ SECURITYAPI_JAVADOCBOTTOM = '<font size="-1"><a href="
# you get "No packages or classes specified." due to $(CLASSPATH_SEPARATOR)
# being interpreted as an end of command (newline)
-JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes"
+JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/bsd/classes"
JAAS_DOCDIR = $(DOCSDIR)/jre/api/security/jaas/spec
JAAS_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \
-encoding ascii \

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_Makefile,v 1.1 2008/03/19 18:05:45 kurt Exp $
--- jdk/make/java/Makefile.orig Tue Oct 30 05:04:22 2007
+++ jdk/make/java/Makefile Wed Nov 7 18:01:59 2007
@@ -49,7 +49,7 @@ ifeq ($(PLATFORM), solaris)
$OpenBSD: patch-jdk_make_java_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/Makefile.orig Fri Aug 13 03:21:36 2010
+++ jdk/make/java/Makefile Mon Oct 25 18:15:45 2010
@@ -53,7 +53,7 @@ ifeq ($(PLATFORM), solaris)
endif
endif # PLATFORM

View File

@ -1,13 +1,10 @@
$OpenBSD: patch-jdk_make_java_hpi_hpi_common_gmk,v 1.1 2008/03/19 18:05:45 kurt Exp $
--- jdk/make/java/hpi/hpi_common.gmk.orig Tue Oct 30 05:04:22 2007
+++ jdk/make/java/hpi/hpi_common.gmk Wed Nov 7 18:03:20 2007
@@ -86,5 +86,9 @@ endif
$OpenBSD: patch-jdk_make_java_hpi_hpi_common_gmk,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/hpi/hpi_common.gmk.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/hpi/hpi_common.gmk Tue Oct 26 10:32:53 2010
@@ -86,5 +86,5 @@ endif
# Things that must be linked in.
#
ifneq ($(PLATFORM), windows)
+ifeq ($(PLATFORM), bsd)
+OTHER_LDLIBS += $(LIBM)
+else
OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl
+endif
-OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) $(LIBM) -ldl
+OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) $(LIBM) $(LIBDL)
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_hpi_native_Makefile,v 1.2 2009/06/10 19:01:09 kurt Exp $
--- jdk/make/java/hpi/native/Makefile.orig Thu May 14 03:29:40 2009
+++ jdk/make/java/hpi/native/Makefile Tue Jun 2 12:12:03 2009
@@ -72,16 +72,25 @@ OTHER_CPPFLAGS += -DUSE_PTHREADS
$OpenBSD: patch-jdk_make_java_hpi_native_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/hpi/native/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/hpi/native/Makefile Mon Oct 25 18:15:45 2010
@@ -73,16 +73,25 @@ OTHER_CPPFLAGS += -DUSE_PTHREADS
ifeq ($(MOOT_PRIORITIES),true)
OTHER_CPPFLAGS += -DMOOT_PRIORITIES
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_instrument_Makefile,v 1.3 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/java/instrument/Makefile.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/java/instrument/Makefile Sun Sep 27 09:49:59 2009
@@ -102,6 +102,26 @@ ifeq ($(PLATFORM), windows)
$OpenBSD: patch-jdk_make_java_instrument_Makefile,v 1.4 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/instrument/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/instrument/Makefile Tue Oct 26 10:33:04 2010
@@ -103,9 +103,29 @@ ifeq ($(PLATFORM), windows)
# equivalent of strcasecmp is stricmp on Windows
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
else
@ -27,8 +27,12 @@ $OpenBSD: patch-jdk_make_java_instrument_Makefile,v 1.3 2009/10/07 01:53:54 kurt
+else
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
OTHER_LDLIBS += -ljli
OTHER_LDLIBS += -ldl
@@ -113,6 +133,7 @@ else
- OTHER_LDLIBS += -ldl
+ OTHER_LDLIBS += $(LIBDL)
ifeq ($(PLATFORM), solaris)
LDFLAGS += -R \$$ORIGIN/jli
endif
@@ -114,6 +134,7 @@ else
LDFLAGS += -Wl,--allow-shlib-undefined
LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/jli
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_java_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $
--- jdk/make/java/java/Makefile.orig Mon Aug 4 03:43:01 2008
+++ jdk/make/java/java/Makefile Wed Aug 13 13:39:37 2008
@@ -165,8 +165,10 @@ OTHER_INCLUDES += -I$(PLATFORM_SRC)/native/java/util
$OpenBSD: patch-jdk_make_java_java_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/java/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/java/Makefile Tue Oct 26 10:33:18 2010
@@ -166,8 +166,10 @@ OTHER_INCLUDES += -I$(PLATFORM_SRC)/native/java/util
# Is the altzone extern documented in ctime(3C) available?
#
ifneq ($(PLATFORM), windows)
@ -12,17 +12,12 @@ $OpenBSD: patch-jdk_make_java_java_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $
ifeq ($(HAVE_ALTZONE),true)
OTHER_CPPFLAGS += -DHAVE_ALTZONE
@@ -203,8 +205,13 @@ ifeq ($(PLATFORM),windows)
@@ -204,7 +206,7 @@ ifeq ($(PLATFORM),windows)
OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \
-libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib
else
+ifeq ($(PLATFORM), bsd)
+OTHER_LDLIBS += $(JVMLIB) -lverify \
+ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
+else
OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) -lnsl -ldl \
-OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) -ldl \
+OTHER_LDLIBS += $(JVMLIB) -lverify $(LIBSOCKET) $(LIBNSL) $(LIBDL) \
-L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm.$(ARCH)
+endif
endif
#

View File

@ -1,13 +1,12 @@
$OpenBSD: patch-jdk_make_java_java_hprof_demo_Makefile,v 1.2 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/java/java_hprof_demo/Makefile.orig Fri May 8 03:34:15 2009
+++ jdk/make/java/java_hprof_demo/Makefile Mon May 18 11:28:14 2009
@@ -83,7 +83,9 @@ OTHER_INCLUDES = -I$(SRCDIR) \
$OpenBSD: patch-jdk_make_java_java_hprof_demo_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/java_hprof_demo/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/java_hprof_demo/Makefile Tue Oct 26 10:33:32 2010
@@ -84,7 +84,7 @@ OTHER_INCLUDES = -I$(SRCDIR) \
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS += wsock32.lib winmm.lib
else
+ifneq ($(PLATFORM), bsd)
OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl
+endif
- OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) -ldl
+ OTHER_LDLIBS += $(LIBSOCKET) $(LIBNSL) $(LIBDL)
endif
#

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/java/jli/Makefile.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/java/jli/Makefile Sat Sep 26 10:24:44 2009
@@ -44,7 +44,9 @@ MS_RUNTIME_STATIC = true
$OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.6 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/jli/Makefile.orig Thu Dec 16 17:09:57 2010
+++ jdk/make/java/jli/Makefile Tue Jan 4 18:25:20 2011
@@ -45,7 +45,9 @@ MS_RUNTIME_STATIC = true
include $(BUILDDIR)/common/Defs.gmk
@ -11,7 +11,7 @@ $OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin
LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin
@@ -65,13 +67,17 @@ FILES_c = \
@@ -70,13 +72,17 @@ FILES_c = \
parse_manifest.c \
version_comp.c \
wildcard.c \
@ -30,7 +30,7 @@ $OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
ifneq ($(PLATFORM), windows)
@@ -88,15 +94,17 @@ ifeq ($(PLATFORM), solaris)
@@ -93,7 +99,7 @@ ifeq ($(PLATFORM), solaris)
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
endif
@ -39,17 +39,16 @@ $OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
ifneq ($(PLATFORM), windows) # UNIX systems
LIB_LOCATION = $(LIBDIR)/$(LIBARCH)/jli
+ifneq ($(PLATFORM), bsd) # other UNIX systems
@@ -102,7 +108,7 @@ ifneq ($(PLATFORM), windows) # UNIX systems
# Note: its important to keep this order meaning -lc is the
# last library otherwise it could cause compatibility issues
# by pulling in SUNW_private symbols from libc
LDLIBS = -ldl -lc
+endif # !bsd
- LDLIBS = -ldl -lc
+ LDLIBS = $(LIBDL) -lc
ifeq ($(USE_PTHREADS),true)
LDLIBS += -lpthread
endif # USE_PTHREADS
@@ -120,7 +128,11 @@ endif
@@ -126,7 +132,11 @@ endif
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)
OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC)
@ -62,7 +61,7 @@ $OpenBSD: patch-jdk_make_java_jli_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
#
# Library to compile.
@@ -158,7 +170,28 @@ library:: $(STATIC_LIBRARY)
@@ -158,7 +168,28 @@ library:: $(STATIC_LIBRARY)
endif # PLATFORM

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_management_Makefile,v 1.2 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/java/management/Makefile.orig Fri May 8 03:34:15 2009
+++ jdk/make/java/management/Makefile Sat May 9 11:04:58 2009
@@ -85,6 +85,11 @@ vpath %.c $(PLATFORM_SRC)/native/com/sun/management
$OpenBSD: patch-jdk_make_java_management_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/management/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/management/Makefile Mon Oct 25 18:15:45 2010
@@ -86,6 +86,11 @@ vpath %.c $(PLATFORM_SRC)/native/com/sun/management
OTHER_INCLUDES += \
-I$(SHARE_SRC)/native/sun/management

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_net_FILES_c_gmk,v 1.2 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/java/net/FILES_c.gmk.orig Fri May 8 03:34:15 2009
+++ jdk/make/java/net/FILES_c.gmk Sat May 9 11:04:58 2009
@@ -47,6 +47,10 @@ ifeq ($(PLATFORM), linux)
$OpenBSD: patch-jdk_make_java_net_FILES_c_gmk,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/net/FILES_c.gmk.orig Thu Oct 28 20:18:01 2010
+++ jdk/make/java/net/FILES_c.gmk Mon Nov 1 13:16:19 2010
@@ -43,6 +43,10 @@ ifeq ($(PLATFORM), linux)
FILES_c += linux_close.c
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_net_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $
--- jdk/make/java/net/Makefile.orig Mon Aug 4 03:43:01 2008
+++ jdk/make/java/net/Makefile Wed Aug 13 13:39:37 2008
@@ -92,6 +92,12 @@ include $(BUILDDIR)/common/Mapfile-vers.gmk
$OpenBSD: patch-jdk_make_java_net_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/net/Makefile.orig Thu Oct 28 20:18:01 2010
+++ jdk/make/java/net/Makefile Mon Nov 1 13:16:19 2010
@@ -96,14 +96,21 @@ include $(BUILDDIR)/common/Mapfile-vers.gmk
include $(BUILDDIR)/common/Library.gmk
@ -14,7 +14,9 @@ $OpenBSD: patch-jdk_make_java_net_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $
ifeq ($(PLATFORM), windows)
OTHER_LDLIBS = ws2_32.lib $(JVMLIB)
else
@@ -100,6 +106,7 @@ endif
- OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) -ldl $(JVMLIB)
+ OTHER_LDLIBS = $(LIBSOCKET) $(LIBNSL) $(LIBDL) $(JVMLIB)
endif
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += -lpthread
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_nio_Makefile,v 1.5 2009/06/10 19:01:09 kurt Exp $
--- jdk/make/java/nio/Makefile.orig Thu May 14 03:29:41 2009
+++ jdk/make/java/nio/Makefile Tue Jun 2 12:12:32 2009
@@ -260,6 +260,69 @@ FILES_gen += \
$OpenBSD: patch-jdk_make_java_nio_Makefile,v 1.6 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/nio/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/nio/Makefile Tue Oct 26 10:34:14 2010
@@ -261,6 +261,69 @@ FILES_gen += \
sun/nio/fs/UnixConstants.java
endif # PLATFORM = linux
@ -71,7 +71,7 @@ $OpenBSD: patch-jdk_make_java_nio_Makefile,v 1.5 2009/06/10 19:01:09 kurt Exp $
#
# Find platform-specific C source files
#
@@ -284,6 +347,11 @@ OTHER_INCLUDES += \
@@ -285,19 +348,28 @@ OTHER_INCLUDES += \
-I$(PLATFORM_SRC)/native/java/net \
-I$(CLASSHDRDIR)/../../../java.lang/java/CClassHeaders
@ -83,17 +83,29 @@ $OpenBSD: patch-jdk_make_java_nio_Makefile,v 1.5 2009/06/10 19:01:09 kurt Exp $
ifeq ($(PLATFORM),windows)
OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \
-libpath:$(LIBDIR) java.lib \
@@ -294,6 +362,9 @@ endif
$(OBJDIR)/../../../../sun/java.net/net/$(OBJDIRNAME)/net.lib \
$(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/io_util.obj \
$(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/FileDescriptor_md.obj
-endif
+else
+ifeq ($(PLATFORM), solaris)
+OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 $(LIBDL)
+endif # solaris
+OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
+OTHER_LDLIBS += -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), solaris)
-OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \
- -L$(LIBDIR)/$(LIBARCH) -ljava -lnet
+ifeq ($(PLATFORM), bsd)
+OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -pthread
+OTHER_LDLIBS += -pthread
+endif
ifeq ($(PLATFORM), solaris)
OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \
-L$(LIBDIR)/$(LIBARCH) -ljava -lnet
@@ -315,6 +386,9 @@ FILES_m = mapfile-solaris
endif # PLATFORM
#
@@ -320,6 +392,9 @@ FILES_m = mapfile-solaris
endif
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-jdk_make_java_nio_mapfile-bsd,v 1.2 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/java/nio/mapfile-bsd.orig Sun Sep 27 09:39:53 2009
+++ jdk/make/java/nio/mapfile-bsd Sun Sep 27 09:51:12 2009
$OpenBSD: patch-jdk_make_java_nio_mapfile-bsd,v 1.3 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/nio/mapfile-bsd.orig Mon Oct 25 18:02:18 2010
+++ jdk/make/java/nio/mapfile-bsd Mon Oct 25 18:15:45 2010
@@ -36,25 +36,6 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_DatagramDispatcher_readv0;
Java_sun_nio_ch_DatagramDispatcher_write0;
@ -27,7 +27,7 @@ $OpenBSD: patch-jdk_make_java_nio_mapfile-bsd,v 1.2 2009/10/07 01:53:54 kurt Exp
Java_sun_nio_ch_FileChannelImpl_close0;
Java_sun_nio_ch_FileChannelImpl_initIDs;
Java_sun_nio_ch_FileChannelImpl_map0;
@@ -122,26 +103,14 @@ SUNWprivate_1.1 {
@@ -123,26 +104,14 @@ SUNWprivate_1.1 {
Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_accept0;
Java_sun_nio_ch_UnixAsynchronousServerSocketChannelImpl_initIDs;
Java_sun_nio_ch_UnixAsynchronousSocketChannelImpl_checkConnect;

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_npt_Makefile,v 1.3 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/java/npt/Makefile.orig Fri May 8 03:34:15 2009
+++ jdk/make/java/npt/Makefile Mon May 18 11:45:54 2009
@@ -65,6 +65,18 @@ ifeq ($(PLATFORM), windows)
$OpenBSD: patch-jdk_make_java_npt_Makefile,v 1.4 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/npt/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/npt/Makefile Mon Oct 25 18:15:45 2010
@@ -68,6 +68,18 @@ ifeq ($(PLATFORM), windows)
OTHER_LCF += -export:nptInitialize -export:nptTerminate
endif

View File

@ -1,18 +0,0 @@
$OpenBSD: patch-jdk_make_java_redist_FILES_gmk,v 1.1 2008/03/19 18:05:45 kurt Exp $
--- jdk/make/java/redist/FILES.gmk.orig Tue Oct 30 05:04:23 2007
+++ jdk/make/java/redist/FILES.gmk Wed Nov 7 18:01:59 2007
@@ -38,6 +38,14 @@ SHARED_FONTFILES = \
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
ifeq ($(PLATFORM), linux)
+NEED_OBLIQUE_FONTS = true
+endif
+
+ifeq ($(PLATFORM), bsd)
+NEED_OBLIQUE_FONTS = true
+endif
+
+ifeq ($(NEED_OBLIQUE_FONTS), true)
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no

View File

@ -1,21 +0,0 @@
$OpenBSD: patch-jdk_make_java_redist_Makefile,v 1.5 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/java/redist/Makefile.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/java/redist/Makefile Sat Sep 26 10:00:48 2009
@@ -330,7 +330,7 @@ $(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique fonts are only needed/wanted on Linux.
@@ -344,7 +344,7 @@ $(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib
$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$(install-file)
-endif # linux
+endif # linux || bsd
endif # !OPENJDK
# Import internal files (ones that are stashed in this source tree)

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-jdk_make_java_redist_fonts_Makefile,v 1.1 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/redist/fonts/Makefile.orig Tue Oct 26 10:34:30 2010
+++ jdk/make/java/redist/fonts/Makefile Tue Oct 26 10:34:37 2010
@@ -43,7 +43,7 @@ SHARED_FONTFILES = \
$(LIBDIR)/fonts/LucidaSansRegular.ttf \
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no
@@ -83,7 +83,7 @@ $(LIBDIR)/fonts/%.ttf: $(CLOSED_SRC)/share/lib/fonts/%
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique fonts are only needed/wanted on Linux.
@@ -97,7 +97,7 @@ $(LIBDIR)/oblique-fonts/%.ttf: $(CLOSED_SRC)/share/lib
$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$(install-file)
-endif # linux
+endif # linux || bsd
all build : $(INTERNAL_IMPORT_LIST)

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_security_Makefile,v 1.1 2009/05/23 03:03:25 kurt Exp $
--- jdk/make/java/security/Makefile.orig Mon May 18 13:01:18 2009
+++ jdk/make/java/security/Makefile Mon May 18 13:01:24 2009
@@ -51,7 +51,15 @@ ifeq ($(PLATFORM), windows)
$OpenBSD: patch-jdk_make_java_security_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/security/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/security/Makefile Mon Oct 25 18:15:47 2010
@@ -50,7 +50,15 @@ ifeq ($(PLATFORM), windows)
ifneq ($(ARCH_DATA_MODEL), 64)
PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows
endif

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-jdk_make_java_zip_Makefile,v 1.4 2009/10/07 01:53:54 kurt Exp $
--- jdk/make/java/zip/Makefile.orig Thu Sep 17 03:51:40 2009
+++ jdk/make/java/zip/Makefile Sat Sep 26 10:00:48 2009
@@ -71,16 +71,28 @@ else
$OpenBSD: patch-jdk_make_java_zip_Makefile,v 1.5 2011/01/11 15:47:50 kurt Exp $
--- jdk/make/java/zip/Makefile.orig Fri Aug 13 03:21:37 2010
+++ jdk/make/java/zip/Makefile Mon Oct 25 18:15:47 2010
@@ -72,16 +72,28 @@ else
CPPFLAGS += -UDEBUG
endif

Some files were not shown because too many files have changed in this diff Show More