Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
df349ae8
D
dragonwell11
项目概览
openanolis
/
dragonwell11
通知
7
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell11
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
df349ae8
编写于
7月 05, 2017
作者:
D
duke
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
3d8f0f64
c568efb7
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
334 addition
and
53 deletion
+334
-53
.hgtags-top-repo
.hgtags-top-repo
+1
-0
common/autoconf/configure.ac
common/autoconf/configure.ac
+3
-0
common/autoconf/flags.m4
common/autoconf/flags.m4
+8
-2
common/autoconf/generated-configure.sh
common/autoconf/generated-configure.sh
+67
-4
common/autoconf/jdk-options.m4
common/autoconf/jdk-options.m4
+34
-0
common/autoconf/spec.gmk.in
common/autoconf/spec.gmk.in
+1
-0
common/autoconf/toolchain.m4
common/autoconf/toolchain.m4
+13
-2
make/BuildStatic.gmk
make/BuildStatic.gmk
+54
-0
make/Init.gmk
make/Init.gmk
+8
-37
make/InitSupport.gmk
make/InitSupport.gmk
+69
-0
make/Main.gmk
make/Main.gmk
+22
-2
make/common/NativeCompilation.gmk
make/common/NativeCompilation.gmk
+44
-1
modules.xml
modules.xml
+3
-0
test/lib/sun/hotspot/code/CodeBlob.java
test/lib/sun/hotspot/code/CodeBlob.java
+4
-2
test/lib/sun/hotspot/code/NMethod.java
test/lib/sun/hotspot/code/NMethod.java
+3
-3
未找到文件。
.hgtags-top-repo
浏览文件 @
df349ae8
...
@@ -334,3 +334,4 @@ fd4f4f7561074dc0dbc1772c8489c7b902b6b8a9 jdk9-b87
...
@@ -334,3 +334,4 @@ fd4f4f7561074dc0dbc1772c8489c7b902b6b8a9 jdk9-b87
895353113f382d24e623191fdab0e29a3ce34738 jdk9-b89
895353113f382d24e623191fdab0e29a3ce34738 jdk9-b89
cf1dc4c035fb84693d4ae5ad818785cb4d1465d1 jdk9-b90
cf1dc4c035fb84693d4ae5ad818785cb4d1465d1 jdk9-b90
122142a185381ce5cea959bf13b923d8cc333628 jdk9-b91
122142a185381ce5cea959bf13b923d8cc333628 jdk9-b91
106c06398f7ab330eef9e335fbd3a5a8ead23b77 jdk9-b92
common/autoconf/configure.ac
浏览文件 @
df349ae8
...
@@ -155,6 +155,9 @@ SRCDIRS_SETUP_OUTPUT_DIRS
...
@@ -155,6 +155,9 @@ SRCDIRS_SETUP_OUTPUT_DIRS
#
#
###############################################################################
###############################################################################
# See if we are doing a complete static build or not
JDKOPT_SETUP_STATIC_BUILD
# First determine the toolchain type (compiler family)
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
...
...
common/autoconf/flags.m4
浏览文件 @
df349ae8
...
@@ -221,7 +221,11 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
...
@@ -221,7 +221,11 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Linking is different on MacOSX
# Linking is different on MacOSX
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
if test "x$STATIC_BUILD" = xtrue; then
SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
else
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
fi
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
...
@@ -696,7 +700,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
...
@@ -696,7 +700,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
-I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
-I${JDK_TOPDIR}/src/java.base/share/native/libjava \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
# The shared libraries are compiled using the picflag.
# The shared libraries are compiled using the picflag.
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
...
...
common/autoconf/generated-configure.sh
浏览文件 @
df349ae8
...
@@ -803,6 +803,7 @@ STATIC_LIBRARY_SUFFIX
...
@@ -803,6 +803,7 @@ STATIC_LIBRARY_SUFFIX
SHARED_LIBRARY_SUFFIX
SHARED_LIBRARY_SUFFIX
LIBRARY_PREFIX
LIBRARY_PREFIX
TOOLCHAIN_TYPE
TOOLCHAIN_TYPE
STATIC_BUILD
BUILD_HOTSPOT
BUILD_HOTSPOT
HOTSPOT_DIST
HOTSPOT_DIST
BUILD_OUTPUT
BUILD_OUTPUT
...
@@ -1074,6 +1075,7 @@ with_override_hotspot
...
@@ -1074,6 +1075,7 @@ with_override_hotspot
with_override_nashorn
with_override_nashorn
with_override_jdk
with_override_jdk
with_import_hotspot
with_import_hotspot
enable_static_build
with_toolchain_type
with_toolchain_type
with_extra_cflags
with_extra_cflags
with_extra_cxxflags
with_extra_cxxflags
...
@@ -1852,6 +1854,7 @@ Optional Features:
...
@@ -1852,6 +1854,7 @@ Optional Features:
run the Queens test after Hotspot build [disabled]
run the Queens test after Hotspot build [disabled]
--enable-unlimited-crypto
--enable-unlimited-crypto
Enable unlimited crypto policy [disabled]
Enable unlimited crypto policy [disabled]
--enable-static-build enable static library build [disabled]
--disable-warnings-as-errors
--disable-warnings-as-errors
do not consider native warnings to be an error
do not consider native warnings to be an error
[enabled]
[enabled]
...
@@ -3989,6 +3992,15 @@ pkgadd_help() {
...
@@ -3989,6 +3992,15 @@ pkgadd_help() {
#
#
################################################################################
#
# Static build support. When enabled will generate static
# libraries instead of shared libraries for all JDK libs.
#
#
#
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
...
@@ -29018,6 +29030,40 @@ $as_echo "yes from $HOTSPOT_DIST" >&6; }
...
@@ -29018,6 +29030,40 @@ $as_echo "yes from $HOTSPOT_DIST" >&6; }
#
#
###############################################################################
###############################################################################
# See if we are doing a complete static build or not
# Check whether --enable-static-build was given.
if test "${enable_static_build+set}" = set; then :
enableval=$enable_static_build;
fi
STATIC_BUILD=false
if test "x$enable_static_build" = "xyes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
$as_echo_n "checking if static build is enabled... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
fi
STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
STATIC_BUILD=true
elif test "x$enable_static_build" = "xno"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
$as_echo_n "checking if static build is enabled... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
elif test "x$enable_static_build" != "x"; then
as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
fi
# First determine the toolchain type (compiler family)
# First determine the toolchain type (compiler family)
...
@@ -29126,8 +29172,19 @@ $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
...
@@ -29126,8 +29172,19 @@ $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
OBJ_SUFFIX='.o'
OBJ_SUFFIX='.o'
EXE_SUFFIX=''
EXE_SUFFIX=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
SHARED_LIBRARY='lib$1.dylib'
# For full static builds, we're overloading the SHARED_LIBRARY
SHARED_LIBRARY_SUFFIX='.dylib'
# variables in order to limit the amount of changes required.
# It would be better to remove SHARED and just use LIBRARY and
# LIBRARY_SUFFIX for libraries that can be built either
# shared or static and use STATIC_* for libraries that are
# always built statically.
if test "x$STATIC_BUILD" = xtrue; then
SHARED_LIBRARY='lib$1.a'
SHARED_LIBRARY_SUFFIX='.a'
else
SHARED_LIBRARY='lib$1.dylib'
SHARED_LIBRARY_SUFFIX='.dylib'
fi
fi
fi
fi
fi
...
@@ -44314,7 +44371,11 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
...
@@ -44314,7 +44371,11 @@ $as_echo "$ac_cv_c_bigendian" >&6; }
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# Linking is different on MacOSX
# Linking is different on MacOSX
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
if test "x$STATIC_BUILD" = xtrue; then
SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
else
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
fi
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
...
@@ -44818,7 +44879,9 @@ $as_echo "$supports" >&6; }
...
@@ -44818,7 +44879,9 @@ $as_echo "$supports" >&6; }
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
-I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/share/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
-I${JDK_TOPDIR}/src/java.base/share/native/libjava \
-I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
# The shared libraries are compiled using the picflag.
# The shared libraries are compiled using the picflag.
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
common/autoconf/jdk-options.m4
浏览文件 @
df349ae8
...
@@ -665,3 +665,37 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
...
@@ -665,3 +665,37 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
AC_SUBST(GCOV_ENABLED)
AC_SUBST(GCOV_ENABLED)
])
])
################################################################################
#
# Static build support. When enabled will generate static
# libraries instead of shared libraries for all JDK libs.
#
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
[
AC_ARG_ENABLE([static-build], [AS_HELP_STRING([--enable-static-build],
[enable static library build @<:@disabled@:>@])])
STATIC_BUILD=false
if test "x$enable_static_build" = "xyes"; then
AC_MSG_CHECKING([if static build is enabled])
AC_MSG_RESULT([yes])
if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
AC_MSG_ERROR([--enable-static-build is only supported for macosx builds])
fi
STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
STATIC_BUILD=true
elif test "x$enable_static_build" = "xno"; then
AC_MSG_CHECKING([if static build is enabled])
AC_MSG_RESULT([no])
elif test "x$enable_static_build" != "x"; then
AC_MSG_ERROR([--enable-static-build can only be assigned "yes" or "no"])
fi
AC_SUBST(STATIC_BUILD)
])
common/autoconf/spec.gmk.in
浏览文件 @
df349ae8
...
@@ -417,6 +417,7 @@ SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
...
@@ -417,6 +417,7 @@ SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
EXE_SUFFIX:=@EXE_SUFFIX@
EXE_SUFFIX:=@EXE_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@
STATIC_BUILD:=@STATIC_BUILD@
STRIPFLAGS:=@STRIPFLAGS@
STRIPFLAGS:=@STRIPFLAGS@
...
...
common/autoconf/toolchain.m4
浏览文件 @
df349ae8
...
@@ -72,8 +72,19 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
...
@@ -72,8 +72,19 @@ AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS],
OBJ_SUFFIX='.o'
OBJ_SUFFIX='.o'
EXE_SUFFIX=''
EXE_SUFFIX=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
SHARED_LIBRARY='lib[$]1.dylib'
# For full static builds, we're overloading the SHARED_LIBRARY
SHARED_LIBRARY_SUFFIX='.dylib'
# variables in order to limit the amount of changes required.
# It would be better to remove SHARED and just use LIBRARY and
# LIBRARY_SUFFIX for libraries that can be built either
# shared or static and use STATIC_* for libraries that are
# always built statically.
if test "x$STATIC_BUILD" = xtrue; then
SHARED_LIBRARY='lib[$]1.a'
SHARED_LIBRARY_SUFFIX='.a'
else
SHARED_LIBRARY='lib[$]1.dylib'
SHARED_LIBRARY_SUFFIX='.dylib'
fi
fi
fi
fi
fi
...
...
make/BuildStatic.gmk
0 → 100644
浏览文件 @
df349ae8
#
# Copyright (c) 2015, 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. Oracle designates this
# particular file as subject to the "Classpath" exception as provided
# by Oracle in the LICENSE file that accompanied this code.
#
# 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.
#
default: all
include $(SPEC)
include MakeBase.gmk
################################################################################
#
# Concatenate exported.symbols files for modules into a single global file.
#
GLOBAL_SYMBOLS_FILE := $(SUPPORT_OUTPUTDIR)/build-static/exported.symbols
EXPORTED_SYMBOLS_MODULES := java.base jdk.jdwp.agent
MODULES_SYMBOLS_FILES := $(foreach module, $(EXPORTED_SYMBOLS_MODULES), \
$(SUPPORT_OUTPUTDIR)/modules_libs/$(module)/$(module).symbols)
$(GLOBAL_SYMBOLS_FILE): $(MODULES_SYMBOLS_FILES)
$(ECHO) $(LOG_INFO) "Generating global exported.symbols file"
$(MKDIR) -p $(@D)
$(CAT) $^ > $@
TARGETS += $(GLOBAL_SYMBOLS_FILE)
################################################################################
all: $(TARGETS)
.PHONY: default all
make/Init.gmk
浏览文件 @
df349ae8
...
@@ -305,49 +305,20 @@ else # HAS_SPEC=true
...
@@ -305,49 +305,20 @@ else # HAS_SPEC=true
endif
endif
on-failure:
on-failure:
ifneq ($(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*), )
$(call PrintFailureReports)
$(PRINTF) "=== Output from failing command(s) repeated here ===\n"
$(call PrintBuildLogFailures)
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*)), \
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \
$(CAT) $(logfile) | $(GREP) -v -e "^Note: including file:" $(NEWLINE) \
)
$(PRINTF) "=== End of repeated output ===\n"
endif
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
$(PRINTF) "=== Make failure sequence repeated here ===\n" ; \
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
$(PRINTF) "=== End of repeated output ===\n" ; \
$(PRINTF) "Hint: Try searching the build log for the name of the first failed target.\n" ; \
else \
$(PRINTF) "No indication of failed target found.\n" ; \
$(PRINTF) "Hint: Try searching the build log for '] Error'.\n" ; \
fi
$(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n"
$(PRINTF) "Hint: If caused by a warning, try configure --disable-warnings-as-errors.\n\n"
ifneq ($(COMPARE_BUILD), )
$(call CleanupCompareBuild)
endif
# Support targets for COMPARE_BUILD, used for makefile development
# Support targets for COMPARE_BUILD, used for makefile development
pre-compare-build:
pre-compare-build:
$(ECHO) "Preparing for comparison rebuild"
$(call PrepareCompareBuild)
# Apply patch, if any
ifneq ($(COMPARE_BUILD_PATCH), )
$(PATCH) -p1 < $(COMPARE_BUILD_PATCH)
endif
# Move the first build away and re-create the output directory
( cd $(TOPDIR) && \
$(MV) $(OUTPUT_ROOT) $(OUTPUT_ROOT).OLD && \
$(MKDIR) -p $(OUTPUT_ROOT) )
# Re-run configure with the same arguments (and possibly some additional),
# must be done after patching.
( cd $(OUTPUT_ROOT) && PATH="$(ORIGINAL_PATH)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
post-compare-build:
post-compare-build:
# Compare first and second build. Ignore any error code from compare.sh.
$(call CleanupCompareBuild)
$(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)"
$(call CompareBuildDoComparison)
ifneq ($(COMPARE_BUILD_COMP_DIR), )
+(cd $(OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) -2dirs $(OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) $(OUTPUT_ROOT).OLD/$(COMPARE_BUILD_COMP_DIR) || true)
else
+(cd $(OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) -o $(OUTPUT_ROOT).OLD || true)
endif
.PHONY: print-targets print-modules reconfigure main on-failure
.PHONY: print-targets print-modules reconfigure main on-failure
endif
endif
make/InitSupport.gmk
浏览文件 @
df349ae8
...
@@ -321,6 +321,8 @@ else # $(HAS_SPEC)=true
...
@@ -321,6 +321,8 @@ else # $(HAS_SPEC)=true
# If any value contains "+", it will be replaced by space.
# If any value contains "+", it will be replaced by space.
define ParseCompareBuild
define ParseCompareBuild
ifneq ($$(COMPARE_BUILD), )
ifneq ($$(COMPARE_BUILD), )
COMPARE_BUILD_OUTPUT_ROOT := $(TOPDIR)/build/compare-build/$(CONF_NAME)
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
ifneq ($$(findstring :, $$(COMPARE_BUILD)), )
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
$$(foreach part, $$(subst :, , $$(COMPARE_BUILD)), \
$$(if $$(filter PATCH=%, $$(part)), \
$$(if $$(filter PATCH=%, $$(part)), \
...
@@ -364,6 +366,73 @@ else # $(HAS_SPEC)=true
...
@@ -364,6 +366,73 @@ else # $(HAS_SPEC)=true
endif
endif
endef
endef
# Prepare for a comparison rebuild
define PrepareCompareBuild
$(ECHO) "Preparing for comparison rebuild"
# Apply patch, if any
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -p1 < $(COMPARE_BUILD_PATCH))
# Move the first build away temporarily
$(RM) -r $(TOPDIR)/build/.compare-build-temp
$(MKDIR) -p $(TOPDIR)/build/.compare-build-temp
$(MV) $(OUTPUT_ROOT) $(TOPDIR)/build/.compare-build-temp
# Restore an old compare-build, or create a new compare-build directory.
if test -d $(COMPARE_BUILD_OUTPUT_ROOT); then \
$(MV) $(COMPARE_BUILD_OUTPUT_ROOT) $(OUTPUT_ROOT); \
else \
$(MKDIR) -p $(OUTPUT_ROOT); \
fi
# Re-run configure with the same arguments (and possibly some additional),
# must be done after patching.
( cd $(OUTPUT_ROOT) && PATH="$(ORIGINAL_PATH)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) $(COMPARE_BUILD_CONF))
endef
# Cleanup after a compare build
define CleanupCompareBuild
# If running with a COMPARE_BUILD patch, reverse-apply it
$(if $(COMPARE_BUILD_PATCH), $(PATCH) -R -p1 < $(COMPARE_BUILD_PATCH))
# Move this build away and restore the original build
$(MKDIR) -p $(TOPDIR)/build/compare-build
$(MV) $(OUTPUT_ROOT) $(COMPARE_BUILD_OUTPUT_ROOT)
$(MV) $(TOPDIR)/build/.compare-build-temp/$(CONF_NAME) $(OUTPUT_ROOT)
$(RM) -r $(TOPDIR)/build/.compare-build-temp
endef
# Do the actual comparison of two builds
define CompareBuildDoComparison
# Compare first and second build. Ignore any error code from compare.sh.
$(ECHO) "Comparing between comparison rebuild (this/new) and baseline (other/old)"
$(if $(COMPARE_BUILD_COMP_DIR), \
+(cd $(COMPARE_BUILD_OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) \
-2dirs $(COMPARE_BUILD_OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) $(OUTPUT_ROOT)/$(COMPARE_BUILD_COMP_DIR) || true), \
+(cd $(COMPARE_BUILD_OUTPUT_ROOT) && ./compare.sh $(COMPARE_BUILD_COMP_OPTS) \
-o $(OUTPUT_ROOT) || true) \
)
endef
define PrintFailureReports
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*), \
$(PRINTF) "=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*)), \
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \
$(CAT) $(logfile) | $(GREP) -v -e "^Note: including file:" $(NEWLINE) \
) \
$(PRINTF) "=== End of repeated output ===\n" \
)
endef
define PrintBuildLogFailures
if $(GREP) -q "recipe for target .* failed" $(BUILD_LOG) 2> /dev/null; then \
$(PRINTF) "=== Make failure sequence repeated here ===\n" ; \
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
$(PRINTF) "=== End of repeated output ===\n" ; \
$(PRINTF) "Hint: Try searching the build log for the name of the first failed target.\n" ; \
else \
$(PRINTF) "No indication of failed target found.\n" ; \
$(PRINTF) "Hint: Try searching the build log for '] Error'.\n" ; \
fi
endef
define RotateLogFiles
define RotateLogFiles
$(RM) $(BUILD_LOG).old 2> /dev/null
$(RM) $(BUILD_LOG).old 2> /dev/null
$(MV) $(BUILD_LOG) $(BUILD_LOG).old 2> /dev/null || true
$(MV) $(BUILD_LOG) $(BUILD_LOG).old 2> /dev/null || true
...
...
make/Main.gmk
浏览文件 @
df349ae8
...
@@ -93,7 +93,10 @@ import-hotspot:
...
@@ -93,7 +93,10 @@ import-hotspot:
unpack-sec:
unpack-sec:
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
+($(CD) $(JDK_TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f UnpackSecurity.gmk)
ALL_TARGETS += import-hotspot unpack-sec
generate-exported-symbols:
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f BuildStatic.gmk)
ALL_TARGETS += import-hotspot unpack-sec generate-exported-symbols
################################################################################
################################################################################
# Gensrc targets, generating source before java compilation can be done
# Gensrc targets, generating source before java compilation can be done
...
@@ -298,16 +301,23 @@ ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
...
@@ -298,16 +301,23 @@ ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
test:
test:
$(call RunTests, $(TEST))
$(call RunTests, $(TEST))
test-hotspot-jtreg:
$(call RunTests, "hotspot_all")
test-hotspot-jtreg-native:
test-hotspot-jtreg-native:
$(call RunTests, "hotspot_native_sanity")
$(call RunTests, "hotspot_native_sanity")
test-hotspot-internal:
$(call RunTests, "hotspot_internal")
test-jdk-jtreg-native:
test-jdk-jtreg-native:
$(call RunTests, "jdk_native_sanity")
$(call RunTests, "jdk_native_sanity")
test-make:
test-make:
($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
($(CD) $(SRC_ROOT)/test/make && $(MAKE) $(MAKE_ARGS) -f TestMake.gmk $(TEST_TARGET))
ALL_TARGETS += test test-hotspot-jtreg-native test-jdk-jtreg-native test-make
ALL_TARGETS += test test-hotspot-jtreg test-hotspot-jtreg-native \
test-hotspot-internal test-jdk-jtreg-native test-make
################################################################################
################################################################################
# Verification targets
# Verification targets
...
@@ -368,10 +378,16 @@ else
...
@@ -368,10 +378,16 @@ else
import-hotspot: hotspot
import-hotspot: hotspot
generate-exported-symbols: java.base-libs jdk.jdwp.agent-libs
$(LIBS_TARGETS): import-hotspot
$(LIBS_TARGETS): import-hotspot
$(LAUNCHER_TARGETS): java.base-libs
$(LAUNCHER_TARGETS): java.base-libs
ifeq ($(STATIC_BUILD), true)
$(LAUNCHER_TARGETS): generate-exported-symbols
endif
# The demos are currently linking to libjvm and libjava, just like all other
# The demos are currently linking to libjvm and libjava, just like all other
# jdk libs, even though they don't need to. To avoid warnings, make sure they
# jdk libs, even though they don't need to. To avoid warnings, make sure they
# aren't built until after libjava and libjvm are available to link to.
# aren't built until after libjava and libjvm are available to link to.
...
@@ -462,6 +478,10 @@ else
...
@@ -462,6 +478,10 @@ else
test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
test-image-jdk-jtreg-native: build-test-jdk-jtreg-native
test-hotspot-internal: exploded-image
test-hotspot-jtreg: jimages test-image
endif
endif
################################################################################
################################################################################
...
...
make/common/NativeCompilation.gmk
浏览文件 @
df349ae8
...
@@ -34,6 +34,31 @@ ifeq (,$(_MAKEBASE_GMK))
...
@@ -34,6 +34,31 @@ ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
endif
endif
################################################################################
# Create exported symbols file for static libraries
################################################################################
# get the exported symbols from mapfiles and if there
# is no mapfile, get them from the archive
define GetSymbols
$(RM) $$(@D)/$$(basename $$(@F)).symbols; \
if [ ! -z $$($1_MAPFILE) -a -e $$($1_MAPFILE) ]; then \
$(ECHO) "Getting symbols from mapfile $$($1_MAPFILE)"; \
$(AWK) '/global:/','/local:/' $$($1_MAPFILE) | \
$(SED) -e 's/#.*//;s/global://;s/local://;s/\;//;s/^[ ]*/_/;/^_$$$$/d' | \
$(EGREP) -v "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" > \
$$(@D)/$$(basename $$(@F)).symbols || true; \
$(NM) $$($1_TARGET) | $(GREP) " T " | \
$(EGREP) "JNI_OnLoad|JNI_OnUnload|Agent_OnLoad|Agent_OnUnload|Agent_OnAttach" | \
$(CUT) -d ' ' -f 3 >> $$(@D)/$$(basename $$(@F)).symbols || true;\
else \
$(ECHO) "Getting symbols from nm"; \
$(NM) -m $$($1_TARGET) | $(GREP) "__TEXT" | \
$(EGREP) -v "non-external|private extern|__TEXT,__eh_frame" | \
$(SED) -e 's/.* //' > $$(@D)/$$(basename $$(@F)).symbols; \
fi
endef
################################################################################
################################################################################
# Define a native toolchain configuration that can be used by
# Define a native toolchain configuration that can be used by
# SetupNativeCompilation calls
# SetupNativeCompilation calls
...
@@ -274,6 +299,15 @@ endef
...
@@ -274,6 +299,15 @@ endef
SetupNativeCompilation = $(NamedParamsMacroTemplate)
SetupNativeCompilation = $(NamedParamsMacroTemplate)
define SetupNativeCompilationBody
define SetupNativeCompilationBody
# If we're doing a static build and producing a library
# force it to be a static library and remove the -l libraries
ifeq ($(STATIC_BUILD), true)
ifneq ($$($1_LIBRARY),)
$1_STATIC_LIBRARY := $$($1_LIBRARY)
$1_LIBRARY :=
endif
endif
ifneq (,$$($1_BIN))
ifneq (,$$($1_BIN))
$$(error BIN has been replaced with OBJECT_DIR)
$$(error BIN has been replaced with OBJECT_DIR)
endif
endif
...
@@ -495,6 +529,12 @@ define SetupNativeCompilationBody
...
@@ -495,6 +529,12 @@ define SetupNativeCompilationBody
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
$1_EXTRA_CXXFLAGS += $$(CXX_FLAG_REORDER)
endif
endif
# Pass the library name for static JNI library naming
ifneq ($$($1_STATIC_LIBRARY),)
$1_EXTRA_CFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
$1_EXTRA_CXXFLAGS += -DLIBRARY_NAME=$$($1_STATIC_LIBRARY)
endif
# Pick up disabled warnings, if possible on this platform.
# Pick up disabled warnings, if possible on this platform.
ifneq ($(DISABLE_WARNING_PREFIX),)
ifneq ($(DISABLE_WARNING_PREFIX),)
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
$1_EXTRA_CFLAGS += $$(addprefix $(DISABLE_WARNING_PREFIX), $$($1_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)))
...
@@ -725,7 +765,10 @@ define SetupNativeCompilationBody
...
@@ -725,7 +765,10 @@ define SetupNativeCompilationBody
$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
$(ECHO) $(LOG_INFO) "Archiving $$($1_STATIC_LIBRARY)"
$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
$(call LogFailures, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link.log, $$($1_SAFE_NAME)_link, \
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
$$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_EXPECTED_OBJS) \
$$($1_RES) $$($1_LIBS) $$($1_EXTRA_LIBS))
$$($1_RES))
ifeq ($(STATIC_BUILD), true)
$(GetSymbols)
endif
endif
endif
ifneq (,$$($1_PROGRAM))
ifneq (,$$($1_PROGRAM))
...
...
modules.xml
浏览文件 @
df349ae8
...
@@ -229,8 +229,11 @@
...
@@ -229,8 +229,11 @@
<to>
java.logging
</to>
<to>
java.logging
</to>
<to>
java.management
</to>
<to>
java.management
</to>
<to>
java.naming
</to>
<to>
java.naming
</to>
<to>
java.security.jgss
</to>
<to>
java.sql
</to>
<to>
java.sql
</to>
<to>
java.xml
</to>
<to>
jdk.management.resource
</to>
<to>
jdk.management.resource
</to>
<to>
jdk.scripting.nashorn
</to>
</export>
</export>
<export>
<export>
<name>
jdk.internal.org.objectweb.asm
</name>
<name>
jdk.internal.org.objectweb.asm
</name>
...
...
test/lib/sun/hotspot/code/CodeBlob.java
浏览文件 @
df349ae8
...
@@ -47,22 +47,24 @@ public class CodeBlob {
...
@@ -47,22 +47,24 @@ public class CodeBlob {
return
new
CodeBlob
(
obj
);
return
new
CodeBlob
(
obj
);
}
}
protected
CodeBlob
(
Object
[]
obj
)
{
protected
CodeBlob
(
Object
[]
obj
)
{
assert
obj
.
length
==
3
;
assert
obj
.
length
==
4
;
name
=
(
String
)
obj
[
0
];
name
=
(
String
)
obj
[
0
];
size
=
(
Integer
)
obj
[
1
];
size
=
(
Integer
)
obj
[
1
];
code_blob_type
=
BlobType
.
values
()[(
Integer
)
obj
[
2
]];
code_blob_type
=
BlobType
.
values
()[(
Integer
)
obj
[
2
]];
assert
code_blob_type
.
id
==
(
Integer
)
obj
[
2
];
assert
code_blob_type
.
id
==
(
Integer
)
obj
[
2
];
address
=
(
Long
)
obj
[
3
];
}
}
public
final
String
name
;
public
final
String
name
;
public
final
int
size
;
public
final
int
size
;
public
final
BlobType
code_blob_type
;
public
final
BlobType
code_blob_type
;
public
final
long
address
;
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"CodeBlob{"
return
"CodeBlob{"
+
"name="
+
name
+
"name="
+
name
+
", size="
+
size
+
", size="
+
size
+
", code_blob_type="
+
code_blob_type
+
", code_blob_type="
+
code_blob_type
+
", address="
+
address
+
'}'
;
+
'}'
;
}
}
}
}
test/lib/sun/hotspot/code/NMethod.java
浏览文件 @
df349ae8
...
@@ -39,12 +39,12 @@ public class NMethod extends CodeBlob {
...
@@ -39,12 +39,12 @@ public class NMethod extends CodeBlob {
comp_level
=
(
Integer
)
obj
[
1
];
comp_level
=
(
Integer
)
obj
[
1
];
insts
=
(
byte
[])
obj
[
2
];
insts
=
(
byte
[])
obj
[
2
];
compile_id
=
(
Integer
)
obj
[
3
];
compile_id
=
(
Integer
)
obj
[
3
];
address
=
(
Long
)
obj
[
4
];
entry_point
=
(
Long
)
obj
[
4
];
}
}
public
final
byte
[]
insts
;
public
final
byte
[]
insts
;
public
final
int
comp_level
;
public
final
int
comp_level
;
public
final
int
compile_id
;
public
final
int
compile_id
;
public
final
long
address
;
public
final
long
entry_point
;
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
...
@@ -53,7 +53,7 @@ public class NMethod extends CodeBlob {
...
@@ -53,7 +53,7 @@ public class NMethod extends CodeBlob {
+
", insts="
+
insts
+
", insts="
+
insts
+
", comp_level="
+
comp_level
+
", comp_level="
+
comp_level
+
", compile_id="
+
compile_id
+
", compile_id="
+
compile_id
+
",
address="
+
address
+
",
entry_point="
+
entry_point
+
'}'
;
+
'}'
;
}
}
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录