8013786: JDK-8013480 broke configure on solaris
Reviewed-by: tbell
This commit is contained in:
parent
68446ddbad
commit
e44f5ce0ae
@ -166,6 +166,7 @@ PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
|||||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||||
|
TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC
|
||||||
|
|
||||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -333,18 +333,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS],
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
|
AC_SUBST(DEFINE_CROSS_COMPILE_ARCH)
|
||||||
|
|
||||||
# Some Zero and Shark settings.
|
|
||||||
# ZERO_ARCHFLAG tells the compiler which mode to build for
|
|
||||||
case "${OPENJDK_TARGET_CPU}" in
|
|
||||||
s390)
|
|
||||||
ZERO_ARCHFLAG="-m31"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
|
||||||
esac
|
|
||||||
PLATFORM_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
|
|
||||||
AC_SUBST(ZERO_ARCHFLAG)
|
|
||||||
|
|
||||||
# ZERO_ARCHDEF is used to enable architecture-specific code
|
# ZERO_ARCHDEF is used to enable architecture-specific code
|
||||||
case "${OPENJDK_TARGET_CPU}" in
|
case "${OPENJDK_TARGET_CPU}" in
|
||||||
ppc*) ZERO_ARCHDEF=PPC ;;
|
ppc*) ZERO_ARCHDEF=PPC ;;
|
||||||
@ -418,51 +406,6 @@ AC_SUBST(OS_VERSION_MINOR)
|
|||||||
AC_SUBST(OS_VERSION_MICRO)
|
AC_SUBST(OS_VERSION_MICRO)
|
||||||
])
|
])
|
||||||
|
|
||||||
# PLATFORM_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
|
|
||||||
# [RUN-IF-FALSE])
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# Check that the c and c++ compilers support an argument
|
|
||||||
AC_DEFUN([PLATFORM_COMPILER_CHECK_ARGUMENTS],
|
|
||||||
[
|
|
||||||
AC_MSG_CHECKING([if compiler supports "$1"])
|
|
||||||
supports=yes
|
|
||||||
|
|
||||||
saved_cflags="$CFLAGS"
|
|
||||||
CFLAGS="$CFLAGS $1"
|
|
||||||
AC_LANG_PUSH([C])
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
AC_LANG_SOURCE([[int i;]])
|
|
||||||
], [], [supports=no])
|
|
||||||
AC_LANG_POP([C])
|
|
||||||
CFLAGS="$saved_cflags"
|
|
||||||
|
|
||||||
saved_cxxflags="$CXXFLAGS"
|
|
||||||
CXXFLAGS="$CXXFLAG $1"
|
|
||||||
AC_LANG_PUSH([C++])
|
|
||||||
AC_COMPILE_IFELSE([
|
|
||||||
AC_LANG_SOURCE([[int i;]])
|
|
||||||
], [], [supports=no])
|
|
||||||
AC_LANG_POP([C++])
|
|
||||||
CXXFLAGS="$saved_cxxflags"
|
|
||||||
|
|
||||||
AC_MSG_RESULT([$supports])
|
|
||||||
if test "x$supports" = "xyes" ; then
|
|
||||||
m4_ifval([$2], [$2], [:])
|
|
||||||
else
|
|
||||||
m4_ifval([$3], [$3], [:])
|
|
||||||
fi
|
|
||||||
])
|
|
||||||
|
|
||||||
# Check that the compiler supports -mX flags
|
|
||||||
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
|
|
||||||
AC_DEFUN([PLATFORM_CHECK_COMPILER_TARGET_BITS_FLAGS],
|
|
||||||
[
|
|
||||||
PLATFORM_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}],
|
|
||||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
|
|
||||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
|
|
||||||
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
|
|
||||||
])
|
|
||||||
|
|
||||||
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
|
# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
|
||||||
# Add -mX to various FLAGS variables.
|
# Add -mX to various FLAGS variables.
|
||||||
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
AC_DEFUN([PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS],
|
||||||
@ -491,8 +434,6 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_TARGET_BITS],
|
|||||||
# is made at runtime.)
|
# is made at runtime.)
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_CHECK_COMPILER_TARGET_BITS_FLAGS
|
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||||
# Always specify -m flags on Solaris
|
# Always specify -m flags on Solaris
|
||||||
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
PLATFORM_SET_COMPILER_TARGET_BITS_FLAGS
|
||||||
|
@ -1030,3 +1030,61 @@ AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
|
|||||||
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
|
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
|
||||||
AC_SUBST(LDFLAGS_CXX_JDK)
|
AC_SUBST(LDFLAGS_CXX_JDK)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
# TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
|
||||||
|
# [RUN-IF-FALSE])
|
||||||
|
# ------------------------------------------------------------
|
||||||
|
# Check that the c and c++ compilers support an argument
|
||||||
|
AC_DEFUN([TOOLCHAIN_COMPILER_CHECK_ARGUMENTS],
|
||||||
|
[
|
||||||
|
AC_MSG_CHECKING([if compiler supports "$1"])
|
||||||
|
supports=yes
|
||||||
|
|
||||||
|
saved_cflags="$CFLAGS"
|
||||||
|
CFLAGS="$CFLAGS $1"
|
||||||
|
AC_LANG_PUSH([C])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[int i;]])
|
||||||
|
], [], [supports=no])
|
||||||
|
AC_LANG_POP([C])
|
||||||
|
CFLAGS="$saved_cflags"
|
||||||
|
|
||||||
|
saved_cxxflags="$CXXFLAGS"
|
||||||
|
CXXFLAGS="$CXXFLAG $1"
|
||||||
|
AC_LANG_PUSH([C++])
|
||||||
|
AC_COMPILE_IFELSE([
|
||||||
|
AC_LANG_SOURCE([[int i;]])
|
||||||
|
], [], [supports=no])
|
||||||
|
AC_LANG_POP([C++])
|
||||||
|
CXXFLAGS="$saved_cxxflags"
|
||||||
|
|
||||||
|
AC_MSG_RESULT([$supports])
|
||||||
|
if test "x$supports" = "xyes" ; then
|
||||||
|
m4_ifval([$2], [$2], [:])
|
||||||
|
else
|
||||||
|
m4_ifval([$3], [$3], [:])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC],
|
||||||
|
[
|
||||||
|
# Some Zero and Shark settings.
|
||||||
|
# ZERO_ARCHFLAG tells the compiler which mode to build for
|
||||||
|
case "${OPENJDK_TARGET_CPU}" in
|
||||||
|
s390)
|
||||||
|
ZERO_ARCHFLAG="-m31"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
ZERO_ARCHFLAG="-m${OPENJDK_TARGET_CPU_BITS}"
|
||||||
|
esac
|
||||||
|
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
|
||||||
|
AC_SUBST(ZERO_ARCHFLAG)
|
||||||
|
|
||||||
|
# Check that the compiler supports -mX flags
|
||||||
|
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
|
||||||
|
TOOLCHAIN_COMPILER_CHECK_ARGUMENTS([-m${OPENJDK_TARGET_CPU_BITS}],
|
||||||
|
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
|
||||||
|
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
|
||||||
|
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
|
||||||
|
])
|
||||||
|
Loading…
Reference in New Issue
Block a user