8138694: Devkit build on Macosx still requires Xcode to be installed
Reviewed-by: ihse, tbell
This commit is contained in:
parent
1cfadcd465
commit
eb0e012f6c
@ -165,6 +165,11 @@ SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
# First determine the toolchain type (compiler family)
|
||||
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
|
||||
|
||||
# User supplied flags should be used when configure detects compilers
|
||||
FLAGS_SETUP_USER_SUPPLIED_FLAGS
|
||||
# The sysroot cflags are needed for configure to be able to run the compilers
|
||||
FLAGS_SETUP_SYSROOT_FLAGS
|
||||
|
||||
# Then detect the actual binaries needed
|
||||
TOOLCHAIN_PRE_DETECTION
|
||||
TOOLCHAIN_DETECT_TOOLCHAIN_CORE
|
||||
|
@ -23,6 +23,100 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
|
||||
# corresponding configure arguments instead
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_USER_SUPPLIED_FLAGS],
|
||||
[
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
|
||||
[extra flags to be used when compiling jdk c-files])])
|
||||
|
||||
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
|
||||
[extra flags to be used when compiling jdk c++-files])])
|
||||
|
||||
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
|
||||
[extra flags to be used when linking jdk])])
|
||||
|
||||
EXTRA_CFLAGS="$with_extra_cflags"
|
||||
EXTRA_CXXFLAGS="$with_extra_cxxflags"
|
||||
EXTRA_LDFLAGS="$with_extra_ldflags"
|
||||
|
||||
# Hotspot needs these set in their legacy form
|
||||
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
|
||||
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
|
||||
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
|
||||
|
||||
AC_SUBST(LEGACY_EXTRA_CFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_LDFLAGS)
|
||||
|
||||
# The global CFLAGS and LDLAGS variables are used by configure tests and
|
||||
# should include the extra parameters
|
||||
CFLAGS="$EXTRA_CFLAGS"
|
||||
CXXFLAGS="$EXTRA_CXXFLAGS"
|
||||
LDFLAGS="$EXTRA_LDFLAGS"
|
||||
CPPFLAGS=""
|
||||
])
|
||||
|
||||
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
|
||||
# that configure can use them while detecting compilers.
|
||||
# TOOLCHAIN_TYPE is available here.
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_SYSROOT_FLAGS],
|
||||
[
|
||||
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"
|
||||
# The global CFLAGS and LDFLAGS variables need these for configure to function
|
||||
CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# We also need -iframework<path>/System/Library/Frameworks
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
|
||||
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
|
||||
# set this here so it doesn't have to be peppered throughout the forest
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
|
||||
fi
|
||||
|
||||
AC_SUBST(SYSROOT_CFLAGS)
|
||||
AC_SUBST(SYSROOT_LDFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
|
||||
[
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
@ -113,44 +207,6 @@ AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
|
||||
# silence copyright notice and other headers.
|
||||
COMMON_CCXXFLAGS="$COMMON_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$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
|
||||
SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
|
||||
SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
|
||||
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
|
||||
|
||||
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
|
||||
# set this here so it doesn't have to be peppered throughout the forest
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
|
||||
fi
|
||||
|
||||
AC_SUBST(SYSROOT_CFLAGS)
|
||||
AC_SUBST(SYSROOT_LDFLAGS)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
|
||||
@ -480,39 +536,9 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
|
||||
fi
|
||||
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags])
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags])
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
AC_MSG_WARN([Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(extra-cflags, [AS_HELP_STRING([--with-extra-cflags],
|
||||
[extra flags to be used when compiling jdk c-files])])
|
||||
|
||||
AC_ARG_WITH(extra-cxxflags, [AS_HELP_STRING([--with-extra-cxxflags],
|
||||
[extra flags to be used when compiling jdk c++-files])])
|
||||
|
||||
AC_ARG_WITH(extra-ldflags, [AS_HELP_STRING([--with-extra-ldflags],
|
||||
[extra flags to be used when linking jdk])])
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
|
||||
|
||||
# Hotspot needs these set in their legacy form
|
||||
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)
|
||||
AC_SUBST(LEGACY_EXTRA_LDFLAGS)
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -705,9 +705,6 @@ CXXFLAGS_JDKLIB
|
||||
CFLAGS_JDKEXE
|
||||
CFLAGS_JDKLIB
|
||||
MACOSX_VERSION_MIN
|
||||
LEGACY_EXTRA_LDFLAGS
|
||||
LEGACY_EXTRA_CXXFLAGS
|
||||
LEGACY_EXTRA_CFLAGS
|
||||
CXX_O_FLAG_NONE
|
||||
CXX_O_FLAG_DEBUG
|
||||
CXX_O_FLAG_NORM
|
||||
@ -728,8 +725,6 @@ SET_SHARED_LIBRARY_ORIGIN
|
||||
SET_EXECUTABLE_ORIGIN
|
||||
CXX_FLAG_REORDER
|
||||
C_FLAG_REORDER
|
||||
SYSROOT_LDFLAGS
|
||||
SYSROOT_CFLAGS
|
||||
RC_FLAGS
|
||||
AR_OUT_OPTION
|
||||
LD_OUT_OPTION
|
||||
@ -747,6 +742,8 @@ HOTSPOT_LD
|
||||
HOTSPOT_CXX
|
||||
HOTSPOT_RC
|
||||
HOTSPOT_MT
|
||||
BUILD_SYSROOT_LDFLAGS
|
||||
BUILD_SYSROOT_CFLAGS
|
||||
BUILD_LD
|
||||
BUILD_CXX
|
||||
BUILD_CC
|
||||
@ -793,6 +790,11 @@ VS_LIB
|
||||
VS_INCLUDE
|
||||
VS_PATH
|
||||
CYGWIN_LINK
|
||||
SYSROOT_LDFLAGS
|
||||
SYSROOT_CFLAGS
|
||||
LEGACY_EXTRA_LDFLAGS
|
||||
LEGACY_EXTRA_CXXFLAGS
|
||||
LEGACY_EXTRA_CFLAGS
|
||||
EXE_SUFFIX
|
||||
OBJ_SUFFIX
|
||||
STATIC_LIBRARY
|
||||
@ -1078,11 +1080,11 @@ with_override_nashorn
|
||||
with_override_jdk
|
||||
with_import_hotspot
|
||||
with_toolchain_type
|
||||
with_toolchain_version
|
||||
with_jtreg
|
||||
with_extra_cflags
|
||||
with_extra_cxxflags
|
||||
with_extra_ldflags
|
||||
with_toolchain_version
|
||||
with_jtreg
|
||||
enable_warnings_as_errors
|
||||
enable_debug_symbols
|
||||
enable_zip_debug_info
|
||||
@ -1937,14 +1939,14 @@ Optional Packages:
|
||||
source
|
||||
--with-toolchain-type the toolchain type (or family) to use, use '--help'
|
||||
to show possible values [platform dependent]
|
||||
--with-extra-cflags extra flags to be used when compiling jdk c-files
|
||||
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
|
||||
--with-extra-ldflags extra flags to be used when linking jdk
|
||||
--with-toolchain-version
|
||||
the version of the toolchain to look for, use
|
||||
'--help' to show possible values [platform
|
||||
dependent]
|
||||
--with-jtreg Regression Test Harness [probed]
|
||||
--with-extra-cflags extra flags to be used when compiling jdk c-files
|
||||
--with-extra-cxxflags extra flags to be used when compiling jdk c++-files
|
||||
--with-extra-ldflags extra flags to be used when linking jdk
|
||||
--with-x use the X Window System
|
||||
--with-cups specify prefix directory for the cups package
|
||||
(expecting the headers under PATH/include)
|
||||
@ -3767,6 +3769,15 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
|
||||
# questions.
|
||||
#
|
||||
|
||||
# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
|
||||
# corresponding configure arguments instead
|
||||
|
||||
|
||||
# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
|
||||
# that configure can use them while detecting compilers.
|
||||
# TOOLCHAIN_TYPE is available here.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -4364,7 +4375,7 @@ VS_SDK_PLATFORM_NAME_2013=
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Do not change or remove the following line, it is needed for consistency checks:
|
||||
DATE_WHEN_GENERATED=1443605847
|
||||
DATE_WHEN_GENERATED=1444045451
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -26827,6 +26838,109 @@ $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESC
|
||||
fi
|
||||
|
||||
|
||||
# User supplied flags should be used when configure detects compilers
|
||||
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-extra-cflags was given.
|
||||
if test "${with_extra_cflags+set}" = set; then :
|
||||
withval=$with_extra_cflags;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-extra-cxxflags was given.
|
||||
if test "${with_extra_cxxflags+set}" = set; then :
|
||||
withval=$with_extra_cxxflags;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-extra-ldflags was given.
|
||||
if test "${with_extra_ldflags+set}" = set; then :
|
||||
withval=$with_extra_ldflags;
|
||||
fi
|
||||
|
||||
|
||||
EXTRA_CFLAGS="$with_extra_cflags"
|
||||
EXTRA_CXXFLAGS="$with_extra_cxxflags"
|
||||
EXTRA_LDFLAGS="$with_extra_ldflags"
|
||||
|
||||
# Hotspot needs these set in their legacy form
|
||||
LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
|
||||
LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
|
||||
LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# The global CFLAGS and LDLAGS variables are used by configure tests and
|
||||
# should include the extra parameters
|
||||
CFLAGS="$EXTRA_CFLAGS"
|
||||
CXXFLAGS="$EXTRA_CXXFLAGS"
|
||||
LDFLAGS="$EXTRA_LDFLAGS"
|
||||
CPPFLAGS=""
|
||||
|
||||
# The sysroot cflags are needed for configure to be able to run the compilers
|
||||
|
||||
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"
|
||||
# The global CFLAGS and LDFLAGS variables need these for configure to function
|
||||
CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
|
||||
LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# We also need -iframework<path>/System/Library/Frameworks
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
|
||||
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
|
||||
# set this here so it doesn't have to be peppered throughout the forest
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# Then detect the actual binaries needed
|
||||
|
||||
# FIXME: Is this needed?
|
||||
@ -40557,12 +40671,16 @@ $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
|
||||
fi
|
||||
fi
|
||||
|
||||
BUILD_SYSROOT_CFLAGS=""
|
||||
BUILD_SYSROOT_LDFLAGS=""
|
||||
else
|
||||
# If we are not cross compiling, use the normal target compilers for
|
||||
# building the build platform executables.
|
||||
BUILD_CC="$CC"
|
||||
BUILD_CXX="$CXX"
|
||||
BUILD_LD="$LD"
|
||||
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
fi
|
||||
|
||||
|
||||
@ -40570,6 +40688,8 @@ $as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# For hotspot, we need these in Windows mixed path,
|
||||
# so rewrite them all. Need added .exe suffix.
|
||||
@ -41308,44 +41428,6 @@ $as_echo "$tool_specified" >&6; }
|
||||
COMMON_CCXXFLAGS="$COMMON_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$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
|
||||
SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
|
||||
SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
|
||||
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
|
||||
|
||||
# These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
|
||||
# set this here so it doesn't have to be peppered throughout the forest
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# FIXME: Currently we must test this after toolchain but before flags. Fix!
|
||||
|
||||
@ -42338,54 +42420,9 @@ $as_echo "$supports" >&6; }
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
|
||||
fi
|
||||
|
||||
if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
|
||||
fi
|
||||
|
||||
if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
|
||||
fi
|
||||
|
||||
if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
|
||||
$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-extra-cflags was given.
|
||||
if test "${with_extra_cflags+set}" = set; then :
|
||||
withval=$with_extra_cflags;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-extra-cxxflags was given.
|
||||
if test "${with_extra_cxxflags+set}" = set; then :
|
||||
withval=$with_extra_cxxflags;
|
||||
fi
|
||||
|
||||
|
||||
|
||||
# Check whether --with-extra-ldflags was given.
|
||||
if test "${with_extra_ldflags+set}" = set; then :
|
||||
withval=$with_extra_ldflags;
|
||||
fi
|
||||
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
|
||||
|
||||
# Hotspot needs these set in their legacy form
|
||||
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"
|
||||
|
||||
|
||||
|
||||
|
||||
CFLAGS_JDK="${CFLAGS_JDK} $EXTRA_CFLAGS"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} $EXTRA_CXXFLAGS"
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} $EXTRA_LDFLAGS"
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
@ -48,8 +48,8 @@ ALT_CUPS_HEADERS_PATH:=$(patsubst -I%,%,$(filter -I%,@CUPS_CFLAGS@))
|
||||
|
||||
# The HOSTCC/HOSTCXX is Hotspot terminology for the BUILD_CC/BUILD_CXX, i.e. the
|
||||
# compiler that produces code that can be run on the build platform.
|
||||
HOSTCC:=@FIXPATH@ @BUILD_CC@
|
||||
HOSTCXX:=@FIXPATH@ @BUILD_CXX@
|
||||
HOSTCC:=@FIXPATH@ @BUILD_CC@ $(BUILD_SYSROOT_CFLAGS)
|
||||
HOSTCXX:=@FIXPATH@ @BUILD_CXX@ $(BUILD_SYSROOT_CFLAGS)
|
||||
|
||||
####################################################
|
||||
#
|
||||
|
@ -367,6 +367,8 @@ LDFLAGS_TESTEXE_SUFFIX:=@LDFLAGS_TESTEXE_SUFFIX@
|
||||
# build platform.
|
||||
BUILD_CC:=@FIXPATH@ @BUILD_CC@
|
||||
BUILD_LD:=@FIXPATH@ @BUILD_LD@
|
||||
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
|
||||
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
|
||||
|
||||
AS:=@FIXPATH@ @AS@
|
||||
|
||||
|
@ -656,17 +656,23 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
BASIC_PATH_PROGS(BUILD_LD, ld)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_LD)
|
||||
BUILD_SYSROOT_CFLAGS=""
|
||||
BUILD_SYSROOT_LDFLAGS=""
|
||||
else
|
||||
# If we are not cross compiling, use the normal target compilers for
|
||||
# building the build platform executables.
|
||||
BUILD_CC="$CC"
|
||||
BUILD_CXX="$CXX"
|
||||
BUILD_LD="$LD"
|
||||
BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
|
||||
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
|
||||
fi
|
||||
|
||||
AC_SUBST(BUILD_CC)
|
||||
AC_SUBST(BUILD_CXX)
|
||||
AC_SUBST(BUILD_LD)
|
||||
AC_SUBST(BUILD_SYSROOT_CFLAGS)
|
||||
AC_SUBST(BUILD_SYSROOT_LDFLAGS)
|
||||
])
|
||||
|
||||
# Setup legacy variables that are still needed as alternative ways to refer to
|
||||
|
Loading…
x
Reference in New Issue
Block a user