Merge
This commit is contained in:
commit
96235da15b
@ -245,3 +245,4 @@ cd3825b2983045784d6fc6d1729c799b08215752 jdk8-b120
|
||||
1e1f86d5d4e22c15a9bf9f1581acddb8c59abae2 jdk9-b00
|
||||
50669e45cec4491de0d921d3118a3fe2e767020a jdk9-b01
|
||||
135f0c7af57ebace31383d8877f47e32172759ff jdk9-b02
|
||||
fd8d51bdf9aadf7ae83e65e8655c53581017c363 jdk9-b03
|
||||
|
1706
THIRD_PARTY_README
1706
THIRD_PARTY_README
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -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/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
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -126,7 +126,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE],
|
||||
done
|
||||
IFS="$IFS_save"
|
||||
else
|
||||
AC_MSG_NOTICE([Resolving $1 (as $path) failed, using $path directly.])
|
||||
# This is an absolute path, we can use it without further modifications.
|
||||
new_path="$path"
|
||||
fi
|
||||
|
||||
@ -418,14 +418,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Locate the directory of this script.
|
||||
SCRIPT="[$]0"
|
||||
AUTOCONF_DIR=`cd \`$DIRNAME $SCRIPT\`; $THEPWDCMD -L`
|
||||
|
||||
# Where is the source? It is located two levels above the configure script.
|
||||
# Save the current directory this script was started from
|
||||
CURDIR="$PWD"
|
||||
cd "$AUTOCONF_DIR/../.."
|
||||
SRC_ROOT="`$THEPWDCMD -L`"
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
@ -433,13 +427,21 @@ AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
else
|
||||
PATH_SEP=":"
|
||||
fi
|
||||
|
||||
AC_SUBST(SRC_ROOT)
|
||||
AC_SUBST(PATH_SEP)
|
||||
cd "$CURDIR"
|
||||
|
||||
BASIC_FIXUP_PATH(SRC_ROOT)
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
AC_SUBST(TOPDIR)
|
||||
|
||||
# We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
BASIC_FIXUP_PATH(CURDIR)
|
||||
BASIC_FIXUP_PATH(TOPDIR)
|
||||
# SRC_ROOT is a traditional alias for TOPDIR.
|
||||
SRC_ROOT=$TOPDIR
|
||||
|
||||
# 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...
|
||||
@ -487,13 +489,17 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[ CONF_NAME=${with_conf_name} ])
|
||||
|
||||
# Test from where we are running configure, in or outside of src root.
|
||||
AC_MSG_CHECKING([where to store configuration])
|
||||
if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
|
||||
|| test "x$CURDIR" = "x$SRC_ROOT/make" ; then
|
||||
# We are running configure from the src root.
|
||||
# Create a default ./build/target-variant-debuglevel output root.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
AC_MSG_RESULT([in default location])
|
||||
CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUT_ROOT"
|
||||
@ -509,6 +515,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
|
||||
fi
|
||||
OUTPUT_ROOT="$CURDIR"
|
||||
AC_MSG_RESULT([in current directory])
|
||||
|
||||
# WARNING: This might be a bad thing to do. You need to be sure you want to
|
||||
# have a configuration in this directory. Do some sanity checks!
|
||||
@ -558,9 +565,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
# You can run make from the OUTPUT_ROOT, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
|
||||
# Save the arguments given to us
|
||||
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_LOGGING],
|
||||
|
@ -341,39 +341,45 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
[
|
||||
##############################################################################
|
||||
#
|
||||
# Specify options for anything that is run with the Boot JDK.
|
||||
# Specify jvm options for anything that is run with the Boot JDK.
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
#
|
||||
AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
|
||||
[specify JVM arguments to be passed to all invocations of the Boot JDK, overriding the default values,
|
||||
[specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
|
||||
e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
|
||||
|
||||
if test "x$with_boot_jdk_jvmargs" = x; then
|
||||
# Not all JVM:s accept the same arguments on the command line.
|
||||
# OpenJDK specific increase in thread stack for JDK build,
|
||||
# well more specifically, when running javac.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, the stack takes more space
|
||||
# since 64-bit pointers are pushed on the stach. Apparently, we need
|
||||
# to increase the stack space when javacing the JDK....
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Minimum amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
|
||||
# Why does macosx need more heap? Its the huge JDK batch.
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1600M],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
ADD_JVM_ARG_IF_OK([-Xmx1100M],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
# When is adding -client something that speeds up the JVM?
|
||||
# ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Maximum amount of heap memory.
|
||||
# Maximum stack size.
|
||||
if test "x$BUILD_NUM_BITS" = x32; then
|
||||
JVM_MAX_HEAP=1100M
|
||||
STACK_SIZE=768
|
||||
else
|
||||
# Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
|
||||
# pointers are used. Apparently, we need to increase the heap and stack
|
||||
# space for the jvm. More specifically, when running javac to build huge
|
||||
# jdk batch
|
||||
JVM_MAX_HEAP=1600M
|
||||
STACK_SIZE=1536
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx$JVM_MAX_HEAP],boot_jdk_jvmargs,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Disable special log output when a debug build is used as Boot JDK...
|
||||
ADD_JVM_ARG_IF_OK([-XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
# Apply user provided options.
|
||||
ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
# For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
|
||||
JAVA_FLAGS=$boot_jdk_jvmargs
|
||||
|
||||
AC_SUBST(BOOT_JDK_JVMARGS, $boot_jdk_jvmargs)
|
||||
AC_SUBST(JAVA_FLAGS, $JAVA_FLAGS)
|
||||
])
|
||||
|
@ -261,7 +261,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_PRECOMPILED_HEADERS],
|
||||
|
||||
if test "x$ENABLE_PRECOMPH" = xyes; then
|
||||
# Check that the compiler actually supports precomp headers.
|
||||
if test "x$GCC" = xyes; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([that precompiled headers work])
|
||||
echo "int alfa();" > conftest.h
|
||||
$CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2013, 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
|
||||
@ -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@"
|
||||
|
97
common/autoconf/configure
vendored
97
common/autoconf/configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/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
|
||||
@ -22,19 +22,26 @@
|
||||
# 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
|
||||
|
||||
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/closed/autoconf"
|
||||
else
|
||||
conf_custom_script_dir=$CUSTOM_CONFIG_DIR
|
||||
conf_custom_script_dir="$CUSTOM_CONFIG_DIR"
|
||||
fi
|
||||
|
||||
###
|
||||
@ -110,14 +117,41 @@ 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 echo "$1" | grep '^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\.:,%/+=_-]\{1,\}$' > /dev/null \
|
||||
&& ! echo "$1" | grep '^=' > /dev/null; then
|
||||
quoted="$1"
|
||||
else
|
||||
if echo "$1" | grep "[\'!]" > /dev/null; 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" : '[^=]*=\(.*\)'`
|
||||
@ -128,18 +162,35 @@ do
|
||||
export conf_debug_configure
|
||||
fi
|
||||
;;
|
||||
[^-]*=*)
|
||||
# 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!"
|
||||
# ... and then process argument as usual
|
||||
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" ;;
|
||||
@ -152,6 +203,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"
|
||||
@ -181,10 +235,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
|
||||
|
||||
@ -218,6 +272,13 @@ Additional (non-autoconf) OpenJDK Options:
|
||||
--debug-configure Run the configure script with additional debug
|
||||
logging enabled.
|
||||
|
||||
EOT
|
||||
|
||||
# Print list of toolchains. This must be done by the autoconf script.
|
||||
( CONFIGURE_PRINT_TOOLCHAIN_LIST=true . $conf_script_to_run PRINTF=printf )
|
||||
|
||||
cat <<EOT
|
||||
|
||||
Please be aware that, when cross-compiling, the OpenJDK configure script will
|
||||
generally use 'target' where autoconf traditionally uses 'host'.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -31,9 +31,9 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(OpenJDK, jdk8, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_INIT(OpenJDK, jdk9, 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])
|
||||
@ -71,7 +72,11 @@ DATE_WHEN_GENERATED=@DATE_WHEN_GENERATED@
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
# Basic initialization that must happen first of all
|
||||
# If we are requested to print additional help, do that and then exit.
|
||||
# This must be the very first call.
|
||||
HELP_PRINT_ADDITIONAL_HELP_AND_EXIT
|
||||
|
||||
# Basic initialization that must happen first of all in the normal process.
|
||||
BASIC_INIT
|
||||
BASIC_SETUP_FUNDAMENTAL_TOOLS
|
||||
|
||||
@ -148,26 +153,41 @@ SRCDIRS_SETUP_OUTPUT_DIRS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the toolchain (compilers etc), i.e. the tools that need to be
|
||||
# cross-compilation aware.
|
||||
# Setup the toolchain (compilers etc), i.e. tools used to compile and process
|
||||
# native code.
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
TOOLCHAIN_SETUP_SYSROOT_AND_OUT_OPTIONS
|
||||
# Locate the actual tools
|
||||
TOOLCHAIN_SETUP_PATHS
|
||||
# First determine the toolchain type (compiler family)
|
||||
TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE
|
||||
|
||||
# FIXME: Currently we must test this after paths but before flags. Fix!
|
||||
# Then detect the actual binaries needed
|
||||
TOOLCHAIN_PRE_DETECTION
|
||||
TOOLCHAIN_DETECT_TOOLCHAIN_CORE
|
||||
TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA
|
||||
TOOLCHAIN_POST_DETECTION
|
||||
|
||||
# And we can test some aspects on the target using configure macros.
|
||||
# Finally do some processing after the detection phase
|
||||
TOOLCHAIN_SETUP_BUILD_COMPILERS
|
||||
TOOLCHAIN_SETUP_LEGACY
|
||||
TOOLCHAIN_MISC_CHECKS
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
TOOLCHAIN_SETUP_JTREG
|
||||
|
||||
FLAGS_SETUP_INIT_FLAGS
|
||||
|
||||
# FIXME: Currently we must test this after toolchain but before flags. Fix!
|
||||
|
||||
# Now we can test some aspects on the target using configure macros.
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
TOOLCHAIN_SETUP_COMPILER_FLAGS_MISC
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION
|
||||
FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK
|
||||
FLAGS_SETUP_COMPILER_FLAGS_MISC
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
JDKOPT_SETUP_DEBUG_SYMBOLS
|
||||
@ -188,7 +208,7 @@ LIB_SETUP_FREETYPE
|
||||
LIB_SETUP_ALSA
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_STATIC_LINK_LIBSTDCPP
|
||||
|
||||
LIB_SETUP_ON_WINDOWS
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
699
common/autoconf/flags.m4
Normal file
699
common/autoconf/flags.m4
Normal file
@ -0,0 +1,699 @@
|
||||
#
|
||||
# Copyright (c) 2011, 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
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_INIT_FLAGS],
|
||||
[
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
if test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
COMPILER_TARGET_BITS_FLAG="-q"
|
||||
else
|
||||
COMPILER_TARGET_BITS_FLAG="-m"
|
||||
fi
|
||||
AC_SUBST(COMPILER_TARGET_BITS_FLAG)
|
||||
|
||||
# FIXME: figure out if we should select AR flags depending on OS or toolchain.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
ARFLAGS="-r"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
ARFLAGS="-X64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# lib.exe is used as AR to create static libraries.
|
||||
ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
|
||||
else
|
||||
ARFLAGS=""
|
||||
fi
|
||||
AC_SUBST(ARFLAGS)
|
||||
|
||||
## Setup strip.
|
||||
# FIXME: should this really be per platform, or should it be per toolchain type?
|
||||
# strip is not provided by clang or solstudio; so guessing platform makes most sense.
|
||||
# FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
STRIPFLAGS="-g"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
STRIPFLAGS="-x"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
STRIPFLAGS="-S"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
STRIPFLAGS="-X32_64"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
POST_STRIP_CMD="$STRIP $STRIPFLAGS"
|
||||
fi
|
||||
AC_SUBST(POST_STRIP_CMD)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
# FIXME: break out into MCSFLAGS
|
||||
POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
|
||||
fi
|
||||
AC_SUBST(POST_MCS_CMD)
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CC_OUT_OPTION=-Fo
|
||||
EXE_OUT_OPTION=-out:
|
||||
LD_OUT_OPTION=-out:
|
||||
AR_OUT_OPTION=-out:
|
||||
else
|
||||
# The option used to specify the target .o,.a or .so file.
|
||||
# When compiling, how to specify the to be created object file.
|
||||
CC_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created executable.
|
||||
EXE_OUT_OPTION='-o$(SPACE)'
|
||||
# When linking, how to specify the to be created dynamically linkable library.
|
||||
LD_OUT_OPTION='-o$(SPACE)'
|
||||
# When archiving, how to specify the to be create static archive for object files.
|
||||
AR_OUT_OPTION='rcs$(SPACE)'
|
||||
fi
|
||||
AC_SUBST(CC_OUT_OPTION)
|
||||
AC_SUBST(EXE_OUT_OPTION)
|
||||
AC_SUBST(LD_OUT_OPTION)
|
||||
AC_SUBST(AR_OUT_OPTION)
|
||||
|
||||
# On Windows, we need to set RC flags.
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
RC_FLAGS="-nologo -l 0x409 -r"
|
||||
if test "x$VARIANT" = xOPT; then
|
||||
RC_FLAGS="$RC_FLAGS -d NDEBUG"
|
||||
fi
|
||||
|
||||
# The version variables used to create RC_FLAGS may be overridden
|
||||
# in a custom configure script, or possibly the command line.
|
||||
# Let those variables be expanded at make time in spec.gmk.
|
||||
# The \$ are escaped to the shell, and the $(...) variables
|
||||
# are evaluated by make.
|
||||
RC_FLAGS="$RC_FLAGS \
|
||||
-d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
|
||||
-d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
|
||||
-d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
|
||||
-d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
|
||||
-d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
|
||||
-d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
|
||||
-d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
|
||||
fi
|
||||
AC_SUBST(RC_FLAGS)
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
|
||||
CCXXFLAGS="$CCXXFLAGS -nologo"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_LIBS],
|
||||
[
|
||||
###############################################################################
|
||||
#
|
||||
# How to compile shared libraries.
|
||||
#
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
PICFLAG="-fPIC"
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Linking is different on MacOSX
|
||||
SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
|
||||
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
else
|
||||
# Default works for linux, might work on other platforms as well.
|
||||
SHARED_LIBRARY_FLAGS='-shared'
|
||||
SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME='-Xlinker -soname=[$]1'
|
||||
SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=[$]1'
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
PICFLAG="-KPIC"
|
||||
C_FLAG_REORDER='-xF'
|
||||
CXX_FLAG_REORDER='-xF'
|
||||
SHARED_LIBRARY_FLAGS="-G"
|
||||
SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN[$]1'
|
||||
SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE='-M[$]1'
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
PICFLAG="-qpic=large"
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-qmkshrobj"
|
||||
SET_EXECUTABLE_ORIGIN=""
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
PICFLAG=""
|
||||
C_FLAG_REORDER=''
|
||||
CXX_FLAG_REORDER=''
|
||||
SHARED_LIBRARY_FLAGS="-LD"
|
||||
SET_EXECUTABLE_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_ORIGIN=''
|
||||
SET_SHARED_LIBRARY_NAME=''
|
||||
SET_SHARED_LIBRARY_MAPFILE=''
|
||||
fi
|
||||
|
||||
AC_SUBST(C_FLAG_REORDER)
|
||||
AC_SUBST(CXX_FLAG_REORDER)
|
||||
AC_SUBST(SHARED_LIBRARY_FLAGS)
|
||||
AC_SUBST(SET_EXECUTABLE_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_ORIGIN)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_NAME)
|
||||
AC_SUBST(SET_SHARED_LIBRARY_MAPFILE)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
|
||||
CFLAGS_JDKLIB_EXTRA='-xstrconst'
|
||||
fi
|
||||
# The (cross) compiler is now configured, we can now test capabilities
|
||||
# of the target platform.
|
||||
])
|
||||
|
||||
# Documentation on common flags used for solstudio in HIGHEST.
|
||||
#
|
||||
# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
|
||||
# done with care, there are some assumptions below that need to
|
||||
# be understood about the use of pointers, and IEEE behavior.
|
||||
#
|
||||
# -fns: Use non-standard floating point mode (not IEEE 754)
|
||||
# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
|
||||
# -fsingle: Use single precision floating point with 'float'
|
||||
# -xalias_level=basic: Assume memory references via basic pointer types do not alias
|
||||
# (Source with excessing pointer casting and data access with mixed
|
||||
# pointer types are not recommended)
|
||||
# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
|
||||
# -xrestrict: Pointer parameters to functions do not overlap
|
||||
# (Similar to -xalias_level=basic usage, but less obvious sometimes.
|
||||
# If you pass in multiple pointers to the same data, do not use this)
|
||||
# -xlibmil: Inline some library routines
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
|
||||
# (If you expect perfect errno behavior, do not use this)
|
||||
# Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
|
||||
|
||||
# FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
|
||||
# Bug?
|
||||
#if test "x$OPENJDK_TARGET_CPU" = xsparc; then
|
||||
# CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
|
||||
# CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
|
||||
#fi
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_OPTIMIZATION],
|
||||
[
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup the opt flags for different compilers
|
||||
# and different operating systems.
|
||||
#
|
||||
|
||||
# FIXME: this was indirectly the old default, but just inherited.
|
||||
# if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# C_FLAG_DEPS="-MMD -MF"
|
||||
# fi
|
||||
|
||||
# Generate make dependency files
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
C_FLAG_DEPS="-MMD -MF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
C_FLAG_DEPS="-xMMD -xMF"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_FLAG_DEPS="-qmakedep=gcc -MF"
|
||||
fi
|
||||
CXX_FLAG_DEPS="$C_FLAG_DEPS"
|
||||
AC_SUBST(C_FLAG_DEPS)
|
||||
AC_SUBST(CXX_FLAG_DEPS)
|
||||
|
||||
# Debug symbols
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g1"
|
||||
else
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g -xs"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
CXXFLAGS_DEBUG_SYMBOLS="-g"
|
||||
fi
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
|
||||
# Optimization levels
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
|
||||
# FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
|
||||
C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
|
||||
C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
|
||||
C_O_FLAG_NONE="-xregs=no%frameptr"
|
||||
CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
|
||||
CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
|
||||
CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
|
||||
CXX_O_FLAG_NONE="-xregs=no%frameptr"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
|
||||
CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
|
||||
C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
|
||||
C_O_FLAG_NONE=""
|
||||
CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
|
||||
CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
|
||||
CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
|
||||
CXX_O_FLAG_NONE=""
|
||||
fi
|
||||
else
|
||||
# The remaining toolchains share opt flags between CC and CXX;
|
||||
# setup for C and duplicate afterwards.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# On MacOSX we optimize for size, something
|
||||
# we should do for all platforms?
|
||||
C_O_FLAG_HIGHEST="-Os"
|
||||
C_O_FLAG_HI="-Os"
|
||||
C_O_FLAG_NORM="-Os"
|
||||
C_O_FLAG_NONE=""
|
||||
else
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_NONE="-O0"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
C_O_FLAG_HIGHEST="-O3"
|
||||
C_O_FLAG_HI="-O3 -qstrict"
|
||||
C_O_FLAG_NORM="-O2"
|
||||
C_O_FLAG_NONE=""
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
C_O_FLAG_HIGHEST="-O2"
|
||||
C_O_FLAG_HI="-O1"
|
||||
C_O_FLAG_NORM="-O1"
|
||||
C_O_FLAG_NONE="-Od"
|
||||
fi
|
||||
CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
|
||||
CXX_O_FLAG_HI="$C_O_FLAG_HI"
|
||||
CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
|
||||
fi
|
||||
|
||||
AC_SUBST(C_O_FLAG_HIGHEST)
|
||||
AC_SUBST(C_O_FLAG_HI)
|
||||
AC_SUBST(C_O_FLAG_NORM)
|
||||
AC_SUBST(C_O_FLAG_NONE)
|
||||
AC_SUBST(CXX_O_FLAG_HIGHEST)
|
||||
AC_SUBST(CXX_O_FLAG_HI)
|
||||
AC_SUBST(CXX_O_FLAG_NORM)
|
||||
AC_SUBST(CXX_O_FLAG_NONE)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
|
||||
[
|
||||
# Special extras...
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
|
||||
CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
|
||||
fi
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
|
||||
CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -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=$with_extra_cflags
|
||||
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
|
||||
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
|
||||
|
||||
AC_SUBST(LEGACY_EXTRA_CFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_CXXFLAGS)
|
||||
AC_SUBST(LEGACY_EXTRA_LDFLAGS)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Now setup the CFLAGS and LDFLAGS for the JDK build.
|
||||
# Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
|
||||
#
|
||||
|
||||
# Setup compiler/platform specific flags to CFLAGS_JDK,
|
||||
# CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# these options are used for both C and C++ compiles
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
|
||||
-pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
|
||||
case $OPENJDK_TARGET_CPU_ARCH in
|
||||
arm )
|
||||
# on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
ppc )
|
||||
# on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
|
||||
;;
|
||||
* )
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
|
||||
CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
|
||||
;;
|
||||
esac
|
||||
elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
|
||||
fi
|
||||
|
||||
CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
|
||||
-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
|
||||
-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||
-DWIN32 -DIAL"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
|
||||
fi
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
|
||||
# Adjust flags according to debug level.
|
||||
case $DEBUG_LEVEL in
|
||||
fastdebug )
|
||||
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
|
||||
C_O_FLAG_HI="$C_O_FLAG_NORM"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_NORM"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
slowdebug )
|
||||
CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
|
||||
CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
|
||||
C_O_FLAG_HI="$C_O_FLAG_NONE"
|
||||
C_O_FLAG_NORM="$C_O_FLAG_NONE"
|
||||
CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
|
||||
CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
|
||||
JAVAC_FLAGS="$JAVAC_FLAGS -g"
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup LP64
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
|
||||
|
||||
# Set some common defines. These works for all compilers, but assume
|
||||
# -D is universally accepted.
|
||||
|
||||
# Setup endianness
|
||||
if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
|
||||
# The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
|
||||
# Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
|
||||
# (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
|
||||
# Note: -Dmacro is the same as #define macro 1
|
||||
# -Dmacro= is the same as #define macro
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
|
||||
fi
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
|
||||
fi
|
||||
|
||||
# Setup target OS define. Use OS target name but in upper case.
|
||||
OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
|
||||
|
||||
# Setup target CPU
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
|
||||
|
||||
# Setup debug/release defines
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
|
||||
fi
|
||||
else
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
|
||||
fi
|
||||
|
||||
# Setup release name
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
|
||||
|
||||
|
||||
# Set some additional per-OS defines.
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# FIXME: PPC64 should not be here.
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
|
||||
elif test "x$OPENJDK_TARGET_OS" = xbsd; then
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
|
||||
fi
|
||||
|
||||
# Additional macosx handling
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# FIXME: This needs to be exported in spec.gmk due to closed legacy code.
|
||||
# FIXME: clean this up, and/or move it elsewhere.
|
||||
|
||||
# Setting these parameters makes it an error to link to macosx APIs that are
|
||||
# newer than the given OS version and makes the linked binaries compatible
|
||||
# even if built on a newer version of the OS.
|
||||
# The expected format is X.Y.Z
|
||||
MACOSX_VERSION_MIN=10.7.0
|
||||
AC_SUBST(MACOSX_VERSION_MIN)
|
||||
|
||||
# The macro takes the version with no dots, ex: 1070
|
||||
# Let the flags variables get resolved in make for easier override on make
|
||||
# command line.
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup some hard coded includes
|
||||
CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
|
||||
-I${JDK_OUTPUTDIR}/include \
|
||||
-I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
|
||||
-I${JDK_TOPDIR}/src/share/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
|
||||
-I${JDK_TOPDIR}/src/share/native/common \
|
||||
-I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
|
||||
|
||||
# The shared libraries are compiled using the picflag.
|
||||
CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
|
||||
CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
|
||||
|
||||
# Executable flags
|
||||
CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
|
||||
CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
|
||||
|
||||
AC_SUBST(CFLAGS_JDKLIB)
|
||||
AC_SUBST(CFLAGS_JDKEXE)
|
||||
AC_SUBST(CXXFLAGS_JDKLIB)
|
||||
AC_SUBST(CXXFLAGS_JDKEXE)
|
||||
|
||||
# Setup LDFLAGS et al.
|
||||
#
|
||||
# Now this is odd. The JDK native libraries have to link against libjvm.so
|
||||
# On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
|
||||
# Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
|
||||
# is identical for client and server? Yes. Which is picked at runtime (client or server)?
|
||||
# Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
|
||||
# libraries will link to whatever is in memory. Yuck.
|
||||
#
|
||||
# Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
|
||||
fi
|
||||
# TODO: make -debug optional "--disable-full-debug-symbols"
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -debug"
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
|
||||
LDFLAGS_JDKLIB_SUFFIX=""
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
LDFLAGS_STACK_SIZE=1048576
|
||||
else
|
||||
LDFLAGS_STACK_SIZE=327680
|
||||
fi
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
|
||||
else
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
# If this is a --hash-style=gnu system, use --hash-style=both, why?
|
||||
# We have previously set HAS_GNU_HASH if this is the case
|
||||
if test -n "$HAS_GNU_HASH"; then
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
|
||||
fi
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
# And since we now know that the linker is gnu, then add -z defs, to forbid
|
||||
# undefined symbols in object files.
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
# When building release libraries, tell the linker optimize them.
|
||||
# Should this be supplied to the OSS linker as well?
|
||||
LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
|
||||
LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
|
||||
-L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# Add server first if available. Linking aginst client does not always produce the same results.
|
||||
# Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
|
||||
# Default to server for other variants.
|
||||
if test "x$JVM_VARIANT_SERVER" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
|
||||
elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
|
||||
else
|
||||
LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
|
||||
LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
|
||||
fi
|
||||
|
||||
LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(LDFLAGS_JDKLIB)
|
||||
AC_SUBST(LDFLAGS_JDKEXE)
|
||||
AC_SUBST(LDFLAGS_JDKLIB_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_JDKEXE_SUFFIX)
|
||||
AC_SUBST(LDFLAGS_CXX_JDK)
|
||||
])
|
||||
|
||||
|
||||
# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
|
||||
# [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the c and c++ compilers support an argument
|
||||
AC_DEFUN([FLAGS_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([FLAGS_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="${COMPILER_TARGET_BITS_FLAG}31"
|
||||
;;
|
||||
*)
|
||||
ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
|
||||
esac
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS([$ZERO_ARCHFLAG], [], [ZERO_ARCHFLAG=""])
|
||||
AC_SUBST(ZERO_ARCHFLAG)
|
||||
|
||||
# Check that the compiler supports -mX (or -qX on AIX) flags
|
||||
# Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS([${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
|
||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
|
||||
[COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
|
||||
AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
|
||||
])
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -151,14 +151,46 @@ 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
|
||||
|
||||
printf "\n"
|
||||
printf "====================================================\n"
|
||||
printf "A new configuration has been successfully created in\n"
|
||||
printf "$OUTPUT_ROOT\n"
|
||||
if test "x$no_create" != "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
|
||||
else
|
||||
printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
|
||||
fi
|
||||
else
|
||||
if test "x$IS_RECONFIGURE" != "xyes"; then
|
||||
printf "A configuration has been successfully checked but not created\n"
|
||||
else
|
||||
printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
|
||||
fi
|
||||
fi
|
||||
if test "x$CONFIGURE_COMMAND_LINE" != x; then
|
||||
printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
|
||||
else
|
||||
@ -178,8 +210,9 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* C Compiler: $CC_VENDOR version $CC_VERSION (at $CC)\n"
|
||||
printf "* C++ Compiler: $CXX_VENDOR version $CXX_VERSION (at $CXX)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
@ -212,10 +245,16 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" = "xyes"; then
|
||||
if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
|
||||
printf "WARNING: The result of this configuration has overridden an older\n"
|
||||
printf "configuration. You *should* run 'make clean' to make sure you get a\n"
|
||||
printf "proper build. Failure to do so might result in strange build problems.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
|
||||
if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
|
||||
printf "WARNING: The result of this configuration was not saved.\n"
|
||||
printf "You should run without '--no-create | -n' to create the configuration.\n"
|
||||
printf "\n"
|
||||
fi
|
||||
])
|
||||
|
@ -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@
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -332,6 +332,10 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_OPEN_OR_CUSTOM],
|
||||
fi
|
||||
|
||||
AC_SUBST(SET_OPENJDK)
|
||||
|
||||
# custom-make-dir is deprecated. Please use your custom-hook.m4 to override
|
||||
# the IncludeCustomExtension macro.
|
||||
BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
@ -424,6 +428,19 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
AC_SUBST(ENABLE_INTREE_EC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# --enable-rmiconnector-iiop
|
||||
#
|
||||
AC_ARG_ENABLE(rmiconnector-iiop, [AS_HELP_STRING([--enable-rmiconnector-iiop],
|
||||
[enable the JMX RMIConnector iiop transport @<:@disabled@:>@])])
|
||||
if test "x$enable_rmiconnector_iiop" = "xyes"; then
|
||||
RMICONNECTOR_IIOP=true
|
||||
else
|
||||
RMICONNECTOR_IIOP=false
|
||||
fi
|
||||
AC_SUBST(RMICONNECTOR_IIOP)
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Compress jars
|
||||
@ -469,7 +486,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VERSION_NUMBERS],
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(user-release-suffix, [AS_HELP_STRING([--with-user-release-suffix],
|
||||
[Add a custom string to the version string if build number isn't set.@<:@username_builddateb00@:>@])])
|
||||
[Add a custom string to the version string if build number is not set.@<:@username_builddateb00@:>@])])
|
||||
if test "x$with_user_release_suffix" = xyes; then
|
||||
AC_MSG_ERROR([Release suffix must have a value])
|
||||
elif test "x$with_user_release_suffix" != x; then
|
||||
@ -589,14 +606,4 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
|
||||
AC_SUBST(ENABLE_DEBUG_SYMBOLS)
|
||||
AC_SUBST(ZIP_DEBUGINFO_FILES)
|
||||
AC_SUBST(CFLAGS_DEBUG_SYMBOLS)
|
||||
AC_SUBST(CXXFLAGS_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
# Support for customization of the build process. Some build files
|
||||
# will include counterparts from this location, if they exist. This allows
|
||||
# for a degree of customization of the build targets and the rules/recipes
|
||||
# to create them
|
||||
AC_ARG_WITH([custom-make-dir], [AS_HELP_STRING([--with-custom-make-dir],
|
||||
[use this directory for custom build/make files])], [CUSTOM_MAKE_DIR=$with_custom_make_dir])
|
||||
AC_SUBST(CUSTOM_MAKE_DIR)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -562,7 +562,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
fi
|
||||
|
||||
if test "x${with_alsa}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa}/lib -lalsa"
|
||||
ALSA_LIBS="-L${with_alsa}/lib -lasound"
|
||||
ALSA_CFLAGS="-I${with_alsa}/include"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
@ -571,7 +571,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ALSA],
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x${with_alsa_lib}" != x; then
|
||||
ALSA_LIBS="-L${with_alsa_lib} -lalsa"
|
||||
ALSA_LIBS="-L${with_alsa_lib} -lasound"
|
||||
ALSA_FOUND=yes
|
||||
fi
|
||||
if test "x$ALSA_FOUND" = xno; then
|
||||
@ -876,14 +876,25 @@ AC_DEFUN_ONCE([LIB_SETUP_STATIC_LINK_LIBSTDCPP],
|
||||
fi
|
||||
|
||||
# libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$LIBCXX" = x; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
|
||||
LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
|
||||
fi
|
||||
|
||||
# TODO better (platform agnostic) test
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$GCC" = xyes; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
LIBCXX="-lstdc++"
|
||||
fi
|
||||
|
||||
AC_SUBST(LIBCXX)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([LIB_SETUP_ON_WINDOWS],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
TOOLCHAIN_SETUP_MSVCR_DLL
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
|
||||
BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
|
||||
fi
|
||||
AC_SUBST(MSVCR_DLL)
|
||||
])
|
||||
|
@ -48,6 +48,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@
|
||||
|
||||
@ -67,8 +70,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
|
||||
@ -133,10 +136,13 @@ endif
|
||||
SYS_ROOT:=@SYS_ROOT@
|
||||
|
||||
# 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@
|
||||
@ -147,9 +153,6 @@ HOTSPOT_TOPDIR:=@HOTSPOT_TOPDIR@
|
||||
NASHORN_TOPDIR:=@NASHORN_TOPDIR@
|
||||
COPYRIGHT_YEAR:=@COPYRIGHT_YEAR@
|
||||
|
||||
# Location where build customization files may be found
|
||||
CUSTOM_MAKE_DIR:=@CUSTOM_MAKE_DIR@
|
||||
|
||||
# Information gathered from the version.numbers file.
|
||||
JDK_MAJOR_VERSION:=@JDK_MAJOR_VERSION@
|
||||
JDK_MINOR_VERSION:=@JDK_MINOR_VERSION@
|
||||
@ -172,7 +175,7 @@ RUNTIME_NAME=$(PRODUCT_NAME) $(PRODUCT_SUFFIX)
|
||||
COOKED_BUILD_NUMBER:=@COOKED_BUILD_NUMBER@
|
||||
# These variables need to be generated here so that MILESTONE and
|
||||
# JDK_BUILD_NUMBER can be overridden on the make command line.
|
||||
ifeq ($(MILESTONE),)
|
||||
ifeq ($(MILESTONE), fcs)
|
||||
RELEASE=$(JDK_VERSION)$(BUILD_VARIANT_RELEASE)
|
||||
else
|
||||
RELEASE=$(JDK_VERSION)-$(MILESTONE)$(BUILD_VARIANT_RELEASE)
|
||||
@ -286,6 +289,9 @@ CACERTS_FILE=@CACERTS_FILE@
|
||||
# Enable unlimited crypto policy
|
||||
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
|
||||
|
||||
# Enable RMIConnector IIOP transport
|
||||
RMICONNECTOR_IIOP=@RMICONNECTOR_IIOP@
|
||||
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
@ -294,11 +300,8 @@ OPENWIN_HOME:=@OPENWIN_HOME@
|
||||
# The lowest required version of macosx to enforce compatiblity for
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
|
||||
# There are two types: CC or CL
|
||||
# CC is gcc and others behaving reasonably similar.
|
||||
# CL is cl.exe only.
|
||||
COMPILER_TYPE:=@COMPILER_TYPE@
|
||||
COMPILER_NAME:=@COMPILER_NAME@
|
||||
# Toolchain type: gcc, clang, solstudio, lxc, microsoft...
|
||||
TOOLCHAIN_TYPE:=@TOOLCHAIN_TYPE@
|
||||
|
||||
# Option used to tell the compiler whether to create 32- or 64-bit executables
|
||||
COMPILER_TARGET_BITS_FLAG:=@COMPILER_TARGET_BITS_FLAG@
|
||||
@ -438,7 +441,7 @@ OBJ_SUFFIX:=@OBJ_SUFFIX@
|
||||
POST_STRIP_CMD:=@POST_STRIP_CMD@
|
||||
POST_MCS_CMD:=@POST_MCS_CMD@
|
||||
|
||||
JAVA_FLAGS:=@BOOT_JDK_JVMARGS@
|
||||
JAVA_FLAGS:=@JAVA_FLAGS@
|
||||
|
||||
JAVA=@FIXPATH@ @JAVA@ $(JAVA_FLAGS)
|
||||
|
||||
@ -674,5 +677,14 @@ JRE_BUNDLE_SUBDIR=j2re-bundle/jre$(JDK_VERSION).jre/Contents
|
||||
JDK_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_BUNDLE_SUBDIR)
|
||||
JRE_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_BUNDLE_SUBDIR)
|
||||
|
||||
# This macro is called to allow inclusion of closed source counterparts.
|
||||
# Unless overridden in closed sources, it expands to nothing.
|
||||
# Usage: This function is called in an open makefile, with the following
|
||||
# arguments:
|
||||
# $1 the name of the repo, or empty if the top-level repo.
|
||||
# $2 the name of the makefile
|
||||
define IncludeCustomExtension
|
||||
endef
|
||||
|
||||
# Include the custom-spec.gmk file if it exists
|
||||
-include $(dir @SPEC@)/custom-spec.gmk
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 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
|
||||
@ -88,7 +88,7 @@ if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
|
||||
fi
|
||||
done
|
||||
if [ "${pull_extra_base}" != "" ] ; then
|
||||
subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
|
||||
subrepos_extra="closed jdk/src/closed jdk/make/closed jdk/test/closed hotspot/make/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
|
||||
pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
|
||||
pull_extra="${pull_extra_base}/${pull_default_tail}"
|
||||
for i in ${subrepos_extra} ; do
|
||||
|
9
configure
vendored
9
configure
vendored
@ -1,6 +1,6 @@
|
||||
#!/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 "$@"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -31,8 +31,8 @@ include $(SPEC)
|
||||
# Load the vital tools for all the makefiles.
|
||||
include $(SRC_ROOT)/make/common/MakeBase.gmk
|
||||
|
||||
# Include the corresponding custom file, if present.
|
||||
-include $(CUSTOM_MAKE_DIR)/Main.gmk
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, , Main.gmk))
|
||||
|
||||
### Clean up from previous run
|
||||
|
||||
@ -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)
|
||||
@ -235,6 +236,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
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 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
|
||||
@ -31,7 +31,7 @@ ifeq (,$(_MAKEBASE_GMK))
|
||||
$(error You must include MakeBase.gmk prior to including NativeCompilation.gmk)
|
||||
endif
|
||||
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
ifneq ($(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
|
||||
ifeq ($(COMPILER_TYPE),CC)
|
||||
ifneq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$$(call COMPILING_MSG,$2,$$($1_TARGET))
|
||||
# The Sun studio compiler doesn't output the full path to the object file in the
|
||||
# The Solaris 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:" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user