Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8
提交
3752a6f3
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看板
提交
3752a6f3
编写于
4月 16, 2018
作者:
K
kevinw
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris
Reviewed-by: erikj, ihse
上级
8112ffae
变更
12
展开全部
隐藏空白更改
内联
并排
Showing
12 changed file
with
1065 addition
and
654 deletion
+1065
-654
common/autoconf/basics.m4
common/autoconf/basics.m4
+101
-35
common/autoconf/build-performance.m4
common/autoconf/build-performance.m4
+2
-2
common/autoconf/configure.ac
common/autoconf/configure.ac
+3
-0
common/autoconf/flags.m4
common/autoconf/flags.m4
+36
-4
common/autoconf/generated-configure.sh
common/autoconf/generated-configure.sh
+822
-526
common/autoconf/libraries.m4
common/autoconf/libraries.m4
+61
-49
common/autoconf/spec.gmk.in
common/autoconf/spec.gmk.in
+2
-5
common/autoconf/toolchain.m4
common/autoconf/toolchain.m4
+8
-26
common/bin/compare.sh
common/bin/compare.sh
+1
-1
make/common/NativeCompilation.gmk
make/common/NativeCompilation.gmk
+6
-0
make/devkit/Makefile
make/devkit/Makefile
+1
-1
make/devkit/Tools.gmk
make/devkit/Tools.gmk
+22
-5
未找到文件。
common/autoconf/basics.m4
浏览文件 @
3752a6f3
...
...
@@ -46,10 +46,24 @@ AC_DEFUN([ADD_JVM_ARG_IF_OK],
# Appends a string to a path variable, only adding the : when needed.
AC_DEFUN([BASIC_APPEND_TO_PATH],
[
if test "x[$]$1" = x; then
$1="$2"
else
$1="[$]$1:$2"
if test "x$2" != x; then
if test "x[$]$1" = x; then
$1="$2"
else
$1="[$]$1:$2"
fi
fi
])
# Prepends a string to a path variable, only adding the : when needed.
AC_DEFUN([BASIC_PREPEND_TO_PATH],
[
if test "x$2" != x; then
if test "x[$]$1" = x; then
$1="$2"
else
$1="$2:[$]$1"
fi
fi
])
...
...
@@ -442,49 +456,101 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
# Locate the directory of this script.
AUTOCONF_DIR=$TOPDIR/common/autoconf
])
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
# Add extra search paths on solaris for utilities like ar and as etc...
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
fi
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
[
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this devkit for compilers, tools and resources])],
[
BASIC_FIXUP_PATH([with_devkit])
DEVKIT_ROOT="$with_devkit"
# Check for a meta data info file in the root of the devkit
if test -f "$DEVKIT_ROOT/devkit.info"; then
# This potentially sets the following:
# DEVKIT_NAME: A descriptive name of the devkit
# DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
# DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
# DEVKIT_SYSROOT: Corresponds to --with-sysroot
. $DEVKIT_ROOT/devkit.info
fi
AC_MSG_CHECKING([for devkit])
if test "x$DEVKIT_NAME" != x; then
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
else
AC_MSG_RESULT([$DEVKIT_ROOT])
fi
if test "x$DEVKIT_EXTRA_PATH" != x; then
BASIC_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
fi
# Fallback default of just /bin if DEVKIT_PATH is not defined
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
fi
BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
# places for backwards compatiblity.
if test "x$DEVKIT_SYSROOT" != x; then
SYSROOT="$DEVKIT_SYSROOT"
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
fi
]
)
# You can force the sys
-root if the sys-root encoded into the cross
compiler tools
# You can force the sys
root if the sysroot encoded into the
compiler tools
# is not correct.
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
[pass this sys-root to the compilers and tools (for cross-compiling)])])
[alias for --with-sysroot for backwards compatability])],
[SYSROOT=$with_sys_root]
)
if test "x$with_sys_root" != x; then
SYS_ROOT=$with_sys_root
else
SYS_ROOT=/
fi
AC_SUBST(SYS_ROOT)
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
[use this directory as sysroot)])],
[SYSROOT=$with_sysroot]
)
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
[search this directory for compilers and tools (for cross-compiling)])],
[TOOLS_DIR=$with_tools_dir]
[alias for --with-toolchain-path for backwards compatibility])],
[BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
)
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
[prepend these directories when searching for toolchain binaries (compilers etc)])],
[BASIC_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
)
AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
[prepend these directories to the default path])],
[BASIC_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
)
# Prepend the extra path to the global path
BASIC_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
# Add extra search paths on solaris for utilities like ar and as etc...
PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
fi
# Xcode version will be validated later
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
[explicit path to Xcode 4 (generally for building on 10.9 and later)])],
[XCODE_PATH=$with_xcode_path]
)
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
[use this directory as base for tools-dir and sys-root (for cross-compiling)])],
[
if test "x$with_sys_root" != x; then
AC_MSG_ERROR([Cannot specify both --with-devkit and --with-sys-root at the same time])
fi
BASIC_FIXUP_PATH([with_devkit])
BASIC_APPEND_TO_PATH([TOOLS_DIR],$with_devkit/bin)
if test -d "$with_devkit/$host_alias/libc"; then
SYS_ROOT=$with_devkit/$host_alias/libc
elif test -d "$with_devkit/$host/sys-root"; then
SYS_ROOT=$with_devkit/$host/sys-root
fi
])
AC_MSG_CHECKING([for sysroot])
AC_MSG_RESULT([$SYSROOT])
AC_MSG_CHECKING([for toolchain path])
AC_MSG_RESULT([$TOOLCHAIN_PATH])
AC_MSG_CHECKING([for extra path])
AC_MSG_RESULT([$EXTRA_PATH])
])
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
...
...
@@ -654,10 +720,10 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
fi
if test "x$FOUND_MAKE" = x; then
if test "x$TOOL
S_DIR
" != x; then
# We have a tool
s-dir
, check that as well before giving up.
if test "x$TOOL
CHAIN_PATH
" != x; then
# We have a tool
chain path
, check that as well before giving up.
OLD_PATH=$PATH
PATH=$TOOL
S_DIR
:$PATH
PATH=$TOOL
CHAIN_PATH
:$PATH
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
if test "x$FOUND_MAKE" = x; then
...
...
common/autoconf/build-performance.m4
浏览文件 @
3752a6f3
...
...
@@ -169,8 +169,8 @@ AC_DEFUN([BPERF_SETUP_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
BASIC_REQUIRE_PROGS(CCACHE, ccache)
CCACHE_STATUS="enabled"
...
...
common/autoconf/configure.ac
浏览文件 @
3752a6f3
...
...
@@ -101,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
...
...
common/autoconf/flags.m4
浏览文件 @
3752a6f3
...
...
@@ -119,6 +119,32 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
# FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
CCXXFLAGS="$CCXXFLAGS -nologo"
fi
if test "x$SYSROOT" != "x"; then
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
# Solaris Studio does not have a concept of sysroot. Instead we must
# make sure the default include and lib dirs are appended to each
# compile and link command line.
SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
-L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
fi
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
elif test "x$TOOLCHAIN_TYPE" = xclang; then
SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
fi
# Propagate the sysroot args to hotspot
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
fi
AC_SUBST(SYSROOT_CFLAGS)
AC_SUBST(SYSROOT_LDFLAGS)
])
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
...
...
@@ -389,9 +415,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
# Hotspot needs these set in their legacy form
LEGACY_EXTRA_CFLAGS=
$with_extra_cflags
LEGACY_EXTRA_CXXFLAGS=
$with_extra_cxxflags
LEGACY_EXTRA_LDFLAGS=
$with_extra_ldflags
LEGACY_EXTRA_CFLAGS=
"$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
LEGACY_EXTRA_CXXFLAGS=
"$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
LEGACY_EXTRA_LDFLAGS=
"$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
AC_SUBST(LEGACY_EXTRA_CFLAGS)
AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
...
...
@@ -490,7 +516,13 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
fi
else
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
# Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
# are defined in the system?
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN="
else
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
fi
fi
# Setup target OS define. Use OS target name but in upper case.
...
...
common/autoconf/generated-configure.sh
浏览文件 @
3752a6f3
此差异已折叠。
点击以展开。
common/autoconf/libraries.m4
浏览文件 @
3752a6f3
...
...
@@ -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="$
SYS
ROOT/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="$FREETYPE_ROOT/usr"
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="$SYSROOT/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],
...
...
@@ -864,7 +876,7 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
LIBCXX="
${SYSROOT}
/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
fi
# TODO better (platform agnostic) test
...
...
common/autoconf/spec.gmk.in
浏览文件 @
3752a6f3
...
...
@@ -128,10 +128,8 @@ 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
ADD_SRC_ROOT:=@ADD_SRC_ROOT@
...
...
@@ -293,7 +291,6 @@ 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@
...
...
common/autoconf/toolchain.m4
浏览文件 @
3752a6f3
...
...
@@ -323,29 +323,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
PATH="/usr/ccs/bin:$PATH"
fi
# Finally add TOOL
S_DIR
at the beginning, to allow --with-tools-dir to
# Finally add TOOL
CHAIN_PATH
at the beginning, to allow --with-tools-dir to
# override all other locations.
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
# If a devkit is found on the builddeps server, then prepend its path to the
# PATH variable. If there are cross compilers available in the devkit, these
# will be found by AC_PROG_CC et al.
DEVKIT=
BDEPS_CHECK_MODULE(DEVKIT, devkit, xxx,
[
# Found devkit
PATH="$DEVKIT/bin:$PATH"
SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
if test "x$x_includes" = "xNONE"; then
x_includes="$SYS_ROOT/usr/include/X11"
fi
if test "x$x_libraries" = "xNONE"; then
x_libraries="$SYS_ROOT/usr/lib"
fi
],
[])
])
# Restore path, etc
...
...
@@ -519,15 +501,15 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
# used.
$1=
# If TOOL
S_DIR
is set, check for all compiler names in there first
# If TOOL
CHAIN_PATH
is set, check for all compiler names in there first
# before checking the rest of the PATH.
# FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
# step, this should not be necessary.
if test -n "$TOOL
S_DIR
"; then
if test -n "$TOOL
CHAIN_PATH
"; then
PATH_save="$PATH"
PATH="$TOOL
S_DIR
"
AC_PATH_PROGS(TOOL
S_DIR_$1, $3
)
$1=$TOOL
S_DIR
_$1
PATH="$TOOL
CHAIN_PATH
"
AC_PATH_PROGS(TOOL
CHAIN_PATH_$1, $SEARCH_LIST
)
$1=$TOOL
CHAIN_PATH
_$1
PATH="$PATH_save"
fi
...
...
common/bin/compare.sh
浏览文件 @
3752a6f3
...
...
@@ -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" \
...
...
make/common/NativeCompilation.gmk
浏览文件 @
3752a6f3
...
...
@@ -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
浏览文件 @
3752a6f3
...
...
@@ -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
浏览文件 @
3752a6f3
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录