This commit is contained in:
Phil Race 2014-02-20 16:10:56 -08:00
commit aed611c5d2
10 changed files with 916 additions and 1001 deletions

File diff suppressed because it is too large Load Diff

@ -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
@ -36,7 +36,7 @@ else
fi
if test "x$CUSTOM_CONFIG_DIR" = "x"; then
custom_script_dir="$script_dir/../../jdk/make/closed/autoconf"
custom_script_dir="$script_dir/../../closed/autoconf"
else
custom_script_dir=$CUSTOM_CONFIG_DIR
fi

@ -558,9 +558,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],

@ -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
@ -28,11 +28,10 @@ if test "x$BASH_VERSION" = x; then
exit 1
fi
CONFIGURE_COMMAND_LINE="$@"
conf_script_dir=`dirname $0`
if [ "$CUSTOM_CONFIG_DIR" = "" ]; then
conf_custom_script_dir="$conf_script_dir/../../jdk/make/closed/autoconf"
conf_custom_script_dir="$conf_script_dir/../../closed/autoconf"
else
conf_custom_script_dir=$CUSTOM_CONFIG_DIR
fi
@ -110,14 +109,40 @@ fi
if test "x$conf_debug_configure" = xtrue; then
conf_debug_configure=recursive
fi
###
### Process command-line arguments
###
# Returns a shell-escaped version of the argument given.
function shell_quote() {
if [[ -n "$1" ]]; then
# Uses only shell-safe characters? No quoting needed.
# '=' is a zsh meta-character, but only in word-initial position.
if [[ "$1" =~ ^[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.:,%/+=_-]+$ && ! "$1" =~ ^= ]]; then
quoted="$1"
else
if [[ "$1" =~ [\'!] ]]; then
# csh does history expansion within single quotes, but not
# when backslash-escaped!
local quoted_quote="'\\''" quoted_exclam="'\\!'"
word="${1//\'/${quoted_quote}}"
word="${1//\!/${quoted_exclam}}"
fi
quoted="'$1'"
fi
echo "$quoted"
fi
}
conf_processed_arguments=()
conf_quoted_arguments=()
conf_openjdk_target=
for conf_option
do
# Process (and remove) our own extensions that will not be passed to autoconf
case $conf_option in
--openjdk-target=*)
conf_openjdk_target=`expr "X$conf_option" : '[^=]*=\(.*\)'`
@ -128,18 +153,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 +194,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"

@ -971,7 +971,6 @@ BASH
BASENAME
DATE_WHEN_CONFIGURED
CONFIGURE_COMMAND_LINE
CUSTOM_MAKE_DIR
target_alias
host_alias
build_alias
@ -1013,12 +1012,12 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
with_custom_make_dir
with_target_bits
with_sys_root
with_tools_dir
with_devkit
enable_openjdk_only
with_custom_make_dir
with_jdk_variant
with_jvm_interpreter
with_jvm_variants
@ -1839,7 +1838,6 @@ Optional Features:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-custom-make-dir use this directory for custom build/make files
--with-target-bits build 32-bit or 64-bit binaries (for platforms that
support it), e.g. --with-target-bits=32 [guessed]
--with-sys-root pass this sys-root to the compilers and tools (for
@ -1848,6 +1846,8 @@ Optional Packages:
cross-compiling)
--with-devkit use this directory as base for tools-dir and
sys-root (for cross-compiling)
--with-custom-make-dir Deprecated. Option is kept for backwards
compatibility and is ignored
--with-jdk-variant JDK variant to build (normal) [normal]
--with-jvm-interpreter JVM interpreter to build (template, cpp) [template]
--with-jvm-variants JVM variants (separated by commas) to build (server,
@ -1869,7 +1869,7 @@ Optional Packages:
--with-update-version Set update version value for build [b00]
--with-user-release-suffix
Add a custom string to the version string if build
number isn't set.[username_builddateb00]
number is not set.[username_builddateb00]
--with-build-number Set build number value for build [b00]
--with-boot-jdk path to Boot JDK (used to bootstrap build) [probed]
--with-boot-jdk-jvmargs specify JVM arguments to be passed to all
@ -3790,7 +3790,7 @@ pkgadd_help() {
#
# 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
@ -3841,18 +3841,6 @@ pkgadd_help() {
# 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
# Check whether --with-custom-make-dir was given.
if test "${with_custom_make_dir+set}" = set; then :
withval=$with_custom_make_dir; CUSTOM_MAKE_DIR=$with_custom_make_dir
fi
#
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@ -14317,6 +14305,18 @@ $as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes
# custom-make-dir is deprecated. Please use your custom-hook.m4 to override
# the IncludeCustomExtension macro.
# Check whether --with-custom-make-dir was given.
if test "${with_custom_make_dir+set}" = set; then :
withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
fi
# These are needed to be able to create a configuration name (and thus the output directory)
@ -14835,9 +14835,6 @@ $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is inval
ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
# Save the arguments given to us
echo "$CONFIGURE_COMMAND_LINE" > $OUTPUT_ROOT/configure-arguments
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
@ -41884,7 +41881,8 @@ fi
#
case $COMPILER_NAME in
gcc )
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
# 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
@ -50032,8 +50030,19 @@ $CHMOD +x $OUTPUT_ROOT/compare.sh
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
@ -50087,10 +50096,16 @@ $CHMOD +x $OUTPUT_ROOT/compare.sh
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

@ -157,8 +157,19 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
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
@ -212,10 +223,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
])

@ -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],
@ -482,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
@ -605,11 +609,3 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
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)

@ -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@
@ -147,9 +150,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@
@ -686,5 +686,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

@ -898,7 +898,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_COMPILER_FLAGS_FOR_JDK],
#
case $COMPILER_NAME in
gcc )
CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -W -Wall -Wno-unused -Wno-parentheses \
# 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

@ -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