Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell11
提交
c12bec9a
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,发现更多精彩内容 >>
提交
c12bec9a
编写于
2月 24, 2014
作者:
I
ihse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8034788: Rewrite toolchain.m4 to support multiple toolchains per platform.
Reviewed-by: henryjen, erikj
上级
b72a63c4
变更
14
展开全部
隐藏空白更改
内联
并排
Showing
14 changed file
with
6887 addition
and
6644 deletion
+6887
-6644
common/autoconf/basics.m4
common/autoconf/basics.m4
+1
-1
common/autoconf/build-performance.m4
common/autoconf/build-performance.m4
+1
-1
common/autoconf/configure
common/autoconf/configure
+7
-0
common/autoconf/configure.ac
common/autoconf/configure.ac
+34
-14
common/autoconf/flags.m4
common/autoconf/flags.m4
+699
-0
common/autoconf/generated-configure.sh
common/autoconf/generated-configure.sh
+5620
-5623
common/autoconf/help.m4
common/autoconf/help.m4
+25
-3
common/autoconf/hotspot-spec.gmk.in
common/autoconf/hotspot-spec.gmk.in
+2
-0
common/autoconf/jdk-options.m4
common/autoconf/jdk-options.m4
+0
-2
common/autoconf/libraries.m4
common/autoconf/libraries.m4
+14
-3
common/autoconf/spec.gmk.in
common/autoconf/spec.gmk.in
+2
-5
common/autoconf/toolchain.m4
common/autoconf/toolchain.m4
+474
-984
make/Main.gmk
make/Main.gmk
+1
-1
make/common/NativeCompilation.gmk
make/common/NativeCompilation.gmk
+7
-7
未找到文件。
common/autoconf/basics.m4
浏览文件 @
c12bec9a
...
...
@@ -126,7 +126,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
done
IFS="$IFS_save"
else
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
# This is an absolute path, we can use it without further modifications.
new_path="$path"
fi
...
...
common/autoconf/build-performance.m4
浏览文件 @
c12bec9a
...
...
@@ -261,7 +261,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
if test "x$ENABLE_PRECOMPH" = xyes; then
# Check that the compiler actually supports precomp headers.
if test "x$
GCC" = xyes
; then
if test "x$
TOOLCHAIN_TYPE" = xgcc
; then
AC_MSG_CHECKING([that precompiled headers work])
echo "int alfa();" > conftest.h
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
...
...
common/autoconf/configure
浏览文件 @
c12bec9a
...
...
@@ -263,6 +263,13 @@ Additional (non-autoconf) OpenJDK Options:
--debug-configure Run the configure script with additional debug
logging enabled.
EOT
# Print list of toolchains. This must be done by the autoconf script.
( CONFIGURE_PRINT_TOOLCHAIN_LIST=true .
$conf_script_to_run
PRINTF=printf )
cat <<EOT
Please be aware that, when cross-compiling, the OpenJDK configure script will
generally use
'target'
where autoconf traditionally uses
'host'
.
...
...
common/autoconf/configure.ac
浏览文件 @
c12bec9a
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
4
, 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
...
...
@@ -43,6 +43,7 @@ m4_include([builddeps.m4])
# ... then the rest
m4_include([boot-jdk.m4])
m4_include([build-performance.m4])
m4_include([flags.m4])
m4_include([help.m4])
m4_include([jdk-options.m4])
m4_include([libraries.m4])
...
...
@@ -71,7 +72,11 @@ DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
#
###############################################################################
# Basic initialization that must happen first of all
# If we are requested to print additional help, do that and then exit.
# This must be the very first call.
HELP_PRINT_ADDITIONAL_HELP_AND_EXIT
# Basic initialization that must happen first of all in the normal process.
BASIC_INIT
BASIC_SETUP_FUNDAMENTAL_TOOLS
...
...
@@ -148,26 +153,41 @@ SRCDIRS_SETUP_OUTPUT_DIRS
###############################################################################
#
# Setup the toolchain (compilers etc), i.e. t
he tools that need to be
#
cross-compilation awar
e.
# Setup the toolchain (compilers etc), i.e. t
ools used to compile and process
#
native cod
e.
#
###############################################################################
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
# Locate the actual tools
TOOLCHAIN_SETUP_PATHS
# First determine the toolchain type (compiler family)
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
# Then detect the actual binaries needed
TOOLCHAIN_PRE_DETECTION
TOOLCHAIN_DETECT_TOOLCHAIN_CORE
TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA
TOOLCHAIN_POST_DETECTION
# Finally do some processing after the detection phase
TOOLCHAIN_SETUP_BUILD_COMPILERS
TOOLCHAIN_SETUP_LEGACY
TOOLCHAIN_MISC_CHECKS
# FIXME: Currently we must test this after paths but before flags. Fix!
# Setup the JTReg Regression Test Harness.
TOOLCHAIN_SETUP_JTREG
# And we can test some aspects on the target using configure macros.
FLAGS_SETUP_INIT_FLAGS
# FIXME: Currently we must test this after toolchain but before flags. Fix!
# Now we can test some aspects on the target using configure macros.
PLATFORM_SETUP_OPENJDK_TARGET_BITS
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
# Configure flags for the tools
TOOLCHAIN
_SETUP_COMPILER_FLAGS_FOR_LIBS
TOOLCHAIN
_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
TOOLCHAIN
_SETUP_COMPILER_FLAGS_FOR_JDK
TOOLCHAIN
_SETUP_COMPILER_FLAGS_MISC
FLAGS
_SETUP_COMPILER_FLAGS_FOR_LIBS
FLAGS
_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
FLAGS
_SETUP_COMPILER_FLAGS_FOR_JDK
FLAGS
_SETUP_COMPILER_FLAGS_MISC
# Setup debug symbols (need objcopy from the toolchain for that)
JDKOPT_SETUP_DEBUG_SYMBOLS
...
...
@@ -188,7 +208,7 @@ LIB_SETUP_FREETYPE
LIB_SETUP_ALSA
LIB_SETUP_MISC_LIBS
LIB_SETUP_STATIC_LINK_LIBSTDCPP
LIB_SETUP_ON_WINDOWS
###############################################################################
#
...
...
common/autoconf/flags.m4
0 → 100644
浏览文件 @
c12bec9a
此差异已折叠。
点击以展开。
common/autoconf/generated-configure.sh
浏览文件 @
c12bec9a
此差异已折叠。
点击以展开。
common/autoconf/help.m4
浏览文件 @
c12bec9a
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
4
, 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
...
...
@@ -151,6 +151,27 @@ pkgadd_help() {
PKGHANDLER_COMMAND=""
}
# This function will check if we're called from the "configure" wrapper while
# printing --help. If so, we will print out additional information that can
# only be extracted within the autoconf script, and then exit. This must be
# called at the very beginning in configure.ac.
AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
[
if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
$PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
$PRINTF "Which are valid to use depends on the build platform.\n"
for toolchain in $VALID_TOOLCHAINS_all; do
# Use indirect variable referencing
toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
$PRINTF " %-10s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
done
# And now exit directly
exit 0
fi
])
AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
[
# Finally output some useful information to the user
...
...
@@ -189,8 +210,9 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
printf "\n"
printf "Build performance summary:\n"
...
...
common/autoconf/hotspot-spec.gmk.in
浏览文件 @
c12bec9a
...
...
@@ -102,6 +102,8 @@ HOTSPOT_BUILD_JOBS:=$(JOBS)
# Control wether Hotspot runs Queens test after building
TEST_IN_BUILD=@TEST_IN_BUILD@
USE_CLANG := @USE_CLANG@
# For hotspot, override compiler/tools definition to not include FIXPATH prefix.
# Hotspot has its own handling on the Windows path situation.
CXX:=@CCACHE@ @HOTSPOT_CXX@
...
...
common/autoconf/jdk-options.m4
浏览文件 @
c12bec9a
...
...
@@ -606,6 +606,4 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
AC_SUBST(ZIP_DEBUGINFO_FILES)
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
])
common/autoconf/libraries.m4
浏览文件 @
c12bec9a
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
4
, 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
...
...
@@ -876,14 +876,25 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
fi
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$
OPENJDK_TARGET_OS" = xsolaris
&& test "x$LIBCXX" = x; then
if test "x$
TOOLCHAIN_TYPE" = xsolstudio
&& test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi
# TODO better (platform agnostic) test
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$
GCC" = xyes
; then
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$
TOOLCHAIN_TYPE" = xgcc
; then
LIBCXX="-lstdc++"
fi
AC_SUBST(LIBCXX)
])
AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
[
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
TOOLCHAIN_SETUP_MSVCR_DLL
BASIC_DEPRECATED_ARG_WITH([dxsdk])
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
fi
AC_SUBST(MSVCR_DLL)
])
common/autoconf/spec.gmk.in
浏览文件 @
c12bec9a
...
...
@@ -297,11 +297,8 @@ OPENWIN_HOME:=@OPENWIN_HOME@
# The lowest required version of macosx to enforce compatiblity for
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
# There are two types: CC or CL
# CC is gcc and others behaving reasonably similar.
# CL is cl.exe only.
COMPILER_TYPE:=@COMPILER_TYPE@
COMPILER_NAME:=@COMPILER_NAME@
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
# Option used to tell the compiler whether to create 32- or 64-bit executables
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
...
...
common/autoconf/toolchain.m4
浏览文件 @
c12bec9a
此差异已折叠。
点击以展开。
make/Main.gmk
浏览文件 @
c12bec9a
...
...
@@ -243,7 +243,7 @@ reconfigure:
else
@$(ECHO) "Re-running configure using default settings"
endif
@( cd $(OUTPUT_ROOT) && $(BASH) $(TOPDIR)/configure
"$(CONFIGURE_COMMAND_LINE)"
)
@( cd $(OUTPUT_ROOT) && $(BASH) $(TOPDIR)/configure
$(CONFIGURE_COMMAND_LINE)
)
.PHONY: langtools corba jaxp jaxws hotspot jdk nashorn images overlay-images install test docs
.PHONY: langtools-only corba-only jaxp-only jaxws-only hotspot-only jdk-only nashorn-only images-only overlay-images-only install-only test-only docs-only
...
...
make/common/NativeCompilation.gmk
浏览文件 @
c12bec9a
#
# Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
4
, 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
...
...
@@ -31,7 +31,7 @@ ifeq (,$(_MAKEBASE_GMK))
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
endif
if
eq ($(COMPILER_TYPE),CC
)
if
neq ($(TOOLCHAIN_TYPE), microsoft
)
COMPILING_MSG=echo $(LOG_INFO) "Compiling $(notdir $1) (for $(notdir $2))"
LINKING_MSG=echo $(LOG_INFO) "Linking $1"
LINKING_EXE_MSG=echo $(LOG_INFO) "Linking executable $1"
...
...
@@ -86,18 +86,18 @@ define add_native_source
# Include previously generated dependency information. (if it exists)
-include $$($1_$2_DEP)
ifeq ($(
COMPILER_TYPE),CL
)
ifeq ($(
TOOLCHAIN_TYPE), microsoft
)
$1_$2_DEBUG_OUT_FLAGS:=-Fd$$(patsubst %$(OBJ_SUFFIX),%.pdb,$$($1_$2_OBJ)) \
-Fm$$(patsubst %$(OBJ_SUFFIX),%.map,$$($1_$2_OBJ))
endif
endif
$$($1_$2_OBJ) : $2
if
eq ($(COMPILER_TYPE),CC
)
if
neq ($(TOOLCHAIN_TYPE), microsoft
)
$$(call COMPILING_MSG,$2,$$($1_TARGET))
# The S
un
studio compiler doesn't output the full path to the object file in the
# The S
olaris
studio compiler doesn't output the full path to the object file in the
# generated deps files. Fixing it with sed. If compiling assembly, don't try this.
ifeq ($(
COMPILER_NAME)$$(filter %.s,$2),ossc
)
ifeq ($(
TOOLCHAIN_TYPE)$$(filter %.s,$2), solstudio
)
$$($1_$2_COMP) $$($1_$2_FLAGS) $$($1_$2_DEP_FLAG) $$($1_$2_DEP).tmp $(CC_OUT_OPTION)$$($1_$2_OBJ) $2
$(SED) 's|^$$(@F):|$$@:|' $$($1_$2_DEP).tmp > $$($1_$2_DEP)
else
...
...
@@ -107,7 +107,7 @@ define add_native_source
# The Visual Studio compiler lacks a feature for generating make dependencies, but by
# setting -showIncludes, all included files are printed. These are filtered out and
# parsed into make dependences.
ifeq ($(
COMPILER_TYPE),CL
)
ifeq ($(
TOOLCHAIN_TYPE), microsoft
)
($$($1_$2_COMP) $$($1_$2_FLAGS) -showIncludes $$($1_$2_DEBUG_OUT_FLAGS) \
$(CC_OUT_OPTION)$$($1_$2_OBJ) $2 ; echo $$$$? > $$($1_$2_DEP).exitvalue) \
| $(TEE) $$($1_$2_DEP).raw | $(GREP) -v "^Note: including file:" \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录