Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8
提交
d2e2410c
D
dragonwell8
项目概览
openanolis
/
dragonwell8
通知
5
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d2e2410c
编写于
4月 18, 2018
作者:
R
robm
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
1a48e913
3752a6f3
变更
23
展开全部
隐藏空白更改
内联
并排
Showing
23 changed file
with
29315 addition
and
17399 deletion
+29315
-17399
common/autoconf/Makefile.in
common/autoconf/Makefile.in
+2
-2
common/autoconf/autogen.sh
common/autoconf/autogen.sh
+29
-13
common/autoconf/basics.m4
common/autoconf/basics.m4
+278
-136
common/autoconf/basics_windows.m4
common/autoconf/basics_windows.m4
+2
-2
common/autoconf/build-performance.m4
common/autoconf/build-performance.m4
+26
-14
common/autoconf/compare.sh.in
common/autoconf/compare.sh.in
+2
-2
common/autoconf/configure
common/autoconf/configure
+85
-14
common/autoconf/configure.ac
common/autoconf/configure.ac
+38
-15
common/autoconf/flags.m4
common/autoconf/flags.m4
+799
-0
common/autoconf/generated-configure.sh
common/autoconf/generated-configure.sh
+27270
-15921
common/autoconf/help.m4
common/autoconf/help.m4
+28
-28
common/autoconf/hotspot-spec.gmk.in
common/autoconf/hotspot-spec.gmk.in
+3
-1
common/autoconf/jdk-options.m4
common/autoconf/jdk-options.m4
+1
-3
common/autoconf/libraries.m4
common/autoconf/libraries.m4
+75
-52
common/autoconf/spec.gmk.in
common/autoconf/spec.gmk.in
+15
-15
common/autoconf/toolchain.m4
common/autoconf/toolchain.m4
+559
-1119
common/autoconf/toolchain_windows.m4
common/autoconf/toolchain_windows.m4
+48
-44
common/bin/compare.sh
common/bin/compare.sh
+1
-1
configure
configure
+7
-2
make/Main.gmk
make/Main.gmk
+11
-2
make/common/NativeCompilation.gmk
make/common/NativeCompilation.gmk
+13
-7
make/devkit/Makefile
make/devkit/Makefile
+1
-1
make/devkit/Tools.gmk
make/devkit/Tools.gmk
+22
-5
未找到文件。
common/autoconf/Makefile.in
浏览文件 @
d2e2410c
#
# 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
...
...
@@ -24,4 +24,4 @@
# This Makefile was generated by configure @DATE_WHEN_CONFIGURED@
# GENERATED FILE, DO NOT EDIT
SPEC
:=
@OUTPUT_ROOT@/spec.gmk
include
@
SRC_ROOT
@/Makefile
include
@
TOPDIR
@/Makefile
common/autoconf/autogen.sh
浏览文件 @
d2e2410c
...
...
@@ -22,6 +22,23 @@
# questions.
#
generate_configure_script
()
{
# First create a header
cat
>
$1
<<
EOT
#!/bin/bash
#
# ##########################################################
# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
# ##########################################################
#
EOT
# Then replace "magic" variables in configure.ac and append the output
# from autoconf. $2 is either cat (just a no-op) or a filter.
cat
$script_dir
/configure.ac |
sed
-e
"s|@DATE_WHEN_GENERATED@|
$TIMESTAMP
|"
|
\
eval
$2
|
${
AUTOCONF
}
-W
all
-I
$script_dir
-
>>
$1
rm
-rf
autom4te.cache
}
script_dir
=
`
dirname
$0
`
# Create a timestamp as seconds since epoch
...
...
@@ -36,7 +53,8 @@ else
fi
if
test
"x
$CUSTOM_CONFIG_DIR
"
=
"x"
;
then
custom_script_dir
=
"
$script_dir
/../../jdk/make/closed/autoconf"
topdir
=
`
cd
$script_dir
/../..
>
/dev/null
&&
pwd
`
custom_script_dir
=
"
$topdir
/jdk/make/closed/autoconf"
else
custom_script_dir
=
$CUSTOM_CONFIG_DIR
fi
...
...
@@ -45,25 +63,23 @@ custom_hook=$custom_script_dir/custom-hook.m4
AUTOCONF
=
"
`
which autoconf 2> /dev/null |
grep
-v
'^no autoconf in'
`
"
echo
"Autoconf found:
${
AUTOCONF
}
"
if
test
"x
${
AUTOCONF
}
"
=
x
;
then
echo
You need autoconf installed to be able to regenerate the configure script
echo
Error: Cannot find autoconf
1>&2
echo
"You need autoconf installed to be able to regenerate the configure script"
echo
"Error: Cannot find autoconf"
1>&2
exit
1
fi
echo
Generating generated-configure.sh with
${
AUTOCONF
}
cat
$script_dir
/configure.ac |
sed
-e
"s|@DATE_WHEN_GENERATED@|
$TIMESTAMP
|"
|
${
AUTOCONF
}
-W
all
-I
$script_dir
-
>
$script_dir
/generated-configure.sh
rm
-rf
autom4te.cache
autoconf_version
=
`
$AUTOCONF
--version
|
head
-1
`
echo
"Using autoconf at
${
AUTOCONF
}
[
$autoconf_version
]"
echo
"Generating generated-configure.sh"
generate_configure_script
"
$script_dir
/generated-configure.sh"
'cat'
if
test
-e
$custom_hook
;
then
echo
Generating custom generated-configure.sh
# We have custom sources available; also generate configure script
# with custom hooks compiled in.
cat
$script_dir
/configure.ac |
sed
-e
"s|@DATE_WHEN_GENERATED@|
$TIMESTAMP
|"
|
\
sed
-e
"s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([
$custom_hook
])|"
|
${
AUTOCONF
}
-W
all
-I
$script_dir
-
>
$custom_script_dir
/generated-configure.sh
rm
-rf
autom4te.cache
echo
"Generating custom generated-configure.sh"
generate_configure_script
"
$custom_script_dir
/generated-configure.sh"
'sed -e "s|#CUSTOM_AUTOCONF_INCLUDE|m4_include([$custom_hook])|"'
else
echo
No custom hook found:
$custom_hook
echo
"(No custom hook found at
$custom_hook
)"
fi
common/autoconf/basics.m4
浏览文件 @
d2e2410c
此差异已折叠。
点击以展开。
common/autoconf/basics_windows.m4
浏览文件 @
d2e2410c
...
...
@@ -321,8 +321,8 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
fi
AC_MSG_CHECKING([cygwin root directory as unix-style path])
# The cmd output ends with Windows line endings (CR/LF)
, the grep command will strip that away
cygwin_winpath_root=`cd / ; cmd /c cd |
grep ".*"
`
# The cmd output ends with Windows line endings (CR/LF)
cygwin_winpath_root=`cd / ; cmd /c cd |
$TR -d '\r\n'
`
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
...
...
common/autoconf/build-performance.m4
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -160,20 +160,28 @@ AC_DEFUN_ONCE([BPERF_SETUP_BUILD_JOBS],
AC_DEFUN([BPERF_SETUP_CCACHE],
[
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--disable-ccache],
[disable using ccache to speed up recompilations @<:@enabled@:>@])],
[ENABLE_CCACHE=${enable_ccache}], [ENABLE_CCACHE=yes])
if test "x$ENABLE_CCACHE" = xyes; then
[AS_HELP_STRING([--enable-ccache],
[enable using ccache to speed up recompilations @<:@disabled@:>@])])
CCACHE=
AC_MSG_CHECKING([is ccache enabled])
ENABLE_CCACHE=$enable_ccache
if test "x$enable_ccache" = xyes; then
AC_MSG_RESULT([yes])
OLD_PATH="$PATH"
if test "x$TOOL
S_DIR
" != x; then
PATH=$TOOL
S_DIR
:$PATH
if test "x$TOOL
CHAIN_PATH
" != x; then
PATH=$TOOL
CHAIN_PATH
:$PATH
fi
AC_PATH_PROG(CCACHE, ccache)
BASIC_REQUIRE_PROGS(CCACHE, ccache)
CCACHE_STATUS="enabled"
PATH="$OLD_PATH"
elif test "x$enable_ccache" = xno; then
AC_MSG_RESULT([no, explicitly disabled])
elif test "x$enable_ccache" = x; then
AC_MSG_RESULT([no])
else
AC_MSG_CHECKING([for ccache])
AC_MSG_RESULT([explicitly disabled])
CCACHE=
AC_MSG_RESULT([unknown])
AC_MSG_ERROR([--enable-ccache does not accept any parameters])
fi
AC_SUBST(CCACHE)
...
...
@@ -185,8 +193,11 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
# When using a non home ccache directory, assume the use is to share ccache files
# with other users. Thus change the umask.
SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
if test "x$CCACHE" = x; then
AC_MSG_WARN([--with-ccache-dir has no meaning when ccache is not enabled])
fi
fi
CCACHE_FOUND=""
if test "x$CCACHE" != x; then
BPERF_SETUP_CCACHE_USAGE
fi
...
...
@@ -195,7 +206,6 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
[
if test "x$CCACHE" != x; then
CCACHE_FOUND="true"
# Only use ccache if it is 3.1.4 or later, which supports
# precompiled headers.
AC_MSG_CHECKING([if ccache supports precompiled headers])
...
...
@@ -203,6 +213,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
if test "x$HAS_GOOD_CCACHE" = x; then
AC_MSG_RESULT([no, disabling ccache])
CCACHE=
CCACHE_STATUS="disabled"
else
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C-compiler supports ccache precompiled headers])
...
...
@@ -215,6 +226,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE_USAGE],
else
AC_MSG_RESULT([no, disabling ccaching of precompiled headers])
CCACHE=
CCACHE_STATUS="disabled"
fi
fi
fi
...
...
@@ -249,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/compare.sh.in
浏览文件 @
d2e2410c
#!/bin/bash
#
# Copyright (c) 2012, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012, 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
...
...
@@ -64,7 +64,7 @@ UNIQ="@UNIQ@"
UNPACK200
=
"@FIXPATH@ @BOOT_JDK@/bin/unpack200"
UNZIP
=
"@UNZIP@"
SRC_ROOT
=
"@
SRC_ROOT
@"
SRC_ROOT
=
"@
TOPDIR
@"
if
[
"
$OPENJDK_TARGET_OS
"
=
"windows"
]
;
then
PATH
=
"@VS_PATH@"
...
...
common/autoconf/configure
浏览文件 @
d2e2410c
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012,
2018,
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
...
...
@@ -22,23 +22,30 @@
# questions.
#
if
test
"x
$BASH_VERSION
"
=
x
;
then
echo
This script needs bash to run.
echo
It is recommended to use the configure script
in
the
source
tree root instead.
exit
1
if
test
"x
$1
"
!=
xCHECKME
;
then
echo
"WARNING: Calling the wrapper script directly is deprecated and unsupported."
echo
"Not all features of configure will be available."
echo
"Use the 'configure' script in the top-level directory instead."
TOPDIR
=
$(
cd
$(
dirname
$0
)
/../..
>
/dev/null
&&
pwd
)
else
# Now the next argument is the absolute top-level directory path.
# The TOPDIR variable is passed on to configure.ac.
TOPDIR
=
"
$2
"
# Remove these two arguments to get to the user supplied arguments
shift
shift
fi
# Force autoconf to use bash. This also means we must disable autoconf re-exec.
export
CONFIG_SHELL
=
$BASH
export
_as_can_reexec
=
no
CONFIGURE_COMMAND_LINE
=
"
$@
"
conf_script_dir
=
`
dirname
$0
`
conf_script_dir
=
"
$TOPDIR
/common/autoconf"
if
[
"
$CUSTOM_CONFIG_DIR
"
=
""
]
;
then
conf_custom_script_dir
=
"
$
conf_script_dir
/../..
/jdk/make/closed/autoconf"
conf_custom_script_dir
=
"
$
TOPDIR
/jdk/make/closed/autoconf"
else
conf_custom_script_dir
=
$CUSTOM_CONFIG_DIR
conf_custom_script_dir
=
"
$CUSTOM_CONFIG_DIR
"
fi
###
...
...
@@ -114,28 +121,79 @@ fi
if
test
"x
$conf_debug_configure
"
=
xtrue
;
then
conf_debug_configure
=
recursive
fi
###
### Process command-line arguments
###
# Returns a shell-escaped version of the argument given.
function
shell_quote
()
{
if
[[
-n
"
$1
"
]]
;
then
# Uses only shell-safe characters? No quoting needed.
# '=' is a zsh meta-character, but only in word-initial position.
if
[[
"
$1
"
=
~ ^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:,%/+
=
_-]+
$
&&
!
"
$1
"
=
~ ^
=
]]
;
then
quoted
=
"
$1
"
else
if
[[
"
$1
"
=
~
[
\'
!]
]]
;
then
# csh does history expansion within single quotes, but not
# when backslash-escaped!
local
quoted_quote
=
"'
\\
''"
quoted_exclam
=
"'
\\
!'"
word
=
"
${
1
//\
'/${quoted_quote}}"
word="${1//\!/${quoted_exclam}}"
fi
quoted="'
$1
'"
fi
echo "$quoted"
fi
}
conf_processed_arguments=()
conf_quoted_arguments=()
conf_openjdk_target=
for conf_option
do
# Process (and remove) our own extensions that will not be passed to autoconf
case $conf_option in
--openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '
[^=]*=\(.*\)
'`
continue
;;
;;
--debug-configure)
if test "x$conf_debug_configure" != xrecursive; then
conf_debug_configure=true
export conf_debug_configure
fi
continue
;;
;;
*)
conf_processed_arguments
=(
"
${
conf_processed_arguments
[@]
}
"
"
$conf_option
"
)
;;
conf_processed_arguments=("${conf_processed_arguments[@]}" "$conf_option")
;;
esac
# Store all variables overridden on the command line
case $conf_option in
[^-]*=*)
# Add name of variable to CONFIGURE_OVERRIDDEN_VARIABLES list inside !...!.
conf_env_var=`expr "x$conf_option" : '
x
\([^=]*\)=
'`
CONFIGURE_OVERRIDDEN_VARIABLES="$CONFIGURE_OVERRIDDEN_VARIABLES!$conf_env_var!"
;;
esac
# Save the arguments, intelligently quoted for CONFIGURE_COMMAND_LINE.
case $conf_option in
*=*)
conf_option_name=`expr "x$conf_option" : '
x
\([^=]*\)=
'`
conf_option_name=$(shell_quote "$conf_option_name")
conf_option_value=`expr "x$conf_option" : '
x
[^=]*=\(.*\)
'`
conf_option_value=$(shell_quote "$conf_option_value")
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$conf_option_name=$conf_option_value")
;;
*)
conf_quoted_arguments=("${conf_quoted_arguments[@]}" "$(shell_quote "$conf_option")")
;;
esac
# Check for certain autoconf options that require extra action
case $conf_option in
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
...
...
@@ -148,6 +206,9 @@ do
esac
done
# Save the quoted command line
CONFIGURE_COMMAND_LINE="${conf_quoted_arguments[@]}"
if test "x$conf_legacy_crosscompile" != "x"; then
if test "x$conf_openjdk_target" != "x"; then
echo "Error: Specifying --openjdk-target together with autoconf"
...
...
@@ -177,10 +238,10 @@ conf_processed_arguments=("--enable-option-checking=fatal" "${conf_processed_arg
###
if test -e $conf_custom_script_dir/generated-configure.sh; then
# Custom source configure available; run that instead
echo
Running custom generated-configure.sh
echo
"Running custom generated-configure.sh"
conf_script_to_run=$conf_custom_script_dir/generated-configure.sh
else
echo
Running generated-configure.sh
echo
"Running generated-configure.sh"
conf_script_to_run=$conf_script_dir/generated-configure.sh
fi
...
...
@@ -214,8 +275,18 @@ 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'
.
Also note that variables must be passed on the command line. Variables in the
environment will generally be ignored, unlike traditional autoconf scripts.
EOT
fi
else
...
...
common/autoconf/configure.ac
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -33,7 +33,7 @@
AC_PREREQ([2.69])
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_AUX_DIR([
$TOPDIR/common/autoconf/
build-aux])
m4_include([build-aux/pkg.m4])
# Include these first...
...
...
@@ -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])
...
...
@@ -72,7 +73,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
...
...
@@ -96,6 +101,9 @@ JDKOPT_SETUP_DEBUG_LEVEL
# With basic setup done, call the custom early hook.
CUSTOM_EARLY_HOOK
# Check if we have devkits, extra paths or sysroot set.
BASIC_SETUP_DEVKIT
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
...
...
@@ -149,26 +157,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
...
...
@@ -189,7 +212,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
浏览文件 @
d2e2410c
此差异已折叠。
点击以展开。
common/autoconf/generated-configure.sh
浏览文件 @
d2e2410c
此差异已折叠。
点击以展开。
common/autoconf/help.m4
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
2
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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,26 +151,31 @@ 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
if test "x$CCACHE_FOUND" != x; then
if test "x$HAS_GOOD_CCACHE" = x; then
CCACHE_STATUS="installed, but disabled (version older than 3.1.4)"
CCACHE_HELP_MSG="You have ccache installed, but it is a version prior to 3.1.4. Try upgrading."
else
CCACHE_STATUS="installed and in use"
fi
else
if test "x$GCC" = xyes; then
CCACHE_STATUS="not installed (consider installing)"
CCACHE_HELP_MSG="You do not have ccache installed. Try installing it."
else
CCACHE_STATUS="not available for your system"
fi
fi
printf "\n"
printf "====================================================\n"
printf "A new configuration has been successfully created in\n"
...
...
@@ -194,23 +199,18 @@ 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"
printf "* Cores to use: $JOBS\n"
printf "* Memory limit: $MEMORY_SIZE MB\n"
printf "* ccache status: $CCACHE_STATUS\n"
printf "\n"
if test "x$CCACHE_HELP_MSG" != x && test "x$HIDE_PERFORMANCE_HINTS" = "xno"; then
printf "Build performance tip: ccache gives a tremendous speedup for C++ recompilations.\n"
printf "$CCACHE_HELP_MSG\n"
HELP_MSG_MISSING_DEPENDENCY([ccache])
printf "$HELP_MSG\n"
printf "\n"
if test "x$CCACHE_STATUS" != "x"; then
printf "* ccache status: $CCACHE_STATUS\n"
fi
printf "\n"
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
printf "NOTE: You have requested to build more than one version of the JVM, which\n"
...
...
common/autoconf/hotspot-spec.gmk.in
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
6
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -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
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -606,8 +606,6 @@ 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)
])
# Support for customization of the build process. Some build files
...
...
common/autoconf/libraries.m4
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -97,21 +97,23 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
# Check if the user has specified sysroot, but not --x-includes or --x-libraries.
# Make a simple check for the libraries at the sysroot, and setup --x-includes and
# --x-libraries for the sysroot, if that seems to be correct.
if test "x$SYS_ROOT" != "x/"; then
if test "x$x_includes" = xNONE; then
if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
x_includes="$SYS_ROOT/usr/X11R6/include"
elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
x_includes="$SYS_ROOT/usr/include"
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
if test "x$SYSROOT" != "x"; then
if test "x$x_includes" = xNONE; then
if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
x_includes="$SYSROOT/usr/X11R6/include"
elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
x_includes="$SYSROOT/usr/include"
fi
fi
fi
if test "x$x_libraries" = xNONE
; then
if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
x_libraries="$SYS_ROOT/usr/X11R6/lib"
elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
x_libraries="$SYS_ROOT/usr/lib64"
elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
x_libraries="$SYS_ROOT/usr/lib"
if test "x$x_libraries" = xNONE; then
if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"
; then
x_libraries="$SYSROOT/usr/X11R6/lib"
elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
x_libraries="$SYSROOT/usr/lib64"
elif test -f "$SYSROOT/usr/lib/libX11.so"; then
x_libraries="$SYSROOT/usr/lib"
fi
fi
fi
fi
...
...
@@ -131,11 +133,15 @@ AC_DEFUN_ONCE([LIB_SETUP_X11],
AC_MSG_ERROR([Could not find X11 libraries. $HELP_MSG])
fi
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
OPENWIN_HOME="/usr/openwin"
X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
-R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
-R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
fi
AC_SUBST(OPENWIN_HOME)
#
# Weird Sol10 something check...TODO change to try compile
...
...
@@ -224,14 +230,14 @@ AC_DEFUN_ONCE([LIB_SETUP_CUPS],
# Getting nervous now? Lets poke around for standard Solaris third-party
# package installation locations.
AC_MSG_CHECKING([for cups headers])
if test -s /opt/sfw/cups/include/cups/cups.h; then
if test -s
$SYSROOT
/opt/sfw/cups/include/cups/cups.h; then
# An SFW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/sfw/cups/include"
elif test -s /opt/csw/include/cups/cups.h; then
CUPS_CFLAGS="-I
$SYSROOT
/opt/sfw/cups/include"
elif test -s
$SYSROOT
/opt/csw/include/cups/cups.h; then
# A CSW package seems to be installed!
CUPS_FOUND=yes
CUPS_CFLAGS="-I/opt/csw/include"
CUPS_CFLAGS="-I
$SYSROOT
/opt/csw/include"
fi
AC_MSG_RESULT([$CUPS_FOUND])
fi
...
...
@@ -385,24 +391,27 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
fi
fi
if test "x$FOUND_FREETYPE" != xyes; then
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
if test "x$PKG_CONFIG" != x; then
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
if test "x$FOUND_FREETYPE" = xyes; then
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
if test "x$BUNDLE_FREETYPE" = xyes; then
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
FOUND_FREETYPE=no
else
AC_MSG_CHECKING([for freetype])
AC_MSG_RESULT([yes (using pkg-config)])
# If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
if test "x$SYSROOT" = x; then
if test "x$FOUND_FREETYPE" != xyes; then
# Check modules using pkg-config, but only if we have it (ugly output results otherwise)
if test "x$PKG_CONFIG" != x; then
PKG_CHECK_MODULES(FREETYPE, freetype2, [FOUND_FREETYPE=yes], [FOUND_FREETYPE=no])
if test "x$FOUND_FREETYPE" = xyes; then
# On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
# 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
fi
# BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
if test "x$BUNDLE_FREETYPE" = xyes; then
AC_MSG_NOTICE([Found freetype using pkg-config, but ignoring since we can not bundle that])
FOUND_FREETYPE=no
else
AC_MSG_CHECKING([for freetype])
AC_MSG_RESULT([yes (using pkg-config)])
fi
fi
fi
fi
...
...
@@ -420,21 +429,21 @@ AC_DEFUN_ONCE([LIB_SETUP_FREETYPE],
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
else
if test "x$SYS_ROOT" = "x/"; then
FREETYPE_ROOT=
else
FREETYPE_ROOT="$SYS_ROOT"
fi
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
FREETYPE_BASE_DIR="$SYSROOT/usr"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib], [well-known location])
fi
if test "x$FOUND_FREETYPE" != xyes; then
FREETYPE_BASE_DIR="$
FREETYPE_
ROOT/usr"
FREETYPE_BASE_DIR="$
SYS
ROOT/usr"
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
LIB_CHECK_POTENTIAL_FREETYPE([$FREETYPE_BASE_DIR/include], [$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu], [well-known location])
else
...
...
@@ -564,8 +573,11 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
if test "x$ALSA_FOUND" = xno; then
BDEPS_CHECK_MODULE(ALSA, alsa, xxx, [ALSA_FOUND=yes], [ALSA_FOUND=no])
fi
if test "x$ALSA_FOUND" = xno; then
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
# Do not try pkg-config if we have a sysroot set.
if test "x$SYSROOT" = x; then
if test "x$ALSA_FOUND" = xno; then
PKG_CHECK_MODULES(ALSA, alsa, [ALSA_FOUND=yes], [ALSA_FOUND=no])
fi
fi
if test "x$ALSA_FOUND" = xno; then
AC_CHECK_HEADERS([alsa/asoundlib.h],
...
...
@@ -863,14 +875,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
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
if test "x$
TOOLCHAIN_TYPE" = xsolstudio
&& test "x$LIBCXX" = x; then
LIBCXX="
${SYSROOT}
/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
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
5
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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
...
...
@@ -46,6 +46,9 @@ define NEWLINE
endef
# The command line given to configure.
CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
# A self-referential reference to this file.
SPEC:=@SPEC@
...
...
@@ -65,8 +68,8 @@ ifeq (,$(findstring -R,$(MAKE)))
endif
# Specify where the common include directory for makefiles is.
ifeq (,$(findstring -I @
SRC_ROOT
@/make/common,$(MAKE)))
MAKE:=$(MAKE) -I @
SRC_ROOT
@/make/common
ifeq (,$(findstring -I @
TOPDIR
@/make/common,$(MAKE)))
MAKE:=$(MAKE) -I @
TOPDIR
@/make/common
endif
# The "human readable" name of this configuration
...
...
@@ -125,16 +128,17 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
export LIB:=@VS_LIB@
endif
# The sys root where standard headers and libraries are found.
# Usually not needed since the configure script should have
# taken it into account already when setting CFLAGS et al.
SYS_ROOT:=@SYS_ROOT@
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
SYSROOT_LDFLAGS := @SYSROOT_LDFLAGS@
# Paths to the source code
SRC_ROOT:=@SRC_ROOT@
ADD_SRC_ROOT:=@ADD_SRC_ROOT@
OVERRIDE_SRC_ROOT:=@OVERRIDE_SRC_ROOT@
TOPDIR:=@SRC_ROOT@
# The top-level directory of the forest (SRC_ROOT is a traditional alias)
TOPDIR:=@TOPDIR@
SRC_ROOT:=@TOPDIR@
OUTPUT_ROOT:=@OUTPUT_ROOT@
JDK_TOPDIR:=@JDK_TOPDIR@
LANGTOOLS_TOPDIR:=@LANGTOOLS_TOPDIR@
...
...
@@ -287,16 +291,12 @@ UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
# Necessary additional compiler flags to compile X11
X_CFLAGS:=@X_CFLAGS@
X_LIBS:=@X_LIBS@
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
浏览文件 @
d2e2410c
此差异已折叠。
点击以展开。
common/autoconf/toolchain_windows.m4
浏览文件 @
d2e2410c
...
...
@@ -141,46 +141,44 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
cd $OUTPUT_ROOT
# FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
# to autoconf standards.
#----
# We need to create a couple of temporary files.
VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
$MKDIR -p $VS_ENV_TMP_DIR
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
# but calculate the difference in Cygwin environment before/after running it and then
# apply the diff.
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
# Instead create a shell script which will set the relevant variables when run.
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
WINPATH_BASH="$BASH"
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
_vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
_dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
_dosbash=`cygpath -a -w -s \`which bash\`.*`
else
_dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
_dosbash=`cmd //c echo \`which bash\``
fi
# generate the set of exported vars before/after the vs10 setup
$ECHO "@echo off" > localdevenvtmp.bat
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
$ECHO "call $_dosvs10varsall $VS_ENV_ARGS" >> localdevenvtmp.bat
$ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
# script (executable by bash) that will setup the important variables.
EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
$ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
# This will end up something like:
# call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
$ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
# These will end up something like:
# C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
# The trailing space for everyone except PATH is no typo, but is needed due
# to trailing \ in the Windows paths. These will be stripped later.
$ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
$ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
# Now execute the newly created bat file.
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys
cmd /c localdevenvtmp.bat | cat
# apply the diff (less some non-vs10 vars named by "!")
$SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
$SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
$COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
# cleanup
$RM localdevenvtmp*
#----
# The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
# Change directory so we don't need to mess with Windows paths in redirects.
cd $VS_ENV_TMP_DIR
cmd /c extract-vs-env.bat | $CAT
cd $CURDIR
if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
AC_MSG_RESULT([no])
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
...
...
@@ -190,30 +188,36 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
# Now set all paths and other env variables. This will allow the rest of
# the configure script to find and run the compiler in the proper way.
AC_MSG_NOTICE([Setting extracted environment variables])
. $OUTPUT_ROOT/localdevenv.sh
. $VS_ENV_TMP_DIR/set-vs-env.sh
# Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
# also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
else
# We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
fi
# At this point, we should have corre
n
t variables in the environment, or we can't continue.
# At this point, we should have corre
c
t variables in the environment, or we can't continue.
AC_MSG_CHECKING([for Visual Studio variables])
if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
if test "x$
INCLUDE" = x || test "x$
LIB" = x; then
if test "x$
VS_INCLUDE" = x || test "x$VS_
LIB" = x; then
AC_MSG_RESULT([present but broken])
AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
else
AC_MSG_RESULT([ok])
# Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
# Remove any paths containing # (typically F#) as that messes up make
PATH=`$ECHO "$PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
VS_PATH="$PATH"
# Remove any trailing "\" and " " from the variables.
VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
# Remove any paths containing # (typically F#) as that messes up make. This
# is needed if visual studio was installed with F# support.
VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
AC_SUBST(VS_PATH)
AC_SUBST(VS_INCLUDE)
AC_SUBST(VS_LIB)
AC_SUBST(VS_PATH)
fi
else
AC_MSG_RESULT([not found])
...
...
common/bin/compare.sh
浏览文件 @
d2e2410c
...
...
@@ -114,7 +114,7 @@ diff_text() {
fi
if
test
"x
$SUFFIX
"
=
"xproperties"
;
then
# Run through nawk to add possibly missing newline at end of file.
$CAT
$OTHER_FILE
|
$NAWK
'{ print }'
>
$OTHER_FILE
.cleaned
$CAT
$OTHER_FILE
|
$NAWK
'{ print }'
|
LC_ALL
=
C
$SORT
>
$OTHER_FILE
.cleaned
# Disable this exception since we aren't changing the properties cleaning method yet.
# $CAT $OTHER_FILE | $SED -e 's/\([^\\]\):/\1\\:/g' -e 's/\([^\\]\)=/\1\\=/g' -e 's/#.*/#/g' \
# | $SED -f "$SRC_ROOT/common/makefiles/support/unicode2x.sed" \
...
...
configure
浏览文件 @
d2e2410c
#!/bin/bash
#
# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2012,
2014,
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
...
...
@@ -25,5 +25,10 @@
# This is a thin wrapper which will call the real configure script, and
# make sure that is called using bash.
# Get an absolute path to this script, since that determines the top-level directory.
this_script_dir
=
`
dirname
$0
`
bash
$this_script_dir
/common/autoconf/configure
"
$@
"
this_script_dir
=
`
cd
$this_script_dir
>
/dev/null
&&
pwd
`
# Delegate to wrapper, forcing wrapper to believe $0 is this script by using -c.
# This trick is needed to get autoconf to co-operate properly.
bash
-c
".
$this_script_dir
/common/autoconf/configure"
$this_script_dir
/configure CHECKME
$this_script_dir
"
$@
"
make/Main.gmk
浏览文件 @
d2e2410c
...
...
@@ -71,8 +71,9 @@ all: images docs
# Setup a rule for SPEC file that fails if executed. This check makes sure the configuration
# is up to date after changes to configure
$(SPEC): $(wildcard $(SRC_ROOT)/common/autoconf/*)
@$(ECHO) ERROR: $(SPEC) is not up to date
@$(ECHO) Please rerun configure!
@$(ECHO) "ERROR: $(SPEC) is not up to date."
@$(ECHO) "Please rerun configure! Easiest way to do this is by running"
@$(ECHO) "'make reconfigure'."
@if test "x$(IGNORE_OLD_CONFIG)" != "xtrue"; then exit 1; fi
start-make: $(SPEC)
...
...
@@ -230,6 +231,14 @@ clean-docs:
$(call CleanComponent,docstemp)
clean-test:
$(call CleanComponent,testoutput)
reconfigure:
ifneq ($(CONFIGURE_COMMAND_LINE), )
@$(ECHO) "Re-running configure using arguments '$(CONFIGURE_COMMAND_LINE)'"
else
@$(ECHO) "Re-running configure using default settings"
endif
@( 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
浏览文件 @
d2e2410c
#
# Copyright (c) 2011, 201
3
, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 201
8
, 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:" \
...
...
@@ -372,6 +372,10 @@ define SetupNativeCompilation
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
endif
# Add sys root specific cflags last
$1_EXTRA_CFLAGS += $(SYSROOT_CFLAGS)
$1_EXTRA_CXXFLAGS += $(SYSROOT_CFLAGS)
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
...
...
@@ -417,6 +421,8 @@ define SetupNativeCompilation
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
$1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
$1 := $$($1_TARGET)
ifneq (,$$($1_LIBRARY))
# Generating a dynamic library.
...
...
make/devkit/Makefile
浏览文件 @
d2e2410c
...
...
@@ -75,7 +75,7 @@ ifeq (,$(SKIP_ME))
$(foreach p,$(filter-out $(me),$(platforms)),$(eval $(p)
:
$$(me)))
endif
OUTPUT_ROOT
=
$(
abspath
../../
../
build/devkit
)
OUTPUT_ROOT
=
$(
abspath
../../build/devkit
)
RESULT
=
$(OUTPUT_ROOT)
/result
submakevars
=
HOST
=
$@
BUILD
=
$(me)
\
...
...
make/devkit/Tools.gmk
浏览文件 @
d2e2410c
...
...
@@ -49,8 +49,8 @@ ARCH := $(word 1,$(subst -, ,$(TARGET)))
# Define external dependencies
# Latest that could be made to work.
gcc_ver := gcc-4.
7.3
binutils_ver := binutils-2.2
2
gcc_ver := gcc-4.
8.2
binutils_ver := binutils-2.2
4
ccache_ver := ccache-3.1.9
mpfr_ver := mpfr-3.0.1
gmp_ver := gmp-4.3.2
...
...
@@ -64,6 +64,7 @@ GMP := http://ftp.gnu.org/pub/gnu/gmp/${gmp_ver}.tar.bz2
MPC := http://www.multiprecision.org/mpc/download/${mpc_ver}.tar.gz
# RPMs in OEL5.5
LINUX_VERSION := OEL5.5
RPM_LIST := \
kernel-headers \
glibc-2 glibc-headers glibc-devel \
...
...
@@ -121,7 +122,7 @@ RESULT := $(OUTPUT_ROOT)/result
BUILDDIR := $(OUTPUT_ROOT)/$(HOST)/$(TARGET)
PREFIX := $(RESULT)/$(HOST)
TARGETDIR := $(PREFIX)/$(TARGET)
SYSROOT := $(TARGETDIR)/sys
-
root
SYSROOT := $(TARGETDIR)/sysroot
DOWNLOAD := $(OUTPUT_ROOT)/download
SRCDIR := $(OUTPUT_ROOT)/src
...
...
@@ -184,7 +185,7 @@ $(foreach p,$(RPM_FILE_LIST),$(eval $(call unrpm,$(p))))
##########################################################################################
# Note: MUST create a <sys
-
root>/usr/lib even if not really needed.
# Note: MUST create a <sysroot>/usr/lib even if not really needed.
# gcc will use a path relative to it to resolve lib64. (x86_64).
# we're creating multi-lib compiler with 32bit libc as well, so we should
# have it anyway, but just to make sure...
...
...
@@ -459,15 +460,31 @@ $(TARGETDIR)/%.done : $(BUILDDIR)/%/Makefile
##########################################################################################
$(PREFIX)/devkit.info: FRC
@echo 'Creating devkit.info in the root of the kit'
rm -f $@
touch $@
echo '# This file describes to configure how to interpret the contents of this' >> $@
echo '# devkit' >> $@
echo '' >> $@
echo 'DEVKIT_NAME="$(gcc_ver) - $(LINUX_VERSION)"' >> $@
echo 'DEVKIT_TOOLCHAIN_PATH="$$DEVKIT_ROOT/bin"' >> $@
echo 'DEVKIT_SYSROOT="$$DEVKIT_ROOT/$$host/sysroot"' >> $@
##########################################################################################
bfdlib : $(bfdlib)
binutils : $(binutils)
rpms : $(rpms)
libs : $(libs)
sysroot : rpms libs
gcc : sysroot $(gcc) $(gccpatch)
all : binutils gcc bfdlib
all : binutils gcc bfdlib
$(PREFIX)/devkit.info
# this is only built for host. so separate.
ccache : $(ccache)
# Force target
FRC:
.PHONY : gcc all binutils bfdlib link_libs rpms libs sysroot
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录