Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
657aa7f5
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
657aa7f5
编写于
1月 25, 2012
作者:
P
phh
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
1b1587d7
09027c72
变更
9
显示空白变更内容
内联
并排
Showing
9 changed file
with
278 addition
and
74 deletion
+278
-74
make/bsd/Makefile
make/bsd/Makefile
+1
-1
make/bsd/makefiles/buildtree.make
make/bsd/makefiles/buildtree.make
+70
-28
make/bsd/makefiles/defs.make
make/bsd/makefiles/defs.make
+1
-1
make/bsd/makefiles/launcher.make
make/bsd/makefiles/launcher.make
+18
-1
make/bsd/makefiles/vm.make
make/bsd/makefiles/vm.make
+2
-2
make/linux/makefiles/buildtree.make
make/linux/makefiles/buildtree.make
+70
-12
make/solaris/makefiles/buildtree.make
make/solaris/makefiles/buildtree.make
+75
-15
src/os/bsd/vm/os_bsd.cpp
src/os/bsd/vm/os_bsd.cpp
+32
-13
src/os/posix/launcher/java_md.c
src/os/posix/launcher/java_md.c
+9
-1
未找到文件。
make/bsd/Makefile
浏览文件 @
657aa7f5
...
...
@@ -208,7 +208,7 @@ TARGETS_ZERO = $(addsuffix zero,$(TARGETS))
TARGETS_SHARK
=
$(
addsuffix
shark,
$(TARGETS)
)
BUILDTREE_MAKE
=
$(GAMMADIR)
/make/
$(OSNAME)
/makefiles/buildtree.make
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OSNAME)
SRCARCH
=
$(SRCARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OSNAME)
SRCARCH
=
$(SRCARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
LIBRARY_SUFFIX
=
$(LIBRARY_SUFFIX)
BUILDTREE_VARS
+=
HOTSPOT_RELEASE_VERSION
=
$(HOTSPOT_RELEASE_VERSION)
HOTSPOT_BUILD_VERSION
=
$(HOTSPOT_BUILD_VERSION)
JRE_RELEASE_VERSION
=
$(JRE_RELEASE_VERSION)
BUILDTREE
=
$(MAKE)
-f
$(BUILDTREE_MAKE)
$(BUILDTREE_VARS)
...
...
make/bsd/makefiles/buildtree.make
浏览文件 @
657aa7f5
...
...
@@ -162,20 +162,6 @@ ifndef HOTSPOT_VM_DISTRO
endif
endif
ifeq
($(OS_VENDOR), Darwin)
# MACOSX FIXME: we should be able to run test_gamma (see MACOSX_PORT-214)
ifeq
($(ALWAYS_PASS_TEST_GAMMA),)
# ALWAYS_PASS_TEST_GAMMA wasn't set so we default to true on MacOS X
# until MACOSX_PORT-214 is fixed
ALWAYS_PASS_TEST_GAMMA
=
true
endif
endif
ifeq
($(ALWAYS_PASS_TEST_GAMMA), true)
TEST_GAMMA_STATUS
=
echo
'exit 0'
;
else
TEST_GAMMA_STATUS
=
endif
BUILDTREE_VARS
+=
HOTSPOT_RELEASE_VERSION
=
$(HS_BUILD_VER)
HOTSPOT_BUILD_VERSION
=
JRE_RELEASE_VERSION
=
$(JRE_RELEASE_VERSION)
BUILDTREE
=
\
...
...
@@ -353,12 +339,10 @@ env.sh: $(BUILDTREE_MAKE)
$(BUILDTREE_COMMENT)
;
\
[
-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}
"
;
\
echo
"DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
echo
"HOTSPOT_BUILD_USER=
\"
$
${
LOGNAME
:-
$$USER
}
in
`
basename
$(GAMMADIR)
`
\"
"
;
\
echo
"export JAVA_HOME
LD_LIBRARY_PATH DYLD_LIBRARY_PATH
CLASSPATH HOTSPOT_BUILD_USER"
;
\
echo
"export JAVA_HOME CLASSPATH HOTSPOT_BUILD_USER"
;
\
)
>
$@
env.csh
:
env.sh
...
...
@@ -412,7 +396,7 @@ JAVA_FLAG/32 = -d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to
$(DATA_MODE)
bit
JDK."
echo
"JAVA_HOME must point to
a
$(DATA_MODE)
-bit Open
JDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
...
...
@@ -420,20 +404,78 @@ CROSS_COMPILING_MSG = \
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
'#!/bin/sh'
;
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
'. ./env.sh'
;
\
echo
"if [
\"
$(CROSS_COMPILE_ARCH)
\"
!=
\"\"
]; then {
$(CROSS_COMPILING_MSG)
; exit 0; }; fi"
;
\
echo
"if [ -z
\$
$JAVA_HOME
]; then {
$(NO_JAVA_HOME_MSG)
; exit 0; }; fi"
;
\
echo
"if !
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion 2>&1 > /dev/null"
;
\
echo
"then"
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
; exit 0;"
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use gamma_g if it exists"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
"if [ -f gamma_g ]; then "
;
\
echo
" GAMMA_PROG=gamma_g"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
'[ -f gamma_g ] && { gamma=gamma_g; }'
;
\
echo
'./$${gamma:-gamma}
$(TESTFLAGS)
Queens < /dev/null'
;
\
$(TEST_GAMMA_STATUS)
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
...
...
make/bsd/makefiles/defs.make
浏览文件 @
657aa7f5
...
...
@@ -142,6 +142,7 @@ 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.
$(LIBRARY_SUFFIX)
EXPORT_SERVER_DIR
=
$(EXPORT_JRE_LIB_ARCH_DIR)
/server
EXPORT_CLIENT_DIR
=
$(EXPORT_JRE_LIB_ARCH_DIR)
/client
ifndef
BUILD_CLIENT_ONLY
EXPORT_LIST
+=
$(EXPORT_SERVER_DIR)
/Xusage.txt
...
...
@@ -150,7 +151,6 @@ 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.
$(LIBRARY_SUFFIX)
endif
...
...
make/bsd/makefiles/launcher.make
浏览文件 @
657aa7f5
...
...
@@ -51,6 +51,23 @@ ifeq ($(LINK_INTO),AOUT)
else
LAUNCHER.o
=
launcher.o
LFLAGS_LAUNCHER
+=
-L
`
pwd
`
# The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
# freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting
# the library searchpath using ({DY}LD_LIBRARY_PATH) to find the local JVM
# first. Gamma dlopen()s libjava from $JAVA_HOME/jre/lib{/$arch}, which is
# statically linked with CoreFoundation framework libs. Unfortunately, gamma's
# unique searchpath results in some unresolved symbols in the framework
# libraries, because JDK libraries are inadvertently discovered first on the
# searchpath, e.g. libjpeg. On Mac OS X, filenames are case *insensitive*.
# So, the actual filename collision is libjpeg.dylib and libJPEG.dylib.
# To resolve this, gamma needs to also statically link with the CoreFoundation
# framework libraries.
ifeq
($(OS_VENDOR),Darwin)
LFLAGS_LAUNCHER
+=
-framework
CoreFoundation
endif
LIBS_LAUNCHER
+=
-l
$(JVM)
$(LIBS)
endif
...
...
make/bsd/makefiles/vm.make
浏览文件 @
657aa7f5
...
...
@@ -337,8 +337,8 @@ ifeq ($(OS_VENDOR), Darwin)
$(LIBJVM).dSYM
:
$(LIBJVM)
dsymutil
$(LIBJVM)
# no l
auncher or l
ibjvm_db for macosx
build
:
$(LIBJVM) $(LIBJSIG) $(BUILDLIBSAPROC) dtraceCheck $(LIBJVM).dSYM
# no libjvm_db for macosx
build
:
$(LIBJVM) $(L
AUNCHER) $(L
IBJSIG) $(BUILDLIBSAPROC) dtraceCheck $(LIBJVM).dSYM
echo
"Doing vm.make build:"
else
build
:
$(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC)
...
...
make/linux/makefiles/buildtree.make
浏览文件 @
657aa7f5
...
...
@@ -326,11 +326,10 @@ env.sh: $(BUILDTREE_MAKE)
$(BUILDTREE_COMMENT)
;
\
[
-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}
"
;
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
echo
"HOTSPOT_BUILD_USER=
\"
$
${
LOGNAME
:-
$$USER
}
in
`
basename
$(GAMMADIR)
`
\"
"
;
\
echo
"export JAVA_HOME
LD_LIBRARY_PATH
CLASSPATH HOTSPOT_BUILD_USER"
;
\
echo
"export JAVA_HOME CLASSPATH HOTSPOT_BUILD_USER"
;
\
)
>
$@
env.csh
:
env.sh
...
...
@@ -384,7 +383,7 @@ JAVA_FLAG/32 = -d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to
$(DATA_MODE)
bit
JDK."
echo
"JAVA_HOME must point to
a
$(DATA_MODE)
-bit Open
JDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
...
...
@@ -392,19 +391,78 @@ CROSS_COMPILING_MSG = \
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
'#!/bin/sh'
;
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
'. ./env.sh'
;
\
echo
"if [
\"
$(CROSS_COMPILE_ARCH)
\"
!=
\"\"
]; then {
$(CROSS_COMPILING_MSG)
; exit 0; }; fi"
;
\
echo
"if [ -z
\$
$JAVA_HOME
]; then {
$(NO_JAVA_HOME_MSG)
; exit 0; }; fi"
;
\
echo
"if !
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion 2>&1 > /dev/null"
;
\
echo
"then"
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
; exit 0;"
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use gamma_g if it exists"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
"if [ -f gamma_g ]; then "
;
\
echo
" GAMMA_PROG=gamma_g"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
'[ -f gamma_g ] && { gamma=gamma_g; }'
;
\
echo
'./$${gamma:-gamma}
$(TESTFLAGS)
Queens < /dev/null'
;
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
...
...
make/solaris/makefiles/buildtree.make
浏览文件 @
657aa7f5
...
...
@@ -118,7 +118,7 @@ SUBMAKE_DIRS = $(addprefix $(PLATFORM_DIR)/,$(TARGETS))
BUILDTREE_MAKE
=
$(GAMMADIR)
/make/
$(OS_FAMILY)
/makefiles/buildtree.make
BUILDTREE_TARGETS
=
Makefile flags.make flags_vm.make vm.make adlc.make jvmti.make sa.make
\
env.
k
sh env.csh jdkpath.sh .dbxrc test_gamma
env.sh env.csh jdkpath.sh .dbxrc test_gamma
BUILDTREE_VARS
=
GAMMADIR
=
$(GAMMADIR)
OS_FAMILY
=
$(OS_FAMILY)
\
ARCH
=
$(ARCH)
BUILDARCH
=
$(BUILDARCH)
LIBARCH
=
$(LIBARCH)
VARIANT
=
$(VARIANT)
...
...
@@ -313,22 +313,19 @@ sa.make: $(BUILDTREE_MAKE)
echo
"include
\$
$(GAMMADIR)
/make/
$(OS_FAMILY)
/makefiles/
$
(@F)"
;
\
)
>
$@
env.
k
sh
:
$(BUILDTREE_MAKE)
env.sh
:
$(BUILDTREE_MAKE)
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
[
-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}
"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
"CLASSPATH=
$
${
CLASSPATH
:+
$$CLASSPATH
:
}
.:
\$
${JAVA_HOME}
/jre/lib/rt.jar:
\$
${JAVA_HOME}
/jre/lib/i18n.jar"
;
\
}
|
sed
s:
$
${
JAVA_HOME
:-
-------
}
:
\$
${JAVA_HOME}
:g
;
\
echo
"HOTSPOT_BUILD_USER=
\"
$
${
LOGNAME
:-
$$USER
}
in
`
basename
$(GAMMADIR)
`
\"
"
;
\
echo
"export JAVA_HOME LD_LIBRARY_PATH CLASSPATH HOTSPOT_BUILD_USER"
;
\
)
>
$@
env.csh
:
env.
k
sh
env.csh
:
env.sh
@
echo
Creating
$@
...
$(QUIETLY)
(
\
$(BUILDTREE_COMMENT)
;
\
...
...
@@ -384,23 +381,86 @@ JAVA_FLAG/32 = -d32
JAVA_FLAG/
64
=
-d64
WRONG_DATA_MODE_MSG
=
\
echo
"JAVA_HOME must point to
$(DATA_MODE)
bit JDK."
echo
"JAVA_HOME must point to a
$(DATA_MODE)
-bit OpenJDK."
CROSS_COMPILING_MSG
=
\
echo
"Cross compiling for ARCH
$(CROSS_COMPILE_ARCH)
, skipping gamma run."
test_gamma
:
$(BUILDTREE_MAKE) $(GAMMADIR)/make/test/Queens.java
@
echo
Creating
$@
...
$(QUIETLY)
(
\
echo
'#!/bin/ksh'
;
\
echo
"#!/bin/sh"
;
\
echo
""
;
\
$(BUILDTREE_COMMENT)
;
\
echo
'. ./env.ksh'
;
\
echo
"if [ -z
\$
$JAVA_HOME
]; then {
$(NO_JAVA_HOME_MSG)
; exit 0; }; fi"
;
\
echo
"if !
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion 2>&1 > /dev/null"
;
\
echo
"then"
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
; exit 0;"
;
\
echo
""
;
\
echo
"# Include environment settings for gamma run"
;
\
echo
""
;
\
echo
". ./env.sh"
;
\
echo
""
;
\
echo
"# Do not run gamma test for cross compiles"
;
\
echo
""
;
\
echo
"if [ -n
\"
$(CROSS_COMPILE_ARCH)
\"
]; then "
;
\
echo
"
$(CROSS_COMPILING_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Make sure JAVA_HOME is set as it is required for gamma"
;
\
echo
""
;
\
echo
"if [ -z
\"\$
${JAVA_HOME}
\"
]; then "
;
\
echo
"
$(NO_JAVA_HOME_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Check JAVA_HOME version to be used for the test"
;
\
echo
""
;
\
echo
"
\$
${JAVA_HOME}
/bin/java
$(JAVA_FLAG)
-fullversion > /dev/null 2>&1"
;
\
echo
"if [
\$
$?
-ne 0 ]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use gamma_g if it exists"
;
\
echo
""
;
\
echo
"GAMMA_PROG=gamma"
;
\
echo
"if [ -f gamma_g ]; then "
;
\
echo
" GAMMA_PROG=gamma_g"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" # Ensure architecture for gamma and JAVA_HOME is the same."
;
\
echo
" # NOTE: gamma assumes the OpenJDK directory layout."
;
\
echo
""
;
\
echo
" GAMMA_ARCH=
\"\`
file
\$
${GAMMA_PROG}
| awk '{print
\$
$NF
}'
\`\"
"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
]; then"
;
\
echo
" JVM_LIB=
\"\$
${JAVA_HOME}
/jre/lib/
$
${LIBARCH}
/libjava.
$(LIBRARY_SUFFIX)
\"
"
;
\
echo
" fi"
;
\
echo
" if [ ! -f
\$
${JVM_LIB}
] || [ -z
\"\`
file
\$
${JVM_LIB}
| grep
\$
${GAMMA_ARCH}
\`\"
]; then "
;
\
echo
"
$(WRONG_DATA_MODE_MSG)
"
;
\
echo
" exit 0"
;
\
echo
" fi"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Compile Queens program for test"
;
\
echo
""
;
\
echo
"rm -f Queens.class"
;
\
echo
"
\$
${JAVA_HOME}
/bin/javac -d .
$(GAMMADIR)
/make/test/Queens.java"
;
\
echo
'[ -f gamma_g ] && { gamma=gamma_g; }'
;
\
echo
'./$${gamma:-gamma}
$(TESTFLAGS)
Queens < /dev/null'
;
\
echo
""
;
\
echo
"# Set library path solely for gamma launcher test run"
;
\
echo
""
;
\
echo
"LD_LIBRARY_PATH=.:
$
${
LD_LIBRARY_PATH
:+
$$LD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
"export LD_LIBRARY_PATH"
;
\
echo
"unset LD_LIBRARY_PATH_32"
;
\
echo
"unset LD_LIBRARY_PATH_64"
;
\
echo
""
;
\
echo
"if [
\"
$(OS_VENDOR)
\"
=
\"
Darwin
\"
]; then "
;
\
echo
" DYLD_LIBRARY_PATH=.:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/native_threads:
\$
${JAVA_HOME}
/jre/lib:
$
${
DYLD_LIBRARY_PATH
:+
$$DYLD_LIBRARY_PATH
:
}
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
/native_threads:
\$
${JAVA_HOME}
/jre/lib/
${LIBARCH}
:
${GCC_LIB}
"
;
\
echo
" export DYLD_LIBRARY_PATH"
;
\
echo
"fi"
;
\
echo
""
;
\
echo
"# Use the gamma launcher and JAVA_HOME to run the test"
;
\
echo
""
;
\
echo
"./
\$
${GAMMA_PROG}
$(TESTFLAGS)
Queens < /dev/null"
;
\
)
>
$@
$(QUIETLY)
chmod
+x
$@
...
...
src/os/bsd/vm/os_bsd.cpp
浏览文件 @
657aa7f5
...
...
@@ -301,6 +301,12 @@ static char cpu_arch[] = "sparc";
#error Add appropriate cpu_arch setting
#endif
// Compiler variant
#ifdef COMPILER2
#define COMPILER_VARIANT "server"
#else
#define COMPILER_VARIANT "client"
#endif
#ifndef _ALLBSD_SOURCE
// pid_t gettid()
...
...
@@ -2507,7 +2513,7 @@ void os::print_signal_handlers(outputStream* st, char* buf, size_t buflen) {
static
char
saved_jvm_path
[
MAXPATHLEN
]
=
{
0
};
// Find the full path to the current module, libjvm
.so or libjvm_g.so
// Find the full path to the current module, libjvm
or libjvm_g
void
os
::
jvm_path
(
char
*
buf
,
jint
buflen
)
{
// Error checking.
if
(
buflen
<
MAXPATHLEN
)
{
...
...
@@ -2532,11 +2538,11 @@ void os::jvm_path(char *buf, jint buflen) {
if
(
Arguments
::
created_by_gamma_launcher
())
{
// Support for the gamma launcher. Typical value for buf is
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm
.so
". If "/jre/lib/" appears at
// "<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm". If "/jre/lib/" appears at
// the right place in the string, then assume we are installed in a JDK and
// we're done. Otherwise, check for a JAVA_HOME environment variable and
fix
//
up the path so it looks like libjvm.so is installed there (append a
// fake suffix hotspot/libjvm.so).
// we're done. Otherwise, check for a JAVA_HOME environment variable and
//
construct a path to the JVM being overridden.
const
char
*
p
=
buf
+
strlen
(
buf
)
-
1
;
for
(
int
count
=
0
;
p
>
buf
&&
count
<
5
;
++
count
)
{
for
(
--
p
;
p
>
buf
&&
*
p
!=
'/'
;
--
p
)
...
...
@@ -2550,7 +2556,7 @@ void os::jvm_path(char *buf, jint buflen) {
char
*
jrelib_p
;
int
len
;
// Check the current module name "libjvm
.so" or "libjvm_g.so
".
// Check the current module name "libjvm
" or "libjvm_g
".
p
=
strrchr
(
buf
,
'/'
);
assert
(
strstr
(
p
,
"/libjvm"
)
==
p
,
"invalid library name"
);
p
=
strstr
(
p
,
"_g"
)
?
"_g"
:
""
;
...
...
@@ -2563,19 +2569,32 @@ void os::jvm_path(char *buf, jint buflen) {
// modules image doesn't have "jre" subdirectory
len
=
strlen
(
buf
);
jrelib_p
=
buf
+
len
;
snprintf
(
jrelib_p
,
buflen
-
len
,
"/jre/lib/%s"
,
cpu_arch
);
// Add the appropriate library subdir
snprintf
(
jrelib_p
,
buflen
-
len
,
"/jre/lib"
);
if
(
0
!=
access
(
buf
,
F_OK
))
{
snprintf
(
jrelib_p
,
buflen
-
len
,
"/lib"
);
}
// Add the appropriate client or server subdir
len
=
strlen
(
buf
);
jrelib_p
=
buf
+
len
;
snprintf
(
jrelib_p
,
buflen
-
len
,
"/%s"
,
COMPILER_VARIANT
);
if
(
0
!=
access
(
buf
,
F_OK
))
{
snprintf
(
jrelib_p
,
buflen
-
len
,
"
/lib/%s"
,
cpu_arch
);
snprintf
(
jrelib_p
,
buflen
-
len
,
"
"
);
}
// If the path exists within JAVA_HOME, add the JVM library name
// to complete the path to JVM being overridden. Otherwise fallback
// to the path to the current library.
if
(
0
==
access
(
buf
,
F_OK
))
{
// Use current module name "libjvm[_g]
.so
" instead of
// "libjvm"debug_only("_g")"
.so
" since for fastdebug version
// we should have "libjvm
.so
" but debug_only("_g") adds "_g"!
// Use current module name "libjvm[_g]" instead of
// "libjvm"debug_only("_g")"" since for fastdebug version
// we should have "libjvm" but debug_only("_g") adds "_g"!
len
=
strlen
(
buf
);
snprintf
(
buf
+
len
,
buflen
-
len
,
"/
hotspot/libjvm%s.so"
,
p
);
snprintf
(
buf
+
len
,
buflen
-
len
,
"/
libjvm%s%s"
,
p
,
JNI_LIB_SUFFIX
);
}
else
{
//
Go back to path of .so
//
Fall back to path of current library
rp
=
realpath
(
dli_fname
,
buf
);
if
(
rp
==
NULL
)
return
;
...
...
src/os/posix/launcher/java_md.c
浏览文件 @
657aa7f5
...
...
@@ -701,6 +701,14 @@ GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative)
char
libjava
[
MAXPATHLEN
];
if
(
GetApplicationHome
(
path
,
pathsize
))
{
/* Is the JRE universal, i.e. no arch dir? */
sprintf
(
libjava
,
"%s/jre/lib/"
JAVA_DLL
,
path
);
if
(
access
(
libjava
,
F_OK
)
==
0
)
{
strcat
(
path
,
"/jre"
);
goto
found
;
}
/* Is JRE co-located with the application? */
sprintf
(
libjava
,
"%s/lib/%s/"
JAVA_DLL
,
path
,
arch
);
if
(
access
(
libjava
,
F_OK
)
==
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录