--- old/common/autoconf/basics.m4 2016-02-11 12:16:21.499847035 +0100 +++ new/common/autoconf/basics.m4 2016-02-11 12:16:21.407847030 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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,11 +36,11 @@ # "ARG_FOO". # # The generated function can be called like this: -# MYFUNC(FOO: [foo-val], BAR: -# [ +# MYFUNC(FOO: [foo-val], +# BAR: [ # $ECHO hello world # ]) -# +# Note that the argument value must start on the same line as the argument name. # # Argument 1: Name of the function to define # Argument 2: List of legal named arguments, with a * prefix for required arguments --- old/common/autoconf/build-performance.m4 2016-02-11 12:16:21.883847056 +0100 +++ new/common/autoconf/build-performance.m4 2016-02-11 12:16:21.791847051 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -72,7 +72,7 @@ FOUND_MEM=yes elif test -x /usr/sbin/prtconf; then # Looks like a Solaris or AIX system - MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'` + MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [[Ss]]ize" | awk '{ print [$]3 }'` FOUND_MEM=yes elif test -x /usr/sbin/sysctl; then # Looks like a MacOSX system @@ -260,8 +260,8 @@ # AC_DEFUN([BPERF_RUN_ICECC_CREATE_ENV], [ - cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ - && ${ICECC_CREATE_ENV} $1 > $2 2>&1 + ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \ + && ${ICECC_CREATE_ENV} $1 > $2 2>&1 ) if test "$?" != "0"; then AC_MSG_NOTICE([icecc-create-env output:]) cat $2 --- old/common/autoconf/configure 2016-02-11 12:16:22.275847077 +0100 +++ new/common/autoconf/configure 2016-02-11 12:16:22.171847072 +0100 @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, 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 @@ -283,8 +283,9 @@ EOT - # Print list of toolchains. This must be done by the autoconf script. - ( CONFIGURE_PRINT_TOOLCHAIN_LIST=true . $conf_script_to_run PRINTF=printf ) + # Print additional help, e.g. a list of toolchains. + # This must be done by the autoconf script. + ( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $conf_script_to_run PRINTF=printf ) cat <@])], + [set the debug level (release, fastdebug, slowdebug, optimized) @<:@release@:>@])], [ DEBUG_LEVEL="${withval}" if test "x$ENABLE_DEBUG" = xyes; then @@ -79,7 +79,7 @@ test "x$DEBUG_LEVEL" != xoptimized && \ test "x$DEBUG_LEVEL" != xfastdebug && \ test "x$DEBUG_LEVEL" != xslowdebug; then - AC_MSG_ERROR([Allowed debug levels are: release, fastdebug and slowdebug]) + AC_MSG_ERROR([Allowed debug levels are: release, fastdebug, slowdebug and optimized]) fi ]) @@ -176,6 +176,22 @@ fi AC_SUBST(UNLIMITED_CRYPTO) + # Should we build the serviceability agent (SA)? + INCLUDE_SA=true + if test "x$JVM_VARIANT_ZERO" = xtrue ; then + INCLUDE_SA=false + fi + if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then + INCLUDE_SA=false + fi + if test "x$OPENJDK_TARGET_OS" = xaix ; then + INCLUDE_SA=false + fi + if test "x$OPENJDK_TARGET_CPU" = xaarch64; then + INCLUDE_SA=false + fi + AC_SUBST(INCLUDE_SA) + # Compress jars COMPRESS_JARS=false @@ -222,7 +238,7 @@ AC_MSG_CHECKING([what type of native debug symbols to use]) AC_ARG_WITH([native-debug-symbols], [AS_HELP_STRING([--with-native-debug-symbols], - [set the native debug symbol configuration (none, internal, external, zipped) @<:@zipped@:>@])], + [set the native debug symbol configuration (none, internal, external, zipped) @<:@varying@:>@])], [ if test "x$OPENJDK_TARGET_OS" = xaix; then if test "x$withval" = xexternal || test "x$withval" = xzipped; then @@ -235,7 +251,11 @@ # AIX doesn't support 'zipped' so use 'internal' as default with_native_debug_symbols="internal" else - with_native_debug_symbols="zipped" + if test "x$STATIC_BUILD" = xtrue; then + with_native_debug_symbols="none" + else + with_native_debug_symbols="zipped" + fi fi ]) NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols @@ -258,7 +278,7 @@ # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true DEBUG_BINARIES=false STRIP_POLICY=min_strip - + elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then COMPILE_WITH_DEBUG_SYMBOLS=false COPY_DEBUG_SYMBOLS=false @@ -275,7 +295,7 @@ DEBUG_BINARIES=true STRIP_POLICY=no_strip STRIP="" - + elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then @@ -356,7 +376,7 @@ ################################################################################ # -# Static build support. When enabled will generate static +# Static build support. When enabled will generate static # libraries instead of shared libraries for all JDK libs. # AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD], --- old/common/autoconf/spec.gmk.in 2016-02-11 12:16:24.499847197 +0100 +++ new/common/autoconf/spec.gmk.in 2016-02-11 12:16:24.403847192 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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,10 +36,12 @@ # A self-referential reference to this file. SPEC:=@SPEC@ -# SPACE is defined in MakeBase.gmk, but it is also used in := rules here for some -# toolchains, and is needed if MakeBase.gmk is not included before this file. +# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in +# some definitions here, and are needed if MakeBase.gmk is not included before +# this file. X:= SPACE:=$(X) $(X) +COMMA:=, # What make to use for main processing, after bootstrapping top-level Makefile. MAKE := @MAKE@ @@ -350,10 +352,8 @@ CXXFLAGS_JDKEXE:=@CXXFLAGS_JDKEXE@ CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@ -#CXXFLAGS:=@CXXFLAGS@ CPP:=@FIXPATH@ @CPP@ -#CPPFLAGS:=@CPPFLAGS@ # The linker can be gcc or ld on unix systems, or link.exe on windows systems. LD:=@FIXPATH@ @LD@ @@ -501,7 +501,7 @@ INTERIM_LANGTOOLS_JAR = $(BUILDTOOLS_OUTPUTDIR)/interim_langtools.jar INTERIM_LANGTOOLS_ARGS = "-Xbootclasspath/p:$(INTERIM_LANGTOOLS_JAR)" -cp $(INTERIM_LANGTOOLS_JAR) NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) com.sun.tools.javac.Main -NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main +NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) jdk.javadoc.internal.tool.Main # Base flags for RC # Guarding this against resetting value. Legacy make files include spec multiple --- old/common/autoconf/toolchain.m4 2016-02-11 12:16:24.879847218 +0100 +++ new/common/autoconf/toolchain.m4 2016-02-11 12:16:24.779847212 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -50,6 +50,67 @@ TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio" TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++" +# Minimum supported versions, empty means unspecified +TOOLCHAIN_MINIMUM_VERSION_clang="3.2" +TOOLCHAIN_MINIMUM_VERSION_gcc="4.3" +TOOLCHAIN_MINIMUM_VERSION_microsoft="" +TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12" +TOOLCHAIN_MINIMUM_VERSION_xlc="" + +# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called. +# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER. +AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS], +[ + if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then + AC_MSG_WARN([C and C++ compiler has different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER.]) + AC_MSG_WARN([This typically indicates a broken setup, and is not supported]) + fi + + # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal. + if [ [[ "$CC_VERSION_NUMBER" =~ (.*\.){3} ]] ]; then + AC_MSG_WARN([C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong.]) + fi + + if [ [[ "$CC_VERSION_NUMBER" =~ [0-9]{6} ]] ]; then + AC_MSG_WARN([C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong.]) + fi + + COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$CC_VERSION_NUMBER"` +]) + +# Check if the configured compiler (C and C++) is of a specific version or +# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before. +# +# Arguments: +# VERSION: The version string to check against the found version +# IF_AT_LEAST: block to run if the compiler is at least this version (>=) +# IF_OLDER_THAN: block to run if the compiler is older than this version (<) +BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION], + [*VERSION IF_AT_LEAST IF_OLDER_THAN], [$@], +[ + # Need to assign to a variable since m4 is blocked from modifying parts in []. + REFERENCE_VERSION=ARG_VERSION + + if [ [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ]; then + AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only three parts (X.Y.Z) is supported]) + fi + + if [ [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ]; then + AC_MSG_ERROR([Internal errror: Cannot compare to ARG_VERSION, only parts < 99999 is supported]) + fi + + # Version comparison method inspired by http://stackoverflow.com/a/24067243 + COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", [$]1, [$]2, [$]3) }' <<< "$REFERENCE_VERSION"` + + if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then + : + ARG_IF_AT_LEAST + else + : + ARG_IF_OLDER_THAN + fi +]) + # Setup a number of variables describing how native output files are # named on this platform/toolchain. AC_DEFUN([TOOLCHAIN_SETUP_FILENAME_PATTERNS], @@ -175,6 +236,8 @@ # Use indirect variable referencing toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE TOOLCHAIN_DESCRIPTION=${!toolchain_var_name} + toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE + TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name} toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE TOOLCHAIN_CC_BINARY=${!toolchain_var_name} toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE @@ -217,8 +280,14 @@ export INCLUDE="$VS_INCLUDE" export LIB="$VS_LIB" else - # Currently we do not define this for other toolchains. This might change as the need arise. - TOOLCHAIN_VERSION= + if test "x$XCODE_VERSION_OUTPUT" != x; then + # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION + TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '` + TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode" + else + # Currently we do not define this for other toolchains. This might change as the need arise. + TOOLCHAIN_VERSION= + fi fi AC_SUBST(TOOLCHAIN_VERSION) @@ -257,7 +326,7 @@ # # $1 = compiler to test (CC or CXX) # $2 = human readable name of compiler (C or C++) -AC_DEFUN([TOOLCHAIN_CHECK_COMPILER_VERSION], +AC_DEFUN([TOOLCHAIN_EXTRACT_COMPILER_VERSION], [ COMPILER=[$]$1 COMPILER_NAME=$2 @@ -354,7 +423,7 @@ # Collapse compiler output into a single line COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT` COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \ - $SED -e 's/^.*clang version \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'` + $SED -e 's/^.* version \(@<:@1-9@:>@@<:@0-9.@:>@*\).*$/\1/'` else AC_MSG_ERROR([Unknown toolchain type $TOOLCHAIN_TYPE.]) fi @@ -451,7 +520,7 @@ fi fi - TOOLCHAIN_CHECK_COMPILER_VERSION([$1], [$COMPILER_NAME]) + TOOLCHAIN_EXTRACT_COMPILER_VERSION([$1], [$COMPILER_NAME]) ]) # Detect the core components of the toolchain, i.e. the compilers (CC and CXX), @@ -471,6 +540,20 @@ # Now that we have resolved CXX ourself, let autoconf have its go at it AC_PROG_CXX([$CXX]) + # This is the compiler version number on the form X.Y[.Z] + AC_SUBST(CC_VERSION_NUMBER) + AC_SUBST(CXX_VERSION_NUMBER) + + TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS + + if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then + TOOLCHAIN_CHECK_COMPILER_VERSION(VERSION: $TOOLCHAIN_MINIMUM_VERSION, + IF_OLDER_THAN: [ + AC_MSG_WARN([You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration.]) + ] + ) + fi + # # Setup the preprocessor (CPP and CXXCPP) # --- old/common/bin/compare.sh 2016-02-11 12:16:25.263847238 +0100 +++ new/common/bin/compare.sh 2016-02-11 12:16:25.171847233 +0100 @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2012, 2016, 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 @@ -746,6 +746,9 @@ elif [ "$OPENJDK_TARGET_OS" = "aix" ]; then $OBJDUMP -T $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other $OBJDUMP -T $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this + elif [ "$OPENJDK_TARGET_OS" = "macosx" ]; then + $NM -j $ORIG_OTHER_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other + $NM -j $ORIG_THIS_FILE 2> /dev/null | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this else $NM -a $ORIG_OTHER_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.other $NM -a $ORIG_THIS_FILE 2> /dev/null | $GREP -v $NAME | $AWK '{print $2, $3, $4, $5}' | $SYM_SORT_CMD > $WORK_FILE_BASE.symbols.this @@ -1020,14 +1023,6 @@ ################################################################################ # Initiate configuration -COMPARE_ROOT=/tmp/cimages.$USER -$MKDIR -p $COMPARE_ROOT -if [ "$OPENJDK_TARGET_OS" = "windows" ]; then - if [ "$(uname -o)" = "Cygwin" ]; then - COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT) - fi -fi - THIS="$SCRIPT_DIR" echo "$THIS" THIS_SCRIPT="$0" @@ -1050,6 +1045,7 @@ echo "" echo "--sort-symbols Sort all symbols before comparing" echo "--strip Strip all binaries before comparing" + echo "--clean Clean all previous comparison results first" echo "" echo "[FILTER] List filenames in the image to compare, works for jars, zips, libs and execs" echo "Example:" @@ -1149,6 +1145,9 @@ --strip) STRIP_ALL=true ;; + --clean) + CLEAN_OUTPUT=true + ;; *) CMP_NAMES=false CMP_PERMS=false @@ -1167,6 +1166,23 @@ shift done +if [ "$STRIP_ALL" = "true" ] && [ -z "$STRIP" ]; then + echo Warning: Not stripping even with --strip, since strip is missing on this platform + STRIP_ALL=false +fi + +COMPARE_ROOT=/tmp/cimages.$USER +if [ "$CLEAN_OUTPUT" = "true" ]; then + echo Cleaning old output in $COMPARE_ROOT. + $RM -rf $COMPARE_ROOT +fi +$MKDIR -p $COMPARE_ROOT +if [ "$OPENJDK_TARGET_OS" = "windows" ]; then + if [ "$(uname -o)" = "Cygwin" ]; then + COMPARE_ROOT=$(cygpath -msa $COMPARE_ROOT) + fi +fi + if [ "$CMP_2_ZIPS" = "true" ]; then THIS_DIR="$(dirname $THIS_FILE)" THIS_DIR="$(cd "$THIS_DIR" > /dev/null && pwd )" --- old/make/Main.gmk 2016-02-11 12:16:25.659847260 +0100 +++ new/make/Main.gmk 2016-02-11 12:16:25.559847254 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -431,7 +431,7 @@ # The annotation processing for jdk.vm.ci needs java.base classes from the # current JDK. - jdk.vm.ci-gensrc-hotspot: java.base-java + jdk.vm.ci-gensrc-hotspot: java.base-java # Explicitly add dependencies for special targets java.base-java: unpack-sec --- old/make/StripBinaries.gmk 2016-02-11 12:16:26.035847280 +0100 +++ new/make/StripBinaries.gmk 2016-02-11 12:16:25.939847275 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2014, 2016, 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 @@ -57,8 +57,12 @@ NO_STRIP_CMDS_FILTER += %.cgi # Don't include debug info for executables. + +# OS X stores symbol information in a .dylib file inside a .dSYM directory - +# that file should not be stripped, so we prune the tree at the .dSYM directory. ALL_CMDS_SRC := $(filter-out %.bc %.debuginfo %.diz %.map %.pdb, \ - $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds -type f -o -type l)) + $(shell $(FIND) $(SUPPORT_OUTPUTDIR)/modules_cmds \( -type f -o -type l \) \ + -print -o -name "*.dSYM" -prune)) COPY_CMDS_SRC := $(filter $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) STRIP_CMDS_SRC := $(filter-out $(NO_STRIP_CMDS_FILTER), $(ALL_CMDS_SRC)) --- old/make/common/NativeCompilation.gmk 2016-02-11 12:16:26.411847300 +0100 +++ new/make/common/NativeCompilation.gmk 2016-02-11 12:16:26.311847295 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -187,25 +187,30 @@ # param 6 = the c++ flags to the compiler # param 7 = the c++ compiler # param 8 = the flags to the assembler + # param 9 = set to disable THIS_FILE + + ifeq ($9, ) + $1_$2_THIS_FILE = -DTHIS_FILE='"$$( $$($1_RES_DEP).raw 2>&1 || true ; \ @@ -654,12 +663,11 @@ endif endif - # mapfile doesnt seem to be implemented on macosx (yet??) - ifneq ($(OPENJDK_TARGET_OS),macosx) + ifneq ($(DISABLE_MAPFILES),true) + $1_REAL_MAPFILE := $$($1_MAPFILE) ifneq ($(OPENJDK_TARGET_OS),windows) - $1_REAL_MAPFILE:=$$($1_MAPFILE) ifneq (,$$($1_REORDER)) - $1_REAL_MAPFILE:=$$($1_OBJECT_DIR)/mapfile + $1_REAL_MAPFILE := $$($1_OBJECT_DIR)/mapfile $$($1_REAL_MAPFILE) : $$($1_MAPFILE) $$($1_REORDER) $$(MKDIR) -p $$(@D) @@ -689,7 +697,8 @@ # The dependency on TARGET is needed on windows for debuginfo files # to be rebuilt properly. $$($1_OUTPUT_DIR)/% : $$($1_OBJECT_DIR)/% $$($1_TARGET) - $(CP) $$< $$@ + # Use cp -r since on macosx, the dSYM is a directory + $(CP) -r $$< $$@ endif # Generate debuginfo files. @@ -815,13 +824,23 @@ $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) # Generating a static library, ie object file archive. - $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) + ifeq ($(STATIC_BUILD), true) + ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) + STATIC_MAPFILE_DEP := $$($1_MAPFILE) + endif + endif + + $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_VARDEPS_FILE) $$(STATIC_MAPFILE_DEP) $$(call LogInfo, Archiving $$($1_STATIC_LIBRARY)) $$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_link, \ $$($1_AR) $$($1_ARFLAGS) $(AR_OUT_OPTION)$$($1_TARGET) $$($1_ALL_OBJS) \ $$($1_RES)) ifeq ($(STATIC_BUILD), true) - $(GetSymbols) + ifeq ($$($1_USE_MAPFILE_FOR_SYMBOLS), true) + $(CP) $$($1_MAPFILE) $$(@D)/$$(basename $$(@F)).symbols + else + $(GetSymbols) + endif endif endif @@ -836,6 +855,12 @@ $1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, \ $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).vardeps) + ifeq ($(OPENJDK_TARGET_OS), windows) + ifeq ($$($1_EMBED_MANIFEST), true) + $1_EXTRA_LDFLAGS += -manifest:embed + endif + endif + $$($1_TARGET): $$($1_ALL_OBJS) $$($1_RES) $$($1_MANIFEST) \ $$($1_VARDEPS_FILE) $$(call LogInfo, Linking executable $$($1_BASENAME)) --- old/hotspot/make/lib/Lib-jdk.hotspot.agent.gmk 2016-02-11 12:16:26.823847322 +0100 +++ new/hotspot/make/lib/Lib-jdk.hotspot.agent.gmk 2016-02-11 12:16:26.699847316 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2016, 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 @@ -29,6 +29,10 @@ ################################################################################ +ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), ) + DISABLE_MAPFILES := true +endif + SA_TOPDIR := $(HOTSPOT_TOPDIR)/src/jdk.hotspot.agent # Defaults for most platforms --- old/hotspot/src/os/windows/vm/version.rc 2016-02-11 12:16:27.231847344 +0100 +++ new/hotspot/src/os/windows/vm/version.rc 2016-02-11 12:16:27.115847338 +0100 @@ -1,5 +1,5 @@ // -// Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. +// Copyright (c) 2004, 2016, 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 @@ -19,7 +19,7 @@ // 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. -// +// // #include "winresrc.h" @@ -36,7 +36,7 @@ // VS_VERSION_INFO VERSIONINFO - FILEVERSION HS_VER + FILEVERSION JDK_VER PRODUCTVERSION JDK_VER FILEFLAGSMASK 0x3fL #ifdef _DEBUG @@ -56,7 +56,7 @@ BEGIN VALUE "CompanyName", XSTR(HS_COMPANY) "\0" VALUE "FileDescription", XSTR(HS_FILEDESC) "\0" - VALUE "FileVersion", XSTR(HS_DOTVER) "\0" + VALUE "FileVersion", XSTR(JDK_DOTVER) "\0" VALUE "Full Version", XSTR(HS_BUILD_ID) "\0" VALUE "InternalName", XSTR(HS_INTERNAL_NAME) "\0" VALUE "LegalCopyright", XSTR(HS_COPYRIGHT) "\0" --- old/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2016-02-11 12:16:27.743847372 +0100 +++ new/jdk/make/gensrc/Gensrc-jdk.jdi.gmk 2016-02-11 12:16:27.535847361 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -78,11 +78,9 @@ $(install-file) # Some platforms don't have the serviceability agent -ifeq (, $(filter $(OPENJDK_TARGET_OS)-$(OPENJDK_TARGET_CPU), aix-ppc64)) - ifneq ($(JVM_VARIANT_ZERO), true) - GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \ - $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector - endif +ifeq ($(INCLUDE_SA), true) + GENSRC_JDK_JDI += $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/META-INF/services/com.sun.jdi.connect.Connector \ + $(SUPPORT_OUTPUTDIR)/gensrc/jdk.hotspot.agent/META-INF/services/com.sun.jdi.connect.Connector endif ################################################################################ --- old/jdk/make/launcher/LauncherCommon.gmk 2016-02-11 12:16:28.299847402 +0100 +++ new/jdk/make/launcher/LauncherCommon.gmk 2016-02-11 12:16:28.099847391 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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 @@ -26,8 +26,12 @@ include NativeCompilation.gmk ifeq ($(OPENJDK_TARGET_OS), macosx) + DISABLE_MAPFILES := true ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN) else + ifeq ($(OPENJDK_TARGET_OS), windows) + DISABLE_MAPFILES := true + endif ORIGIN_ARG := $(call SET_EXECUTABLE_ORIGIN,/../lib$(OPENJDK_TARGET_CPU_LIBDIR)/jli) # Applications expect to be able to link against libjawt without invoking --- old/jdk/make/lib/LibCommon.gmk 2016-02-11 12:16:28.879847433 +0100 +++ new/jdk/make/lib/LibCommon.gmk 2016-02-11 12:16:28.643847420 +0100 @@ -1,5 +1,5 @@ # -# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2011, 2016, 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,6 +36,10 @@ # elegant solution to this. WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib +ifneq ($(findstring $(OPENJDK_TARGET_OS), macosx windows), ) + DISABLE_MAPFILES := true +endif + ################################################################################ # Find the default set of src dirs for a native library. # Param 1 - module name