Merge
This commit is contained in:
commit
65bf61852f
3
.hgtags
3
.hgtags
@ -619,3 +619,6 @@ c7d4f2849dbfb755fc5860b362a4044ea0c9e082 jdk-15+8
|
||||
4a87bb7ebfd7f6a25ec59a5982fe3607242777f8 jdk-14+35
|
||||
62b5bfef8d618e08e6f3a56cf1fb0e67e89e9cc2 jdk-15+9
|
||||
bc54620a3848c26cff9766e5e2a6e5ddab98ed18 jdk-14+36
|
||||
1bee69801aeea1a34261c93f35bc9de072a98704 jdk-15+10
|
||||
b2dd4028a6de4e40dda8b76109e4b5c6b294f980 jdk-15+11
|
||||
2ec0ff3042630ddbd3587e340fe0dd40391cb6c4 jdk-15+12
|
||||
|
11
bin/idea.sh
11
bin/idea.sh
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2009, 2020, 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
|
||||
@ -113,6 +113,14 @@ if [ "x$SPEC" = "x" ] ; then
|
||||
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
||||
VCS_TYPE="hg4idea"
|
||||
fi
|
||||
|
||||
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
||||
VCS_TYPE="Git"
|
||||
fi
|
||||
|
||||
### Replace template variables
|
||||
|
||||
NUM_REPLACEMENTS=0
|
||||
@ -137,6 +145,7 @@ add_replacement() {
|
||||
}
|
||||
|
||||
add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||
SPEC_DIR=`dirname $SPEC`
|
||||
if [ "x$CYGPATH" = "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "$SPEC_DIR"
|
||||
|
@ -473,7 +473,7 @@ CC: Sun C++ 5.13 SunOS_i386 151846-10 2015/10/30</code></pre>
|
||||
<li><code>--with-version-string=<string></code> - Specify the version string this build will be identified with.</li>
|
||||
<li><code>--with-version-<part>=<value></code> - A group of options, where <code><part></code> can be any of <code>pre</code>, <code>opt</code>, <code>build</code>, <code>major</code>, <code>minor</code>, <code>security</code> or <code>patch</code>. Use these options to modify just the corresponding part of the version string from the default, or the value provided by <code>--with-version-string</code>.</li>
|
||||
<li><code>--with-jvm-variants=<variant>[,<variant>...]</code> - Build the specified variant (or variants) of Hotspot. Valid variants are: <code>server</code>, <code>client</code>, <code>minimal</code>, <code>core</code>, <code>zero</code>, <code>custom</code>. Note that not all variants are possible to combine in a single build.</li>
|
||||
<li><code>--with-jvm-features=<feature>[,<feature>...]</code> - Use the specified JVM features when building Hotspot. The list of features will be enabled on top of the default list. For the <code>custom</code> JVM variant, this default list is empty. A complete list of available JVM features can be found using <code>bash configure --help</code>.</li>
|
||||
<li><code>--enable-jvm-feature-<feature></code> or <code>--disable-jvm-feature-<feature></code> - Include (or exclude) <code><feature></code> as a JVM feature in Hotspot. You can also specify a list of features to be enabled, separated by space or comma, as <code>--with-jvm-features=<feature>[,<feature>...]</code>. If you prefix <code><feature></code> with a <code>-</code>, it will be disabled. These options will modify the default list of features for the JVM variant(s) you are building. For the <code>custom</code> JVM variant, the default list is empty. A complete list of valid JVM features can be found using <code>bash configure --help</code>.</li>
|
||||
<li><code>--with-target-bits=<bits></code> - Create a target binary suitable for running on a <code><bits></code> platform. Use this to create 32-bit output on a 64-bit build platform, instead of doing a full cross-compile. (This is known as a <em>reduced</em> build.)</li>
|
||||
</ul>
|
||||
<p>On Linux, BSD and AIX, it is possible to override where Java by default searches for runtime/JNI libraries. This can be useful in situations where there is a special shared directory for system JNI libraries. This setting can in turn be overriden at runtime by setting the <code>java.library.path</code> property.</p>
|
||||
|
@ -684,11 +684,14 @@ features, use `bash configure --help=short` instead.)
|
||||
(or variants) of Hotspot. Valid variants are: `server`, `client`,
|
||||
`minimal`, `core`, `zero`, `custom`. Note that not all
|
||||
variants are possible to combine in a single build.
|
||||
* `--with-jvm-features=<feature>[,<feature>...]` - Use the specified JVM
|
||||
features when building Hotspot. The list of features will be enabled on top
|
||||
of the default list. For the `custom` JVM variant, this default list is
|
||||
empty. A complete list of available JVM features can be found using `bash
|
||||
configure --help`.
|
||||
* `--enable-jvm-feature-<feature>` or `--disable-jvm-feature-<feature>` -
|
||||
Include (or exclude) `<feature>` as a JVM feature in Hotspot. You can also
|
||||
specify a list of features to be enabled, separated by space or comma, as
|
||||
`--with-jvm-features=<feature>[,<feature>...]`. If you prefix `<feature>`
|
||||
with a `-`, it will be disabled. These options will modify the default list
|
||||
of features for the JVM variant(s) you are building. For the `custom` JVM
|
||||
variant, the default list is empty. A complete list of valid JVM features
|
||||
can be found using `bash configure --help`.
|
||||
* `--with-target-bits=<bits>` - Create a target binary suitable for running
|
||||
on a `<bits>` platform. Use this to create 32-bit output on a 64-bit build
|
||||
platform, instead of doing a full cross-compile. (This is known as a
|
||||
|
146
make/Bundles.gmk
146
make/Bundles.gmk
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@ -125,6 +125,13 @@ define SetupBundleFileBody
|
||||
&& $(TAR) cf - -$(TAR_INCLUDE_PARAM) $$($1_$$d_LIST_FILE) \
|
||||
$(TAR_IGNORE_EXIT_VALUE) ) \
|
||||
| ( $(CD) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) && $(TAR) xf - )$$(NEWLINE) )
|
||||
# Rename stripped pdb files
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.stripped.pdb"`; do \
|
||||
$(ECHO) Renaming $$$${f} to $$$${f%stripped.pdb}pdb $(LOG_INFO); \
|
||||
$(MV) $$$${f} $$$${f%stripped.pdb}pdb; \
|
||||
done
|
||||
endif
|
||||
# Unzip any zipped debuginfo files
|
||||
ifeq ($$($1_UNZIP_DEBUGINFO), true)
|
||||
for f in `$(FIND) $(SUPPORT_OUTPUTDIR)/bundles/$1/$$($1_SUBDIR) -name "*.diz"`; do \
|
||||
@ -183,7 +190,7 @@ endif
|
||||
|
||||
ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.pdb %.map
|
||||
SYMBOLS_EXCLUDE_PATTERN := %.debuginfo %.diz %.map
|
||||
|
||||
# There may be files with spaces in the names, so use ShellFindFiles
|
||||
# explicitly.
|
||||
@ -209,6 +216,21 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JDK_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JDK_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JDK_BUNDLE_FILES := \
|
||||
$(filter-out \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
@ -218,13 +240,14 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
, \
|
||||
$(ALL_JDK_FILES) \
|
||||
)
|
||||
|
||||
JDK_SYMBOLS_BUNDLE_FILES := \
|
||||
$(filter \
|
||||
$(JDK_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN) \
|
||||
, \
|
||||
$(filter-out \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% \
|
||||
$(JDK_IMAGE_HOMEDIR)/demo/% %.stripped.pdb \
|
||||
, \
|
||||
$(ALL_JDK_SYMBOLS_FILES) \
|
||||
) \
|
||||
@ -245,29 +268,116 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
endif
|
||||
endif
|
||||
|
||||
# Create special filter rules when dealing with debug symbols on windows
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := %.pdb
|
||||
else
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
JRE_SYMBOLS_EXCLUDE_PATTERN := \
|
||||
$(filter-out \
|
||||
%.stripped.pdb, \
|
||||
$(filter %.pdb, $(ALL_JRE_FILES)) \
|
||||
)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
JRE_BUNDLE_FILES := $(filter-out \
|
||||
$(JRE_SYMBOLS_EXCLUDE_PATTERN) \
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
################################################################################
|
||||
# JDK bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JDK_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JDK_IMAGE_DIR), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
DEST := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
JDK_SIGNED_CODE_RESOURCES := \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JDK_SIGNED_CODE_RESOURCES): $(CREATE_JDK_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JDK_BUNDLE_DIR_SIGNED) \
|
||||
$(JDK_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JDK_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
################################################################################
|
||||
# JRE bundle
|
||||
$(eval $(call SetupCopyFiles, CREATE_JRE_BUNDLE_DIR_SIGNED, \
|
||||
SRC := $(JRE_IMAGE_DIR), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
DEST := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
))
|
||||
|
||||
JRE_SIGNED_CODE_RESOURCES := \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_CONTENTS_SUBDIR)/_CodeSignature/CodeResources
|
||||
|
||||
$(JRE_SIGNED_CODE_RESOURCES): $(CREATE_JRE_BUNDLE_DIR_SIGNED)
|
||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||
--timestamp --options runtime --deep --force \
|
||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
||||
$(TOUCH) $@
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := \
|
||||
$(CREATE_JRE_BUNDLE_DIR_SIGNED) \
|
||||
$(JRE_SIGNED_CODE_RESOURCES), \
|
||||
BASE_DIRS := $(JRE_MACOSX_BUNDLE_DIR_SIGNED), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
else
|
||||
# Not a Macosx release build or code signing not available.
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||
BUNDLE_NAME := $(JDK_BUNDLE_NAME), \
|
||||
FILES := $(JDK_BUNDLE_FILES), \
|
||||
SPECIAL_INCLUDES := $(JDK_SPECIAL_INCLUDES), \
|
||||
BASE_DIRS := $(JDK_IMAGE_DIR), \
|
||||
SUBDIR := $(JDK_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
PRODUCT_TARGETS += $(BUILD_JDK_BUNDLE)
|
||||
|
||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||
BUNDLE_NAME := $(JRE_BUNDLE_NAME), \
|
||||
FILES := $(JRE_BUNDLE_FILES), \
|
||||
BASE_DIRS := $(JRE_IMAGE_DIR), \
|
||||
SUBDIR := $(JRE_BUNDLE_SUBDIR), \
|
||||
))
|
||||
|
||||
LEGACY_TARGETS += $(BUILD_JRE_BUNDLE)
|
||||
endif
|
||||
|
||||
ifeq ($(COPY_DEBUG_SYMBOLS), true)
|
||||
$(eval $(call SetupBundleFile, BUILD_JDK_SYMBOLS_BUNDLE, \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@ -40,7 +40,6 @@ $(eval $(call IncludeCustomExtension, CompileTools.gmk))
|
||||
# Use += to be able to add to this from a custom extension
|
||||
BUILD_TOOLS_SRC_DIRS += \
|
||||
$(TOPDIR)/make/jdk/src/classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_cldrconverter_classes \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/interim_tzdb_classes \
|
||||
#
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
#
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@ -58,12 +59,58 @@ $(call FillFindCache, \
|
||||
)
|
||||
|
||||
ifneq ($(LIBS_DIR), )
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
DEPS += $(call FindFiles, $(LIBS_DIR))
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs and rename them
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
LIBS_DIR_FILTERED := $(subst modules_libs,modules_libs_filtered, $(LIBS_DIR))
|
||||
FILES_LIBS := $(filter-out %.pdb, $(call FindFiles, $(LIBS_DIR))) \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(LIBS_DIR)))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_LIBS, \
|
||||
SRC := $(LIBS_DIR), \
|
||||
DEST := $(LIBS_DIR_FILTERED), \
|
||||
FILES := $(FILES_LIBS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_LIBS)
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --libs $(LIBS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CMDS_DIR), )
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
DEPS += $(call FindFiles, $(CMDS_DIR))
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
# For public debug symbols on Windows, we have to use stripped pdbs, rename them
|
||||
# and filter out a few launcher pdbs where there's a lib that goes by the same name
|
||||
rename_stripped = $(patsubst %.stripped.pdb,%.pdb,$1)
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
FILES_CMDS := $(filter-out %.pdb, $(call FindFiles, $(CMDS_DIR))) \
|
||||
$(filter-out %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb, \
|
||||
$(filter %.stripped.pdb, $(call FindFiles, $(CMDS_DIR))))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(FILES_CMDS), \
|
||||
NAME_MACRO := rename_stripped, \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+full)
|
||||
# For full debug symbols on Windows, we have to filter out a few launcher pdbs
|
||||
# where there's a lib that goes by the same name
|
||||
CMDS_DIR_FILTERED := $(subst modules_cmds,modules_cmds_filtered, $(CMDS_DIR))
|
||||
$(eval $(call SetupCopyFiles, COPY_FILTERED_CMDS, \
|
||||
SRC := $(CMDS_DIR), \
|
||||
DEST := $(CMDS_DIR_FILTERED), \
|
||||
FILES := $(filter-out %jimage.pdb %jpackage.pdb %java.pdb, \
|
||||
$(call FindFiles, $(CMDS_DIR))), \
|
||||
))
|
||||
DEPS += $(COPY_FILTERED_CMDS)
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR_FILTERED)
|
||||
else
|
||||
JMOD_FLAGS += --cmds $(CMDS_DIR)
|
||||
endif
|
||||
endif
|
||||
ifneq ($(CONF_DIR), )
|
||||
JMOD_FLAGS += --config $(CONF_DIR)
|
||||
@ -159,7 +206,15 @@ ifeq ($(INTERIM_JMOD), true)
|
||||
INTERIM_MSG := interim$(SPACE)
|
||||
endif
|
||||
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM,*.pdb,*.map}'
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), )
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.pdb,*.map}'
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.map}'
|
||||
endif
|
||||
else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@ -104,6 +104,17 @@ $(eval $(call SetupCopyFiles, COPY_CLASSLIST, \
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST)
|
||||
|
||||
# In case of shipping public debug symbols on windows, there is another temporary
|
||||
# location from where jmods are compiled - need to deploy classlist there, too.
|
||||
ifeq ($(call isTargetOs, windows)+$(SHIP_DEBUG_SYMBOLS), true+public)
|
||||
$(eval $(call SetupCopyFiles, COPY_CLASSLIST_TO_FILTERED, \
|
||||
FILES := $(CLASSLIST_FILE), \
|
||||
DEST := $(SUPPORT_OUTPUTDIR)/modules_libs_filtered/java.base, \
|
||||
))
|
||||
|
||||
TARGETS += $(COPY_CLASSLIST_TO_FILTERED)
|
||||
endif
|
||||
|
||||
# Copy the default_jli_trace.txt file into jdk.jlink
|
||||
$(eval $(call SetupCopyFiles, COPY_JLI_TRACE, \
|
||||
FILES := $(JLI_TRACE_FILE), \
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, 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
|
||||
@ -117,13 +117,14 @@ print-configurations:
|
||||
# We need a dummy rule otherwise make will complain
|
||||
@true
|
||||
|
||||
# This is not really a "help" target, but it is a global target, and those are
|
||||
# all contained in this file.
|
||||
run-test-prebuilt:
|
||||
test-prebuilt:
|
||||
@( cd $(topdir) && \
|
||||
$(MAKE) --no-print-directory -r -R -I make/common/ -f make/RunTestsPrebuilt.gmk \
|
||||
run-test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
test-prebuilt CUSTOM_MAKE_DIR=$(CUSTOM_MAKE_DIR) TEST="$(TEST)" )
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations run-test-prebuilt
|
||||
# Alias for backwards compatibility
|
||||
run-test-prebuilt: test-prebuilt
|
||||
|
||||
ALL_GLOBAL_TARGETS := help print-configurations test-prebuilt run-test-prebuilt
|
||||
|
||||
.PHONY: $(ALL_GLOBAL_TARGETS)
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, 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
|
||||
@ -208,6 +208,7 @@ ifeq ($(call isTargetOs, windows), true)
|
||||
else
|
||||
LIBS_TARGET_SUBDIR := lib
|
||||
endif
|
||||
CMDS_TARGET_SUBDIR := bin
|
||||
|
||||
# Param 1 - dir to find debuginfo files in
|
||||
FindDebuginfoFiles = \
|
||||
@ -224,12 +225,15 @@ else
|
||||
# dirs.
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
$(call FillFindCache, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds $(SUPPORT_OUTPUTDIR)/modules_libs)
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs $(SUPPORT_OUTPUTDIR)/modules_cmds)
|
||||
FindDebuginfoFiles = \
|
||||
$(if $(wildcard $1), $(call containing, .dSYM/, $(call FindFiles, $1)))
|
||||
endif
|
||||
endif
|
||||
|
||||
FILTERED_PDBS := %jimage.stripped.pdb %jpackage.stripped.pdb %java.stripped.pdb \
|
||||
%jimage.pdb %jpackage.pdb %java.pdb %jimage.map %jpackage.map %java.map
|
||||
|
||||
# Param 1 - either JDK or JRE
|
||||
SetupCopyDebuginfo = \
|
||||
$(foreach m, $(ALL_$1_MODULES), \
|
||||
@ -240,6 +244,13 @@ SetupCopyDebuginfo = \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_libs/$m), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_LIBS_DEBUGINFO_$m)) \
|
||||
$(eval $(call SetupCopyFiles, COPY_$1_CMDS_DEBUGINFO_$m, \
|
||||
SRC := $(SUPPORT_OUTPUTDIR)/modules_cmds/$m, \
|
||||
DEST := $($1_IMAGE_DIR)/$(CMDS_TARGET_SUBDIR), \
|
||||
FILES := $(filter-out $(FILTERED_PDBS), $(call FindDebuginfoFiles, \
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/$m)), \
|
||||
)) \
|
||||
$(eval $1_TARGETS += $$(COPY_$1_CMDS_DEBUGINFO_$m)) \
|
||||
)
|
||||
|
||||
# No space before argument to avoid having to put $(strip ) everywhere in
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, 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
|
||||
@ -47,7 +47,7 @@ ifeq ($(HAS_SPEC),)
|
||||
|
||||
# Here are "global" targets, i.e. targets that can be executed without having
|
||||
# a configuration. This will define ALL_GLOBAL_TARGETS.
|
||||
include $(topdir)/make/Help.gmk
|
||||
include $(topdir)/make/Global.gmk
|
||||
|
||||
# Targets provided by Init.gmk.
|
||||
ALL_INIT_TARGETS := print-modules print-targets print-configuration \
|
||||
|
@ -75,9 +75,6 @@ interim-langtools:
|
||||
interim-rmic:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileInterimRmic.gmk)
|
||||
|
||||
interim-cldrconverter:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimCLDRConverter.gmk)
|
||||
|
||||
interim-tzdb:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CopyInterimTZDB.gmk)
|
||||
|
||||
@ -92,7 +89,7 @@ buildtools-hotspot:
|
||||
+($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f CompileToolsHotspot.gmk)
|
||||
|
||||
ALL_TARGETS += buildtools-langtools interim-langtools \
|
||||
interim-rmic interim-cldrconverter interim-tzdb buildtools-jdk buildtools-modules \
|
||||
interim-rmic interim-tzdb buildtools-jdk buildtools-modules \
|
||||
buildtools-hotspot
|
||||
|
||||
################################################################################
|
||||
@ -677,7 +674,7 @@ else
|
||||
|
||||
interim-langtools: $(INTERIM_LANGTOOLS_GENSRC_TARGETS)
|
||||
|
||||
buildtools-jdk: interim-langtools interim-cldrconverter interim-tzdb
|
||||
buildtools-jdk: interim-langtools interim-tzdb
|
||||
|
||||
buildtools-hotspot: interim-langtools
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, 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
|
||||
@ -1049,7 +1049,7 @@ define SetupRunSpecialTestBody
|
||||
else ifeq ($$($1_TEST_NAME), make)
|
||||
$1_TEST_COMMAND_LINE := \
|
||||
($(CD) $(TOPDIR)/test/make && $(MAKE) $(MAKE_ARGS) -f \
|
||||
TestMake.gmk $$($1_TEST_ARGS))
|
||||
TestMake.gmk $$($1_TEST_ARGS) TEST_SUPPORT_DIR="$$($1_TEST_SUPPORT_DIR)")
|
||||
else
|
||||
$$(error Invalid special test specification: $$($1_TEST_NAME))
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2017, 2020, 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
|
||||
@ -336,7 +336,7 @@ SPEC := $(NEW_SPEC)
|
||||
|
||||
default: all
|
||||
|
||||
run-test-prebuilt:
|
||||
test-prebuilt:
|
||||
# Need to make sure the failure logs output dir exists since
|
||||
# ExecuteWithLog is called in RunTests.gmk. The PrepareFailureLogs macro
|
||||
# is unfortunately not available at this point.
|
||||
@ -351,6 +351,6 @@ run-test-prebuilt:
|
||||
@cd $(TOPDIR) && $(MAKE) $(MAKE_ARGS) -f make/RunTests.gmk run-test \
|
||||
TEST="$(TEST)"
|
||||
|
||||
all: run-test-prebuilt
|
||||
all: test-prebuilt
|
||||
|
||||
.PHONY: default all
|
||||
.PHONY: default all test-prebuilt
|
||||
|
544
make/autoconf/basic.m4
Normal file
544
make/autoconf/basic.m4
Normal file
@ -0,0 +1,544 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
m4_include([basic_tools.m4])
|
||||
m4_include([basic_windows.m4])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_INIT],
|
||||
[
|
||||
# Save the original command line. This is passed to us by the wrapper configure script.
|
||||
AC_SUBST(CONFIGURE_COMMAND_LINE)
|
||||
# AUTOCONF might be set in the environment by the user. Preserve for "make reconfigure".
|
||||
AC_SUBST(AUTOCONF)
|
||||
# Save the path variable before it gets changed
|
||||
ORIGINAL_PATH="$PATH"
|
||||
AC_SUBST(ORIGINAL_PATH)
|
||||
DATE_WHEN_CONFIGURED=`date`
|
||||
AC_SUBST(DATE_WHEN_CONFIGURED)
|
||||
AC_MSG_NOTICE([Configuration created at $DATE_WHEN_CONFIGURED.])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that there are no unprocessed overridden variables left.
|
||||
# If so, they are an incorrect argument and we will exit with an error.
|
||||
AC_DEFUN([BASIC_CHECK_LEFTOVER_OVERRIDDEN],
|
||||
[
|
||||
if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
|
||||
# Replace the separating ! with spaces before presenting for end user.
|
||||
unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
|
||||
AC_MSG_WARN([The following variables might be unknown to configure: $unknown_variables])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PATHS],
|
||||
[
|
||||
# Save the current directory this script was started from
|
||||
CONFIGURE_START_DIR="$PWD"
|
||||
|
||||
# We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
|
||||
# for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
|
||||
# was not available at that time.
|
||||
REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
|
||||
if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
|
||||
ORIGINAL_PATH="$REWRITTEN_PATH"
|
||||
AC_MSG_NOTICE([Rewriting ORIGINAL_PATH to $REWRITTEN_PATH])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
PATH_SEP=";"
|
||||
EXE_SUFFIX=".exe"
|
||||
BASIC_CHECK_PATHS_WINDOWS
|
||||
else
|
||||
PATH_SEP=":"
|
||||
EXE_SUFFIX=""
|
||||
fi
|
||||
AC_SUBST(PATH_SEP)
|
||||
AC_SUBST(EXE_SUFFIX)
|
||||
|
||||
# We get the top-level directory from the supporting wrappers.
|
||||
AC_MSG_CHECKING([for top-level directory])
|
||||
AC_MSG_RESULT([$TOPDIR])
|
||||
AC_SUBST(TOPDIR)
|
||||
AC_SUBST(CONFIGURE_START_DIR)
|
||||
|
||||
# We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
|
||||
UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
|
||||
UTIL_FIXUP_PATH(TOPDIR)
|
||||
|
||||
# Locate the directory of this script.
|
||||
AUTOCONF_DIR=$TOPDIR/make/autoconf
|
||||
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
# Outer [ ] to quote m4.
|
||||
[ USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'` ]
|
||||
AC_SUBST(USERNAME)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Evaluates platform specific overrides for devkit variables.
|
||||
# $1: Name of variable
|
||||
AC_DEFUN([BASIC_EVAL_DEVKIT_VARIABLE],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
eval $1="\${$1_${OPENJDK_TARGET_CPU}}"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
AC_ARG_WITH([devkit], [AS_HELP_STRING([--with-devkit],
|
||||
[use this devkit for compilers, tools and resources])])
|
||||
|
||||
if test "x$with_devkit" = xyes; then
|
||||
AC_MSG_ERROR([--with-devkit must have a value])
|
||||
elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
|
||||
UTIL_FIXUP_PATH([with_devkit])
|
||||
DEVKIT_ROOT="$with_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$DEVKIT_ROOT/devkit.info"; then
|
||||
. $DEVKIT_ROOT/devkit.info
|
||||
# This potentially sets the following:
|
||||
# A descriptive name of the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_NAME])
|
||||
# Corresponds to --with-extra-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_EXTRA_PATH])
|
||||
# Corresponds to --with-toolchain-path
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_TOOLCHAIN_PATH])
|
||||
# Corresponds to --with-sysroot
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_SYSROOT])
|
||||
|
||||
# Identifies the Visual Studio version in the devkit
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_VERSION])
|
||||
# The Visual Studio include environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_INCLUDE])
|
||||
# The Visual Studio lib environment variable
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VS_LIB])
|
||||
# Corresponds to --with-msvcr-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCR_DLL])
|
||||
# Corresponds to --with-msvcp-dll
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_MSVCP_DLL])
|
||||
# Corresponds to --with-ucrt-dll-dir
|
||||
BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_UCRT_DLL_DIR])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for devkit])
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
AC_MSG_RESULT([$DEVKIT_NAME in $DEVKIT_ROOT])
|
||||
else
|
||||
AC_MSG_RESULT([$DEVKIT_ROOT])
|
||||
fi
|
||||
|
||||
UTIL_PREPEND_TO_PATH([EXTRA_PATH],$DEVKIT_EXTRA_PATH)
|
||||
|
||||
# Fallback default of just /bin if DEVKIT_PATH is not defined
|
||||
if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
|
||||
DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
|
||||
fi
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
|
||||
|
||||
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
|
||||
# places for backwards compatiblity.
|
||||
if test "x$DEVKIT_SYSROOT" != x; then
|
||||
SYSROOT="$DEVKIT_SYSROOT"
|
||||
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
|
||||
elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
|
||||
SYSROOT="$DEVKIT_ROOT/$host/sys-root"
|
||||
fi
|
||||
|
||||
if test "x$DEVKIT_ROOT" != x; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
|
||||
fi
|
||||
AC_SUBST(DEVKIT_LIB_DIR)
|
||||
fi
|
||||
fi
|
||||
|
||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[alias for --with-sysroot for backwards compatability])],
|
||||
[SYSROOT=$with_sys_root]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
||||
[use this directory as sysroot])],
|
||||
[SYSROOT=$with_sysroot]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
||||
[alias for --with-toolchain-path for backwards compatibility])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
||||
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
||||
)
|
||||
|
||||
AC_ARG_WITH([extra-path], [AS_HELP_STRING([--with-extra-path],
|
||||
[prepend these directories to the default path])],
|
||||
[UTIL_PREPEND_TO_PATH([EXTRA_PATH],$with_extra_path)]
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user, this will
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
AC_PATH_PROG([XCODEBUILD], [xcodebuild], [/usr/bin/xcodebuild], [$TOOLCHAIN_PATH])
|
||||
else
|
||||
# this should result in SYSROOT being empty, unless --with-sysroot is provided
|
||||
# when only the command line tools are installed there are no SDKs, so headers
|
||||
# are copied into the system frameworks
|
||||
XCODEBUILD=
|
||||
AC_SUBST(XCODEBUILD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the platform SDK of the given name. @<:@macosx@:>@])],
|
||||
[SDKNAME=$with_sdk_name]
|
||||
)
|
||||
AC_MSG_RESULT([$SDKNAME])
|
||||
|
||||
# if toolchain path is specified then don't rely on system headers, they may not compile
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=0
|
||||
test -z "$TOOLCHAIN_PATH" && \
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
|
||||
|
||||
if test -z "$SYSROOT"; then
|
||||
if test -n "$XCODEBUILD"; then
|
||||
# if we don't have system headers, use default SDK name (last resort)
|
||||
if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
SDKNAME=${SDKNAME:-macosx}
|
||||
fi
|
||||
|
||||
if test -n "$SDKNAME"; then
|
||||
# Call xcodebuild to determine SYSROOT
|
||||
SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
|
||||
fi
|
||||
else
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
AC_MSG_ERROR([No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# warn user if --with-sdk-name was also set
|
||||
if test -n "$with_sdk_name"; then
|
||||
AC_MSG_WARN([Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
|
||||
# If no system framework headers, then SYSROOT must be set, or we won't build
|
||||
AC_MSG_ERROR([Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments.])
|
||||
fi
|
||||
|
||||
# Perform a basic sanity test
|
||||
if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
if test -z "$SYSROOT"; then
|
||||
AC_MSG_ERROR([Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly])
|
||||
else
|
||||
AC_MSG_ERROR([Invalid SDK or SYSROOT path, dependent framework headers not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# set SDKROOT too, Xcode tools will pick it up
|
||||
SDKROOT="$SYSROOT"
|
||||
AC_SUBST(SDKROOT)
|
||||
fi
|
||||
|
||||
# Prepend the extra path to the global path
|
||||
UTIL_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_MSG_RESULT([$SYSROOT])
|
||||
AC_MSG_CHECKING([for toolchain path])
|
||||
AC_MSG_RESULT([$TOOLCHAIN_PATH])
|
||||
AC_MSG_CHECKING([for extra path])
|
||||
AC_MSG_RESULT([$EXTRA_PATH])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_OUTPUT_DIR],
|
||||
[
|
||||
|
||||
AC_ARG_WITH(conf-name, [AS_HELP_STRING([--with-conf-name],
|
||||
[use this as the name of the configuration @<:@generated from important configuration options@:>@])],
|
||||
[ 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$CONFIGURE_START_DIR" = "x$TOPDIR" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$CUSTOM_ROOT" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/make/autoconf" \
|
||||
|| test "x$CONFIGURE_START_DIR" = "x$TOPDIR/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}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
|
||||
else
|
||||
AC_MSG_RESULT([in build directory with custom name])
|
||||
fi
|
||||
|
||||
if test "x$CUSTOM_ROOT" != x; then
|
||||
WORKSPACE_ROOT="${CUSTOM_ROOT}"
|
||||
else
|
||||
WORKSPACE_ROOT="${TOPDIR}"
|
||||
fi
|
||||
OUTPUTDIR="${WORKSPACE_ROOT}/build/${CONF_NAME}"
|
||||
$MKDIR -p "$OUTPUTDIR"
|
||||
if test ! -d "$OUTPUTDIR"; then
|
||||
AC_MSG_ERROR([Could not create build directory $OUTPUTDIR])
|
||||
fi
|
||||
else
|
||||
# We are running configure from outside of the src dir.
|
||||
# Then use the current directory as output dir!
|
||||
# If configuration is situated in normal build directory, just use the build
|
||||
# directory name as configuration name, otherwise use the complete path.
|
||||
if test "x${CONF_NAME}" = x; then
|
||||
CONF_NAME=`$ECHO $CONFIGURE_START_DIR | $SED -e "s!^${TOPDIR}/build/!!"`
|
||||
fi
|
||||
OUTPUTDIR="$CONFIGURE_START_DIR"
|
||||
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!
|
||||
|
||||
if test ! -e "$OUTPUTDIR/spec.gmk"; then
|
||||
# If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
|
||||
# other files
|
||||
files_present=`$LS $OUTPUTDIR`
|
||||
# Configure has already touched config.log and confdefs.h in the current dir when this check
|
||||
# is performed.
|
||||
filtered_files=`$ECHO "$files_present" \
|
||||
| $SED -e 's/config.log//g' \
|
||||
-e 's/configure.log//g' \
|
||||
-e 's/confdefs.h//g' \
|
||||
-e 's/configure-support//g' \
|
||||
-e 's/ //g' \
|
||||
| $TR -d '\n'`
|
||||
if test "x$filtered_files" != x; then
|
||||
AC_MSG_NOTICE([Current directory is $CONFIGURE_START_DIR.])
|
||||
AC_MSG_NOTICE([Since this is not the source root, configure will output the configuration here])
|
||||
AC_MSG_NOTICE([(as opposed to creating a configuration in <src_root>/build/<conf-name>).])
|
||||
AC_MSG_NOTICE([However, this directory is not empty. This is not allowed, since it could])
|
||||
AC_MSG_NOTICE([seriously mess up just about everything.])
|
||||
AC_MSG_NOTICE([Try 'cd $TOPDIR' and restart configure])
|
||||
AC_MSG_NOTICE([(or create a new empty directory and cd to it).])
|
||||
AC_MSG_ERROR([Will not continue creating configuration in $CONFIGURE_START_DIR])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([what configuration name to use])
|
||||
AC_MSG_RESULT([$CONF_NAME])
|
||||
|
||||
UTIL_FIXUP_PATH(OUTPUTDIR)
|
||||
|
||||
CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
|
||||
$MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
|
||||
|
||||
SPEC="$OUTPUTDIR/spec.gmk"
|
||||
AC_SUBST(SPEC)
|
||||
AC_SUBST(CONF_NAME)
|
||||
AC_SUBST(OUTPUTDIR)
|
||||
AC_SUBST(WORKSPACE_ROOT)
|
||||
AC_SUBST(CONFIGURESUPPORT_OUTPUTDIR)
|
||||
|
||||
# The spec.gmk file contains all variables for the make system.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in])
|
||||
# The bootcycle-spec.gmk file contains support for boot cycle builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in])
|
||||
# The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in])
|
||||
# The compare.sh is used to compare the build output to other builds.
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in])
|
||||
# The generated Makefile knows where the spec.gmk is and where the source is.
|
||||
# You can run make from the OUTPUTDIR, or from the top-level Makefile
|
||||
# which will look for generated configurations
|
||||
AC_CONFIG_FILES([$OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if build directory is on local disk. If not possible to determine,
|
||||
# we prefer to claim it's local.
|
||||
# Argument 1: directory to test
|
||||
# Argument 2: what to do if it is on local disk
|
||||
# Argument 3: what to do otherwise (remote disk or failure)
|
||||
AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
[
|
||||
# df -l lists only local disks; if the given directory is not found then
|
||||
# a non-zero exit code is given
|
||||
if test "x$DF" = x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
# msys does not have df; use Windows "net use" instead.
|
||||
IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
|
||||
if test "x$IS_NETWORK_DISK" = x; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
# No df here, say it's local
|
||||
$2
|
||||
fi
|
||||
else
|
||||
# JDK-8189619
|
||||
# df on AIX does not understand -l. On modern AIXes it understands "-T local" which
|
||||
# is the same. On older AIXes we just continue to live with a "not local build" warning.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
DF_LOCAL_ONLY_OPTION='-T local'
|
||||
else
|
||||
DF_LOCAL_ONLY_OPTION='-l'
|
||||
fi
|
||||
if $DF $DF_LOCAL_ONLY_OPTION $1 > /dev/null 2>&1; then
|
||||
$2
|
||||
else
|
||||
# In WSL, local Windows drives are considered remote by df, but we are
|
||||
# required to build into a directory accessible from windows, so consider
|
||||
# them local here.
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
if $DF $1 | $GREP -q "^[[A-Z]]:"; then
|
||||
$2
|
||||
else
|
||||
$3
|
||||
fi
|
||||
else
|
||||
$3
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check that source files have basic read permissions set. This might
|
||||
# not be the case in cygwin in certain conditions.
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
file_to_test="$TOPDIR/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_TEST_USABILITY_ISSUES],
|
||||
[
|
||||
AC_MSG_CHECKING([if build directory is on local disk])
|
||||
BASIC_CHECK_DIR_ON_LOCAL_DISK($OUTPUTDIR,
|
||||
[OUTPUT_DIR_IS_LOCAL="yes"],
|
||||
[OUTPUT_DIR_IS_LOCAL="no"])
|
||||
AC_MSG_RESULT($OUTPUT_DIR_IS_LOCAL)
|
||||
|
||||
BASIC_CHECK_SRC_PERMS
|
||||
|
||||
# Check if the user has any old-style ALT_ variables set.
|
||||
FOUND_ALT_VARIABLES=`env | grep ^ALT_`
|
||||
|
||||
# Before generating output files, test if they exist. If they do, this is a reconfigure.
|
||||
# Since we can't properly handle the dependencies for this, warn the user about the situation
|
||||
if test -e $OUTPUTDIR/spec.gmk; then
|
||||
IS_RECONFIGURE=yes
|
||||
else
|
||||
IS_RECONFIGURE=no
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Default make target
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
|
||||
[
|
||||
AC_ARG_WITH(default-make-target, [AS_HELP_STRING([--with-default-make-target],
|
||||
[set the default make target @<:@exploded-image@:>@])])
|
||||
if test "x$with_default_make_target" = "x" \
|
||||
|| test "x$with_default_make_target" = "xyes"; then
|
||||
DEFAULT_MAKE_TARGET="exploded-image"
|
||||
elif test "x$with_default_make_target" = "xno"; then
|
||||
AC_MSG_ERROR([--without-default-make-target is not a valid option])
|
||||
else
|
||||
DEFAULT_MAKE_TARGET="$with_default_make_target"
|
||||
fi
|
||||
|
||||
AC_SUBST(DEFAULT_MAKE_TARGET)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup the default value for LOG=
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
|
||||
[
|
||||
AC_ARG_WITH(log, [AS_HELP_STRING([--with-log],
|
||||
[[default vaue for make LOG argument [warn]]])])
|
||||
AC_MSG_CHECKING([for default LOG value])
|
||||
if test "x$with_log" = x; then
|
||||
DEFAULT_LOG=""
|
||||
else
|
||||
# Syntax for valid LOG options is a bit too complex for it to be worth
|
||||
# implementing a test for correctness in configure. Just accept it.
|
||||
DEFAULT_LOG=$with_log
|
||||
fi
|
||||
AC_MSG_RESULT([$DEFAULT_LOG])
|
||||
AC_SUBST(DEFAULT_LOG)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Code to run after AC_OUTPUT
|
||||
AC_DEFUN_ONCE([BASIC_POST_CONFIG_OUTPUT],
|
||||
[
|
||||
# Try to move config.log (generated by autoconf) to the configure-support directory.
|
||||
if test -e ./config.log; then
|
||||
$MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Rotate our log file (configure.log)
|
||||
if test -e "$OUTPUTDIR/configure.log.old"; then
|
||||
$RM -f "$OUTPUTDIR/configure.log.old"
|
||||
fi
|
||||
if test -e "$OUTPUTDIR/configure.log"; then
|
||||
$MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Move configure.log from current directory to the build output root
|
||||
if test -e ./configure.log; then
|
||||
$MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
|
||||
fi
|
||||
|
||||
# Make the compare script executable
|
||||
$CHMOD +x $OUTPUTDIR/compare.sh
|
||||
])
|
475
make/autoconf/basic_tools.m4
Normal file
475
make/autoconf/basic_tools.m4
Normal file
@ -0,0 +1,475 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Setup the most fundamental tools that relies on not much else to set up,
|
||||
# but is used by much of the early bootstrap code.
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
[
|
||||
# Start with tools that do not need have cross compilation support
|
||||
# and can be expected to be found in the default PATH. These tools are
|
||||
# used by configure.
|
||||
|
||||
# First are all the simple required tools.
|
||||
UTIL_REQUIRE_PROGS(BASENAME, basename)
|
||||
UTIL_REQUIRE_PROGS(BASH, bash)
|
||||
UTIL_REQUIRE_PROGS(CAT, cat)
|
||||
UTIL_REQUIRE_PROGS(CHMOD, chmod)
|
||||
UTIL_REQUIRE_PROGS(CMP, cmp)
|
||||
UTIL_REQUIRE_PROGS(COMM, comm)
|
||||
UTIL_REQUIRE_PROGS(CP, cp)
|
||||
UTIL_REQUIRE_PROGS(CUT, cut)
|
||||
UTIL_REQUIRE_PROGS(DATE, date)
|
||||
UTIL_REQUIRE_PROGS(DIFF, [gdiff diff])
|
||||
UTIL_REQUIRE_PROGS(DIRNAME, dirname)
|
||||
UTIL_REQUIRE_PROGS(ECHO, echo)
|
||||
UTIL_REQUIRE_PROGS(EXPR, expr)
|
||||
UTIL_REQUIRE_PROGS(FILE, file)
|
||||
UTIL_REQUIRE_PROGS(FIND, find)
|
||||
UTIL_REQUIRE_PROGS(HEAD, head)
|
||||
UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
|
||||
UTIL_REQUIRE_PROGS(GZIP, pigz gzip)
|
||||
UTIL_REQUIRE_PROGS(LN, ln)
|
||||
UTIL_REQUIRE_PROGS(LS, ls)
|
||||
# gmkdir is known to be safe for concurrent invocations with -p flag.
|
||||
UTIL_REQUIRE_PROGS(MKDIR, [gmkdir mkdir])
|
||||
UTIL_REQUIRE_PROGS(MKTEMP, mktemp)
|
||||
UTIL_REQUIRE_PROGS(MV, mv)
|
||||
UTIL_REQUIRE_PROGS(NAWK, [nawk gawk awk])
|
||||
UTIL_REQUIRE_PROGS(PRINTF, printf)
|
||||
UTIL_REQUIRE_PROGS(READLINK, [greadlink readlink])
|
||||
UTIL_REQUIRE_PROGS(RM, rm)
|
||||
UTIL_REQUIRE_PROGS(RMDIR, rmdir)
|
||||
UTIL_REQUIRE_PROGS(SH, sh)
|
||||
UTIL_REQUIRE_PROGS(SORT, sort)
|
||||
UTIL_REQUIRE_PROGS(TAIL, tail)
|
||||
UTIL_REQUIRE_PROGS(TAR, gtar tar)
|
||||
UTIL_REQUIRE_PROGS(TEE, tee)
|
||||
UTIL_REQUIRE_PROGS(TOUCH, touch)
|
||||
UTIL_REQUIRE_PROGS(TR, tr)
|
||||
UTIL_REQUIRE_PROGS(UNAME, uname)
|
||||
UTIL_REQUIRE_PROGS(UNIQ, uniq)
|
||||
UTIL_REQUIRE_PROGS(WC, wc)
|
||||
UTIL_REQUIRE_PROGS(WHICH, which)
|
||||
UTIL_REQUIRE_PROGS(XARGS, xargs)
|
||||
|
||||
# Then required tools that require some special treatment.
|
||||
UTIL_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
|
||||
UTIL_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
|
||||
UTIL_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
|
||||
UTIL_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
|
||||
UTIL_REQUIRE_SPECIAL(SED, [AC_PROG_SED])
|
||||
|
||||
# Always force rm.
|
||||
RM="$RM -f"
|
||||
|
||||
# pwd behaves differently on various platforms and some don't support the -L flag.
|
||||
# Always use the bash builtin pwd to get uniform behavior.
|
||||
THEPWDCMD=pwd
|
||||
|
||||
# These are not required on all platforms
|
||||
UTIL_PATH_PROGS(CYGPATH, cygpath)
|
||||
UTIL_PATH_PROGS(WSLPATH, wslpath)
|
||||
UTIL_PATH_PROGS(DF, df)
|
||||
UTIL_PATH_PROGS(CPIO, [cpio bsdcpio])
|
||||
UTIL_PATH_PROGS(NICE, nice)
|
||||
|
||||
UTIL_PATH_PROGS(LSB_RELEASE, lsb_release)
|
||||
UTIL_PATH_PROGS(CMD, [cmd.exe /mnt/c/Windows/System32/cmd.exe])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if we have found a usable version of make
|
||||
# $1: the path to a potential make binary (or empty)
|
||||
# $2: the description on how we found this
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
[
|
||||
MAKE_CANDIDATE="$1"
|
||||
DESCRIPTION="$2"
|
||||
|
||||
# On Cygwin, we require a newer version of make than on other platforms
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_VERSION_EXPR="-e 4\."
|
||||
MAKE_REQUIRED_VERSION="4.0"
|
||||
else
|
||||
MAKE_VERSION_EXPR="-e 3\.8[[12]] -e 4\."
|
||||
MAKE_REQUIRED_VERSION="3.81"
|
||||
fi
|
||||
|
||||
if test "x$MAKE_CANDIDATE" != x; then
|
||||
AC_MSG_NOTICE([Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION])
|
||||
MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
|
||||
IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
|
||||
if test "x$IS_GNU_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring.])
|
||||
else
|
||||
IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
|
||||
if test "x$IS_MODERN_MAKE" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring.])
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
MAKE_EXPECTED_ENV='cygwin'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
MAKE_EXPECTED_ENV='msys'
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
MAKE_EXPECTED_ENV='x86_64-.*-linux-gnu'
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment])
|
||||
fi
|
||||
MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
|
||||
IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
|
||||
else
|
||||
# Not relevant for non-Windows
|
||||
IS_MAKE_CORRECT_ENV=true
|
||||
fi
|
||||
if test "x$IS_MAKE_CORRECT_ENV" = x; then
|
||||
AC_MSG_NOTICE([Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring.])
|
||||
else
|
||||
FOUND_MAKE=$MAKE_CANDIDATE
|
||||
UTIL_FIXUP_EXECUTABLE(FOUND_MAKE)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
|
||||
[
|
||||
# Check if make supports the output sync option and if so, setup using it.
|
||||
AC_MSG_CHECKING([if make --output-sync is supported])
|
||||
if $MAKE --version -O > /dev/null 2>&1; then
|
||||
OUTPUT_SYNC_SUPPORTED=true
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([for output-sync value])
|
||||
AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],
|
||||
[set make output sync type if supported by make. @<:@recurse@:>@])],
|
||||
[OUTPUT_SYNC=$with_output_sync])
|
||||
if test "x$OUTPUT_SYNC" = "x"; then
|
||||
OUTPUT_SYNC=none
|
||||
fi
|
||||
AC_MSG_RESULT([$OUTPUT_SYNC])
|
||||
if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
|
||||
AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])
|
||||
fi
|
||||
else
|
||||
OUTPUT_SYNC_SUPPORTED=false
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
|
||||
AC_SUBST(OUTPUT_SYNC)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Goes looking for a usable version of GNU make.
|
||||
AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
||||
[
|
||||
UTIL_SETUP_TOOL([MAKE],
|
||||
[
|
||||
# Try our hardest to locate a correct version of GNU make
|
||||
AC_PATH_PROGS(CHECK_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
# We have a toolchain path, check that as well before giving up.
|
||||
OLD_PATH=$PATH
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_PATH_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
||||
fi
|
||||
PATH=$OLD_PATH
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||
fi
|
||||
],[
|
||||
# If MAKE was set by user, verify the version
|
||||
BASIC_CHECK_MAKE_VERSION("$MAKE", [user supplied MAKE=$MAKE])
|
||||
if test "x$FOUND_MAKE" = x; then
|
||||
AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer.])
|
||||
fi
|
||||
])
|
||||
|
||||
MAKE=$FOUND_MAKE
|
||||
AC_SUBST(MAKE)
|
||||
AC_MSG_NOTICE([Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)])
|
||||
|
||||
BASIC_CHECK_MAKE_OUTPUT_SYNC
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_FIND_DELETE],
|
||||
[
|
||||
# Test if find supports -delete
|
||||
AC_MSG_CHECKING([if find supports -delete])
|
||||
FIND_DELETE="-delete"
|
||||
|
||||
DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
|
||||
|
||||
echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
|
||||
|
||||
TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
|
||||
if test -f $DELETEDIR/TestIfFindSupportsDelete; then
|
||||
# No, it does not.
|
||||
$RM $DELETEDIR/TestIfFindSupportsDelete
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
# AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
|
||||
FIND_DELETE="-print | $XARGS $RM"
|
||||
else
|
||||
FIND_DELETE="-exec $RM \{\} \+"
|
||||
fi
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
$RMDIR $DELETEDIR
|
||||
AC_SUBST(FIND_DELETE)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_TAR],
|
||||
[
|
||||
# Test which kind of tar was found
|
||||
if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
|
||||
TAR_TYPE="gnu"
|
||||
elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
|
||||
TAR_TYPE="bsd"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
|
||||
TAR_TYPE="solaris"
|
||||
elif test "x$OPENJDK_BUILD_OS" = "xaix"; then
|
||||
TAR_TYPE="aix"
|
||||
fi
|
||||
AC_MSG_CHECKING([what type of tar was found])
|
||||
AC_MSG_RESULT([$TAR_TYPE])
|
||||
|
||||
TAR_CREATE_FILE_PARAM=""
|
||||
|
||||
if test "x$TAR_TYPE" = "xgnu"; then
|
||||
TAR_INCLUDE_PARAM="T"
|
||||
TAR_SUPPORTS_TRANSFORM="true"
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# When using gnu tar for Solaris targets, need to use compatibility mode
|
||||
TAR_CREATE_EXTRA_PARAM="--format=ustar"
|
||||
fi
|
||||
elif test "x$TAR_TYPE" = "aix"; then
|
||||
# -L InputList of aix tar: name of file listing the files and directories
|
||||
# that need to be archived or extracted
|
||||
TAR_INCLUDE_PARAM="L"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
else
|
||||
TAR_INCLUDE_PARAM="I"
|
||||
TAR_SUPPORTS_TRANSFORM="false"
|
||||
fi
|
||||
AC_SUBST(TAR_TYPE)
|
||||
AC_SUBST(TAR_CREATE_EXTRA_PARAM)
|
||||
AC_SUBST(TAR_INCLUDE_PARAM)
|
||||
AC_SUBST(TAR_SUPPORTS_TRANSFORM)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_CHECK_GREP],
|
||||
[
|
||||
# Test that grep supports -Fx with a list of pattern which includes null pattern.
|
||||
# This is a problem for the grep resident on AIX.
|
||||
AC_MSG_CHECKING([that grep ($GREP) -Fx handles empty lines in the pattern list correctly])
|
||||
# Multiple subsequent spaces..
|
||||
STACK_SPACES='aaa bbb ccc'
|
||||
# ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
|
||||
# patterns in it.
|
||||
STACK_LIST=${STACK_SPACES// /$'\n'}
|
||||
NEEDLE_SPACES='ccc bbb aaa'
|
||||
NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
|
||||
RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
|
||||
if test "x$RESULT" == "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
|
||||
fi
|
||||
AC_MSG_ERROR([grep does not handle -Fx correctly. ${ADDINFO}])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
[
|
||||
BASIC_CHECK_GNU_MAKE
|
||||
|
||||
BASIC_CHECK_FIND_DELETE
|
||||
BASIC_CHECK_TAR
|
||||
BASIC_CHECK_GREP
|
||||
BASIC_SETUP_PANDOC
|
||||
|
||||
# These tools might not be installed by default,
|
||||
# need hint on how to install them.
|
||||
UTIL_REQUIRE_PROGS(UNZIP, unzip)
|
||||
# Since zip uses "ZIP" as a environment variable for passing options, we need
|
||||
# to name our variable differently, hence ZIPEXE.
|
||||
UTIL_REQUIRE_PROGS(ZIPEXE, zip)
|
||||
|
||||
# Non-required basic tools
|
||||
|
||||
UTIL_PATH_PROGS(LDD, ldd)
|
||||
if test "x$LDD" = "x"; then
|
||||
# List shared lib dependencies is used for
|
||||
# debug output and checking for forbidden dependencies.
|
||||
# We can build without it.
|
||||
LDD="true"
|
||||
fi
|
||||
UTIL_PATH_PROGS(READELF, [greadelf readelf])
|
||||
UTIL_PATH_PROGS(DOT, dot)
|
||||
UTIL_PATH_PROGS(HG, hg)
|
||||
UTIL_PATH_PROGS(GIT, git)
|
||||
UTIL_PATH_PROGS(STAT, stat)
|
||||
UTIL_PATH_PROGS(TIME, time)
|
||||
UTIL_PATH_PROGS(FLOCK, flock)
|
||||
# Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
|
||||
# be in the user path.
|
||||
UTIL_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
|
||||
UTIL_PATH_PROGS(PATCH, [gpatch patch])
|
||||
# Check if it's GNU time
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
IS_GNU_TIME=no
|
||||
fi
|
||||
AC_SUBST(IS_GNU_TIME)
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
UTIL_REQUIRE_PROGS(DSYMUTIL, dsymutil)
|
||||
UTIL_REQUIRE_PROGS(MIG, mig)
|
||||
UTIL_REQUIRE_PROGS(XATTR, xattr)
|
||||
UTIL_PATH_PROGS(CODESIGN, codesign)
|
||||
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Check for user provided code signing identity.
|
||||
# If no identity was provided, fall back to "openjdk_codesign".
|
||||
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
|
||||
[specify the code signing identity])],
|
||||
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
|
||||
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
|
||||
)
|
||||
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
# Verify that the codesign certificate is present
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
UTIL_REQUIRE_PROGS(ELFEDIT, elfedit)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
UTIL_REQUIRE_BUILTIN_PROGS(ULIMIT, ulimit)
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check for support for specific options in bash
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_BASH_OPTIONS],
|
||||
[
|
||||
# Check bash version
|
||||
# Extra [ ] to stop m4 mangling
|
||||
[ BASH_VER=`$BASH --version | $SED -n -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'` ]
|
||||
AC_MSG_CHECKING([bash version])
|
||||
AC_MSG_RESULT([$BASH_VER])
|
||||
|
||||
BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
|
||||
BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
|
||||
if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
|
||||
AC_MSG_ERROR([bash version 3.2 or better is required])
|
||||
fi
|
||||
|
||||
# Test if bash supports pipefail.
|
||||
AC_MSG_CHECKING([if bash supports pipefail])
|
||||
if ${BASH} -c 'set -o pipefail'; then
|
||||
BASH_ARGS="$BASH_ARGS -o pipefail"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if bash supports errexit (-e)])
|
||||
if ${BASH} -e -c 'true'; then
|
||||
BASH_ARGS="$BASH_ARGS -e"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_SUBST(BASH_ARGS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup Pandoc
|
||||
#
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_PANDOC],
|
||||
[
|
||||
UTIL_PATH_PROGS(PANDOC, pandoc)
|
||||
|
||||
PANDOC_MARKDOWN_FLAG="markdown"
|
||||
if test -n "$PANDOC"; then
|
||||
AC_MSG_CHECKING(if the pandoc smart extension needs to be disabled for markdown)
|
||||
if $PANDOC --list-extensions | $GREP -q '\+smart'; then
|
||||
AC_MSG_RESULT([yes])
|
||||
PANDOC_MARKDOWN_FLAG="markdown-smart"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$PANDOC"; then
|
||||
ENABLE_PANDOC="true"
|
||||
else
|
||||
ENABLE_PANDOC="false"
|
||||
fi
|
||||
AC_SUBST(ENABLE_PANDOC)
|
||||
AC_SUBST(PANDOC_MARKDOWN_FLAG)
|
||||
])
|
183
make/autoconf/basic_windows.m4
Normal file
183
make/autoconf/basic_windows.m4
Normal file
@ -0,0 +1,183 @@
|
||||
#
|
||||
# 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
|
||||
# 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.
|
||||
#
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.[0-6]'`
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
AC_MSG_CHECKING([cygwin root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF)
|
||||
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
|
||||
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
|
||||
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
|
||||
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
|
||||
UTIL_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
# m4 replaces [ and ] so we use @<:@ and @:>@ instead
|
||||
WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'`
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel version])
|
||||
WSL_KERNEL_VERSION=`$UNAME -v`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel release])
|
||||
WSL_KERNEL_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([WSL distribution])
|
||||
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
|
||||
AC_MSG_RESULT([$WSL_DISTRIBUTION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='WSL'
|
||||
WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
|
||||
fi
|
||||
|
||||
# Test if windows or unix (cygwin/msys) find is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
|
||||
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
|
||||
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
|
||||
FIXPATH="$FIXPATH_BIN -c"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
|
||||
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
|
||||
# @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
|
||||
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.wsl; then
|
||||
FIXPATH="$FIXPATH_BIN -w"
|
||||
fi
|
||||
FIXPATH_SRC_W="$FIXPATH_SRC"
|
||||
FIXPATH_BIN_W="$FIXPATH_BIN"
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
|
||||
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
|
||||
cd $FIXPATH_DIR
|
||||
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
OLD_WSLENV="$WSLENV"
|
||||
WSLENV=`$ECHO $WSLENV | $SED 's/PATH\/l://'`
|
||||
UTIL_APPEND_TO_PATH(WSLENV, "FIXPATH_PATH")
|
||||
export WSLENV
|
||||
export FIXPATH_PATH=$VS_PATH_WINDOWS
|
||||
AC_MSG_NOTICE([FIXPATH_PATH is $FIXPATH_PATH])
|
||||
AC_MSG_NOTICE([Rewriting WSLENV from $OLD_WSLENV to $WSLENV])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
> $FIXPATH_DIR/fixpath2.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
FIXPATH_DETACH_FLAG="--detach"
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
AC_SUBST(FIXPATH_DETACH_FLAG)
|
||||
])
|
File diff suppressed because it is too large
Load Diff
@ -97,7 +97,7 @@ AC_DEFUN([BOOTJDK_DO_CHECK],
|
||||
else
|
||||
# We're done! :-)
|
||||
BOOT_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BOOT_JDK)
|
||||
UTIL_FIXUP_PATH(BOOT_JDK)
|
||||
AC_MSG_CHECKING([for Boot JDK])
|
||||
AC_MSG_RESULT([$BOOT_JDK])
|
||||
AC_MSG_CHECKING([Boot JDK version])
|
||||
@ -150,7 +150,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_HOME],
|
||||
[
|
||||
if test "x$JAVA_HOME" != x; then
|
||||
JAVA_HOME_PROCESSED="$JAVA_HOME"
|
||||
BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED)
|
||||
if test ! -d "$JAVA_HOME_PROCESSED"; then
|
||||
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
|
||||
else
|
||||
@ -177,7 +177,7 @@ AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
|
||||
# Lets find the JDK/JRE directory by following symbolic links.
|
||||
# Linux/GNU systems often have links from /usr/bin/java to
|
||||
# /etc/alternatives/java to the real JDK binary.
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
UTIL_REMOVE_SYMBOLIC_LINKS(BINARY)
|
||||
BOOT_JDK=`dirname "$BINARY"`
|
||||
BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
|
||||
if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
|
||||
@ -241,7 +241,7 @@ AC_DEFUN([BOOTJDK_FIND_BEST_JDK_IN_WINDOWS_VIRTUAL_DIRECTORY],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
VIRTUAL_DIR="[$]$1/Java"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
|
||||
BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
|
||||
fi
|
||||
])
|
||||
@ -269,7 +269,7 @@ AC_DEFUN([BOOTJDK_CHECK_WELL_KNOWN_LOCATIONS],
|
||||
AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
[
|
||||
# Use user overridden value if available, otherwise locate tool in the Boot JDK.
|
||||
BASIC_SETUP_TOOL($1,
|
||||
UTIL_SETUP_TOOL($1,
|
||||
[
|
||||
AC_MSG_CHECKING([for $2 in Boot JDK])
|
||||
$1=$BOOT_JDK/bin/$2
|
||||
@ -362,7 +362,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
# Try to enable CDS
|
||||
AC_MSG_CHECKING([for local Boot JDK Class Data Sharing (CDS)])
|
||||
BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE],boot_jdk_cds_args,[$JAVA])
|
||||
|
||||
if test "x$boot_jdk_cds_args" != x; then
|
||||
# Try creating a CDS archive
|
||||
@ -391,18 +391,18 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command] )
|
||||
|
||||
# Force en-US environment
|
||||
ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Duser.language=en -Duser.country=US],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
|
||||
# Use our own CDS archive
|
||||
ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$boot_jdk_cds_args -Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
else
|
||||
# Otherwise optimistically use the system-wide one, if one is present
|
||||
ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xshare:auto],boot_jdk_jvmargs,[$JAVA])
|
||||
fi
|
||||
|
||||
# Finally append user provided options to allow them to override.
|
||||
ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs])
|
||||
|
||||
@ -413,7 +413,7 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for big workloads])
|
||||
|
||||
# Starting amount of heap memory.
|
||||
ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms64M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
|
||||
|
||||
# Maximum amount of heap memory and stack size.
|
||||
@ -441,8 +441,8 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
STACK_SIZE=$STACK_SIZE_64
|
||||
JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx${JVM_MAX_HEAP}M],boot_jdk_jvmargs_big,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:ThreadStackSize=$STACK_SIZE],boot_jdk_jvmargs_big,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_big])
|
||||
|
||||
@ -469,10 +469,10 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
AC_MSG_CHECKING([flags for boot jdk java command for small workloads])
|
||||
|
||||
# Use serial gc for small short lived tools if possible
|
||||
ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:+UseSerialGC],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms32M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xmx512M],boot_jdk_jvmargs_small,[$JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-XX:TieredStopAtLevel=1],boot_jdk_jvmargs_small,[$JAVA])
|
||||
|
||||
AC_MSG_RESULT([$boot_jdk_jvmargs_small])
|
||||
|
||||
@ -531,7 +531,7 @@ AC_DEFUN([BOOTJDK_CHECK_BUILD_JDK],
|
||||
else
|
||||
# We're done!
|
||||
BUILD_JDK_FOUND=yes
|
||||
BASIC_FIXUP_PATH(BUILD_JDK)
|
||||
UTIL_FIXUP_PATH(BUILD_JDK)
|
||||
AC_MSG_CHECKING([for Build JDK])
|
||||
AC_MSG_RESULT([$BUILD_JDK])
|
||||
AC_MSG_CHECKING([Build JDK version])
|
||||
|
@ -180,7 +180,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
||||
if test "x$TOOLCHAIN_PATH" != x; then
|
||||
PATH=$TOOLCHAIN_PATH:$PATH
|
||||
fi
|
||||
BASIC_REQUIRE_PROGS(CCACHE, ccache)
|
||||
UTIL_REQUIRE_PROGS(CCACHE, ccache)
|
||||
PATH="$OLD_PATH"
|
||||
CCACHE_VERSION=[`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`]
|
||||
CCACHE_STATUS="Active ($CCACHE_VERSION)"
|
||||
@ -288,12 +288,12 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
[enable distribted compilation of native code using icecc/icecream @<:@disabled@:>@])])
|
||||
|
||||
if test "x${enable_icecc}" = "xyes"; then
|
||||
BASIC_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
UTIL_REQUIRE_PROGS(ICECC_CMD, icecc)
|
||||
old_path="$PATH"
|
||||
|
||||
# Look for icecc-create-env in some known places
|
||||
PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
|
||||
BASIC_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
UTIL_REQUIRE_PROGS(ICECC_CREATE_ENV, icecc-create-env)
|
||||
# Use icecc-create-env to create a minimal compilation environment that can
|
||||
# be sent to the other hosts in the icecream cluster.
|
||||
icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
|
||||
@ -308,7 +308,7 @@ AC_DEFUN([BPERF_SETUP_ICECC],
|
||||
elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
|
||||
# For clang, the icecc compilerwrapper is needed. It usually resides next
|
||||
# to icecc-create-env.
|
||||
BASIC_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
UTIL_REQUIRE_PROGS(ICECC_WRAPPER, compilerwrapper)
|
||||
BPERF_RUN_ICECC_CREATE_ENV([--clang ${CC} ${ICECC_WRAPPER}], ${icecc_create_env_log})
|
||||
else
|
||||
AC_MSG_ERROR([Can only create icecc compiler packages for toolchain types gcc and clang])
|
||||
@ -442,7 +442,7 @@ AC_DEFUN_ONCE([BPERF_SETUP_SMART_JAVAC],
|
||||
if test "$MX_VALUE" -lt "512"; then
|
||||
MX_VALUE=512
|
||||
fi
|
||||
ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
UTIL_ADD_JVM_ARG_IF_OK([-Xms${MS_VALUE}M -Xmx${MX_VALUE}M],SJAVAC_SERVER_JAVA_FLAGS,[$SJAVAC_SERVER_JAVA])
|
||||
AC_SUBST(SJAVAC_SERVER_JAVA_FLAGS)
|
||||
|
||||
AC_ARG_ENABLE([sjavac], [AS_HELP_STRING([--enable-sjavac],
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2020, 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
|
||||
@ -96,6 +96,7 @@ BUILD_GTEST := false
|
||||
|
||||
JVM_VARIANTS := server
|
||||
JVM_VARIANT_MAIN := server
|
||||
JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
|
||||
|
||||
# Some users still set EXTRA_*FLAGS on the make command line. Must
|
||||
# make sure to override that when building buildjdk.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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,20 @@ AC_INIT(OpenJDK, openjdk, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
|
||||
|
||||
# This line needs to be here, verbatim, after the dummy hook definitions but
|
||||
# before all includes. It is replaced with custom functionality when building
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
# Include these first...
|
||||
m4_include([basics.m4])
|
||||
m4_include([basics_windows.m4])
|
||||
m4_include([util.m4])
|
||||
# ... then the rest
|
||||
m4_include([basic.m4])
|
||||
m4_include([boot-jdk.m4])
|
||||
m4_include([build-performance.m4])
|
||||
m4_include([flags.m4])
|
||||
@ -47,21 +57,11 @@ m4_include([help.m4])
|
||||
m4_include([hotspot.m4])
|
||||
m4_include([jdk-options.m4])
|
||||
m4_include([jdk-version.m4])
|
||||
m4_include([jvm-features.m4])
|
||||
m4_include([libraries.m4])
|
||||
m4_include([platform.m4])
|
||||
m4_include([source-dirs.m4])
|
||||
m4_include([toolchain.m4])
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
AC_DEFUN_ONCE([CUSTOM_EARLY_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_LATE_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_CONFIG_OUTPUT_GENERATED_HOOK])
|
||||
AC_DEFUN_ONCE([CUSTOM_SUMMARY_AND_WARNINGS_HOOK])
|
||||
|
||||
# This line needs to be here, verbatim, after all includes and the dummy hook
|
||||
# definitions. It is replaced with custom functionality when building
|
||||
# custom sources.
|
||||
#CUSTOM_AUTOCONF_INCLUDE
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -203,12 +203,6 @@ JDKOPT_SETUP_CODE_COVERAGE
|
||||
# AddressSanitizer
|
||||
JDKOPT_SETUP_ADDRESS_SANITIZER
|
||||
|
||||
# Need toolchain to setup dtrace
|
||||
HOTSPOT_SETUP_DTRACE
|
||||
HOTSPOT_ENABLE_DISABLE_AOT
|
||||
HOTSPOT_ENABLE_DISABLE_CDS
|
||||
HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Check dependencies for external and internal libraries.
|
||||
@ -221,9 +215,17 @@ BASIC_COMPILE_FIXPATH
|
||||
LIB_DETERMINE_DEPENDENCIES
|
||||
LIB_SETUP_LIBRARIES
|
||||
|
||||
# Hotspot setup depends on lib checks.
|
||||
###############################################################################
|
||||
#
|
||||
# Setup hotspot and JVM features (needs toolchain).
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
HOTSPOT_SETUP_JVM_FEATURES
|
||||
JVM_FEATURES_PARSE_OPTIONS
|
||||
JVM_FEATURES_SETUP
|
||||
|
||||
HOTSPOT_ENABLE_DISABLE_GTEST
|
||||
HOTSPOT_SETUP_MISC
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
@ -277,9 +279,6 @@ BASIC_TEST_USABILITY_ISSUES
|
||||
# At the end, call the custom hook. (Dummy macro if no custom sources available)
|
||||
CUSTOM_LATE_HOOK
|
||||
|
||||
# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
|
||||
HOTSPOT_FINALIZE_JVM_FEATURES
|
||||
|
||||
# Did user specify any unknown variables?
|
||||
BASIC_CHECK_LEFTOVER_OVERRIDDEN
|
||||
|
||||
|
@ -430,7 +430,7 @@ AC_DEFUN([FLAGS_SETUP_FLAGS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C compiler supports an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if ARG_PREFIX[CC] supports "ARG_ARGUMENT"])
|
||||
@ -461,7 +461,7 @@ BASIC_DEFUN_NAMED([FLAGS_C_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C++ compiler supports an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if ARG_PREFIX[CXX] supports "ARG_ARGUMENT"])
|
||||
@ -492,7 +492,7 @@ BASIC_DEFUN_NAMED([FLAGS_CXX_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the C and C++ compilers support an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE PREFIX], [$@],
|
||||
[
|
||||
FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARG_ARGUMENT],
|
||||
@ -524,7 +524,7 @@ BASIC_DEFUN_NAMED([FLAGS_COMPILER_CHECK_ARGUMENTS],
|
||||
# IF_FALSE: [RUN-IF-FALSE])
|
||||
# ------------------------------------------------------------
|
||||
# Check that the linker support an argument
|
||||
BASIC_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
|
||||
UTIL_DEFUN_NAMED([FLAGS_LINKER_CHECK_ARGUMENTS],
|
||||
[*ARGUMENT IF_TRUE IF_FALSE], [$@],
|
||||
[
|
||||
AC_MSG_CHECKING([if linker supports "ARG_ARGUMENT"])
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@ -180,21 +180,25 @@ AC_DEFUN_ONCE([HELP_PRINT_ADDITIONAL_HELP_AND_EXIT],
|
||||
if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
|
||||
|
||||
# Print available toolchains
|
||||
$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"
|
||||
$PRINTF "The following toolchains are valid as arguments to --with-toolchain-type.\n"
|
||||
$PRINTF "Which are available 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"
|
||||
$PRINTF " %-22s %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
|
||||
done
|
||||
$PRINTF "\n"
|
||||
|
||||
# Print available jvm features
|
||||
$PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
|
||||
$PRINTF "Which are valid to use depends on the target platform.\n "
|
||||
$PRINTF "%s " $VALID_JVM_FEATURES
|
||||
$PRINTF "\n"
|
||||
# Print available JVM features
|
||||
$PRINTF "The following JVM features are valid as arguments to --with-jvm-features.\n"
|
||||
$PRINTF "Which are available to use depends on the environment and JVM variant.\n"
|
||||
m4_foreach(FEATURE, m4_split(jvm_features_valid), [
|
||||
# Create an m4 variable containing the description for FEATURE.
|
||||
m4_define(FEATURE_DESCRIPTION, [jvm_feature_desc_]m4_translit(FEATURE, -, _))
|
||||
$PRINTF " %-22s %s\n" FEATURE "FEATURE_DESCRIPTION"
|
||||
m4_undefine([FEATURE_DESCRIPTION])
|
||||
])
|
||||
|
||||
# And now exit directly
|
||||
exit 0
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@ -23,14 +23,6 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# All valid JVM features, regardless of platform
|
||||
VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
|
||||
graal vm-structs jni-check services management epsilongc g1gc parallelgc serialgc shenandoahgc zgc nmt cds \
|
||||
static-build link-time-opt aot jfr"
|
||||
|
||||
# Deprecated JVM features (these are ignored, but with a warning)
|
||||
DEPRECATED_JVM_FEATURES="trace cmsgc"
|
||||
|
||||
# All valid JVM variants
|
||||
VALID_JVM_VARIANTS="server client minimal core zero custom"
|
||||
|
||||
@ -46,32 +38,6 @@ VALID_JVM_VARIANTS="server client minimal core zero custom"
|
||||
AC_DEFUN([HOTSPOT_CHECK_JVM_VARIANT],
|
||||
[ [ [[ " $JVM_VARIANTS " =~ " $1 " ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Check if the specified JVM feature is enabled. To be used in shell if
|
||||
# constructs, like this:
|
||||
# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
|
||||
#
|
||||
# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
|
||||
|
||||
# Definition kept in one line to allow inlining in if statements.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
AC_DEFUN([HOTSPOT_CHECK_JVM_FEATURE],
|
||||
[ [ [[ " $JVM_FEATURES " =~ " $1 " ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Check if the specified JVM feature is explicitly disabled. To be used in
|
||||
# shell if constructs, like this:
|
||||
# if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then
|
||||
#
|
||||
# This function is internal to hotspot.m4, and is only used when constructing
|
||||
# the valid set of enabled JVM features. Users outside of hotspot.m4 should just
|
||||
# use HOTSPOT_CHECK_JVM_FEATURE to check if a feature is enabled or not.
|
||||
|
||||
# Definition kept in one line to allow inlining in if statements.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
AC_DEFUN([HOTSPOT_IS_JVM_FEATURE_DISABLED],
|
||||
[ [ [[ " $DISABLED_JVM_FEATURES " =~ " $1 " ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Check which variants of the JVM that we want to build. Available variants are:
|
||||
# server: normal interpreter, and a tiered C1/C2 compiler
|
||||
@ -84,7 +50,8 @@ AC_DEFUN([HOTSPOT_IS_JVM_FEATURE_DISABLED],
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
[
|
||||
AC_ARG_WITH([jvm-variants], [AS_HELP_STRING([--with-jvm-variants],
|
||||
[JVM variants (separated by commas) to build (server,client,minimal,core,zero,custom) @<:@server@:>@])])
|
||||
[JVM variants to build, separated by commas (server client minimal core
|
||||
zero custom) @<:@server@:>@])])
|
||||
|
||||
if test "x$with_jvm_variants" = x; then
|
||||
with_jvm_variants="server"
|
||||
@ -108,7 +75,8 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
AC_MSG_RESULT([$JVM_VARIANTS])
|
||||
|
||||
# Check that the selected variants are valid
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_VARIANTS, $JVM_VARIANTS, $VALID_JVM_VARIANTS)
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_JVM_VARIANTS)
|
||||
if test "x$INVALID_VARIANTS" != x; then
|
||||
AC_MSG_NOTICE([Unknown variant(s) specified: "$INVALID_VARIANTS"])
|
||||
AC_MSG_NOTICE([The available JVM variants are: "$VALID_JVM_VARIANTS"])
|
||||
@ -117,9 +85,11 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
|
||||
# All "special" variants share the same output directory ("server")
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, $VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS.])
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
|
||||
test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You can only build multiple variants using these variants: '$VALID_MULTIPLE_JVM_VARIANTS'])
|
||||
fi
|
||||
|
||||
# The "main" variant is the one used by other libs to link against during the
|
||||
@ -139,473 +109,9 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
AC_SUBST(JVM_VARIANTS)
|
||||
AC_SUBST(VALID_JVM_VARIANTS)
|
||||
AC_SUBST(JVM_VARIANT_MAIN)
|
||||
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
# zero behaves as a platform and rewrites these values. This is really weird. :(
|
||||
# We are guaranteed that we do not build any other variants when building zero.
|
||||
HOTSPOT_TARGET_CPU=zero
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if dtrace should be enabled and has all prerequisites present.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_DTRACE],
|
||||
[
|
||||
# Test for dtrace dependencies
|
||||
AC_ARG_ENABLE([dtrace], [AS_HELP_STRING([--enable-dtrace@<:@=yes/no/auto@:>@],
|
||||
[enable dtrace. Default is auto, where dtrace is enabled if all dependencies
|
||||
are present.])])
|
||||
|
||||
DTRACE_DEP_MISSING=false
|
||||
|
||||
AC_MSG_CHECKING([for dtrace tool])
|
||||
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_RESULT([$DTRACE])
|
||||
else
|
||||
AC_MSG_RESULT([not found, cannot build dtrace])
|
||||
DTRACE_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([sys/sdt.h], [DTRACE_HEADERS_OK=yes],[DTRACE_HEADERS_OK=no])
|
||||
if test "x$DTRACE_HEADERS_OK" != "xyes"; then
|
||||
DTRACE_DEP_MISSING=true
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if dtrace should be built])
|
||||
if test "x$enable_dtrace" = "xyes"; then
|
||||
if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
HELP_MSG_MISSING_DEPENDENCY([dtrace])
|
||||
AC_MSG_ERROR([Cannot enable dtrace with missing dependencies. See above. $HELP_MSG])
|
||||
else
|
||||
INCLUDE_DTRACE=true
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
fi
|
||||
elif test "x$enable_dtrace" = "xno"; then
|
||||
INCLUDE_DTRACE=false
|
||||
AC_MSG_RESULT([no, forced])
|
||||
elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
|
||||
if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
|
||||
INCLUDE_DTRACE=false
|
||||
AC_MSG_RESULT([no, missing dependencies])
|
||||
else
|
||||
INCLUDE_DTRACE=true
|
||||
AC_MSG_RESULT([yes, dependencies present])
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-dtrace: $enable_dtrace])
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Check if AOT should be enabled
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_AOT],
|
||||
[
|
||||
AC_ARG_ENABLE([aot], [AS_HELP_STRING([--enable-aot@<:@=yes/no/auto@:>@],
|
||||
[enable ahead of time compilation feature. Default is auto, where aot is enabled if all dependencies are present.])])
|
||||
|
||||
if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
|
||||
ENABLE_AOT="true"
|
||||
elif test "x$enable_aot" = "xyes"; then
|
||||
ENABLE_AOT="true"
|
||||
elif test "x$enable_aot" = "xno"; then
|
||||
ENABLE_AOT="false"
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-aot: $enable_aot])
|
||||
fi
|
||||
|
||||
if test "x$ENABLE_AOT" = "xtrue"; then
|
||||
# Only enable AOT on X64 platforms.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
if test -e "${TOPDIR}/src/jdk.aot"; then
|
||||
if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
|
||||
ENABLE_AOT="true"
|
||||
else
|
||||
ENABLE_AOT="false"
|
||||
if test "x$enable_aot" = "xyes"; then
|
||||
AC_MSG_ERROR([Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot.])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ENABLE_AOT="false"
|
||||
if test "x$enable_aot" = "xyes"; then
|
||||
AC_MSG_ERROR([Cannot build AOT without src/jdk.aot sources. Remove --enable-aot.])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
ENABLE_AOT="false"
|
||||
if test "x$enable_aot" = "xyes"; then
|
||||
AC_MSG_ERROR([AOT is currently only supported on x86_64 and aarch64. Remove --enable-aot.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_AOT)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Allow to disable CDS
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_CDS],
|
||||
[
|
||||
AC_ARG_ENABLE([cds], [AS_HELP_STRING([--enable-cds@<:@=yes/no/auto@:>@],
|
||||
[enable class data sharing feature in non-minimal VM. Default is auto, where cds is enabled if supported on the platform.])])
|
||||
|
||||
if test "x$enable_cds" = "x" || test "x$enable_cds" = "xauto"; then
|
||||
ENABLE_CDS="true"
|
||||
elif test "x$enable_cds" = "xyes"; then
|
||||
ENABLE_CDS="true"
|
||||
elif test "x$enable_cds" = "xno"; then
|
||||
ENABLE_CDS="false"
|
||||
else
|
||||
AC_MSG_ERROR([Invalid value for --enable-cds: $enable_cds])
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_CDS)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Set up all JVM features for each JVM variant.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
|
||||
[
|
||||
# Prettify the VALID_JVM_FEATURES string
|
||||
BASIC_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
|
||||
|
||||
# The user can in some cases supply additional jvm features. For the custom
|
||||
# variant, this defines the entire variant.
|
||||
AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
|
||||
[JVM features to enable (foo) or disable (-foo), separated by comma. Use '--help' to show possible values @<:@none@:>@])])
|
||||
if test "x$with_jvm_features" != x; then
|
||||
AC_MSG_CHECKING([user specified JVM feature list])
|
||||
USER_JVM_FEATURE_LIST=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
|
||||
AC_MSG_RESULT([$user_jvm_feature_list])
|
||||
# These features will be added to all variant defaults
|
||||
JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'`
|
||||
# These features will be removed from all variant defaults
|
||||
DISABLED_JVM_FEATURES=`$ECHO $USER_JVM_FEATURE_LIST | $AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
|
||||
|
||||
# Verify that the user has provided valid features
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $VALID_JVM_FEATURES $DEPRECATED_JVM_FEATURES)
|
||||
if test "x$INVALID_FEATURES" != x; then
|
||||
AC_MSG_NOTICE([Unknown JVM features specified: "$INVALID_FEATURES"])
|
||||
AC_MSG_NOTICE([The available JVM features are: "$VALID_JVM_FEATURES"])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Check if the user has provided deprecated features
|
||||
BASIC_GET_MATCHING_VALUES(DEPRECATED_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $DEPRECATED_JVM_FEATURES)
|
||||
if test "x$DEPRECATED_FEATURES" != x; then
|
||||
AC_MSG_WARN([Deprecated JVM features specified (will be ignored): "$DEPRECATED_FEATURES"])
|
||||
# Filter out deprecated features
|
||||
BASIC_GET_NON_MATCHING_VALUES(JVM_FEATURES, $JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
BASIC_GET_NON_MATCHING_VALUES(DISABLED_JVM_FEATURES, $DISABLED_JVM_FEATURES, $DEPRECATED_FEATURES)
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Override hotspot cpu definitions for ARM platforms
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
|
||||
fi
|
||||
|
||||
# Verify that dependencies are met for explicitly set features.
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(management) && ! HOTSPOT_CHECK_JVM_FEATURE(nmt); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt'])
|
||||
fi
|
||||
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(jvmci) && ! (HOTSPOT_CHECK_JVM_FEATURE(compiler1) || HOTSPOT_CHECK_JVM_FEATURE(compiler2)); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'])
|
||||
fi
|
||||
|
||||
# Enable JFR by default, except for Zero, linux-sparcv9 and on minimal.
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
if test "x$OPENJDK_TARGET_OS" != xaix; then
|
||||
if test "x$OPENJDK_TARGET_OS" != xlinux || test "x$OPENJDK_TARGET_CPU" != xsparcv9; then
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jfr"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Only enable Shenandoah on supported arches
|
||||
AC_MSG_CHECKING([if shenandoah can be built])
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES shenandoahgc"
|
||||
AC_MSG_RESULT([no, platform not supported])
|
||||
fi
|
||||
|
||||
# Only enable ZGC on supported platforms
|
||||
if (test "x$OPENJDK_TARGET_OS" = "xwindows" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
|
||||
AC_MSG_CHECKING([if zgc can be built on windows])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <windows.h>]],
|
||||
[[struct MEM_EXTENDED_PARAMETER x;]])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
CAN_BUILD_ZGC_ON_WINDOWS="yes"
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no, missing required APIs])
|
||||
CAN_BUILD_ZGC_ON_WINDOWS="no"
|
||||
]
|
||||
)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if zgc can be built])
|
||||
if (test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xx86_64") || \
|
||||
(test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK_TARGET_CPU" = "xaarch64") || \
|
||||
(test "x$CAN_BUILD_ZGC_ON_WINDOWS" = "xyes") || \
|
||||
(test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$OPENJDK_TARGET_CPU" = "xx86_64"); then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES zgc"
|
||||
AC_MSG_RESULT([no, platform not supported])
|
||||
fi
|
||||
|
||||
# Disable unsupported GCs for Zero
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
DISABLED_JVM_FEATURES="$DISABLED_JVM_FEATURES epsilongc g1gc zgc shenandoahgc"
|
||||
fi
|
||||
|
||||
# Turn on additional features based on other parts of configure
|
||||
if test "x$INCLUDE_DTRACE" = "xtrue"; then
|
||||
JVM_FEATURES="$JVM_FEATURES dtrace"
|
||||
else
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(dtrace); then
|
||||
AC_MSG_ERROR([To enable dtrace, you must use --enable-dtrace])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$STATIC_BUILD" = "xtrue"; then
|
||||
JVM_FEATURES="$JVM_FEATURES static-build"
|
||||
else
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(static-build); then
|
||||
AC_MSG_ERROR([To enable static-build, you must use --enable-static-build])
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(zero); then
|
||||
AC_MSG_ERROR([To enable zero, you must use --with-jvm-variants=zero])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if jvmci module jdk.internal.vm.ci should be built])
|
||||
# Check if jvmci is diabled
|
||||
if HOTSPOT_IS_JVM_FEATURE_DISABLED(jvmci); then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
JVM_FEATURES_jvmci=""
|
||||
INCLUDE_JVMCI="false"
|
||||
else
|
||||
# Only enable jvmci on x86_64 and aarch64
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
JVM_FEATURES_jvmci="jvmci"
|
||||
INCLUDE_JVMCI="true"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
JVM_FEATURES_jvmci=""
|
||||
INCLUDE_JVMCI="false"
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(jvmci); then
|
||||
AC_MSG_ERROR([JVMCI is currently not supported on this platform.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(INCLUDE_JVMCI)
|
||||
|
||||
AC_MSG_CHECKING([if graal module jdk.internal.vm.compiler should be built])
|
||||
# Check if graal is diabled
|
||||
if HOTSPOT_IS_JVM_FEATURE_DISABLED(graal); then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
JVM_FEATURES_graal=""
|
||||
INCLUDE_GRAAL="false"
|
||||
else
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(graal); then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
|
||||
AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci'])
|
||||
fi
|
||||
JVM_FEATURES_graal="graal"
|
||||
INCLUDE_GRAAL="true"
|
||||
else
|
||||
# By default enable graal build on x64 or where AOT is available.
|
||||
# graal build requires jvmci.
|
||||
if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
|
||||
(test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$ENABLE_AOT" = "xtrue") ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
JVM_FEATURES_graal="graal"
|
||||
INCLUDE_GRAAL="true"
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
JVM_FEATURES_graal=""
|
||||
INCLUDE_GRAAL="false"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(INCLUDE_GRAAL)
|
||||
|
||||
# Disable aot with '--with-jvm-features=-aot'
|
||||
if HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then
|
||||
ENABLE_AOT="false"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if aot should be enabled])
|
||||
if test "x$ENABLE_AOT" = "xtrue"; then
|
||||
if test "x$JVM_FEATURES_graal" != "xgraal"; then
|
||||
if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal'])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
JVM_FEATURES_aot=""
|
||||
ENABLE_AOT="false"
|
||||
else
|
||||
if test "x$enable_aot" = "xyes" || HOTSPOT_CHECK_JVM_FEATURE(aot); then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
JVM_FEATURES_aot="aot"
|
||||
fi
|
||||
else
|
||||
if test "x$enable_aot" = "xno" || HOTSPOT_IS_JVM_FEATURE_DISABLED(aot); then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
JVM_FEATURES_aot=""
|
||||
if HOTSPOT_CHECK_JVM_FEATURE(aot); then
|
||||
AC_MSG_ERROR([To enable aot, you must use --enable-aot])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(ENABLE_AOT)
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
|
||||
# Default to use link time optimizations on minimal on arm
|
||||
JVM_FEATURES_link_time_opt="link-time-opt"
|
||||
else
|
||||
JVM_FEATURES_link_time_opt=""
|
||||
fi
|
||||
|
||||
# All variants but minimal (and custom) get these features
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES g1gc parallelgc serialgc epsilongc shenandoahgc jni-check jvmti management nmt services vm-structs zgc"
|
||||
|
||||
# Disable CDS on AIX.
|
||||
if test "x$OPENJDK_TARGET_OS" = "xaix"; then
|
||||
ENABLE_CDS="false"
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_ERROR([CDS is currently not supported on AIX. Remove --enable-cds.])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Disable CDS if user requested it with --with-jvm-features=-cds.
|
||||
if HOTSPOT_IS_JVM_FEATURE_DISABLED(cds); then
|
||||
ENABLE_CDS="false"
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_ERROR([CDS was disabled by --with-jvm-features=-cds. Remove --enable-cds.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if ! HOTSPOT_CHECK_JVM_VARIANT(server) && ! HOTSPOT_CHECK_JVM_VARIANT(client); then
|
||||
# ..except when the user explicitely requested it with --enable-jvm-features
|
||||
if ! HOTSPOT_CHECK_JVM_FEATURE(cds); then
|
||||
ENABLE_CDS="false"
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_ERROR([CDS not implemented for variants zero, minimal, core. Remove --enable-cds.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if cds should be enabled])
|
||||
if test "x$ENABLE_CDS" = "xtrue"; then
|
||||
if test "x$enable_cds" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
|
||||
else
|
||||
if test "x$enable_cds" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Enable features depending on variant.
|
||||
JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
|
||||
JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_minimal="compiler1 minimal serialgc $JVM_FEATURES $JVM_FEATURES_link_time_opt"
|
||||
JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
|
||||
JVM_FEATURES_custom="$JVM_FEATURES"
|
||||
|
||||
AC_SUBST(JVM_FEATURES_server)
|
||||
AC_SUBST(JVM_FEATURES_client)
|
||||
AC_SUBST(JVM_FEATURES_core)
|
||||
AC_SUBST(JVM_FEATURES_minimal)
|
||||
AC_SUBST(JVM_FEATURES_zero)
|
||||
AC_SUBST(JVM_FEATURES_custom)
|
||||
|
||||
# Used for verification of Makefiles by check-jvm-feature
|
||||
AC_SUBST(VALID_JVM_FEATURES)
|
||||
|
||||
# --with-cpu-port is no longer supported
|
||||
BASIC_DEPRECATED_ARG_WITH(with-cpu-port)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Finalize JVM features once all setup is complete, including custom setup.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_FINALIZE_JVM_FEATURES],
|
||||
[
|
||||
for variant in $JVM_VARIANTS; do
|
||||
AC_MSG_CHECKING([JVM features for JVM variant '$variant'])
|
||||
features_var_name=JVM_FEATURES_$variant
|
||||
JVM_FEATURES_FOR_VARIANT=${!features_var_name}
|
||||
|
||||
# Filter out user-requested disabled features
|
||||
BASIC_GET_NON_MATCHING_VALUES(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT, $DISABLED_JVM_FEATURES)
|
||||
|
||||
# Keep feature lists sorted and free of duplicates
|
||||
BASIC_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
|
||||
|
||||
# Update real feature set variable
|
||||
eval $features_var_name='"'$JVM_FEATURES_FOR_VARIANT'"'
|
||||
AC_MSG_RESULT(["$JVM_FEATURES_FOR_VARIANT"])
|
||||
|
||||
# Verify that we have at least one gc selected
|
||||
GC_FEATURES=`$ECHO $JVM_FEATURES_FOR_VARIANT | $GREP gc`
|
||||
if test "x$GC_FEATURES" = x; then
|
||||
AC_MSG_WARN([Invalid JVM features: No gc selected for variant $variant.])
|
||||
fi
|
||||
|
||||
# Validate features (for configure script errors, not user errors)
|
||||
BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
|
||||
if test "x$INVALID_FEATURES" != x; then
|
||||
AC_MSG_ERROR([Internal configure script error. Invalid JVM feature(s): $INVALID_FEATURES])
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# Check if gtest should be built
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
|
||||
@ -613,25 +119,37 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
|
||||
AC_ARG_ENABLE([hotspot-gtest], [AS_HELP_STRING([--disable-hotspot-gtest],
|
||||
[Disables building of the Hotspot unit tests @<:@enabled@:>@])])
|
||||
|
||||
GTEST_AVAILABLE=true
|
||||
|
||||
AC_MSG_CHECKING([if Hotspot gtest test source is present])
|
||||
if test -e "${TOPDIR}/test/hotspot/gtest"; then
|
||||
GTEST_DIR_EXISTS="true"
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
GTEST_DIR_EXISTS="false"
|
||||
AC_MSG_RESULT([no, cannot run gtest])
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
|
||||
# On solaris, we also must have the libstlport.so.1 library, setup in
|
||||
# LIB_SETUP_LIBRARIES.
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
if test "x$STLPORT_LIB" = "x"; then
|
||||
GTEST_AVAILABLE=false
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if Hotspot gtest unit tests should be built])
|
||||
if test "x$enable_hotspot_gtest" = "xyes"; then
|
||||
if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
|
||||
if test "x$GTEST_AVAILABLE" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
BUILD_GTEST="true"
|
||||
else
|
||||
AC_MSG_ERROR([Cannot build gtest without the test source])
|
||||
AC_MSG_ERROR([Cannot build gtest with missing dependencies])
|
||||
fi
|
||||
elif test "x$enable_hotspot_gtest" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
BUILD_GTEST="false"
|
||||
elif test "x$enable_hotspot_gtest" = "x"; then
|
||||
if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
|
||||
if test "x$GTEST_AVAILABLE" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
BUILD_GTEST="true"
|
||||
else
|
||||
@ -644,3 +162,25 @@ AC_DEFUN_ONCE([HOTSPOT_ENABLE_DISABLE_GTEST],
|
||||
|
||||
AC_SUBST(BUILD_GTEST)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Misc hotspot setup that does not fit elsewhere.
|
||||
#
|
||||
AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
[
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(zero); then
|
||||
# zero behaves as a platform and rewrites these values. This is a bit weird.
|
||||
# But when building zero, we never build any other variants so it works.
|
||||
HOTSPOT_TARGET_CPU=zero
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
|
||||
# Override hotspot cpu definitions for ARM platforms
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm; then
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
|
||||
fi
|
||||
|
||||
# --with-cpu-port is no longer supported
|
||||
UTIL_DEPRECATED_ARG_WITH(with-cpu-port)
|
||||
])
|
||||
|
@ -34,7 +34,7 @@
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
[
|
||||
# Deprecated in JDK 12
|
||||
BASIC_DEPRECATED_ARG_WITH([jdk-variant])
|
||||
UTIL_DEPRECATED_ARG_WITH([jdk-variant])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@ -314,7 +314,7 @@ AC_DEFUN_ONCE([JDKOPT_DETECT_INTREE_EC],
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
[
|
||||
#
|
||||
# NATIVE_DEBUG_SYMBOLS
|
||||
# Native debug symbols.
|
||||
# This must be done after the toolchain is setup, since we're looking at objcopy.
|
||||
#
|
||||
AC_MSG_CHECKING([what type of native debug symbols to use])
|
||||
@ -326,11 +326,9 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
if test "x$withval" = xexternal || test "x$withval" = xzipped; then
|
||||
AC_MSG_ERROR([AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols])
|
||||
fi
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
if test "x$withval" = xinternal; then
|
||||
AC_MSG_ERROR([Windows does not support the parameter 'internal' for --with-native-debug-symbols])
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
if test "x$withval" = xinternal; then
|
||||
AC_MSG_ERROR([Windows does not support the parameter 'internal' for --with-native-debug-symbols])
|
||||
fi
|
||||
fi
|
||||
],
|
||||
@ -346,18 +344,17 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
fi
|
||||
fi
|
||||
])
|
||||
NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
|
||||
AC_MSG_RESULT([$NATIVE_DEBUG_SYMBOLS])
|
||||
AC_MSG_RESULT([$with_native_debug_symbols])
|
||||
|
||||
if test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
|
||||
if test "x$with_native_debug_symbols" = xnone; then
|
||||
COMPILE_WITH_DEBUG_SYMBOLS=false
|
||||
COPY_DEBUG_SYMBOLS=false
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS=false
|
||||
elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
|
||||
elif test "x$with_native_debug_symbols" = xinternal; then
|
||||
COMPILE_WITH_DEBUG_SYMBOLS=true
|
||||
COPY_DEBUG_SYMBOLS=false
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS=false
|
||||
elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
|
||||
elif test "x$with_native_debug_symbols" = xexternal; then
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OBJCOPY" = x; then
|
||||
@ -370,7 +367,7 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
COMPILE_WITH_DEBUG_SYMBOLS=true
|
||||
COPY_DEBUG_SYMBOLS=true
|
||||
ZIP_EXTERNAL_DEBUG_SYMBOLS=false
|
||||
elif test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
|
||||
elif test "x$with_native_debug_symbols" = xzipped; then
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
if test "x$OBJCOPY" = x; then
|
||||
@ -390,6 +387,33 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_DEBUG_SYMBOLS],
|
||||
AC_SUBST(COMPILE_WITH_DEBUG_SYMBOLS)
|
||||
AC_SUBST(COPY_DEBUG_SYMBOLS)
|
||||
AC_SUBST(ZIP_EXTERNAL_DEBUG_SYMBOLS)
|
||||
|
||||
# Should we add external native debug symbols to the shipped bundles?
|
||||
AC_MSG_CHECKING([if we should add external native debug symbols to the shipped bundles])
|
||||
AC_ARG_WITH([external-symbols-in-bundles],
|
||||
[AS_HELP_STRING([--with-external-symbols-in-bundles],
|
||||
[which type of external native debug symbol information shall be shipped in product bundles (none, public, full)
|
||||
(e.g. ship full/stripped pdbs on Windows) @<:@none@:>@])])
|
||||
|
||||
if test "x$with_external_symbols_in_bundles" = x || test "x$with_external_symbols_in_bundles" = xnone ; then
|
||||
AC_MSG_RESULT([no])
|
||||
elif test "x$with_external_symbols_in_bundles" = xfull || test "x$with_external_symbols_in_bundles" = xpublic ; then
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows ; then
|
||||
AC_MSG_ERROR([--with-external-symbols-in-bundles currently only works on windows!])
|
||||
elif test "x$COPY_DEBUG_SYMBOLS" != xtrue ; then
|
||||
AC_MSG_ERROR([--with-external-symbols-in-bundles only works when --with-native-debug-symbols=external is used!])
|
||||
elif test "x$with_external_symbols_in_bundles" = xfull ; then
|
||||
AC_MSG_RESULT([full])
|
||||
SHIP_DEBUG_SYMBOLS=full
|
||||
else
|
||||
AC_MSG_RESULT([public])
|
||||
SHIP_DEBUG_SYMBOLS=public
|
||||
fi
|
||||
else
|
||||
AC_MSG_ERROR([$with_external_symbols_in_bundles is an unknown value for --with-external-symbols-in-bundles])
|
||||
fi
|
||||
|
||||
AC_SUBST(SHIP_DEBUG_SYMBOLS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
@ -449,14 +473,14 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_CODE_COVERAGE],
|
||||
AC_MSG_ERROR([Invalid JCov bundle: "$JCOV_HOME/lib/jcov.jar" does not exist])
|
||||
fi
|
||||
JCOV_ENABLED="true"
|
||||
BASIC_FIXUP_PATH(JCOV_HOME)
|
||||
UTIL_FIXUP_PATH(JCOV_HOME)
|
||||
if test "x$with_jcov_input_jdk" != "x" ; then
|
||||
JCOV_INPUT_JDK="$with_jcov_input_jdk"
|
||||
if test ! -f "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX"; then
|
||||
AC_MSG_RESULT([fail])
|
||||
AC_MSG_ERROR([Invalid JDK bundle: "$JCOV_INPUT_JDK/bin/java$EXE_SUFFIX" does not exist])
|
||||
fi
|
||||
BASIC_FIXUP_PATH(JCOV_INPUT_JDK)
|
||||
UTIL_FIXUP_PATH(JCOV_INPUT_JDK)
|
||||
fi
|
||||
if test "x$with_jcov_filters" != "x" ; then
|
||||
JCOV_FILTERS="$with_jcov_filters"
|
||||
@ -616,33 +640,24 @@ AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST],
|
||||
Default is to generate it when either the server or client JVMs are built and
|
||||
enable-cds is true.])])
|
||||
|
||||
# Check if it's likely that it's possible to generate the classlist. Depending
|
||||
# on exact jvm configuration it could be possible anyway.
|
||||
if test "x$ENABLE_CDS" = "xtrue" && (HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) || HOTSPOT_CHECK_JVM_FEATURE(cds)); then
|
||||
ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
|
||||
else
|
||||
ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
|
||||
fi
|
||||
# In jvm-features.m4 ENABLE_CDS is set to true iff all JVM variants has cds
|
||||
# enabled.
|
||||
|
||||
AC_MSG_CHECKING([if the CDS classlist generation should be enabled])
|
||||
if test "x$enable_generate_classlist" = "xyes"; then
|
||||
AC_MSG_RESULT([yes, forced])
|
||||
ENABLE_GENERATE_CLASSLIST="true"
|
||||
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
|
||||
if test "x$ENABLE_CDS" = "xfalse"; then
|
||||
# In GenerateLinkOptData.gmk, DumpLoadedClassList is used to generate the
|
||||
# classlist file. It never will work in this case since the VM will report
|
||||
# an error for DumpLoadedClassList when CDS is disabled.
|
||||
AC_MSG_ERROR([Generation of classlist is not possible with enable-cds=false])
|
||||
else
|
||||
AC_MSG_WARN([Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS])
|
||||
fi
|
||||
if test "x$ENABLE_CDS" = "xfalse"; then
|
||||
# In GenerateLinkOptData.gmk, DumpLoadedClassList is used to generate the
|
||||
# classlist file. It never will work in this case since the VM will report
|
||||
# an error for DumpLoadedClassList when CDS is disabled.
|
||||
AC_MSG_ERROR([Generation of classlist is not possible without JVM feature 'cds'])
|
||||
fi
|
||||
elif test "x$enable_generate_classlist" = "xno"; then
|
||||
AC_MSG_RESULT([no, forced])
|
||||
ENABLE_GENERATE_CLASSLIST="false"
|
||||
elif test "x$enable_generate_classlist" = "x"; then
|
||||
if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
|
||||
if test "x$ENABLE_CDS" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
ENABLE_GENERATE_CLASSLIST="true"
|
||||
else
|
||||
|
669
make/autoconf/jvm-features.m4
Normal file
669
make/autoconf/jvm-features.m4
Normal file
@ -0,0 +1,669 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Terminology used in this file:
|
||||
#
|
||||
# Valid features == All possible features that the JVM knows about.
|
||||
# Deprecated features == Previously known features (not considered valid).
|
||||
# Available features == Features that are possible to use in this configuration.
|
||||
# Default features == Features that are on by default in this configuration.
|
||||
# Enabled features == Features requested by the user to be present.
|
||||
# Disabled features == Features excluded from being used by the user.
|
||||
# Active features == The exact set of features to be used for a JVM variant.
|
||||
#
|
||||
# All valid features are considered available, unless listed as unavailable.
|
||||
# All available features will be turned on as default, unless listed in a filter.
|
||||
###############################################################################
|
||||
|
||||
# We need these as m4 defines to be able to loop over them using m4 later on.
|
||||
|
||||
# All valid JVM features, regardless of platform
|
||||
m4_define(jvm_features_valid, m4_normalize( \
|
||||
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
|
||||
\
|
||||
aot cds compiler1 compiler2 dtrace epsilongc g1gc graal jfr jni-check \
|
||||
jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \
|
||||
serialgc services shenandoahgc static-build vm-structs zero zgc \
|
||||
))
|
||||
|
||||
# Deprecated JVM features (these are ignored, but with a warning)
|
||||
m4_define(jvm_features_deprecated, m4_normalize(
|
||||
cmsgc trace \
|
||||
))
|
||||
|
||||
# Feature descriptions
|
||||
m4_define(jvm_feature_desc_aot, [enable ahead of time compilation (AOT)])
|
||||
m4_define(jvm_feature_desc_cds, [enable class data sharing (CDS)])
|
||||
m4_define(jvm_feature_desc_compiler1, [enable hotspot compiler C1])
|
||||
m4_define(jvm_feature_desc_compiler2, [enable hotspot compiler C2])
|
||||
m4_define(jvm_feature_desc_dtrace, [enable dtrace support])
|
||||
m4_define(jvm_feature_desc_epsilongc, [include the epsilon (no-op) garbage collector])
|
||||
m4_define(jvm_feature_desc_g1gc, [include the G1 garbage collector])
|
||||
m4_define(jvm_feature_desc_graal, [enable Graal (jdk.internal.vm.compiler)])
|
||||
m4_define(jvm_feature_desc_jfr, [enable JDK Flight Recorder (JFR)])
|
||||
m4_define(jvm_feature_desc_jni_check, [enable -Xcheck:jni support])
|
||||
m4_define(jvm_feature_desc_jvmci, [enable JVM Compiler Interface (JVMCI)])
|
||||
m4_define(jvm_feature_desc_jvmti, [enable Java Virtual Machine Tool Interface (JVM TI)])
|
||||
m4_define(jvm_feature_desc_link_time_opt, [enable link time optimization])
|
||||
m4_define(jvm_feature_desc_management, [enable java.lang.management API support])
|
||||
m4_define(jvm_feature_desc_minimal, [support building variant 'minimal'])
|
||||
m4_define(jvm_feature_desc_nmt, [include native memory tracking (NMT)])
|
||||
m4_define(jvm_feature_desc_opt_size, [optimize the JVM library for size])
|
||||
m4_define(jvm_feature_desc_parallelgc, [include the parallel garbage collector])
|
||||
m4_define(jvm_feature_desc_serialgc, [include the serial garbage collector])
|
||||
m4_define(jvm_feature_desc_services, [enable diagnostic services and client attaching])
|
||||
m4_define(jvm_feature_desc_shenandoahgc, [include the Shenandoah garbage collector])
|
||||
m4_define(jvm_feature_desc_static_build, [build static library instead of dynamic])
|
||||
m4_define(jvm_feature_desc_vm_structs, [export JVM structures to the Serviceablility Agent])
|
||||
m4_define(jvm_feature_desc_zero, [support building variant 'zero'])
|
||||
m4_define(jvm_feature_desc_zgc, [include the Z garbage collector])
|
||||
|
||||
###############################################################################
|
||||
# Parse command line options for JVM feature selection. After this function
|
||||
# has run $JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED and $JVM_FEATURES_VALID
|
||||
# can be used.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_PARSE_OPTIONS],
|
||||
[
|
||||
# Setup shell variables from the m4 lists
|
||||
UTIL_SORT_LIST(JVM_FEATURES_VALID, "jvm_features_valid")
|
||||
UTIL_SORT_LIST(JVM_FEATURES_DEPRECATED, "jvm_features_deprecated")
|
||||
|
||||
# For historical reasons, some jvm features have their own, shorter names.
|
||||
# Keep those as aliases for the --enable-jvm-feature-* style arguments.
|
||||
UTIL_ALIASED_ARG_ENABLE(aot, --enable-jvm-feature-aot)
|
||||
UTIL_ALIASED_ARG_ENABLE(cds, --enable-jvm-feature-cds)
|
||||
UTIL_ALIASED_ARG_ENABLE(dtrace, --enable-jvm-feature-dtrace)
|
||||
|
||||
# First check for features using the
|
||||
# --with-jvm-features="<[-]feature>[,<[-]feature> ...]" syntax.
|
||||
AC_ARG_WITH([jvm-features], [AS_HELP_STRING([--with-jvm-features],
|
||||
[JVM features to enable (foo) or disable (-foo), separated by comma. Use
|
||||
'--help' to show possible values @<:@none@:>@])])
|
||||
if test "x$with_jvm_features" != x; then
|
||||
# Replace "," with " ".
|
||||
user_jvm_feature_list=${with_jvm_features//,/ }
|
||||
JVM_FEATURES_ENABLED=`$ECHO $user_jvm_feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'`
|
||||
JVM_FEATURES_DISABLED=`$ECHO $user_jvm_feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
|
||||
|
||||
# Verify that the user has provided only valid (or deprecated) features
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_features, $JVM_FEATURES_ENABLED \
|
||||
$JVM_FEATURES_DISABLED, $JVM_FEATURES_VALID $JVM_FEATURES_DEPRECATED)
|
||||
if test "x$invalid_features" != x; then
|
||||
AC_MSG_NOTICE([Unknown JVM features specified: '$invalid_features'])
|
||||
AC_MSG_NOTICE([The available JVM features are: '$JVM_FEATURES_VALID'])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Check if the user has provided deprecated features
|
||||
UTIL_GET_MATCHING_VALUES(deprecated_features, $JVM_FEATURES_ENABLED \
|
||||
$JVM_FEATURES_DISABLED, $JVM_FEATURES_DEPRECATED)
|
||||
if test "x$deprecated_features" != x; then
|
||||
AC_MSG_WARN([Deprecated JVM features specified (will be ignored): '$deprecated_features'])
|
||||
# Filter out deprecated features
|
||||
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES_ENABLED, \
|
||||
$JVM_FEATURES_ENABLED, $deprecated_features)
|
||||
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES_DISABLED, \
|
||||
$JVM_FEATURES_DISABLED, $deprecated_features)
|
||||
fi
|
||||
fi
|
||||
|
||||
# Then check for features using the "--enable-jvm-feature-<feature>" syntax.
|
||||
# Using m4, loop over all features with the variable FEATURE.
|
||||
m4_foreach(FEATURE, m4_split(jvm_features_valid), [
|
||||
# Create an m4 variable containing a shell variable name (like
|
||||
# "enable_jvm_feature_static_build"), and the description.
|
||||
m4_define(FEATURE_SHELL, [enable_jvm_feature_]m4_translit(FEATURE, -, _))
|
||||
m4_define(FEATURE_DESCRIPTION, [jvm_feature_desc_]m4_translit(FEATURE, -, _))
|
||||
|
||||
AC_ARG_ENABLE(jvm-feature-FEATURE, AS_HELP_STRING(
|
||||
[--enable-jvm-feature-FEATURE], [enable jvm feature 'FEATURE' (FEATURE_DESCRIPTION)]))
|
||||
|
||||
if test "x$FEATURE_SHELL" = xyes; then
|
||||
JVM_FEATURES_ENABLED="$JVM_FEATURES_ENABLED FEATURE"
|
||||
elif test "x$FEATURE_SHELL" = xno; then
|
||||
JVM_FEATURES_DISABLED="$JVM_FEATURES_DISABLED FEATURE"
|
||||
elif test "x$FEATURE_SHELL" != x; then
|
||||
AC_MSG_ERROR([Invalid value for --enable-jvm-feature-FEATURE: '$FEATURE_SHELL'])
|
||||
fi
|
||||
|
||||
m4_undefine([FEATURE_SHELL])
|
||||
m4_undefine([FEATURE_DESCRIPTION])
|
||||
])
|
||||
|
||||
# Likewise, check for deprecated arguments.
|
||||
m4_foreach(FEATURE, m4_split(jvm_features_deprecated), [
|
||||
AC_ARG_ENABLE(jvm-feature-FEATURE, AS_HELP_STRING(
|
||||
[--enable-jvm-feature-FEATURE],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored]))
|
||||
|
||||
m4_define(FEATURE_SHELL, [enable_jvm_feature_]m4_translit(FEATURE, -, _))
|
||||
|
||||
if test "x$FEATURE_SHELL" != x; then
|
||||
AC_MSG_WARN([Deprecated JVM feature, will be ignored: --enable-jvm-feature-FEATURE])
|
||||
fi
|
||||
|
||||
m4_undefine([FEATURE_SHELL])
|
||||
])
|
||||
|
||||
# Warn if the user has both enabled and disabled a feature
|
||||
# If this happens, disable will override enable.
|
||||
UTIL_GET_MATCHING_VALUES(enabled_and_disabled, $JVM_FEATURES_ENABLED, \
|
||||
$JVM_FEATURES_DISABLED)
|
||||
if test "x$enabled_and_disabled" != x; then
|
||||
AC_MSG_WARN([Disabling of these features will override enabling: '$enabled_and_disabled'])
|
||||
fi
|
||||
|
||||
# Clean up lists and announce results to user
|
||||
UTIL_SORT_LIST(JVM_FEATURES_ENABLED, $JVM_FEATURES_ENABLED)
|
||||
AC_MSG_CHECKING([for JVM features enabled by the user])
|
||||
if test "x$JVM_FEATURES_ENABLED" != x; then
|
||||
AC_MSG_RESULT(['$JVM_FEATURES_ENABLED'])
|
||||
else
|
||||
AC_MSG_RESULT([none])
|
||||
fi
|
||||
|
||||
UTIL_SORT_LIST(JVM_FEATURES_DISABLED, $JVM_FEATURES_DISABLED)
|
||||
AC_MSG_CHECKING([for JVM features disabled by the user])
|
||||
if test "x$JVM_FEATURES_DISABLED" != x; then
|
||||
AC_MSG_RESULT(['$JVM_FEATURES_DISABLED'])
|
||||
else
|
||||
AC_MSG_RESULT([none])
|
||||
fi
|
||||
|
||||
# Makefiles use VALID_JVM_FEATURES in check-jvm-feature to verify correctness.
|
||||
VALID_JVM_FEATURES="$JVM_FEATURES_VALID"
|
||||
AC_SUBST(VALID_JVM_FEATURES)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper function for the JVM_FEATURES_CHECK_* suite.
|
||||
# The code in the code block should assign 'false' to the variable AVAILABLE
|
||||
# if the feature is not available, and this function will handle everything
|
||||
# else that is needed.
|
||||
#
|
||||
# arg 1: The name of the feature to test
|
||||
# arg 2: The code block to execute
|
||||
#
|
||||
AC_DEFUN([JVM_FEATURES_CHECK_AVAILABILITY],
|
||||
[
|
||||
# Assume that feature is available
|
||||
AVAILABLE=true
|
||||
|
||||
# Execute feature test block
|
||||
$2
|
||||
|
||||
AC_MSG_CHECKING([if JVM feature '$1' is available])
|
||||
if test "x$AVAILABLE" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
JVM_FEATURES_PLATFORM_UNAVAILABLE="$JVM_FEATURES_PLATFORM_UNAVAILABLE $1"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'aot' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_AOT],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(aot, [
|
||||
AC_MSG_CHECKING([if platform is supported by AOT])
|
||||
# AOT is only available where JVMCI is available since it requires JVMCI.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if AOT source code is present])
|
||||
if test -e "${TOPDIR}/src/jdk.internal.vm.compiler" && \
|
||||
test -e "${TOPDIR}/src/jdk.aot"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, missing src/jdk.internal.vm.compiler or src/jdk.aot])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'cds' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_CDS],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(cds, [
|
||||
AC_MSG_CHECKING([if platform is supported by CDS])
|
||||
if test "x$OPENJDK_TARGET_OS" != xaix; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'dtrace' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(dtrace, [
|
||||
AC_MSG_CHECKING([for dtrace tool])
|
||||
if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
|
||||
AC_MSG_RESULT([$DTRACE])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
|
||||
AC_CHECK_HEADERS([sys/sdt.h], [dtrace_headers_ok=true])
|
||||
if test "x$dtrace_headers_ok" != "xtrue"; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([dtrace])
|
||||
AC_MSG_NOTICE([Cannot enable dtrace with missing dependencies. See above.])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'graal' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_GRAAL],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(graal, [
|
||||
AC_MSG_CHECKING([if platform is supported by Graal])
|
||||
# Graal is only available where JVMCI is available since it requires JVMCI.
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'jfr' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JFR],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(jfr, [
|
||||
AC_MSG_CHECKING([if platform is supported by JFR])
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix || \
|
||||
test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-sparcv9"; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'jvmci' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(jvmci, [
|
||||
AC_MSG_CHECKING([if platform is supported by JVMCI])
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'shenandoahgc' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(shenandoahgc, [
|
||||
AC_MSG_CHECKING([if platform is supported by Shenandoah])
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'static-build' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_STATIC_BUILD],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(static-build, [
|
||||
AC_MSG_CHECKING([if static-build is enabled in configure])
|
||||
if test "x$STATIC_BUILD" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, use --enable-static-build to enable static build.])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'zgc' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(zgc, [
|
||||
AC_MSG_CHECKING([if platform is supported by ZGC])
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux" || \
|
||||
test "x$OPENJDK_TARGET_OS" = "xwindows" || \
|
||||
test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-aarch64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
AC_MSG_CHECKING([if Windows APIs required for ZGC is present])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <windows.h>]],
|
||||
[[struct MEM_EXTENDED_PARAMETER x;]])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([yes])
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT([no, missing required APIs])
|
||||
AVAILABLE=false
|
||||
]
|
||||
)
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup JVM_FEATURES_PLATFORM_UNAVAILABLE and JVM_FEATURES_PLATFORM_FILTER
|
||||
# to contain those features that are unavailable, or should be off by default,
|
||||
# for this platform, regardless of JVM variant.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
|
||||
[
|
||||
# The checks below should add unavailable features to
|
||||
# JVM_FEATURES_PLATFORM_UNAVAILABLE.
|
||||
|
||||
JVM_FEATURES_CHECK_AOT
|
||||
JVM_FEATURES_CHECK_CDS
|
||||
JVM_FEATURES_CHECK_DTRACE
|
||||
JVM_FEATURES_CHECK_GRAAL
|
||||
JVM_FEATURES_CHECK_JFR
|
||||
JVM_FEATURES_CHECK_JVMCI
|
||||
JVM_FEATURES_CHECK_SHENANDOAHGC
|
||||
JVM_FEATURES_CHECK_STATIC_BUILD
|
||||
JVM_FEATURES_CHECK_ZGC
|
||||
|
||||
# Filter out features by default for all variants on certain platforms.
|
||||
# Make sure to just add to JVM_FEATURES_PLATFORM_FILTER, since it could
|
||||
# have a value already from custom extensions.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
JVM_FEATURES_PLATFORM_FILTER="$JVM_FEATURES_PLATFORM_FILTER jfr"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-sparcv9"; then
|
||||
JVM_FEATURES_PLATFORM_FILTER="$JVM_FEATURES_PLATFORM_FILTER jfr"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup JVM_FEATURES_VARIANT_UNAVAILABLE and JVM_FEATURES_VARIANT_FILTER
|
||||
# to contain those features that are unavailable, or should be off by default,
|
||||
# for this particular JVM variant.
|
||||
#
|
||||
# arg 1: JVM variant
|
||||
#
|
||||
AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
|
||||
[
|
||||
variant=$1
|
||||
|
||||
# Check which features are unavailable for this JVM variant.
|
||||
# This means that is not possible to build these features for this variant.
|
||||
if test "x$variant" = "xminimal"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds zero"
|
||||
elif test "x$variant" = "xcore"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
|
||||
elif test "x$variant" = "xzero"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="aot cds compiler1 compiler2 \
|
||||
epsilongc g1gc graal jvmci minimal shenandoahgc zgc"
|
||||
else
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
|
||||
fi
|
||||
|
||||
# Check which features should be off by default for this JVM variant.
|
||||
if test "x$variant" = "xclient"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot compiler2 graal jvmci link-time-opt opt-size"
|
||||
elif test "x$variant" = "xminimal"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot cds compiler2 dtrace epsilongc g1gc \
|
||||
graal jfr jni-check jvmci jvmti management nmt parallelgc services \
|
||||
shenandoahgc vm-structs zgc"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
|
||||
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER opt-size"
|
||||
else
|
||||
# Only arm-32 should have link-time-opt enabled as default.
|
||||
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER \
|
||||
link-time-opt"
|
||||
fi
|
||||
elif test "x$variant" = "xcore"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="aot compiler1 compiler2 graal jvmci \
|
||||
link-time-opt opt-size"
|
||||
elif test "x$variant" = "xzero"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="jfr link-time-opt opt-size"
|
||||
else
|
||||
JVM_FEATURES_VARIANT_FILTER="link-time-opt opt-size"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Calculate the actual set of active JVM features for this JVM variant. Store
|
||||
# the result in JVM_FEATURES_ACTIVE.
|
||||
#
|
||||
# arg 1: JVM variant
|
||||
#
|
||||
AC_DEFUN([JVM_FEATURES_CALCULATE_ACTIVE],
|
||||
[
|
||||
variant=$1
|
||||
|
||||
# The default is set to all valid features except those unavailable or listed
|
||||
# in a filter.
|
||||
if test "x$variant" != xcustom; then
|
||||
UTIL_GET_NON_MATCHING_VALUES(default_for_variant, $JVM_FEATURES_VALID, \
|
||||
$JVM_FEATURES_PLATFORM_UNAVAILABLE $JVM_FEATURES_VARIANT_UNAVAILABLE \
|
||||
$JVM_FEATURES_PLATFORM_FILTER $JVM_FEATURES_VARIANT_FILTER)
|
||||
else
|
||||
# Except for the 'custom' variant, where the default is to start with an
|
||||
# empty set.
|
||||
default_for_variant=""
|
||||
fi
|
||||
|
||||
# Verify that explicitly enabled features are available
|
||||
UTIL_GET_MATCHING_VALUES(enabled_but_unavailable, $JVM_FEATURES_ENABLED, \
|
||||
$JVM_FEATURES_PLATFORM_UNAVAILABLE $JVM_FEATURES_VARIANT_UNAVAILABLE)
|
||||
if test "x$enabled_but_unavailable" != x; then
|
||||
AC_MSG_NOTICE([ERROR: Unavailable JVM features explicitly enabled for '$variant': '$enabled_but_unavailable'])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Notify the user if their command line options has no real effect
|
||||
UTIL_GET_MATCHING_VALUES(enabled_but_default, $JVM_FEATURES_ENABLED, \
|
||||
$default_for_variant)
|
||||
if test "x$enabled_but_default" != x; then
|
||||
AC_MSG_NOTICE([Default JVM features explicitly enabled for '$variant': '$enabled_but_default'])
|
||||
fi
|
||||
UTIL_GET_MATCHING_VALUES(disabled_but_unavailable, $JVM_FEATURES_DISABLED, \
|
||||
$JVM_FEATURES_PLATFORM_UNAVAILABLE $JVM_FEATURES_VARIANT_UNAVAILABLE)
|
||||
if test "x$disabled_but_unavailable" != x; then
|
||||
AC_MSG_NOTICE([Unavailable JVM features explicitly disabled for '$variant': '$disabled_but_unavailable'])
|
||||
fi
|
||||
|
||||
# JVM_FEATURES_ACTIVE is the set of all default features and all explicitly
|
||||
# enabled features, with the explicitly disabled features filtered out.
|
||||
UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES_ACTIVE, $default_for_variant \
|
||||
$JVM_FEATURES_ENABLED, $JVM_FEATURES_DISABLED)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper function for JVM_FEATURES_VERIFY. Check if the specified JVM
|
||||
# feature is active. To be used in shell if constructs, like this:
|
||||
# 'if JVM_FEATURES_IS_ACTIVE(jvmti); then'
|
||||
#
|
||||
# Definition kept in one line to allow inlining in if statements.
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
AC_DEFUN([JVM_FEATURES_IS_ACTIVE],
|
||||
[ [ [[ " $JVM_FEATURES_ACTIVE " =~ ' '$1' ' ]] ] ])
|
||||
|
||||
###############################################################################
|
||||
# Verify that the resulting set of features is consistent and legal.
|
||||
#
|
||||
# arg 1: JVM variant
|
||||
#
|
||||
AC_DEFUN([JVM_FEATURES_VERIFY],
|
||||
[
|
||||
variant=$1
|
||||
|
||||
# Verify that dependencies are met for inter-feature relations.
|
||||
if JVM_FEATURES_IS_ACTIVE(aot) && ! JVM_FEATURES_IS_ACTIVE(graal); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'aot' requires feature 'graal' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(graal) && ! JVM_FEATURES_IS_ACTIVE(jvmci); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'graal' requires feature 'jvmci' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(jvmci) && ! (JVM_FEATURES_IS_ACTIVE(compiler1) || \
|
||||
JVM_FEATURES_IS_ACTIVE(compiler2)); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(jvmti) && ! JVM_FEATURES_IS_ACTIVE(services); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(management) && ! JVM_FEATURES_IS_ACTIVE(nmt); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt' for variant '$variant'])
|
||||
fi
|
||||
|
||||
# For backwards compatibility, disable a feature "globally" if one variant
|
||||
# is missing the feature.
|
||||
if ! JVM_FEATURES_IS_ACTIVE(aot); then
|
||||
ENABLE_AOT="false"
|
||||
fi
|
||||
if ! JVM_FEATURES_IS_ACTIVE(cds); then
|
||||
ENABLE_CDS="false"
|
||||
fi
|
||||
if ! JVM_FEATURES_IS_ACTIVE(graal); then
|
||||
INCLUDE_GRAAL="false"
|
||||
fi
|
||||
if ! JVM_FEATURES_IS_ACTIVE(jvmci); then
|
||||
INCLUDE_JVMCI="false"
|
||||
fi
|
||||
|
||||
# Verify that we have at least one gc selected (i.e., feature named "*gc").
|
||||
if ! JVM_FEATURES_IS_ACTIVE(.*gc); then
|
||||
AC_MSG_NOTICE([At least one gc needed for variant '$variant'.])
|
||||
AC_MSG_NOTICE([Specified features: '$JVM_FEATURES_ACTIVE'])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Set up all JVM features for each enabled JVM variant. Requires that
|
||||
# JVM_FEATURES_PARSE_OPTIONS has been called.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_SETUP],
|
||||
[
|
||||
# Set up variant-independent factors
|
||||
JVM_FEATURES_PREPARE_PLATFORM
|
||||
|
||||
# For backwards compatibility, tentatively enable these features "globally",
|
||||
# and disable them in JVM_FEATURES_VERIFY if a variant is found that are
|
||||
# missing any of them.
|
||||
ENABLE_AOT="true"
|
||||
ENABLE_CDS="true"
|
||||
INCLUDE_GRAAL="true"
|
||||
INCLUDE_JVMCI="true"
|
||||
|
||||
for variant in $JVM_VARIANTS; do
|
||||
# Figure out if any features are unavailable, or should be filtered out
|
||||
# by default, for this variant.
|
||||
# Store the result in JVM_FEATURES_VARIANT_UNAVAILABLE and
|
||||
# JVM_FEATURES_VARIANT_FILTER.
|
||||
JVM_FEATURES_PREPARE_VARIANT($variant)
|
||||
|
||||
# Calculate the resulting set of enabled features for this variant.
|
||||
# The result is stored in JVM_FEATURES_ACTIVE.
|
||||
JVM_FEATURES_CALCULATE_ACTIVE($variant)
|
||||
|
||||
# Verify consistency for JVM_FEATURES_ACTIVE.
|
||||
JVM_FEATURES_VERIFY($variant)
|
||||
|
||||
# Keep feature list sorted and free of duplicates
|
||||
UTIL_SORT_LIST(JVM_FEATURES_ACTIVE, $JVM_FEATURES_ACTIVE)
|
||||
AC_MSG_CHECKING([JVM features to use for variant '$variant'])
|
||||
AC_MSG_RESULT(['$JVM_FEATURES_ACTIVE'])
|
||||
|
||||
# Save this as e.g. JVM_FEATURES_server, using indirect variable
|
||||
# referencing.
|
||||
features_var_name=JVM_FEATURES_$variant
|
||||
eval $features_var_name=\"$JVM_FEATURES_ACTIVE\"
|
||||
done
|
||||
|
||||
# Unfortunately AC_SUBST does not work with non-literally named variables,
|
||||
# so list all variants here.
|
||||
AC_SUBST(JVM_FEATURES_server)
|
||||
AC_SUBST(JVM_FEATURES_client)
|
||||
AC_SUBST(JVM_FEATURES_minimal)
|
||||
AC_SUBST(JVM_FEATURES_core)
|
||||
AC_SUBST(JVM_FEATURES_zero)
|
||||
AC_SUBST(JVM_FEATURES_custom)
|
||||
|
||||
AC_SUBST(ENABLE_AOT)
|
||||
AC_SUBST(INCLUDE_GRAAL)
|
||||
AC_SUBST(INCLUDE_JVMCI)
|
||||
|
||||
])
|
@ -51,7 +51,7 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_GRAALUNIT],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_FIXUP_PATH([GRAALUNIT_LIB])
|
||||
UTIL_FIXUP_PATH([GRAALUNIT_LIB])
|
||||
AC_SUBST(GRAALUNIT_LIB)
|
||||
])
|
||||
|
||||
@ -77,7 +77,7 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
|
||||
AC_MSG_RESULT([no, error])
|
||||
AC_MSG_ERROR([$JMH_HOME does not exist or is not a directory])
|
||||
fi
|
||||
BASIC_FIXUP_PATH([JMH_HOME])
|
||||
UTIL_FIXUP_PATH([JMH_HOME])
|
||||
|
||||
jar_names="jmh-core jmh-generator-annprocess jopt-simple commons-math3"
|
||||
for jar in $jar_names; do
|
||||
|
@ -196,7 +196,7 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
|
||||
[
|
||||
if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
|
||||
# Find the root of the Solaris Studio installation from the compiler path
|
||||
SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
|
||||
STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
|
||||
@ -207,10 +207,9 @@ AC_DEFUN_ONCE([LIB_SETUP_SOLARIS_STLPORT],
|
||||
fi
|
||||
if test -f "$STLPORT_LIB"; then
|
||||
AC_MSG_RESULT([yes, $STLPORT_LIB])
|
||||
BASIC_FIXUP_PATH([STLPORT_LIB])
|
||||
UTIL_FIXUP_PATH([STLPORT_LIB])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found at $STLPORT_LIB])
|
||||
AC_MSG_ERROR([Failed to find libstlport.so.1, cannot build Hotspot gtests])
|
||||
AC_MSG_RESULT([no, not found at $STLPORT_LIB, cannot build Hotspot gtests])
|
||||
fi
|
||||
AC_SUBST(STLPORT_LIB)
|
||||
fi
|
||||
|
@ -46,7 +46,7 @@ AC_DEFUN_ONCE([SRCDIRS_SETUP_IMPORT_MODULES],
|
||||
&& test "x$with_import_modules" != "xno"; then
|
||||
if test -d "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$with_import_modules"
|
||||
BASIC_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
|
||||
UTIL_FIXUP_PATH([IMPORT_MODULES_TOPDIR])
|
||||
elif test -e "$with_import_modules"; then
|
||||
IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
|
||||
$RM -rf "$IMPORT_MODULES_TOPDIR"
|
||||
|
@ -303,6 +303,9 @@ ENABLE_HEADLESS_ONLY := @ENABLE_HEADLESS_ONLY@
|
||||
|
||||
ENABLE_LINKTIME_GC := @ENABLE_LINKTIME_GC@
|
||||
|
||||
# Ship debug symbols (e.g. pdbs on Windows)
|
||||
SHIP_DEBUG_SYMBOLS := @SHIP_DEBUG_SYMBOLS@
|
||||
|
||||
ENABLE_FULL_DOCS := @ENABLE_FULL_DOCS@
|
||||
|
||||
# JDK_OUTPUTDIR specifies where a working jvm is built.
|
||||
@ -911,10 +914,16 @@ GRAAL_BUILDER_IMAGE_DIR := $(IMAGES_OUTPUTDIR)/$(GRAAL_BUILDER_IMAGE_SUBDIR)
|
||||
# Macosx bundles directory definitions
|
||||
JDK_MACOSX_BUNDLE_SUBDIR=jdk-bundle
|
||||
JRE_MACOSX_BUNDLE_SUBDIR=jre-bundle
|
||||
JDK_MACOSX_BUNDLE_SUBDIR_SIGNED=jdk-bundle-signed
|
||||
JRE_MACOSX_BUNDLE_SUBDIR_SIGNED=jre-bundle-signed
|
||||
JDK_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
||||
JRE_MACOSX_BUNDLE_DIR=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
||||
JDK_MACOSX_CONTENTS_SUBDIR=jdk-$(VERSION_NUMBER).jdk/Contents
|
||||
JRE_MACOSX_CONTENTS_SUBDIR=jre-$(VERSION_NUMBER).jre/Contents
|
||||
JDK_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||
JRE_MACOSX_BUNDLE_DIR_SIGNED=$(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||
JDK_MACOSX_BUNDLE_TOP_DIR=jdk-$(VERSION_NUMBER).jdk
|
||||
JRE_MACOSX_BUNDLE_TOP_DIR=jre-$(VERSION_NUMBER).jre
|
||||
JDK_MACOSX_CONTENTS_SUBDIR=$(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
|
||||
JRE_MACOSX_CONTENTS_SUBDIR=$(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
|
||||
JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
|
||||
JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
|
||||
|
||||
|
@ -32,6 +32,7 @@
|
||||
# compilers and related tools that are used.
|
||||
########################################################################
|
||||
|
||||
m4_include([toolchain_windows.m4])
|
||||
|
||||
# All valid toolchains, regardless of platform (used by help.m4)
|
||||
VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
|
||||
@ -92,7 +93,7 @@ AC_DEFUN([TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS],
|
||||
# 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 (<)
|
||||
# PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
|
||||
BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
UTIL_DEFUN_NAMED([TOOLCHAIN_CHECK_COMPILER_VERSION],
|
||||
[*VERSION PREFIX IF_AT_LEAST IF_OLDER_THAN], [$@],
|
||||
[
|
||||
# Need to assign to a variable since m4 is blocked from modifying parts in [].
|
||||
@ -143,7 +144,7 @@ AC_DEFUN([TOOLCHAIN_PREPARE_FOR_LD_VERSION_COMPARISONS],
|
||||
# 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 (<)
|
||||
# PREFIX: Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
|
||||
BASIC_DEFUN_NAMED([TOOLCHAIN_CHECK_LINKER_VERSION],
|
||||
UTIL_DEFUN_NAMED([TOOLCHAIN_CHECK_LINKER_VERSION],
|
||||
[*VERSION PREFIX IF_AT_LEAST IF_OLDER_THAN], [$@],
|
||||
[
|
||||
# Need to assign to a variable since m4 is blocked from modifying parts in [].
|
||||
@ -349,8 +350,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
# Append VS_PATH. In WSL, VS_PATH will not contain the WSL env path needed
|
||||
# for using basic Unix tools, so need to keep the original PATH.
|
||||
BASIC_APPEND_TO_PATH(PATH, $VS_PATH)
|
||||
BASIC_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
|
||||
UTIL_APPEND_TO_PATH(PATH, $VS_PATH)
|
||||
UTIL_APPEND_TO_PATH(WSLENV, "PATH/l:LIB:INCLUDE")
|
||||
export WSLENV
|
||||
else
|
||||
# Reset path to VS_PATH. It will include everything that was on PATH at the time we
|
||||
@ -580,12 +581,12 @@ AC_DEFUN([TOOLCHAIN_FIND_COMPILER],
|
||||
fi
|
||||
|
||||
# Now we have a compiler binary in $1. Make sure it's okay.
|
||||
BASIC_FIXUP_EXECUTABLE($1)
|
||||
UTIL_FIXUP_EXECUTABLE($1)
|
||||
TEST_COMPILER="[$]$1"
|
||||
|
||||
AC_MSG_CHECKING([resolved symbolic links for $1])
|
||||
SYMLINK_ORIGINAL="$TEST_COMPILER"
|
||||
BASIC_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
|
||||
UTIL_REMOVE_SYMBOLIC_LINKS(SYMLINK_ORIGINAL)
|
||||
if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
|
||||
AC_MSG_RESULT([no symlink])
|
||||
else
|
||||
@ -716,9 +717,9 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# Setup the preprocessor (CPP and CXXCPP)
|
||||
#
|
||||
AC_PROG_CPP
|
||||
BASIC_FIXUP_EXECUTABLE(CPP)
|
||||
UTIL_FIXUP_EXECUTABLE(CPP)
|
||||
AC_PROG_CXXCPP
|
||||
BASIC_FIXUP_EXECUTABLE(CXXCPP)
|
||||
UTIL_FIXUP_EXECUTABLE(CXXCPP)
|
||||
|
||||
#
|
||||
# Setup the linker (LD)
|
||||
@ -728,7 +729,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
|
||||
# a cygwin program for something completely different.
|
||||
AC_CHECK_PROG([LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK])
|
||||
BASIC_FIXUP_EXECUTABLE(LD)
|
||||
UTIL_FIXUP_EXECUTABLE(LD)
|
||||
# Verify that we indeed succeeded with this trick.
|
||||
AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
|
||||
"$LD" --version > /dev/null
|
||||
@ -746,8 +747,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
LD="$CC"
|
||||
LDCXX="$CXX"
|
||||
# jaotc expects 'ld' as the linker rather than the compiler.
|
||||
BASIC_CHECK_TOOLS([LD_JAOTC], ld)
|
||||
BASIC_FIXUP_EXECUTABLE(LD_JAOTC)
|
||||
UTIL_CHECK_TOOLS([LD_JAOTC], ld)
|
||||
UTIL_FIXUP_EXECUTABLE(LD_JAOTC)
|
||||
fi
|
||||
AC_SUBST(LD)
|
||||
AC_SUBST(LD_JAOTC)
|
||||
@ -769,8 +770,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# Setup the assembler (AS)
|
||||
#
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_PATH_PROGS(AS, as)
|
||||
BASIC_FIXUP_EXECUTABLE(AS)
|
||||
UTIL_PATH_PROGS(AS, as)
|
||||
UTIL_FIXUP_EXECUTABLE(AS)
|
||||
if test "x$AS" = x; then
|
||||
AC_MSG_ERROR([Solaris assembler (as) is required. Please install via "pkg install pkg:/developer/assembler".])
|
||||
fi
|
||||
@ -787,11 +788,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
# The corresponding ar tool is lib.exe (used to create static libraries)
|
||||
AC_CHECK_PROG([AR], [lib$EXE_SUFFIX],[lib$EXE_SUFFIX],,,)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(AR, ar gcc-ar)
|
||||
UTIL_CHECK_TOOLS(AR, ar gcc-ar)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(AR, ar)
|
||||
UTIL_CHECK_TOOLS(AR, ar)
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(AR)
|
||||
UTIL_FIXUP_EXECUTABLE(AR)
|
||||
])
|
||||
|
||||
# Setup additional tools that is considered a part of the toolchain, but not the
|
||||
@ -800,22 +801,22 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
[
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
|
||||
BASIC_PATH_PROGS(LIPO, lipo)
|
||||
BASIC_FIXUP_EXECUTABLE(LIPO)
|
||||
BASIC_REQUIRE_PROGS(OTOOL, otool)
|
||||
BASIC_FIXUP_EXECUTABLE(OTOOL)
|
||||
BASIC_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
|
||||
BASIC_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
|
||||
UTIL_PATH_PROGS(LIPO, lipo)
|
||||
UTIL_FIXUP_EXECUTABLE(LIPO)
|
||||
UTIL_REQUIRE_PROGS(OTOOL, otool)
|
||||
UTIL_FIXUP_EXECUTABLE(OTOOL)
|
||||
UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
|
||||
UTIL_FIXUP_EXECUTABLE(INSTALL_NAME_TOOL)
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
AC_CHECK_PROG([MT], [mt$EXE_SUFFIX], [mt$EXE_SUFFIX],,, [/usr/bin/mt])
|
||||
BASIC_FIXUP_EXECUTABLE(MT)
|
||||
UTIL_FIXUP_EXECUTABLE(MT)
|
||||
# Setup the resource compiler (RC)
|
||||
AC_CHECK_PROG([RC], [rc$EXE_SUFFIX], [rc$EXE_SUFFIX],,, [/usr/bin/rc])
|
||||
BASIC_FIXUP_EXECUTABLE(RC)
|
||||
UTIL_FIXUP_EXECUTABLE(RC)
|
||||
AC_CHECK_PROG([DUMPBIN], [dumpbin$EXE_SUFFIX], [dumpbin$EXE_SUFFIX],,,)
|
||||
BASIC_FIXUP_EXECUTABLE(DUMPBIN)
|
||||
UTIL_FIXUP_EXECUTABLE(DUMPBIN)
|
||||
# We need to check for 'msbuild.exe' because at the place where we expect to
|
||||
# find 'msbuild.exe' there's also a directory called 'msbuild' and configure
|
||||
# won't find the 'msbuild.exe' executable in that case (and the
|
||||
@ -827,22 +828,22 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
|
||||
BASIC_PATH_PROGS(STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
BASIC_PATH_PROGS(NM, nm)
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
BASIC_PATH_PROGS(GNM, gnm)
|
||||
BASIC_FIXUP_EXECUTABLE(GNM)
|
||||
UTIL_PATH_PROGS(STRIP, strip)
|
||||
UTIL_FIXUP_EXECUTABLE(STRIP)
|
||||
UTIL_PATH_PROGS(NM, nm)
|
||||
UTIL_FIXUP_EXECUTABLE(NM)
|
||||
UTIL_PATH_PROGS(GNM, gnm)
|
||||
UTIL_FIXUP_EXECUTABLE(GNM)
|
||||
elif test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
# FIXME: we should unify this with the solaris case above.
|
||||
BASIC_CHECK_TOOLS(STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(STRIP)
|
||||
UTIL_CHECK_TOOLS(STRIP, strip)
|
||||
UTIL_FIXUP_EXECUTABLE(STRIP)
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
BASIC_CHECK_TOOLS(NM, nm gcc-nm)
|
||||
UTIL_CHECK_TOOLS(NM, nm gcc-nm)
|
||||
else
|
||||
BASIC_CHECK_TOOLS(NM, nm)
|
||||
UTIL_CHECK_TOOLS(NM, nm)
|
||||
fi
|
||||
BASIC_FIXUP_EXECUTABLE(NM)
|
||||
UTIL_FIXUP_EXECUTABLE(NM)
|
||||
GNM="$NM"
|
||||
AC_SUBST(GNM)
|
||||
fi
|
||||
@ -850,10 +851,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
# objcopy is used for moving debug symbols to separate files when
|
||||
# full debug symbols are enabled.
|
||||
if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
|
||||
BASIC_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
UTIL_CHECK_TOOLS(OBJCOPY, [gobjcopy objcopy])
|
||||
# Only call fixup if objcopy was found.
|
||||
if test -n "$OBJCOPY"; then
|
||||
BASIC_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
UTIL_FIXUP_EXECUTABLE(OBJCOPY)
|
||||
if test "x$OPENJDK_BUILD_OS" = xsolaris; then
|
||||
# objcopy prior to 2.21.1 on solaris is broken and is not usable.
|
||||
# Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
|
||||
@ -894,18 +895,18 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
|
||||
UTIL_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
|
||||
if test "x$OBJDUMP" != x; then
|
||||
# Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
|
||||
# Only used for compare.sh; we can live without it. UTIL_FIXUP_EXECUTABLE
|
||||
# bails if argument is missing.
|
||||
BASIC_FIXUP_EXECUTABLE(OBJDUMP)
|
||||
UTIL_FIXUP_EXECUTABLE(OBJDUMP)
|
||||
fi
|
||||
|
||||
case $TOOLCHAIN_TYPE in
|
||||
gcc|clang|solstudio)
|
||||
BASIC_CHECK_TOOLS(CXXFILT, [c++filt])
|
||||
BASIC_CHECK_NONEMPTY(CXXFILT)
|
||||
BASIC_FIXUP_EXECUTABLE(CXXFILT)
|
||||
UTIL_CHECK_TOOLS(CXXFILT, [c++filt])
|
||||
UTIL_CHECK_NONEMPTY(CXXFILT)
|
||||
UTIL_FIXUP_EXECUTABLE(CXXFILT)
|
||||
;;
|
||||
esac
|
||||
])
|
||||
@ -933,7 +934,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
if test ! -d "$with_build_devkit"; then
|
||||
AC_MSG_ERROR([--with-build-devkit points to non existing dir: $with_build_devkit])
|
||||
else
|
||||
BASIC_FIXUP_PATH([with_build_devkit])
|
||||
UTIL_FIXUP_PATH([with_build_devkit])
|
||||
BUILD_DEVKIT_ROOT="$with_build_devkit"
|
||||
# Check for a meta data info file in the root of the devkit
|
||||
if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
|
||||
@ -977,18 +978,18 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
# FIXME: we should list the discovered compilers as an exclude pattern!
|
||||
# If we do that, we can do this detection before POST_DETECTION, and still
|
||||
# find the build compilers in the tools dir, if needed.
|
||||
BASIC_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CC)
|
||||
BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
BASIC_PATH_PROGS(BUILD_NM, nm gcc-nm)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_NM)
|
||||
BASIC_PATH_PROGS(BUILD_AR, ar gcc-ar)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_AR)
|
||||
BASIC_PATH_PROGS(BUILD_OBJCOPY, objcopy)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_OBJCOPY)
|
||||
BASIC_PATH_PROGS(BUILD_STRIP, strip)
|
||||
BASIC_FIXUP_EXECUTABLE(BUILD_STRIP)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_CC)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_CXX)
|
||||
UTIL_PATH_PROGS(BUILD_NM, nm gcc-nm)
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_NM)
|
||||
UTIL_PATH_PROGS(BUILD_AR, ar gcc-ar)
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_AR)
|
||||
UTIL_PATH_PROGS(BUILD_OBJCOPY, objcopy)
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_OBJCOPY)
|
||||
UTIL_PATH_PROGS(BUILD_STRIP, strip)
|
||||
UTIL_FIXUP_EXECUTABLE(BUILD_STRIP)
|
||||
# Assume the C compiler is the assembler
|
||||
BUILD_AS="$BUILD_CC -c"
|
||||
# Just like for the target compiler, use the compiler as linker
|
||||
@ -1082,7 +1083,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
BASIC_FIXUP_PATH([JT_HOME])
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
@ -1122,7 +1123,7 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
BASIC_PATH_PROGS(JTREGEXE, jtreg)
|
||||
UTIL_PATH_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
@ -1148,8 +1149,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
fi
|
||||
fi
|
||||
|
||||
BASIC_FIXUP_EXECUTABLE(JTREGEXE)
|
||||
BASIC_FIXUP_PATH(JT_HOME)
|
||||
UTIL_FIXUP_EXECUTABLE(JTREGEXE)
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
AC_SUBST(JTREGEXE)
|
||||
])
|
||||
|
@ -112,7 +112,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
VS_BASE="$2"
|
||||
METHOD="$3"
|
||||
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(VS_BASE)
|
||||
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
|
||||
# Find the first one present and use that.
|
||||
if test "x$VS_EDITIONS" != x; then
|
||||
@ -160,7 +160,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
VS_VERSION="$1"
|
||||
WIN_SDK_BASE="$2"
|
||||
METHOD="$3"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(WIN_SDK_BASE)
|
||||
if test -d "$WIN_SDK_BASE"; then
|
||||
# There have been cases of partial or broken SDK installations. A missing
|
||||
# lib dir is not going to work.
|
||||
@ -313,7 +313,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
VS_PATH_WINDOWS=""
|
||||
for i in $TOOLCHAIN_PATH; do
|
||||
path=$i
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([path])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([path])
|
||||
VS_PATH_WINDOWS="$VS_PATH_WINDOWS;$path"
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
@ -331,14 +331,14 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
IFS=";"
|
||||
for i in $DEVKIT_VS_INCLUDE; do
|
||||
ipath=$i
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([ipath])
|
||||
VS_INCLUDE="$VS_INCLUDE;$ipath"
|
||||
done
|
||||
# Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
|
||||
# as LIB for compiler invocations without SYSROOT_LDFLAGS
|
||||
for i in $DEVKIT_VS_LIB; do
|
||||
libpath=$i
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([libpath])
|
||||
VS_LIB="$VS_LIB;$libpath"
|
||||
done
|
||||
IFS="$OLDIFS"
|
||||
@ -408,7 +408,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
if test "x$DEVKIT_VS_VERSION" = x; then
|
||||
if test "x$VS_ENV_CMD" != x; then
|
||||
# We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
|
||||
BASIC_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||
UTIL_FIXUP_EXECUTABLE(VS_ENV_CMD)
|
||||
|
||||
# Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
|
||||
AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
|
||||
@ -420,13 +420,13 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
# Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
|
||||
# Instead create a shell script which will set the relevant variables when run.
|
||||
WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
WINPATH_BASH="bash"
|
||||
else
|
||||
WINPATH_BASH="$BASH"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
|
||||
fi
|
||||
|
||||
# Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
|
||||
@ -521,10 +521,10 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
IFS="$OLDIFS"
|
||||
# Check that directory exists before calling fixup_path
|
||||
testpath=$path
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([testpath])
|
||||
if test -d "$testpath"; then
|
||||
BASIC_FIXUP_PATH([path])
|
||||
BASIC_APPEND_TO_PATH(VS_PATH, $path)
|
||||
UTIL_FIXUP_PATH([path])
|
||||
UTIL_APPEND_TO_PATH(VS_PATH, $path)
|
||||
fi
|
||||
IFS=";"
|
||||
fi
|
||||
@ -576,9 +576,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
IFS="$OLDIFS"
|
||||
# Check that directory exists before calling fixup_path
|
||||
testpath=$ipath
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([testpath])
|
||||
if test -d "$testpath"; then
|
||||
BASIC_FIXUP_PATH([ipath])
|
||||
UTIL_FIXUP_PATH([ipath])
|
||||
SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
|
||||
fi
|
||||
IFS=";"
|
||||
@ -592,9 +592,9 @@ AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
|
||||
IFS="$OLDIFS"
|
||||
# Check that directory exists before calling fixup_path
|
||||
testpath=$libpath
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([testpath])
|
||||
if test -d "$testpath"; then
|
||||
BASIC_FIXUP_PATH([libpath])
|
||||
UTIL_FIXUP_PATH([libpath])
|
||||
SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
|
||||
fi
|
||||
IFS=";"
|
||||
@ -665,7 +665,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
|
||||
BASIC_FIXUP_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||
UTIL_FIXUP_PATH(CYGWIN_VC_INSTALL_DIR)
|
||||
if test "$VS_VERSION" -lt 2017; then
|
||||
# Probe: Using well-known location from Visual Studio 12.0 and older
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
@ -675,7 +675,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
fi
|
||||
else
|
||||
CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir"
|
||||
BASIC_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
|
||||
UTIL_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
|
||||
# Probe: Using well-known location from VS 2017 and VS 2019
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
|
||||
@ -702,7 +702,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
# Probe: Look in the Windows system32 directory
|
||||
CYGWIN_SYSTEMROOT="$SYSTEMROOT"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(CYGWIN_SYSTEMROOT)
|
||||
POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
|
||||
[well-known location in SYSTEMROOT])
|
||||
@ -712,7 +712,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
# Probe: If Visual Studio Express is installed, there is usually one with the debugger
|
||||
if test "x$VS100COMNTOOLS" != x; then
|
||||
CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
|
||||
POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
|
||||
| $GREP -i /x64/ | $HEAD --lines 1`
|
||||
@ -814,14 +814,14 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
else
|
||||
AC_MSG_RESULT([$with_ucrt_dll_dir])
|
||||
UCRT_DLL_DIR="$with_ucrt_dll_dir"
|
||||
BASIC_FIXUP_PATH([UCRT_DLL_DIR])
|
||||
UTIL_FIXUP_PATH([UCRT_DLL_DIR])
|
||||
fi
|
||||
elif test "x$DEVKIT_UCRT_DLL_DIR" != "x"; then
|
||||
UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"
|
||||
AC_MSG_RESULT($UCRT_DLL_DIR)
|
||||
else
|
||||
CYGWIN_WINDOWSSDKDIR="${WINDOWSSDKDIR}"
|
||||
BASIC_FIXUP_PATH([CYGWIN_WINDOWSSDKDIR])
|
||||
UTIL_FIXUP_PATH([CYGWIN_WINDOWSSDKDIR])
|
||||
dll_subdir=$OPENJDK_TARGET_CPU
|
||||
if test "x$dll_subdir" = "xx86_64"; then
|
||||
dll_subdir="x64"
|
||||
|
399
make/autoconf/util.m4
Normal file
399
make/autoconf/util.m4
Normal file
@ -0,0 +1,399 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
m4_include([util_paths.m4])
|
||||
m4_include([util_windows.m4])
|
||||
|
||||
###############################################################################
|
||||
# Create a function/macro that takes a series of named arguments. The call is
|
||||
# similar to AC_DEFUN, but the setup of the function looks like this:
|
||||
# UTIL_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
|
||||
# ... do something
|
||||
# AC_MSG_NOTICE([Value of BAR is ARG_BAR])
|
||||
# ])
|
||||
# A star (*) in front of a named argument means that it is required and it's
|
||||
# presence will be verified. To pass e.g. the first value as a normal indexed
|
||||
# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
|
||||
# arguments are referenced in the function by their name prefixed by ARG_, e.g.
|
||||
# "ARG_FOO".
|
||||
#
|
||||
# The generated function can be called like this:
|
||||
# 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
|
||||
# Argument 3: Argument array to treat as named, typically $@
|
||||
# Argument 4: The main function body
|
||||
AC_DEFUN([UTIL_DEFUN_NAMED],
|
||||
[
|
||||
AC_DEFUN($1, [
|
||||
m4_foreach(arg, m4_split($2), [
|
||||
m4_if(m4_bregexp(arg, [^\*]), -1,
|
||||
[
|
||||
m4_set_add(legal_named_args, arg)
|
||||
],
|
||||
[
|
||||
m4_set_add(legal_named_args, m4_substr(arg, 1))
|
||||
m4_set_add(required_named_args, m4_substr(arg, 1))
|
||||
]
|
||||
)
|
||||
])
|
||||
|
||||
m4_foreach([arg], [$3], [
|
||||
m4_define(arg_name, m4_substr(arg, 0, m4_bregexp(arg, [: ])))
|
||||
m4_set_contains(legal_named_args, arg_name, [],[AC_MSG_ERROR([Internal error: arg_name is not a valid named argument to [$1]. Valid arguments are 'm4_set_contents(legal_named_args, [ ])'.])])
|
||||
m4_set_remove(required_named_args, arg_name)
|
||||
m4_set_remove(legal_named_args, arg_name)
|
||||
m4_pushdef([ARG_][]arg_name, m4_substr(arg, m4_incr(m4_incr(m4_bregexp(arg, [: ])))))
|
||||
m4_set_add(defined_args, arg_name)
|
||||
m4_undefine([arg_name])
|
||||
])
|
||||
m4_set_empty(required_named_args, [], [
|
||||
AC_MSG_ERROR([Internal error: Required named arguments are missing for [$1]. Missing arguments: 'm4_set_contents(required_named_args, [ ])'])
|
||||
])
|
||||
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([legal_named_args])), [
|
||||
m4_pushdef([ARG_][]arg, [])
|
||||
m4_set_add(defined_args, arg)
|
||||
])
|
||||
m4_set_delete(legal_named_args)
|
||||
m4_set_delete(required_named_args)
|
||||
|
||||
# Execute function body
|
||||
$4
|
||||
|
||||
m4_foreach([arg], m4_indir([m4_dquote]m4_set_listc([defined_args])), [
|
||||
m4_popdef([ARG_][]arg)
|
||||
])
|
||||
|
||||
m4_set_delete(defined_args)
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Assert that a programmatic condition holds. If not, exit with an error message.
|
||||
# Check that two strings are equal.
|
||||
#
|
||||
# $1: The actual string found
|
||||
# $2: The expected string
|
||||
# $3: An message to print in case of failure [optional]
|
||||
#
|
||||
AC_DEFUN([UTIL_ASSERT_STRING_EQUALS],
|
||||
[
|
||||
ASSERTION_MSG="m4_normalize([$3])"
|
||||
if test "x[$1]" != "x[$2]"; then
|
||||
$ECHO Assertion failed: Actual value '[$1]' \("[$1]"\) did not match \
|
||||
expected value '[$2]' \("[$2]"\)
|
||||
if test "x$ASSERTION_MSG" != x; then
|
||||
$ECHO Assertion message: "$ASSERTION_MSG"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if a list of space-separated words are selected only from a list of
|
||||
# space-separated legal words. Typical use is to see if a user-specified
|
||||
# set of words is selected from a set of legal words.
|
||||
#
|
||||
# Sets the specified variable to list of non-matching (offending) words, or to
|
||||
# the empty string if all words are matching the legal set.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to check
|
||||
# $3: list of legal values
|
||||
AC_DEFUN([UTIL_GET_NON_MATCHING_VALUES],
|
||||
[
|
||||
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
|
||||
# Notice that the original variant fails on SLES 10 and 11
|
||||
# Some grep versions (at least bsd) behaves strangely on the base case with
|
||||
# no legal_values, so make it explicit.
|
||||
values_to_check=`$ECHO $2 | $TR ' ' '\n'`
|
||||
legal_values=`$ECHO $3 | $TR ' ' '\n'`
|
||||
if test -z "$legal_values"; then
|
||||
$1="$2"
|
||||
else
|
||||
result=`$GREP -Fvx "$legal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if a list of space-separated words contains any word(s) from a list of
|
||||
# space-separated illegal words. Typical use is to see if a user-specified
|
||||
# set of words contains any from a set of illegal words.
|
||||
#
|
||||
# Sets the specified variable to list of matching illegal words, or to
|
||||
# the empty string if no words are matching the illegal set.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to check
|
||||
# $3: list of illegal values
|
||||
AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
[
|
||||
# grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
|
||||
# Notice that the original variant fails on SLES 10 and 11
|
||||
# Some grep versions (at least bsd) behaves strangely on the base case with
|
||||
# no legal_values, so make it explicit.
|
||||
values_to_check=`$ECHO $2 | $TR ' ' '\n'`
|
||||
illegal_values=`$ECHO $3 | $TR ' ' '\n'`
|
||||
if test -z "$illegal_values"; then
|
||||
$1=""
|
||||
else
|
||||
result=`$GREP -Fx "$illegal_values" <<< "$values_to_check" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Sort a space-separated list, and remove duplicates.
|
||||
#
|
||||
# Sets the specified variable to the resulting list.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: list of values to sort
|
||||
AC_DEFUN([UTIL_SORT_LIST],
|
||||
[
|
||||
values_to_sort=`$ECHO $2 | $TR ' ' '\n'`
|
||||
result=`$SORT -u <<< "$values_to_sort" | $GREP -v '^$'`
|
||||
$1=${result//$'\n'/ }
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
|
||||
# If so, then append $1 to $2 \
|
||||
# Also set JVM_ARG_OK to true/false depending on outcome.
|
||||
AC_DEFUN([UTIL_ADD_JVM_ARG_IF_OK],
|
||||
[
|
||||
$ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD
|
||||
OUTPUT=`$3 $1 $USER_BOOT_JDK_OPTIONS -version 2>&1`
|
||||
FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
|
||||
FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
|
||||
if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
|
||||
$2="[$]$2 $1"
|
||||
JVM_ARG_OK=true
|
||||
else
|
||||
$ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD
|
||||
$ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD
|
||||
JVM_ARG_OK=false
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register a --with argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --with-
|
||||
AC_DEFUN([UTIL_DEPRECATED_ARG_WITH],
|
||||
[
|
||||
AC_ARG_WITH($1, [AS_HELP_STRING([--with-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])],
|
||||
[AC_MSG_WARN([Option --with-$1 is deprecated and will be ignored.])])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register a --enable argument but mark it as deprecated
|
||||
# $1: The name of the with argument to deprecate, not including --enable-
|
||||
# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
|
||||
# $3: Messages to user.
|
||||
AC_DEFUN([UTIL_DEPRECATED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1],
|
||||
[Deprecated. Option is kept for backwards compatibility and is ignored])])
|
||||
if test "x$enable_$2" != x; then
|
||||
AC_MSG_WARN([Option --enable-$1 is deprecated and will be ignored.])
|
||||
|
||||
if test "x$3" != x; then
|
||||
AC_MSG_WARN([$3])
|
||||
fi
|
||||
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Register an --enable-* argument as an alias for another argument.
|
||||
# $1: The name of the enable argument for the new alias, not including --enable-
|
||||
# $2: The full name of the argument of which to make this an alias, including
|
||||
# --enable- or --with-.
|
||||
AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
|
||||
[
|
||||
AC_ARG_ENABLE($1, [AS_HELP_STRING([--enable-$1], [alias for $2])], [
|
||||
# Use m4 to strip initial -- from target ($2), convert - to _, prefix enable_
|
||||
# to new alias name, and create a shell variable assignment,
|
||||
# e.g.: enable_old_style="$enable_new_alias"
|
||||
m4_translit(m4_bpatsubst($2, --), -, _)="$[enable_]m4_translit($1, -, _)"
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
|
||||
# $1: variable to check
|
||||
AC_DEFUN([UTIL_CHECK_NONEMPTY],
|
||||
[
|
||||
if test "x[$]$1" = x; then
|
||||
AC_MSG_ERROR([Could not find required tool for $1])
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Setup a tool for the given variable. If correctly specified by the user,
|
||||
# use that value, otherwise search for the tool using the supplied code snippet.
|
||||
# $1: variable to set
|
||||
# $2: code snippet to call to look for the tool
|
||||
# $3: code snippet to call if variable was used to find tool
|
||||
AC_DEFUN([UTIL_SETUP_TOOL],
|
||||
[
|
||||
# Publish this variable in the help.
|
||||
AC_ARG_VAR($1, [Override default value for $1])
|
||||
|
||||
if [[ -z "${$1+x}" ]]; then
|
||||
# The variable is not set by user, try to locate tool using the code snippet
|
||||
$2
|
||||
else
|
||||
# The variable is set, but is it from the command line or the environment?
|
||||
|
||||
# Try to remove the string !$1! from our list.
|
||||
try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!$1!/}
|
||||
if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
|
||||
# If it failed, the variable was not from the command line. Ignore it,
|
||||
# but warn the user (except for BASH, which is always set by the calling BASH).
|
||||
if test "x$1" != xBASH; then
|
||||
AC_MSG_WARN([Ignoring value of $1 from the environment. Use command line variables instead.])
|
||||
fi
|
||||
# Try to locate tool using the code snippet
|
||||
$2
|
||||
else
|
||||
# If it succeeded, then it was overridden by the user. We will use it
|
||||
# for the tool.
|
||||
|
||||
# First remove it from the list of overridden variables, so we can test
|
||||
# for unknown variables in the end.
|
||||
CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
|
||||
|
||||
tool_override=[$]$1
|
||||
AC_MSG_NOTICE([User supplied override $1="$tool_override"])
|
||||
|
||||
# Check if we try to supply an empty value
|
||||
if test "x$tool_override" = x; then
|
||||
AC_MSG_CHECKING([for $1])
|
||||
AC_MSG_RESULT([disabled])
|
||||
else
|
||||
# Split up override in command part and argument part
|
||||
tool_and_args=($tool_override)
|
||||
[ tool_command=${tool_and_args[0]} ]
|
||||
[ unset 'tool_and_args[0]' ]
|
||||
[ tool_args=${tool_and_args[@]} ]
|
||||
|
||||
# Check if the provided tool contains a complete path.
|
||||
tool_basename="${tool_command##*/}"
|
||||
if test "x$tool_basename" = "x$tool_command"; then
|
||||
# A command without a complete path is provided, search $PATH.
|
||||
AC_MSG_NOTICE([Will search for user supplied tool "$tool_basename"])
|
||||
AC_PATH_PROG($1, $tool_basename)
|
||||
if test "x[$]$1" = x; then
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_basename" could not be found])
|
||||
fi
|
||||
else
|
||||
# Otherwise we believe it is a complete path. Use it as it is.
|
||||
AC_MSG_NOTICE([Will use user supplied tool "$tool_command"])
|
||||
AC_MSG_CHECKING([for $tool_command])
|
||||
if test ! -x "$tool_command"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
|
||||
fi
|
||||
$1="$tool_command"
|
||||
AC_MSG_RESULT([found])
|
||||
fi
|
||||
if test "x$tool_args" != x; then
|
||||
# If we got arguments, re-append them to the command after the fixup.
|
||||
$1="[$]$1 $tool_args"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
$3
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Call UTIL_SETUP_TOOL with AC_PATH_PROGS to locate the tool
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_PATH_PROGS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
AC_DEFUN([UTIL_CHECK_TOOLS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [AC_CHECK_TOOLS($1, $2)])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_PATH_PROGS but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_REQUIRE_PROGS],
|
||||
[
|
||||
UTIL_PATH_PROGS($1, $2, , $3)
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_SETUP_TOOL but fails if no tool was found.
|
||||
# $1: variable to set
|
||||
# $2: autoconf macro to call to look for the special tool
|
||||
AC_DEFUN([UTIL_REQUIRE_SPECIAL],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [$2])
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Like UTIL_REQUIRE_PROGS but also allows for bash built-ins
|
||||
# $1: variable to set
|
||||
# $2: executable name (or list of names) to look for
|
||||
# $3: [path]
|
||||
AC_DEFUN([UTIL_REQUIRE_BUILTIN_PROGS],
|
||||
[
|
||||
UTIL_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
|
||||
if test "x[$]$1" = x; then
|
||||
AC_MSG_NOTICE([Required tool $2 not found in PATH, checking built-in])
|
||||
if help $2 > /dev/null 2>&1; then
|
||||
AC_MSG_NOTICE([Found $2 as shell built-in. Using it])
|
||||
$1="$2"
|
||||
else
|
||||
AC_MSG_ERROR([Required tool $2 also not found as built-in.])
|
||||
fi
|
||||
fi
|
||||
UTIL_CHECK_NONEMPTY($1)
|
||||
])
|
232
make/autoconf/util_paths.m4
Normal file
232
make/autoconf/util_paths.m4
Normal file
@ -0,0 +1,232 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, 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.
|
||||
#
|
||||
|
||||
# Appends a string to a path variable, only adding the : when needed.
|
||||
AC_DEFUN([UTIL_APPEND_TO_PATH],
|
||||
[
|
||||
if test "x$2" != x; then
|
||||
if test "x[$]$1" = x; then
|
||||
$1="$2"
|
||||
else
|
||||
$1="[$]$1:$2"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Prepends a string to a path variable, only adding the : when needed.
|
||||
AC_DEFUN([UTIL_PREPEND_TO_PATH],
|
||||
[
|
||||
if test "x$2" != x; then
|
||||
if test "x[$]$1" = x; then
|
||||
$1="$2"
|
||||
else
|
||||
$1="$2:[$]$1"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
# This will make a path absolute. Assumes it's already a unix path. Also
|
||||
# resolves ~ to homedir.
|
||||
AC_DEFUN([UTIL_ABSOLUTE_PATH],
|
||||
[
|
||||
if test "x[$]$1" != x; then
|
||||
new_path="[$]$1"
|
||||
|
||||
# Use eval to expand a potential ~. This technique does not work if there
|
||||
# are spaces in the path (which is valid at this point on Windows), so only
|
||||
# try to apply it if there is an actual ~ first in the path.
|
||||
if [ [[ "$new_path" = "~"* ]] ]; then
|
||||
eval new_path="$new_path"
|
||||
if test ! -f "$new_path" && test ! -d "$new_path"; then
|
||||
AC_MSG_ERROR([The new_path of $1, which resolves as "$new_path", is not found.])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -d "$new_path"; then
|
||||
$1="`cd "$new_path"; $THEPWDCMD -L`"
|
||||
else
|
||||
dir="`$DIRNAME "$new_path"`"
|
||||
base="`$BASENAME "$new_path"`"
|
||||
$1="`cd "$dir"; $THEPWDCMD -L`/$base"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# This will make sure the given variable points to a full and proper
|
||||
# path. This means:
|
||||
# 1) There will be no spaces in the path. On unix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([UTIL_FIXUP_PATH],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
if test "x[$]$1" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
UTIL_FIXUP_PATH_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
UTIL_FIXUP_PATH_MSYS($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
UTIL_FIXUP_PATH_WSL($1)
|
||||
else
|
||||
# We're on a unix platform. Hooray! :)
|
||||
path="[$]$1"
|
||||
has_space=`$ECHO "$path" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
|
||||
AC_MSG_ERROR([Spaces are not allowed in this path.])
|
||||
fi
|
||||
|
||||
UTIL_ABSOLUTE_PATH(path)
|
||||
$1="$path"
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# This will make sure the given variable points to a executable
|
||||
# with a full and proper path. This means:
|
||||
# 1) There will be no spaces in the path. On unix platforms,
|
||||
# spaces in the path will result in an error. On Windows,
|
||||
# the path will be rewritten using short-style to be space-free.
|
||||
# 2) The path will be absolute, and it will be in unix-style (on
|
||||
# cygwin).
|
||||
# Any arguments given to the executable is preserved.
|
||||
# If the input variable does not have a directory specification, then
|
||||
# it need to be in the PATH.
|
||||
# $1: The name of the variable to fix
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
|
||||
[
|
||||
# Only process if variable expands to non-empty
|
||||
|
||||
if test "x[$]$1" != x; then
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
UTIL_FIXUP_EXECUTABLE_CYGWIN($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
UTIL_FIXUP_EXECUTABLE_MSYS($1)
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
UTIL_FIXUP_EXECUTABLE_WSL($1)
|
||||
else
|
||||
# We're on a unix platform. Hooray! :)
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
complete="[$]$1"
|
||||
path="${complete%% *}"
|
||||
tmp="$complete EOL"
|
||||
arguments="${tmp#* }"
|
||||
|
||||
# Cannot rely on the command "which" here since it doesn't always work.
|
||||
is_absolute_path=`$ECHO "$path" | $GREP ^/`
|
||||
if test -z "$is_absolute_path"; then
|
||||
# Path to executable is not absolute. Find it.
|
||||
IFS_save="$IFS"
|
||||
IFS=:
|
||||
for p in $PATH; do
|
||||
if test -f "$p/$path" && test -x "$p/$path"; then
|
||||
new_path="$p/$path"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$IFS_save"
|
||||
else
|
||||
# This is an absolute path, we can use it without further modifications.
|
||||
new_path="$path"
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
AC_MSG_NOTICE([The path of $1, which resolves as "$complete", is not found.])
|
||||
has_space=`$ECHO "$complete" | $GREP " "`
|
||||
if test "x$has_space" != x; then
|
||||
AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
|
||||
fi
|
||||
AC_MSG_ERROR([Cannot locate the the path of $1])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now join together the path and the arguments once again
|
||||
if test "x$arguments" != xEOL; then
|
||||
new_complete="$new_path ${arguments% *}"
|
||||
else
|
||||
new_complete="$new_path"
|
||||
fi
|
||||
|
||||
if test "x$complete" != "x$new_complete"; then
|
||||
$1="$new_complete"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_complete"])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([UTIL_REMOVE_SYMBOLIC_LINKS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS" != xwindows; then
|
||||
# Follow a chain of symbolic links. Use readlink
|
||||
# where it exists, else fall back to horribly
|
||||
# complicated shell code.
|
||||
if test "x$READLINK_TESTED" != yes; then
|
||||
# On MacOSX there is a readlink tool with a different
|
||||
# purpose than the GNU readlink tool. Check the found readlink.
|
||||
READLINK_ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
|
||||
# If READLINK_ISGNU is empty, then it's a non-GNU readlink. Don't use it.
|
||||
READLINK_TESTED=yes
|
||||
fi
|
||||
|
||||
if test "x$READLINK" != x && test "x$READLINK_ISGNU" != x; then
|
||||
$1=`$READLINK -f [$]$1`
|
||||
else
|
||||
# Save the current directory for restoring afterwards
|
||||
STARTDIR=$PWD
|
||||
COUNTER=0
|
||||
sym_link_dir=`$DIRNAME [$]$1`
|
||||
sym_link_file=`$BASENAME [$]$1`
|
||||
cd $sym_link_dir
|
||||
# Use -P flag to resolve symlinks in directories.
|
||||
cd `$THEPWDCMD -P`
|
||||
sym_link_dir=`$THEPWDCMD -P`
|
||||
# Resolve file symlinks
|
||||
while test $COUNTER -lt 20; do
|
||||
ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
|
||||
if test "x$ISLINK" == x; then
|
||||
# This is not a symbolic link! We are done!
|
||||
break
|
||||
fi
|
||||
# Again resolve directory symlinks since the target of the just found
|
||||
# link could be in a different directory
|
||||
cd `$DIRNAME $ISLINK`
|
||||
sym_link_dir=`$THEPWDCMD -P`
|
||||
sym_link_file=`$BASENAME $ISLINK`
|
||||
let COUNTER=COUNTER+1
|
||||
done
|
||||
cd $STARTDIR
|
||||
$1=$sym_link_dir/$sym_link_file
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
|
||||
AC_DEFUN([UTIL_REWRITE_AS_UNIX_PATH],
|
||||
[
|
||||
windows_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -42,7 +42,7 @@ AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
|
||||
AC_DEFUN([UTIL_REWRITE_AS_WINDOWS_MIXED_PATH],
|
||||
[
|
||||
unix_path="[$]$1"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
@ -60,7 +60,7 @@ AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
||||
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
@ -96,7 +96,7 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN],
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
|
||||
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
@ -113,7 +113,7 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],
|
||||
# Helper function which possibly converts a path using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
# $1: The path to check
|
||||
AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL],
|
||||
AC_DEFUN([UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL],
|
||||
[
|
||||
input_path="$1"
|
||||
# Check if we need to convert this using DOS-style short mode. If the path
|
||||
@ -124,31 +124,31 @@ AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL],
|
||||
if test "x$has_forbidden_chars" != x; then
|
||||
# Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
|
||||
TOPDIR_windows="$TOPDIR"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([TOPDIR_windows])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([TOPDIR_windows])
|
||||
# First convert to Windows path to make input valid for cmd
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([input_path])
|
||||
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([input_path])
|
||||
new_path=`$CMD /c $TOPDIR_windows/make/scripts/windowsShortName.bat "$input_path" \
|
||||
| $SED -e 's|\r||g' \
|
||||
| $TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
# Rewrite back to unix style
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([new_path])
|
||||
fi
|
||||
])
|
||||
|
||||
# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
|
||||
# FIXME: The UTIL_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
|
||||
# and could probably be heavily simplified. However, all changes in this
|
||||
# area tend to need lot of testing in different scenarios, and in lack of
|
||||
# proper unit testing, cleaning this up has not been deemed worth the effort
|
||||
# at the moment.
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
AC_DEFUN([UTIL_FIXUP_PATH_CYGWIN],
|
||||
[
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
path="[$]$1"
|
||||
new_path=`$CYGPATH -u "$path"`
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
UTIL_ABSOLUTE_PATH(new_path)
|
||||
|
||||
# Cygwin tries to hide some aspects of the Windows file system, such that binaries are
|
||||
# named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
|
||||
@ -165,7 +165,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$new_path])
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
@ -173,7 +173,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_CYGWIN],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
AC_DEFUN([UTIL_FIXUP_PATH_MSYS],
|
||||
[
|
||||
path="[$]$1"
|
||||
has_colon=`$ECHO $path | $GREP ^.:`
|
||||
@ -183,10 +183,10 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
new_path=`cmd //c echo $path`
|
||||
fi
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
UTIL_ABSOLUTE_PATH(new_path)
|
||||
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
UTIL_REWRITE_AS_UNIX_PATH(new_path)
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
|
||||
@ -196,18 +196,18 @@ AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
|
||||
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_PATH_WSL],
|
||||
AC_DEFUN([UTIL_FIXUP_PATH_WSL],
|
||||
[
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path="[$]$1"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([new_path])
|
||||
|
||||
BASIC_ABSOLUTE_PATH(new_path)
|
||||
UTIL_ABSOLUTE_PATH(new_path)
|
||||
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL([$new_path])
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL([$new_path])
|
||||
|
||||
if test "x$path" != "x$new_path"; then
|
||||
$1="$new_path"
|
||||
@ -215,7 +215,7 @@ AC_DEFUN([BASIC_FIXUP_PATH_WSL],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_CYGWIN],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
@ -291,12 +291,12 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
new_path="$input_to_shortpath"
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_CYGWIN([$input_to_shortpath])
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_MSYS],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
@ -308,7 +308,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
@ -321,7 +321,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(new_path)
|
||||
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not always considered executable in MSYS causing which
|
||||
@ -330,7 +330,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
&& test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
|
||||
&& test "x`$LS \"$path\" 2>/dev/null`" != x; then
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(new_path)
|
||||
fi
|
||||
|
||||
if test "x$new_path" = x; then
|
||||
@ -352,9 +352,9 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
else
|
||||
# Not in mixed or Windows style, start by that.
|
||||
new_path=`cmd //c echo $new_path`
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
|
||||
# Output is in $new_path
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
|
||||
UTIL_REWRITE_AS_UNIX_PATH(new_path)
|
||||
# remove trailing .exe if any
|
||||
new_path="${new_path/%.exe/}"
|
||||
|
||||
@ -363,7 +363,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],
|
||||
AC_DEFUN([UTIL_FIXUP_EXECUTABLE_WSL],
|
||||
[
|
||||
# First separate the path from the arguments. This will split at the first
|
||||
# space.
|
||||
@ -375,7 +375,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],
|
||||
# Input might be given as Windows format, start by converting to
|
||||
# unix format.
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([new_path])
|
||||
|
||||
# Now try to locate executable using which
|
||||
new_path_bak="$new_path"
|
||||
@ -394,7 +394,7 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],
|
||||
path="$complete"
|
||||
arguments="EOL"
|
||||
new_path="$path"
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([new_path])
|
||||
UTIL_REWRITE_AS_UNIX_PATH([new_path])
|
||||
new_path_bak="$new_path"
|
||||
new_path=`$WHICH "$new_path" 2> /dev/null`
|
||||
# bat and cmd files are not considered executable in WSL
|
||||
@ -433,164 +433,6 @@ AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],
|
||||
# Call helper function which possibly converts this using DOS-style short mode.
|
||||
# If so, the updated path is stored in $new_path.
|
||||
new_path="$input_to_shortpath"
|
||||
BASIC_MAKE_WINDOWS_SPACE_SAFE_WSL([$input_to_shortpath])
|
||||
UTIL_MAKE_WINDOWS_SPACE_SAFE_WSL([$input_to_shortpath])
|
||||
])
|
||||
|
||||
# Setup basic configuration paths, and platform-specific stuff related to PATHs.
|
||||
AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
|
||||
[
|
||||
SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
|
||||
if test $SRC_ROOT_LENGTH -gt 100; then
|
||||
AC_MSG_ERROR([Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported])
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
AC_MSG_CHECKING([cygwin release])
|
||||
CYGWIN_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$CYGWIN_VERSION])
|
||||
WINDOWS_ENV_VENDOR='cygwin'
|
||||
WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
|
||||
|
||||
CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.[0-6]'`
|
||||
if test "x$CYGWIN_VERSION_OLD" != x; then
|
||||
AC_MSG_NOTICE([Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if test "x$CYGPATH" = x; then
|
||||
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
|
||||
fi
|
||||
AC_MSG_CHECKING([cygwin root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF)
|
||||
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
|
||||
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
|
||||
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
|
||||
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
|
||||
test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
|
||||
if test "x$test_cygdrive_prefix" = x; then
|
||||
AC_MSG_ERROR([Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c.])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
|
||||
AC_MSG_CHECKING([msys release])
|
||||
MSYS_VERSION=`$UNAME -r`
|
||||
AC_MSG_RESULT([$MSYS_VERSION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='msys'
|
||||
WINDOWS_ENV_VERSION="$MSYS_VERSION"
|
||||
|
||||
AC_MSG_CHECKING([msys root directory as unix-style path])
|
||||
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
|
||||
MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
|
||||
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)
|
||||
AC_MSG_RESULT([$MSYS_ROOT_PATH])
|
||||
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
AC_MSG_CHECKING([Windows version])
|
||||
# m4 replaces [ and ] so we use @<:@ and @:>@ instead
|
||||
WINDOWS_VERSION=`$CMD /c ver.exe | $EGREP -o '(@<:@0-9@:>@+\.)+@<:@0-9@:>@+'`
|
||||
AC_MSG_RESULT([$WINDOWS_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel version])
|
||||
WSL_KERNEL_VERSION=`$UNAME -v`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_VERSION])
|
||||
|
||||
AC_MSG_CHECKING([WSL kernel release])
|
||||
WSL_KERNEL_RELEASE=`$UNAME -r`
|
||||
AC_MSG_RESULT([$WSL_KERNEL_RELEASE])
|
||||
|
||||
AC_MSG_CHECKING([WSL distribution])
|
||||
WSL_DISTRIBUTION=`$LSB_RELEASE -d | sed 's/Description:\t//'`
|
||||
AC_MSG_RESULT([$WSL_DISTRIBUTION])
|
||||
|
||||
WINDOWS_ENV_VENDOR='WSL'
|
||||
WINDOWS_ENV_VERSION="$WSL_DISTRIBUTION $WSL_KERNEL_VERSION $WSL_KERNEL_RELEASE (on Windows build $WINDOWS_VERSION)"
|
||||
else
|
||||
AC_MSG_ERROR([Unknown Windows environment. Neither cygwin, msys, nor wsl was detected.])
|
||||
fi
|
||||
|
||||
# Test if windows or unix (cygwin/msys) find is first in path.
|
||||
AC_MSG_CHECKING([what kind of 'find' is first on the PATH])
|
||||
FIND_BINARY_OUTPUT=`find --version 2>&1`
|
||||
if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
|
||||
AC_MSG_RESULT([unix style])
|
||||
elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
|
||||
AC_MSG_RESULT([Windows])
|
||||
AC_MSG_NOTICE([Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools.])
|
||||
AC_MSG_NOTICE([This will not work. Please correct and make sure /usr/bin (or similar) is first in path.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
|
||||
[
|
||||
# When using cygwin or msys, we need a wrapper binary that renames
|
||||
# /cygdrive/c/ arguments into c:/ arguments and peeks into
|
||||
# @files and rewrites these too! This wrapper binary is
|
||||
# called fixpath.
|
||||
FIXPATH=
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
AC_MSG_CHECKING([if fixpath can be created])
|
||||
FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
|
||||
FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
|
||||
FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
|
||||
# Important to keep the .exe suffix on Cygwin for Hotspot makefiles
|
||||
FIXPATH="$FIXPATH_BIN -c"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
|
||||
# Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
|
||||
# @ was chosen as separator to minimize risk of other tools messing around with it
|
||||
all_unique_prefixes=`echo "${all_fixpath_prefixes@<:@@@:>@}" \
|
||||
| tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
|
||||
fixpath_argument_list=`echo $all_unique_prefixes | tr ' ' '@'`
|
||||
FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
|
||||
elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.wsl; then
|
||||
FIXPATH="$FIXPATH_BIN -w"
|
||||
fi
|
||||
FIXPATH_SRC_W="$FIXPATH_SRC"
|
||||
FIXPATH_BIN_W="$FIXPATH_BIN"
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
|
||||
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
|
||||
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
|
||||
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
|
||||
cd $FIXPATH_DIR
|
||||
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
|
||||
if test ! -x $FIXPATH_BIN; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath1.log
|
||||
AC_MSG_ERROR([Could not create $FIXPATH_BIN])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
|
||||
OLD_WSLENV="$WSLENV"
|
||||
WSLENV=`$ECHO $WSLENV | $SED 's/PATH\/l://'`
|
||||
BASIC_APPEND_TO_PATH(WSLENV, "FIXPATH_PATH")
|
||||
export WSLENV
|
||||
export FIXPATH_PATH=$VS_PATH_WINDOWS
|
||||
AC_MSG_NOTICE([FIXPATH_PATH is $FIXPATH_PATH])
|
||||
AC_MSG_NOTICE([Rewriting WSLENV from $OLD_WSLENV to $WSLENV])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if fixpath.exe works])
|
||||
cd $FIXPATH_DIR
|
||||
$FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
|
||||
> $FIXPATH_DIR/fixpath2.log 2>&1
|
||||
cd $CONFIGURE_START_DIR
|
||||
if test ! -x $FIXPATH_DIR/fixpath2.exe; then
|
||||
AC_MSG_RESULT([no])
|
||||
cat $FIXPATH_DIR/fixpath2.log
|
||||
AC_MSG_ERROR([fixpath did not work!])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
FIXPATH_DETACH_FLAG="--detach"
|
||||
fi
|
||||
|
||||
AC_SUBST(FIXPATH)
|
||||
AC_SUBST(FIXPATH_DETACH_FLAG)
|
||||
])
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@ -917,6 +917,9 @@ define SetupNativeCompilationBody
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$1_EXTRA_LDFLAGS += -debug "-pdb:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb" \
|
||||
"-map:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map"
|
||||
ifeq ($(SHIP_DEBUG_SYMBOLS), public)
|
||||
$1_EXTRA_LDFLAGS += "-pdbstripped:$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).stripped.pdb"
|
||||
endif
|
||||
$1_DEBUGINFO_FILES := $$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).pdb \
|
||||
$$($1_SYMBOLS_DIR)/$$($1_NOSUFFIX).map
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, 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
|
||||
@ -251,7 +251,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
configure_args: concat(["--enable-jtreg-failure-handler"],
|
||||
"--with-exclude-translations=de,es,fr,it,ko,pt_BR,sv,ca,tr,cs,sk,ja_JP_A,ja_JP_HA,ja_JP_HI,ja_JP_I,zh_TW,zh_HK",
|
||||
"--disable-manpages",
|
||||
"--with-jvm-features=-shenandoahgc",
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
versionArgs(input, common))
|
||||
};
|
||||
// Extra settings for debug profiles
|
||||
@ -866,7 +866,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
testImageProfile = testedProfile;
|
||||
}
|
||||
var testedProfileTest = testImageProfile + ".test"
|
||||
var testOnlyMake = [ "run-test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ];
|
||||
var testOnlyMake = [ "test-prebuilt", "LOG_CMDLINES=true", "JTREG_VERBOSE=fail,error,time" ];
|
||||
if (testedProfile.endsWith("-gcov")) {
|
||||
testOnlyMake = concat(testOnlyMake, "GCOV_ENABLED=true")
|
||||
}
|
||||
@ -974,7 +974,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
solaris_x64: "SS12u4-Solaris11u1+1.0",
|
||||
solaris_sparcv9: "SS12u6-Solaris11u3+1.0",
|
||||
windows_x64: "VS2017-15.9.16+1.0",
|
||||
linux_aarch64: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_aarch64: "gcc8.3.0-OL7.6+1.0",
|
||||
linux_arm: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_s390x: "gcc8.2.0-Fedora27+1.0"
|
||||
@ -1004,9 +1004,17 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
? input.get("gnumake", "install_path") + "/cygwin/bin"
|
||||
: input.get("gnumake", "install_path") + "/bin");
|
||||
|
||||
var dependencies = {
|
||||
|
||||
boot_jdk: {
|
||||
if (input.build_cpu == 'aarch64') {
|
||||
boot_jdk = {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
module: "jdk-linux_aarch64",
|
||||
revision: "13+1.0",
|
||||
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
|
||||
environment_path: common.boot_jdk_home + "/bin"
|
||||
}
|
||||
} else {
|
||||
boot_jdk = {
|
||||
server: "jpg",
|
||||
product: "jdk",
|
||||
version: common.boot_jdk_version,
|
||||
@ -1015,7 +1023,11 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
+ boot_jdk_platform + "_bin" + boot_jdk_ext,
|
||||
configure_args: "--with-boot-jdk=" + common.boot_jdk_home,
|
||||
environment_path: common.boot_jdk_home + "/bin"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
var dependencies = {
|
||||
boot_jdk: boot_jdk,
|
||||
|
||||
devkit: {
|
||||
organization: common.organization,
|
||||
@ -1041,11 +1053,12 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
},
|
||||
|
||||
jtreg: {
|
||||
server: "javare",
|
||||
revision: "4.2",
|
||||
build_number: "b16",
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "5.0",
|
||||
build_number: "b01",
|
||||
checksum_file: "MD5_VALUES",
|
||||
file: "jtreg_bin-4.2.zip",
|
||||
file: "bundles/jtreg_bin-5.0.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
|
||||
},
|
||||
|
49
make/data/charsetmapping/IBM943.c2b
Normal file
49
make/data/charsetmapping/IBM943.c2b
Normal file
@ -0,0 +1,49 @@
|
||||
#
|
||||
# source: 34B003AF.RPMAP130
|
||||
# c->b only entries
|
||||
#
|
||||
815C 2015
|
||||
8160 FF5E
|
||||
8161 2225
|
||||
817C FF0D
|
||||
88A0 555E
|
||||
898B 7130
|
||||
89A8 9DD7
|
||||
8A9A 5699
|
||||
8BA0 4FE0
|
||||
8BEB 8EC0
|
||||
8C71 7E6B
|
||||
8C74 8346
|
||||
8CB2 9E7C
|
||||
8D8D 9EB4
|
||||
8DF2 6805
|
||||
8EC6 5C62
|
||||
8F4A 7E61
|
||||
8FD3 8523
|
||||
8FDD 91AC
|
||||
90E4 87EC
|
||||
917E 6414
|
||||
9189 7626
|
||||
91CB 9A52
|
||||
925C 7C1E
|
||||
92CD 6451
|
||||
9355 5861
|
||||
935E 985A
|
||||
9398 79B1
|
||||
93C0 7006
|
||||
9458 56CA
|
||||
948D 525D
|
||||
94AC 6F51
|
||||
94AE 91B1
|
||||
966A 9830
|
||||
96CB 9EB5
|
||||
9789 840A
|
||||
9858 881F
|
||||
9BA0 5C5B
|
||||
9DB7 6522
|
||||
9E94 688E
|
||||
E379 7E48
|
||||
E445 8141
|
||||
E8F6 9839
|
||||
FA55 FFE4
|
||||
FA59 F86F
|
@ -51,9 +51,17 @@ endif
|
||||
|
||||
$(info ARCH=$(ARCH))
|
||||
|
||||
KERNEL_HEADERS_RPM := kernel-headers
|
||||
|
||||
ifeq ($(BASE_OS), OL)
|
||||
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
|
||||
LINUX_VERSION := OL6.4
|
||||
ifeq ($(ARCH), aarch64)
|
||||
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL7/6/base/$(ARCH)/
|
||||
LINUX_VERSION := OL7.6
|
||||
KERNEL_HEADERS_RPM := kernel-uek-headers
|
||||
else
|
||||
BASE_URL := http://yum.oracle.com/repo/OracleLinux/OL6/4/base/$(ARCH)/
|
||||
LINUX_VERSION := OL6.4
|
||||
endif
|
||||
else ifeq ($(BASE_OS), Fedora)
|
||||
DEFAULT_OS_VERSION := 27
|
||||
ifeq ($(BASE_OS_VERSION), )
|
||||
@ -118,7 +126,7 @@ GDB := http://ftp.gnu.org/gnu/gdb/${gdb_ver}.tar.xz
|
||||
|
||||
# RPMs used by all BASE_OS
|
||||
RPM_LIST := \
|
||||
kernel-headers \
|
||||
$(KERNEL_HEADERS_RPM) \
|
||||
glibc glibc-headers glibc-devel \
|
||||
cups-libs cups-devel \
|
||||
libX11 libX11-devel \
|
||||
|
@ -186,95 +186,95 @@ ifeq ($(call check-jvm-feature, link-time-opt), true)
|
||||
JVM_LDFLAGS_FEATURES += -O3 -flto -fuse-linker-plugin -fno-strict-aliasing
|
||||
endif
|
||||
|
||||
ifeq ($(call check-jvm-feature, minimal), true)
|
||||
ifeq ($(call check-jvm-feature, link-time-opt), false)
|
||||
JVM_OPTIMIZATION := SIZE
|
||||
OPT_SPEED_SRC := \
|
||||
allocation.cpp \
|
||||
assembler.cpp \
|
||||
barrierSet.cpp \
|
||||
basicLock.cpp \
|
||||
biasedLocking.cpp \
|
||||
bytecode.cpp \
|
||||
bytecodeInterpreter.cpp \
|
||||
c1_Compilation.cpp \
|
||||
c1_Compiler.cpp \
|
||||
c1_GraphBuilder.cpp \
|
||||
c1_LinearScan.cpp \
|
||||
c1_LIR.cpp \
|
||||
ciEnv.cpp \
|
||||
ciObjectFactory.cpp \
|
||||
codeBlob.cpp \
|
||||
constantPool.cpp \
|
||||
constMethod.cpp \
|
||||
classLoader.cpp \
|
||||
classLoaderData.cpp \
|
||||
classFileParser.cpp \
|
||||
classFileStream.cpp \
|
||||
cpCache.cpp \
|
||||
defNewGeneration.cpp \
|
||||
frame_arm.cpp \
|
||||
frame_aarch64.cpp \
|
||||
frame_ppc.cpp \
|
||||
frame_s390.cpp \
|
||||
frame_x86.cpp \
|
||||
genCollectedHeap.cpp \
|
||||
generation.cpp \
|
||||
genMarkSweep.cpp \
|
||||
growableArray.cpp \
|
||||
handles.cpp \
|
||||
hashtable.cpp \
|
||||
heap.cpp \
|
||||
icache.cpp \
|
||||
icache_arm.cpp \
|
||||
icache_aarch64.cpp \
|
||||
icache_ppc.cpp \
|
||||
icache_s390.cpp \
|
||||
icache_x86.cpp \
|
||||
instanceKlass.cpp \
|
||||
invocationCounter.cpp \
|
||||
iterator.cpp \
|
||||
javaCalls.cpp \
|
||||
javaClasses.cpp \
|
||||
jniFastGetField_arm.cpp \
|
||||
jvm.cpp \
|
||||
linkResolver.cpp \
|
||||
klass.cpp \
|
||||
klassVtable.cpp \
|
||||
markSweep.cpp \
|
||||
memRegion.cpp \
|
||||
memoryPool.cpp \
|
||||
method.cpp \
|
||||
methodHandles.cpp \
|
||||
methodHandles_arm.cpp \
|
||||
methodLiveness.cpp \
|
||||
metaspace.cpp \
|
||||
mutex.cpp \
|
||||
mutexLocker.cpp \
|
||||
nativeLookup.cpp \
|
||||
objArrayKlass.cpp \
|
||||
os_linux.cpp \
|
||||
os_linux_arm.cpp \
|
||||
resourceArea.cpp \
|
||||
rewriter.cpp \
|
||||
sharedRuntime.cpp \
|
||||
signature.cpp \
|
||||
space.cpp \
|
||||
stackMapTable.cpp \
|
||||
symbolTable.cpp \
|
||||
systemDictionary.cpp \
|
||||
symbol.cpp \
|
||||
synchronizer.cpp \
|
||||
timer.cpp \
|
||||
typeArrayKlass.cpp \
|
||||
unsafe.cpp \
|
||||
utf8.cpp \
|
||||
vmSymbols.cpp \
|
||||
#
|
||||
ifeq ($(call check-jvm-feature, opt-size), true)
|
||||
JVM_OPTIMIZATION := SIZE
|
||||
OPT_SPEED_SRC := \
|
||||
allocation.cpp \
|
||||
assembler.cpp \
|
||||
barrierSet.cpp \
|
||||
basicLock.cpp \
|
||||
biasedLocking.cpp \
|
||||
bytecode.cpp \
|
||||
bytecodeInterpreter.cpp \
|
||||
c1_Compilation.cpp \
|
||||
c1_Compiler.cpp \
|
||||
c1_GraphBuilder.cpp \
|
||||
c1_LinearScan.cpp \
|
||||
c1_LIR.cpp \
|
||||
ciEnv.cpp \
|
||||
ciObjectFactory.cpp \
|
||||
codeBlob.cpp \
|
||||
constantPool.cpp \
|
||||
constMethod.cpp \
|
||||
classLoader.cpp \
|
||||
classLoaderData.cpp \
|
||||
classFileParser.cpp \
|
||||
classFileStream.cpp \
|
||||
cpCache.cpp \
|
||||
defNewGeneration.cpp \
|
||||
frame_arm.cpp \
|
||||
frame_aarch64.cpp \
|
||||
frame_ppc.cpp \
|
||||
frame_s390.cpp \
|
||||
frame_x86.cpp \
|
||||
genCollectedHeap.cpp \
|
||||
generation.cpp \
|
||||
genMarkSweep.cpp \
|
||||
growableArray.cpp \
|
||||
handles.cpp \
|
||||
hashtable.cpp \
|
||||
heap.cpp \
|
||||
icache.cpp \
|
||||
icache_arm.cpp \
|
||||
icache_aarch64.cpp \
|
||||
icache_ppc.cpp \
|
||||
icache_s390.cpp \
|
||||
icache_x86.cpp \
|
||||
instanceKlass.cpp \
|
||||
invocationCounter.cpp \
|
||||
iterator.cpp \
|
||||
javaCalls.cpp \
|
||||
javaClasses.cpp \
|
||||
jniFastGetField_arm.cpp \
|
||||
jvm.cpp \
|
||||
linkResolver.cpp \
|
||||
klass.cpp \
|
||||
klassVtable.cpp \
|
||||
markSweep.cpp \
|
||||
memRegion.cpp \
|
||||
memoryPool.cpp \
|
||||
method.cpp \
|
||||
methodHandles.cpp \
|
||||
methodHandles_arm.cpp \
|
||||
methodLiveness.cpp \
|
||||
metaspace.cpp \
|
||||
mutex.cpp \
|
||||
mutexLocker.cpp \
|
||||
nativeLookup.cpp \
|
||||
objArrayKlass.cpp \
|
||||
os_linux.cpp \
|
||||
os_linux_arm.cpp \
|
||||
resourceArea.cpp \
|
||||
rewriter.cpp \
|
||||
sharedRuntime.cpp \
|
||||
signature.cpp \
|
||||
space.cpp \
|
||||
stackMapTable.cpp \
|
||||
symbolTable.cpp \
|
||||
systemDictionary.cpp \
|
||||
symbol.cpp \
|
||||
synchronizer.cpp \
|
||||
timer.cpp \
|
||||
typeArrayKlass.cpp \
|
||||
unsafe.cpp \
|
||||
utf8.cpp \
|
||||
vmSymbols.cpp \
|
||||
#
|
||||
|
||||
$(foreach s, $(OPT_SPEED_SRC), \
|
||||
$(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
|
||||
$(foreach s, $(OPT_SPEED_SRC), \
|
||||
$(eval BUILD_LIBJVM_$s_OPTIMIZATION := HIGHEST_JVM))
|
||||
|
||||
ifneq ($(filter $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
BUILD_LIBJVM_systemDictionary.cpp_CXXFLAGS := -fno-optimize-sibling-calls
|
||||
endif
|
||||
endif
|
||||
|
@ -213,7 +213,7 @@ int generateJvmOffsets(GEN_variant gen_variant) {
|
||||
GEN_VALUE(AccessFlags_NATIVE, JVM_ACC_NATIVE);
|
||||
GEN_VALUE(ConstMethod_has_linenumber_table, ConstMethod::_has_linenumber_table);
|
||||
GEN_OFFS(AccessFlags, _flags);
|
||||
GEN_OFFS(Symbol, _length_and_refcount);
|
||||
GEN_OFFS(Symbol, _length);
|
||||
GEN_OFFS(Symbol, _body);
|
||||
printf("\n");
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="###ROOT_DIR###" vcs="hg4idea" />
|
||||
<mapping directory="###ROOT_DIR###" vcs="###VCS_TYPE###" />
|
||||
</component>
|
||||
</project>
|
||||
|
@ -294,7 +294,6 @@ class Bundle {
|
||||
}
|
||||
|
||||
// First, weed out any empty timezone or metazone names from myMap.
|
||||
// Fill in any missing abbreviations if locale is "en".
|
||||
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
|
||||
String key = it.next();
|
||||
if (key.startsWith(CLDRConverter.TIMEZONE_ID_PREFIX)
|
||||
@ -307,10 +306,6 @@ class Bundle {
|
||||
it.remove();
|
||||
continue;
|
||||
}
|
||||
|
||||
if (id.equals("en")) {
|
||||
fillInJREs(key, nameMap);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (Iterator<String> it = myMap.keySet().iterator(); it.hasNext();) {
|
||||
@ -636,42 +631,6 @@ class Bundle {
|
||||
return null;
|
||||
}
|
||||
|
||||
static List<Object[]> jreTimeZoneNames = Arrays.asList(TimeZoneNames.getContents());
|
||||
private void fillInJREs(String key, Map<String, String> map) {
|
||||
String tzid = null;
|
||||
|
||||
if (key.startsWith(CLDRConverter.METAZONE_ID_PREFIX)) {
|
||||
// Look for tzid
|
||||
String meta = key.substring(CLDRConverter.METAZONE_ID_PREFIX.length());
|
||||
if (meta.equals("GMT")) {
|
||||
tzid = meta;
|
||||
} else {
|
||||
for (String tz : CLDRConverter.handlerMetaZones.keySet()) {
|
||||
if (CLDRConverter.handlerMetaZones.get(tz).equals(meta)) {
|
||||
tzid = tz;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
tzid = key.substring(CLDRConverter.TIMEZONE_ID_PREFIX.length());
|
||||
}
|
||||
|
||||
if (tzid != null) {
|
||||
for (Object[] jreZone : jreTimeZoneNames) {
|
||||
if (jreZone[0].equals(tzid)) {
|
||||
for (int i = 0; i < ZONE_NAME_KEYS.length; i++) {
|
||||
if (map.get(ZONE_NAME_KEYS[i]) == null) {
|
||||
String[] jreNames = (String[])jreZone[1];
|
||||
map.put(ZONE_NAME_KEYS[i], jreNames[i]);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a generic conversion of CLDR date-time format pattern letter based
|
||||
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2020, 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,7 +25,6 @@
|
||||
|
||||
package build.tools.cldrconverter;
|
||||
|
||||
import static build.tools.cldrconverter.Bundle.jreTimeZoneNames;
|
||||
import build.tools.cldrconverter.BundleGenerator.BundleType;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@ -89,7 +88,9 @@ public class CLDRConverter {
|
||||
static final String ZONE_NAME_PREFIX = "timezone.displayname.";
|
||||
static final String METAZONE_ID_PREFIX = "metazone.id.";
|
||||
static final String PARENT_LOCALE_PREFIX = "parentLocale.";
|
||||
static final String META_EMPTY_ZONE_NAME = "EMPTY_ZONE";
|
||||
static final String[] EMPTY_ZONE = {"", "", "", "", "", ""};
|
||||
static final String META_ETCUTC_ZONE_NAME = "ETC_UTC";
|
||||
|
||||
private static SupplementDataParseHandler handlerSuppl;
|
||||
private static LikelySubtagsParseHandler handlerLikelySubtags;
|
||||
@ -684,61 +685,7 @@ public class CLDRConverter {
|
||||
}
|
||||
|
||||
private static Map<String, Object> extractZoneNames(Map<String, Object> map, String id) {
|
||||
Map<String, Object> names = new HashMap<>();
|
||||
|
||||
// Copy over missing time zone ids from JRE for English locale
|
||||
if (id.equals("en")) {
|
||||
Map<String[], String> jreMetaMap = new HashMap<>();
|
||||
jreTimeZoneNames.stream().forEach(e -> {
|
||||
String tzid = (String)e[0];
|
||||
String[] data = (String[])e[1];
|
||||
|
||||
if (map.get(TIMEZONE_ID_PREFIX + tzid) == null &&
|
||||
handlerMetaZones.get(tzid) == null ||
|
||||
handlerMetaZones.get(tzid) != null &&
|
||||
map.get(METAZONE_ID_PREFIX + handlerMetaZones.get(tzid)) == null) {
|
||||
|
||||
// First, check the alias
|
||||
String canonID = canonicalTZMap.get(tzid);
|
||||
if (canonID != null && !tzid.equals(canonID)) {
|
||||
Object value = map.get(TIMEZONE_ID_PREFIX + canonID);
|
||||
if (value != null) {
|
||||
names.put(tzid, value);
|
||||
return;
|
||||
} else {
|
||||
String meta = handlerMetaZones.get(canonID);
|
||||
if (meta != null) {
|
||||
value = map.get(METAZONE_ID_PREFIX + meta);
|
||||
if (value != null) {
|
||||
names.put(tzid, meta);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check the CLDR meta key
|
||||
Optional<Map.Entry<String, String>> cldrMeta =
|
||||
handlerMetaZones.getData().entrySet().stream()
|
||||
.filter(me ->
|
||||
Arrays.deepEquals(data,
|
||||
(String[])map.get(METAZONE_ID_PREFIX + me.getValue())))
|
||||
.findAny();
|
||||
cldrMeta.ifPresentOrElse(meta -> names.put(tzid, meta.getValue()), () -> {
|
||||
// Check the JRE meta key, add if there is not.
|
||||
Optional<Map.Entry<String[], String>> jreMeta =
|
||||
jreMetaMap.entrySet().stream()
|
||||
.filter(jm -> Arrays.deepEquals(data, jm.getKey()))
|
||||
.findAny();
|
||||
jreMeta.ifPresentOrElse(meta -> names.put(tzid, meta.getValue()), () -> {
|
||||
String metaName = "JRE_" + tzid.replaceAll("[/-]", "_");
|
||||
names.put(METAZONE_ID_PREFIX + metaName, data);
|
||||
names.put(tzid, metaName);
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
Map<String, Object> names = new TreeMap<>(KeyComparator.INSTANCE);
|
||||
|
||||
getAvailableZoneIds().stream().forEach(tzid -> {
|
||||
// If the tzid is deprecated, get the data for the replacement id
|
||||
@ -747,7 +694,14 @@ public class CLDRConverter {
|
||||
Object data = map.get(TIMEZONE_ID_PREFIX + tzKey);
|
||||
|
||||
if (data instanceof String[]) {
|
||||
names.put(tzid, data);
|
||||
// Hack for UTC. UTC is an alias to Etc/UTC in CLDR
|
||||
if (tzid.equals("Etc/UTC") && !map.containsKey(TIMEZONE_ID_PREFIX + "UTC")) {
|
||||
names.put(METAZONE_ID_PREFIX + META_ETCUTC_ZONE_NAME, data);
|
||||
names.put(tzid, META_ETCUTC_ZONE_NAME);
|
||||
names.put("UTC", META_ETCUTC_ZONE_NAME);
|
||||
} else {
|
||||
names.put(tzid, data);
|
||||
}
|
||||
} else {
|
||||
String meta = handlerMetaZones.get(tzKey);
|
||||
if (meta != null) {
|
||||
@ -764,24 +718,23 @@ public class CLDRConverter {
|
||||
|
||||
// exemplar cities.
|
||||
Map<String, Object> exCities = map.entrySet().stream()
|
||||
.filter(e -> e.getKey().startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX))
|
||||
.collect(Collectors
|
||||
.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
.filter(e -> e.getKey().startsWith(CLDRConverter.EXEMPLAR_CITY_PREFIX))
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
names.putAll(exCities);
|
||||
|
||||
if (!id.equals("en") &&
|
||||
!names.isEmpty()) {
|
||||
// CLDR does not have UTC entry, so add it here.
|
||||
names.put("UTC", EMPTY_ZONE);
|
||||
|
||||
// no metazone zones
|
||||
Arrays.asList(handlerMetaZones.get(MetaZonesParseHandler.NO_METAZONE_KEY)
|
||||
.split("\\s")).stream()
|
||||
.forEach(tz -> {
|
||||
names.put(tz, EMPTY_ZONE);
|
||||
});
|
||||
// If there's no UTC entry at this point, add an empty one
|
||||
if (!names.isEmpty() && !names.containsKey("UTC")) {
|
||||
names.putIfAbsent(METAZONE_ID_PREFIX + META_EMPTY_ZONE_NAME, EMPTY_ZONE);
|
||||
names.put("UTC", META_EMPTY_ZONE_NAME);
|
||||
}
|
||||
|
||||
// Finally some compatibility stuff
|
||||
ZoneId.SHORT_IDS.entrySet().stream()
|
||||
.filter(e -> !names.containsKey(e.getKey()) && names.containsKey(e.getValue()))
|
||||
.forEach(e -> {
|
||||
names.put(e.getKey(), names.get(e.getValue()));
|
||||
});
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2020, 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
|
||||
@ -73,9 +73,7 @@ public class ModuleGraph implements Taglet {
|
||||
+ getImage(moduleName, imageFile, -1, true)
|
||||
+ "</span>";
|
||||
}
|
||||
return "<dt>"
|
||||
+ "<span class=\"simpleTagLabel\">Module Graph:</span>\n"
|
||||
+ "</dt>"
|
||||
return "<dt>Module Graph:</dt>"
|
||||
+ "<dd>"
|
||||
+ "<a class=moduleGraph href=\"" + imageFile + "\">"
|
||||
+ getImage(moduleName, imageFile, thumbnailHeight, false)
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2017, 2020, 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
|
||||
@ -95,7 +95,7 @@ public class ToolGuide implements Taglet {
|
||||
return "";
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("<dt class=\"simpleTagLabel\">Tool Guides:</dt>\n")
|
||||
sb.append("<dt>Tool Guides:</dt>\n")
|
||||
.append("<dd>");
|
||||
|
||||
boolean needComma = false;
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, 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
|
||||
@ -34,24 +34,13 @@ JAVA_RC_FLAGS += -I$(TOPDIR)/src/java.base/windows/native/launcher/icons
|
||||
|
||||
################################################################################
|
||||
|
||||
# On windows, the debuginfo files get the same name as for java.dll. Build
|
||||
# into another dir and copy selectively so debuginfo for java.dll isn't
|
||||
# overwritten.
|
||||
$(eval $(call SetupBuildLauncher, java, \
|
||||
CFLAGS := -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
|
||||
EXTRA_RC_FLAGS := $(JAVA_RC_FLAGS), \
|
||||
VERSION_INFO_RESOURCE := $(JAVA_VERSION_INFO_RESOURCE), \
|
||||
OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs, \
|
||||
OPTIMIZATION := HIGH, \
|
||||
))
|
||||
|
||||
$(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX): $(BUILD_LAUNCHER_java)
|
||||
$(call MakeTargetDir)
|
||||
$(RM) $@
|
||||
$(CP) $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/java_objs/java$(EXE_SUFFIX) $@
|
||||
|
||||
TARGETS += $(SUPPORT_OUTPUTDIR)/modules_cmds/java.base/java$(EXE_SUFFIX)
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
$(eval $(call SetupBuildLauncher, javaw, \
|
||||
CFLAGS := -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS -DENABLE_ARG_FILES, \
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, 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
|
||||
@ -810,7 +810,6 @@ compare_bin_file() {
|
||||
# pdb files.
|
||||
PDB_DIRS="$(ls -d \
|
||||
{$OTHER,$THIS}/support/modules_{cmds,libs}/{*,*/*} \
|
||||
{$OTHER,$THIS}/support/native/java.base/java_objs \
|
||||
{$OTHER,$THIS}/support/native/jdk.incubator.jpackage/* \
|
||||
)"
|
||||
export _NT_SYMBOL_PATH="$(echo $PDB_DIRS | tr ' ' ';')"
|
||||
|
@ -636,6 +636,12 @@ public class GenerateJfrFiles {
|
||||
}
|
||||
out.write(" }");
|
||||
}
|
||||
|
||||
// Avoid clash with static commit() method
|
||||
if (event.fields.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
out.write("");
|
||||
StringJoiner sj = new StringJoiner(",\n ");
|
||||
if (event.startTime) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2007, 2020, 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
|
||||
@ -153,8 +153,8 @@ To build hotspot and import it into the JDK: "mx make hotspot import-hotspot"
|
||||
# JDK10 must be bootstrapped with a JDK9
|
||||
compliance = mx.JavaCompliance('9')
|
||||
jdk9 = mx.get_jdk(compliance.exactMatch, versionDescription=compliance.value)
|
||||
cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--with-jvm-features=graal',
|
||||
'--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk9.home, '--with-jvm-features=graal']
|
||||
cmd = ['sh', 'configure', '--with-debug-level=' + _vm.debugLevel, '--with-native-debug-symbols=external', '--disable-precompiled-headers', '--enable-jvm-feature-graal',
|
||||
'--with-jvm-variants=' + _vm.jvmVariant, '--disable-warnings-as-errors', '--with-boot-jdk=' + jdk9.home]
|
||||
mx.run(cmd, cwd=_get_jdk_dir())
|
||||
cmd = [mx.gmake_cmd(), 'CONF=' + _vm.debugLevel]
|
||||
if mx.get_opts().verbose:
|
||||
|
@ -2074,15 +2074,24 @@ const bool Matcher::match_rule_supported(int opcode) {
|
||||
return ret_value; // Per default match rules are supported.
|
||||
}
|
||||
|
||||
// Identify extra cases that we might want to provide match rules for vector nodes and
|
||||
// other intrinsics guarded with vector length (vlen) and element type (bt).
|
||||
const bool Matcher::match_rule_supported_vector(int opcode, int vlen, BasicType bt) {
|
||||
if (!match_rule_supported(opcode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO
|
||||
// identify extra cases that we might want to provide match rules for
|
||||
// e.g. Op_ vector nodes and other intrinsics while guarding with vlen
|
||||
bool ret_value = match_rule_supported(opcode);
|
||||
// Add rules here.
|
||||
// Special cases which require vector length
|
||||
switch (opcode) {
|
||||
case Op_MulAddVS2VI: {
|
||||
if (vlen != 4) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return ret_value; // Per default match rules are supported.
|
||||
return true; // Per default match rules are supported.
|
||||
}
|
||||
|
||||
const bool Matcher::has_predicated_vectors(void) {
|
||||
@ -2257,8 +2266,7 @@ void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {
|
||||
Unimplemented();
|
||||
}
|
||||
|
||||
// Advertise here if the CPU requires explicit rounding operations to
|
||||
// implement the UseStrictFP mode.
|
||||
// Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
|
||||
const bool Matcher::strict_fp_requires_explicit_rounding = false;
|
||||
|
||||
// Are floats converted to double when stored to stack during
|
||||
@ -10556,6 +10564,22 @@ instruct smnegL(iRegLNoSp dst, iRegIorL2I src1, iRegIorL2I src2, immL0 zero) %{
|
||||
ins_pipe(imac_reg_reg);
|
||||
%}
|
||||
|
||||
// Combined Multiply-Add Shorts into Integer (dst = src1 * src2 + src3 * src4)
|
||||
|
||||
instruct muladdS2I(iRegINoSp dst, iRegIorL2I src1, iRegIorL2I src2, iRegIorL2I src3, iRegIorL2I src4) %{
|
||||
match(Set dst (MulAddS2I (Binary src1 src2) (Binary src3 src4)));
|
||||
|
||||
ins_cost(INSN_COST * 5);
|
||||
format %{ "mulw rscratch1, $src1, $src2\n\t"
|
||||
"maddw $dst, $src3, $src4, rscratch1" %}
|
||||
|
||||
ins_encode %{
|
||||
__ mulw(rscratch1, as_Register($src1$$reg), as_Register($src2$$reg));
|
||||
__ maddw(as_Register($dst$$reg), as_Register($src3$$reg), as_Register($src4$$reg), rscratch1); %}
|
||||
|
||||
ins_pipe(imac_reg_reg);
|
||||
%}
|
||||
|
||||
// Integer Divide
|
||||
|
||||
instruct divI(iRegINoSp dst, iRegIorL2I src1, iRegIorL2I src2) %{
|
||||
@ -16936,6 +16960,30 @@ instruct vmls2D(vecX dst, vecX src1, vecX src2) %{
|
||||
ins_pipe(vmuldiv_fp128);
|
||||
%}
|
||||
|
||||
// --------------- Vector Multiply-Add Shorts into Integer --------------------
|
||||
|
||||
instruct vmuladdS2I(vecX dst, vecX src1, vecX src2, vecX tmp) %{
|
||||
predicate(n->in(1)->bottom_type()->is_vect()->element_basic_type() == T_SHORT);
|
||||
match(Set dst (MulAddVS2VI src1 src2));
|
||||
ins_cost(INSN_COST);
|
||||
effect(TEMP tmp);
|
||||
format %{ "smullv $tmp, $src1, $src2\t# vector (4H)\n\t"
|
||||
"smullv $dst, $src1, $src2\t# vector (8H)\n\t"
|
||||
"addpv $dst, $tmp, $dst\t# vector (4S)\n\t" %}
|
||||
ins_encode %{
|
||||
__ smullv(as_FloatRegister($tmp$$reg), __ T4H,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
__ smullv(as_FloatRegister($dst$$reg), __ T8H,
|
||||
as_FloatRegister($src1$$reg),
|
||||
as_FloatRegister($src2$$reg));
|
||||
__ addpv(as_FloatRegister($dst$$reg), __ T4S,
|
||||
as_FloatRegister($tmp$$reg),
|
||||
as_FloatRegister($dst$$reg));
|
||||
%}
|
||||
ins_pipe(vmuldiv_fp128);
|
||||
%}
|
||||
|
||||
// --------------------------------- DIV --------------------------------------
|
||||
|
||||
instruct vdiv2F(vecD dst, vecD src1, vecD src2)
|
||||
@ -17313,7 +17361,7 @@ instruct vsrl16B(vecX dst, vecX src, vecX shift, vecX tmp) %{
|
||||
instruct vsll8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4 ||
|
||||
n->as_Vector()->length() == 8);
|
||||
match(Set dst (LShiftVB src shift));
|
||||
match(Set dst (LShiftVB src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
@ -17332,7 +17380,7 @@ instruct vsll8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsll16B_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 16);
|
||||
match(Set dst (LShiftVB src shift));
|
||||
match(Set dst (LShiftVB src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
@ -17352,7 +17400,7 @@ instruct vsll16B_imm(vecX dst, vecX src, immI shift) %{
|
||||
instruct vsra8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4 ||
|
||||
n->as_Vector()->length() == 8);
|
||||
match(Set dst (RShiftVB src shift));
|
||||
match(Set dst (RShiftVB src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
@ -17366,7 +17414,7 @@ instruct vsra8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsra16B_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 16);
|
||||
match(Set dst (RShiftVB src shift));
|
||||
match(Set dst (RShiftVB src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
@ -17381,7 +17429,7 @@ instruct vsra16B_imm(vecX dst, vecX src, immI shift) %{
|
||||
instruct vsrl8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4 ||
|
||||
n->as_Vector()->length() == 8);
|
||||
match(Set dst (URShiftVB src shift));
|
||||
match(Set dst (URShiftVB src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (8B)" %}
|
||||
ins_encode %{
|
||||
@ -17400,7 +17448,7 @@ instruct vsrl8B_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsrl16B_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 16);
|
||||
match(Set dst (URShiftVB src shift));
|
||||
match(Set dst (URShiftVB src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (16B)" %}
|
||||
ins_encode %{
|
||||
@ -17517,7 +17565,7 @@ instruct vsrl8S(vecX dst, vecX src, vecX shift, vecX tmp) %{
|
||||
instruct vsll4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2 ||
|
||||
n->as_Vector()->length() == 4);
|
||||
match(Set dst (LShiftVS src shift));
|
||||
match(Set dst (LShiftVS src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (4H)" %}
|
||||
ins_encode %{
|
||||
@ -17536,7 +17584,7 @@ instruct vsll4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsll8S_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 8);
|
||||
match(Set dst (LShiftVS src shift));
|
||||
match(Set dst (LShiftVS src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (8H)" %}
|
||||
ins_encode %{
|
||||
@ -17556,7 +17604,7 @@ instruct vsll8S_imm(vecX dst, vecX src, immI shift) %{
|
||||
instruct vsra4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2 ||
|
||||
n->as_Vector()->length() == 4);
|
||||
match(Set dst (RShiftVS src shift));
|
||||
match(Set dst (RShiftVS src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (4H)" %}
|
||||
ins_encode %{
|
||||
@ -17570,7 +17618,7 @@ instruct vsra4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsra8S_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 8);
|
||||
match(Set dst (RShiftVS src shift));
|
||||
match(Set dst (RShiftVS src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (8H)" %}
|
||||
ins_encode %{
|
||||
@ -17585,7 +17633,7 @@ instruct vsra8S_imm(vecX dst, vecX src, immI shift) %{
|
||||
instruct vsrl4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2 ||
|
||||
n->as_Vector()->length() == 4);
|
||||
match(Set dst (URShiftVS src shift));
|
||||
match(Set dst (URShiftVS src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (4H)" %}
|
||||
ins_encode %{
|
||||
@ -17604,7 +17652,7 @@ instruct vsrl4S_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsrl8S_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 8);
|
||||
match(Set dst (URShiftVS src shift));
|
||||
match(Set dst (URShiftVS src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (8H)" %}
|
||||
ins_encode %{
|
||||
@ -17717,7 +17765,7 @@ instruct vsrl4I(vecX dst, vecX src, vecX shift, vecX tmp) %{
|
||||
|
||||
instruct vsll2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (LShiftVI src shift));
|
||||
match(Set dst (LShiftVI src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (2S)" %}
|
||||
ins_encode %{
|
||||
@ -17730,7 +17778,7 @@ instruct vsll2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsll4I_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4);
|
||||
match(Set dst (LShiftVI src shift));
|
||||
match(Set dst (LShiftVI src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (4S)" %}
|
||||
ins_encode %{
|
||||
@ -17743,7 +17791,7 @@ instruct vsll4I_imm(vecX dst, vecX src, immI shift) %{
|
||||
|
||||
instruct vsra2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (RShiftVI src shift));
|
||||
match(Set dst (RShiftVI src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (2S)" %}
|
||||
ins_encode %{
|
||||
@ -17756,7 +17804,7 @@ instruct vsra2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsra4I_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4);
|
||||
match(Set dst (RShiftVI src shift));
|
||||
match(Set dst (RShiftVI src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (4S)" %}
|
||||
ins_encode %{
|
||||
@ -17769,7 +17817,7 @@ instruct vsra4I_imm(vecX dst, vecX src, immI shift) %{
|
||||
|
||||
instruct vsrl2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (URShiftVI src shift));
|
||||
match(Set dst (URShiftVI src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (2S)" %}
|
||||
ins_encode %{
|
||||
@ -17782,7 +17830,7 @@ instruct vsrl2I_imm(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsrl4I_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4);
|
||||
match(Set dst (URShiftVI src shift));
|
||||
match(Set dst (URShiftVI src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (4S)" %}
|
||||
ins_encode %{
|
||||
@ -17842,7 +17890,7 @@ instruct vsrl2L(vecX dst, vecX src, vecX shift, vecX tmp) %{
|
||||
|
||||
instruct vsll2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (LShiftVL src shift));
|
||||
match(Set dst (LShiftVL src (LShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "shl $dst, $src, $shift\t# vector (2D)" %}
|
||||
ins_encode %{
|
||||
@ -17855,7 +17903,7 @@ instruct vsll2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
|
||||
instruct vsra2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (RShiftVL src shift));
|
||||
match(Set dst (RShiftVL src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "sshr $dst, $src, $shift\t# vector (2D)" %}
|
||||
ins_encode %{
|
||||
@ -17868,7 +17916,7 @@ instruct vsra2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
|
||||
instruct vsrl2L_imm(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (URShiftVL src shift));
|
||||
match(Set dst (URShiftVL src (RShiftCntV shift)));
|
||||
ins_cost(INSN_COST);
|
||||
format %{ "ushr $dst, $src, $shift\t# vector (2D)" %}
|
||||
ins_encode %{
|
||||
|
@ -2259,6 +2259,8 @@ public:
|
||||
INSN(mlsv, 1, 0b100101, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(sshl, 0, 0b010001, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
|
||||
INSN(ushl, 1, 0b010001, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
|
||||
INSN(addpv, 0, 0b101111, true); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S, T2D
|
||||
INSN(smullv, 0, 0b110000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(umullv, 1, 0b110000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
INSN(umlalv, 1, 0b100000, false); // accepted arrangements: T8B, T16B, T4H, T8H, T2S, T4S
|
||||
|
||||
|
@ -40,10 +40,10 @@
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_aarch64.inline.hpp"
|
||||
|
||||
|
||||
|
||||
#ifndef PRODUCT
|
||||
#define COMMENT(x) do { __ block_comment(x); } while (0)
|
||||
#else
|
||||
@ -1747,7 +1747,7 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
|
||||
code == lir_add ? __ add(dreg, lreg_lo, c) : __ sub(dreg, lreg_lo, c);
|
||||
break;
|
||||
case lir_div:
|
||||
assert(c > 0 && is_power_of_2_long(c), "divisor must be power-of-2 constant");
|
||||
assert(c > 0 && is_power_of_2(c), "divisor must be power-of-2 constant");
|
||||
if (c == 1) {
|
||||
// move lreg_lo to dreg if divisor is 1
|
||||
__ mov(dreg, lreg_lo);
|
||||
@ -1760,7 +1760,7 @@ void LIR_Assembler::arith_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
|
||||
}
|
||||
break;
|
||||
case lir_rem:
|
||||
assert(c > 0 && is_power_of_2_long(c), "divisor must be power-of-2 constant");
|
||||
assert(c > 0 && is_power_of_2(c), "divisor must be power-of-2 constant");
|
||||
if (c == 1) {
|
||||
// move 0 to dreg if divisor is 1
|
||||
__ mov(dreg, zr);
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "ci/ciTypeArrayKlass.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_aarch64.inline.hpp"
|
||||
|
||||
#ifdef ASSERT
|
||||
@ -447,7 +448,7 @@ void LIRGenerator::do_ArithmeticOp_Long(ArithmeticOp* x) {
|
||||
// no need to do div-by-zero check if the divisor is a non-zero constant
|
||||
if (c != 0) need_zero_check = false;
|
||||
// do not load right if the divisor is a power-of-2 constant
|
||||
if (c > 0 && is_power_of_2_long(c)) {
|
||||
if (c > 0 && is_power_of_2(c)) {
|
||||
right.dont_load_item();
|
||||
} else {
|
||||
right.load_item();
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "runtime/signature.hpp"
|
||||
#include "runtime/vframe.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_aarch64.inline.hpp"
|
||||
|
||||
|
||||
|
@ -61,7 +61,6 @@ define_pd_global(uint64_t,MaxRAM, 1ULL*G);
|
||||
define_pd_global(bool, CICompileOSR, true );
|
||||
#endif // !TIERED
|
||||
define_pd_global(bool, UseTypeProfile, false);
|
||||
define_pd_global(bool, RoundFPResults, true );
|
||||
|
||||
define_pd_global(bool, LIRFillDelaySlots, false);
|
||||
define_pd_global(bool, OptimizeSinglePrecision, true );
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -59,16 +59,8 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
address unextended_sp = (address)_unextended_sp;
|
||||
|
||||
// consider stack guards when trying to determine "safe" stack pointers
|
||||
static size_t stack_guard_size = os::uses_stack_guard_pages() ?
|
||||
(JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_zone_size()) : 0;
|
||||
size_t usable_stack_size = thread->stack_size() - stack_guard_size;
|
||||
|
||||
// sp must be within the usable part of the stack (not in guards)
|
||||
bool sp_safe = (sp < thread->stack_base()) &&
|
||||
(sp >= thread->stack_base() - usable_stack_size);
|
||||
|
||||
|
||||
if (!sp_safe) {
|
||||
if (!thread->is_in_usable_stack(sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -84,16 +76,14 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
// So unextended sp must be within the stack but we need not to check
|
||||
// that unextended sp >= sp
|
||||
|
||||
bool unextended_sp_safe = (unextended_sp < thread->stack_base());
|
||||
|
||||
if (!unextended_sp_safe) {
|
||||
if (!thread->is_in_full_stack(unextended_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// an fp must be within the stack and above (but not equal) sp
|
||||
// second evaluation on fp+ is added to handle situation where fp is -1
|
||||
bool fp_safe = (fp < thread->stack_base() && (fp > sp) && (((fp + (return_addr_offset * sizeof(void*))) < thread->stack_base())));
|
||||
bool fp_safe = thread->is_in_stack_range_excl(fp, sp) &&
|
||||
thread->is_in_full_stack(fp + (return_addr_offset * sizeof(void*)));
|
||||
|
||||
// We know sp/unextended_sp are safe only fp is questionable here
|
||||
|
||||
@ -155,7 +145,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
sender_sp = _unextended_sp + _cb->frame_size();
|
||||
// Is sender_sp safe?
|
||||
if ((address)sender_sp >= thread->stack_base()) {
|
||||
if (!thread->is_in_full_stack((address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
sender_unextended_sp = sender_sp;
|
||||
@ -172,9 +162,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// only if the sender is interpreted/call_stub (c1 too?) are we certain that the saved fp
|
||||
// is really a frame pointer.
|
||||
|
||||
bool saved_fp_safe = ((address)saved_fp < thread->stack_base()) && (saved_fp > sender_sp);
|
||||
|
||||
if (!saved_fp_safe) {
|
||||
if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -209,9 +197,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
// Could be the call_stub
|
||||
if (StubRoutines::returns_to_call_stub(sender_pc)) {
|
||||
bool saved_fp_safe = ((address)saved_fp < thread->stack_base()) && (saved_fp > sender_sp);
|
||||
|
||||
if (!saved_fp_safe) {
|
||||
if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -222,9 +208,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// Validate the JavaCallWrapper an entry frame must have
|
||||
address jcw = (address)sender.entry_frame_call_wrapper();
|
||||
|
||||
bool jcw_safe = (jcw < thread->stack_base()) && (jcw > (address)sender.fp());
|
||||
|
||||
return jcw_safe;
|
||||
return thread->is_in_stack_range_excl(jcw, (address)sender.fp());
|
||||
}
|
||||
|
||||
CompiledMethod* nm = sender_blob->as_compiled_method_or_null();
|
||||
@ -565,11 +549,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// validate locals
|
||||
|
||||
address locals = (address) *interpreter_frame_locals_addr();
|
||||
|
||||
if (locals > thread->stack_base() || locals < (address) fp()) return false;
|
||||
|
||||
// We'd have to be pretty unlucky to be mislead at this point
|
||||
return true;
|
||||
return thread->is_in_stack_range_incl(locals, (address)fp());
|
||||
}
|
||||
|
||||
BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
|
||||
|
@ -100,7 +100,7 @@ LIR_Opr ShenandoahBarrierSetC1::atomic_xchg_at_resolved(LIRAccess& access, LIRIt
|
||||
__ xchg(access.resolved_addr(), value_opr, result, tmp);
|
||||
|
||||
if (access.is_oop()) {
|
||||
result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0));
|
||||
result = load_reference_barrier(access.gen(), result, LIR_OprFact::addressConst(0), false);
|
||||
LIR_Opr tmp = gen->new_register(type);
|
||||
__ move(result, tmp);
|
||||
result = tmp;
|
||||
|
@ -581,7 +581,11 @@ void ShenandoahBarrierSetAssembler::gen_load_reference_barrier_stub(LIR_Assemble
|
||||
__ bind(slow_path);
|
||||
ce->store_parameter(res, 0);
|
||||
ce->store_parameter(addr, 1);
|
||||
__ far_call(RuntimeAddress(bs->load_reference_barrier_rt_code_blob()->code_begin()));
|
||||
if (stub->is_native()) {
|
||||
__ far_call(RuntimeAddress(bs->load_reference_barrier_native_rt_code_blob()->code_begin()));
|
||||
} else {
|
||||
__ far_call(RuntimeAddress(bs->load_reference_barrier_rt_code_blob()->code_begin()));
|
||||
}
|
||||
|
||||
__ b(*stub->continuation());
|
||||
}
|
||||
@ -636,14 +640,16 @@ void ShenandoahBarrierSetAssembler::generate_c1_pre_barrier_runtime_stub(StubAss
|
||||
__ epilogue();
|
||||
}
|
||||
|
||||
void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm) {
|
||||
void ShenandoahBarrierSetAssembler::generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, bool is_native) {
|
||||
__ prologue("shenandoah_load_reference_barrier", false);
|
||||
// arg0 : object to be resolved
|
||||
|
||||
__ push_call_clobbered_registers();
|
||||
__ load_parameter(0, r0);
|
||||
__ load_parameter(1, r1);
|
||||
if (UseCompressedOops) {
|
||||
if (is_native) {
|
||||
__ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_native));
|
||||
} else if (UseCompressedOops) {
|
||||
__ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier_narrow));
|
||||
} else {
|
||||
__ mov(lr, CAST_FROM_FN_PTR(address, ShenandoahRuntime::load_reference_barrier));
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
void gen_pre_barrier_stub(LIR_Assembler* ce, ShenandoahPreBarrierStub* stub);
|
||||
void gen_load_reference_barrier_stub(LIR_Assembler* ce, ShenandoahLoadReferenceBarrierStub* stub);
|
||||
void generate_c1_pre_barrier_runtime_stub(StubAssembler* sasm);
|
||||
void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm);
|
||||
void generate_c1_load_reference_barrier_runtime_stub(StubAssembler* sasm, bool is_native);
|
||||
#endif
|
||||
|
||||
virtual void arraycopy_prologue(MacroAssembler* masm, DecoratorSet decorators, bool is_oop,
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
void InterpreterMacroAssembler::narrow(Register result) {
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "runtime/jniHandles.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/thread.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_LIRAssembler.hpp"
|
||||
#endif
|
||||
|
@ -28,6 +28,7 @@
|
||||
|
||||
#include "asm/assembler.hpp"
|
||||
#include "oops/compressedOops.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
// MacroAssembler extends Assembler by frequently used macros.
|
||||
//
|
||||
|
@ -43,6 +43,7 @@
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
|
@ -49,6 +49,7 @@
|
||||
#include "runtime/timer.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/debug.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifndef PRODUCT
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2019, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2020, Red Hat Inc. 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
|
||||
@ -451,6 +451,10 @@ void VM_Version::get_processor_features() {
|
||||
if (FLAG_IS_DEFAULT(OptoScheduling)) {
|
||||
OptoScheduling = true;
|
||||
}
|
||||
|
||||
if (FLAG_IS_DEFAULT(AlignVector)) {
|
||||
AlignVector = AvoidUnalignedAccesses;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1140,8 +1140,7 @@ const bool Matcher::misaligned_doubles_ok = false;
|
||||
void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {
|
||||
}
|
||||
|
||||
// Advertise here if the CPU requires explicit rounding operations
|
||||
// to implement the UseStrictFP mode.
|
||||
// Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
|
||||
const bool Matcher::strict_fp_requires_explicit_rounding = false;
|
||||
|
||||
// Are floats converted to double when stored to stack during deoptimization?
|
||||
@ -10619,7 +10618,7 @@ instruct vsl16B_reg(vecX dst, vecX src, vecX shift) %{
|
||||
|
||||
instruct vsl8B_immI(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 8);
|
||||
match(Set dst (LShiftVB src shift));
|
||||
match(Set dst (LShiftVB src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10635,7 +10634,7 @@ instruct vsl8B_immI(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsl16B_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 16);
|
||||
match(Set dst (LShiftVB src shift));
|
||||
match(Set dst (LShiftVB src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10674,7 +10673,7 @@ instruct vsl8S_reg(vecX dst, vecX src, vecX shift) %{
|
||||
|
||||
instruct vsl4S_immI(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4);
|
||||
match(Set dst (LShiftVS src shift));
|
||||
match(Set dst (LShiftVS src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10729,7 +10728,7 @@ instruct vsl4I_reg(vecX dst, vecX src, vecX shift) %{
|
||||
|
||||
instruct vsl2I_immI(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2 && VM_Version::has_simd());
|
||||
match(Set dst (LShiftVI src shift));
|
||||
match(Set dst (LShiftVI src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10745,7 +10744,7 @@ instruct vsl2I_immI(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsl4I_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4 && VM_Version::has_simd());
|
||||
match(Set dst (LShiftVI src shift));
|
||||
match(Set dst (LShiftVI src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10773,7 +10772,7 @@ instruct vsl2L_reg(vecX dst, vecX src, vecX shift) %{
|
||||
|
||||
instruct vsl2L_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (LShiftVL src shift));
|
||||
match(Set dst (LShiftVL src (LShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10796,7 +10795,7 @@ instruct vsl2L_immI(vecX dst, vecX src, immI shift) %{
|
||||
// Chars vector logical right shift
|
||||
instruct vsrl4S_immI(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4);
|
||||
match(Set dst (URShiftVS src shift));
|
||||
match(Set dst (URShiftVS src (RShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10812,7 +10811,7 @@ instruct vsrl4S_immI(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsrl8S_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 8);
|
||||
match(Set dst (URShiftVS src shift));
|
||||
match(Set dst (URShiftVS src (RShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10829,7 +10828,7 @@ instruct vsrl8S_immI(vecX dst, vecX src, immI shift) %{
|
||||
// Integers vector logical right shift
|
||||
instruct vsrl2I_immI(vecD dst, vecD src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2 && VM_Version::has_simd());
|
||||
match(Set dst (URShiftVI src shift));
|
||||
match(Set dst (URShiftVI src (RShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10845,7 +10844,7 @@ instruct vsrl2I_immI(vecD dst, vecD src, immI shift) %{
|
||||
|
||||
instruct vsrl4I_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 4 && VM_Version::has_simd());
|
||||
match(Set dst (URShiftVI src shift));
|
||||
match(Set dst (URShiftVI src (RShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
@ -10862,7 +10861,7 @@ instruct vsrl4I_immI(vecX dst, vecX src, immI shift) %{
|
||||
// Longs vector logical right shift
|
||||
instruct vsrl2L_immI(vecX dst, vecX src, immI shift) %{
|
||||
predicate(n->as_Vector()->length() == 2);
|
||||
match(Set dst (URShiftVL src shift));
|
||||
match(Set dst (URShiftVL src (RShiftCntV shift)));
|
||||
size(4);
|
||||
ins_cost(DEFAULT_COST); // FIXME
|
||||
format %{
|
||||
|
@ -963,8 +963,8 @@ class Assembler : public AbstractAssembler {
|
||||
|
||||
F(fldmia, 1, 1) F(fldmfd, 1, 1)
|
||||
F(fldmdb, 1, 2) F(fldmea, 1, 2)
|
||||
F(fstmia, 0, 1) F(fstmfd, 0, 1)
|
||||
F(fstmdb, 0, 2) F(fstmea, 0, 2)
|
||||
F(fstmia, 0, 1) F(fstmea, 0, 1)
|
||||
F(fstmdb, 0, 2) F(fstmfd, 0, 2)
|
||||
#undef F
|
||||
|
||||
// fconst{s,d} encoding:
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "oops/objArrayKlass.hpp"
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_arm.inline.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "gc/shared/cardTableBarrierSet.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_arm.inline.hpp"
|
||||
|
||||
#ifdef ASSERT
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "runtime/os.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
// Note: Rtemp usage is this file should not impact C2 and should be
|
||||
// correct as long as it is not implicitly used in lower layers (the
|
||||
|
@ -189,7 +189,7 @@ static OopMap* save_live_registers(StubAssembler* sasm, bool save_fpu_registers
|
||||
__ push(RegisterSet(FP) | RegisterSet(LR));
|
||||
__ push(RegisterSet(R0, R6) | RegisterSet(R8, R10) | R12 | altFP_7_11);
|
||||
if (save_fpu_registers) {
|
||||
__ fstmdbd(SP, FloatRegisterSet(D0, fpu_save_size / 2), writeback);
|
||||
__ fpush(FloatRegisterSet(D0, fpu_save_size / 2));
|
||||
} else {
|
||||
__ sub(SP, SP, fpu_save_size * wordSize);
|
||||
}
|
||||
@ -206,7 +206,7 @@ static void restore_live_registers(StubAssembler* sasm,
|
||||
__ block_comment("restore_live_registers");
|
||||
|
||||
if (restore_fpu_registers) {
|
||||
__ fldmiad(SP, FloatRegisterSet(D0, fpu_save_size / 2), writeback);
|
||||
__ fpop(FloatRegisterSet(D0, fpu_save_size / 2));
|
||||
if (!restore_R0) {
|
||||
__ add(SP, SP, (R1_offset - fpu_save_size) * wordSize);
|
||||
}
|
||||
|
@ -62,8 +62,6 @@ define_pd_global(uint64_t, MaxRAM, 1ULL*G);
|
||||
define_pd_global(bool, CICompileOSR, true );
|
||||
#endif // COMPILER2
|
||||
define_pd_global(bool, UseTypeProfile, false);
|
||||
define_pd_global(bool, RoundFPResults, false);
|
||||
|
||||
|
||||
define_pd_global(bool, LIRFillDelaySlots, false);
|
||||
define_pd_global(bool, OptimizeSinglePrecision, true);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, 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,31 +57,19 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
address fp = (address)_fp;
|
||||
address unextended_sp = (address)_unextended_sp;
|
||||
|
||||
static size_t stack_guard_size = os::uses_stack_guard_pages() ?
|
||||
(JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_zone_size()) : 0;
|
||||
size_t usable_stack_size = thread->stack_size() - stack_guard_size;
|
||||
|
||||
// consider stack guards when trying to determine "safe" stack pointers
|
||||
// sp must be within the usable part of the stack (not in guards)
|
||||
bool sp_safe = (sp != NULL &&
|
||||
(sp <= thread->stack_base()) &&
|
||||
(sp >= thread->stack_base() - usable_stack_size));
|
||||
|
||||
if (!sp_safe) {
|
||||
if (!thread->is_in_usable_stack(sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool unextended_sp_safe = (unextended_sp != NULL &&
|
||||
(unextended_sp <= thread->stack_base()) &&
|
||||
(unextended_sp >= sp));
|
||||
if (!unextended_sp_safe) {
|
||||
if (!thread->is_in_stack_range_incl(unextended_sp, sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We know sp/unextended_sp are safe. Only fp is questionable here.
|
||||
|
||||
bool fp_safe = (fp != NULL &&
|
||||
(fp <= thread->stack_base()) &&
|
||||
fp >= sp);
|
||||
bool fp_safe = thread->is_in_stack_range_incl(fp, sp);
|
||||
|
||||
if (_cb != NULL ) {
|
||||
|
||||
@ -125,7 +113,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
sender_sp = _unextended_sp + _cb->frame_size();
|
||||
// Is sender_sp safe?
|
||||
if ((address)sender_sp >= thread->stack_base()) {
|
||||
if (!thread->is_in_full_stack((address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
// With our calling conventions, the return_address should
|
||||
@ -148,9 +136,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// is really a frame pointer.
|
||||
|
||||
intptr_t *saved_fp = (intptr_t*)*(sender_sp - frame::sender_sp_offset + link_offset);
|
||||
bool saved_fp_safe = ((address)saved_fp <= thread->stack_base()) && (saved_fp > sender_sp);
|
||||
|
||||
if (!saved_fp_safe) {
|
||||
if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -178,9 +164,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// Could be the call_stub
|
||||
if (StubRoutines::returns_to_call_stub(sender_pc)) {
|
||||
intptr_t *saved_fp = (intptr_t*)*(sender_sp - frame::sender_sp_offset + link_offset);
|
||||
bool saved_fp_safe = ((address)saved_fp <= thread->stack_base()) && (saved_fp >= sender_sp);
|
||||
|
||||
if (!saved_fp_safe) {
|
||||
if (!thread->is_in_stack_range_excl((address)saved_fp, (address)sender_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -191,9 +175,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
// Validate the JavaCallWrapper an entry frame must have
|
||||
address jcw = (address)sender.entry_frame_call_wrapper();
|
||||
|
||||
bool jcw_safe = (jcw <= thread->stack_base()) && (jcw > (address)sender.fp());
|
||||
|
||||
return jcw_safe;
|
||||
return thread->is_in_stack_range_excl(jcw, (address)sender.fp());
|
||||
}
|
||||
|
||||
// If the frame size is 0 something (or less) is bad because every nmethod has a non-zero frame size
|
||||
@ -500,12 +482,7 @@ bool frame::is_interpreted_frame_valid(JavaThread* thread) const {
|
||||
// validate locals
|
||||
|
||||
address locals = (address) *interpreter_frame_locals_addr();
|
||||
|
||||
if (locals > thread->stack_base() || locals < (address) fp()) return false;
|
||||
|
||||
// We'd have to be pretty unlucky to be mislead at this point
|
||||
|
||||
return true;
|
||||
return thread->is_in_stack_range_incl(locals, (address)fp());
|
||||
}
|
||||
|
||||
BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Implementation of InterpreterMacroAssembler
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2020, 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,22 +50,22 @@ InterpreterRuntime::SignatureHandlerGenerator::SignatureHandlerGenerator(
|
||||
|
||||
#ifdef SHARING_FAST_NATIVE_FINGERPRINTS
|
||||
// mapping from SignatureIterator param to (common) type of parsing
|
||||
static const u1 shared_type[] = {
|
||||
(u1) SignatureIterator::int_parm, // bool
|
||||
(u1) SignatureIterator::int_parm, // byte
|
||||
(u1) SignatureIterator::int_parm, // char
|
||||
(u1) SignatureIterator::int_parm, // short
|
||||
(u1) SignatureIterator::int_parm, // int
|
||||
(u1) SignatureIterator::long_parm, // long
|
||||
static const BasicType shared_type[] = {
|
||||
T_INT, // bool
|
||||
T_INT, // char
|
||||
#ifndef __ABI_HARD__
|
||||
(u1) SignatureIterator::int_parm, // float, passed as int
|
||||
(u1) SignatureIterator::long_parm, // double, passed as long
|
||||
T_INT, // float, passed as int
|
||||
T_LONG, // double, passed as long
|
||||
#else
|
||||
(u1) SignatureIterator::float_parm, // float
|
||||
(u1) SignatureIterator::double_parm, // double
|
||||
T_FLOAT, // float
|
||||
T_DOUBLE, // double
|
||||
#endif
|
||||
(u1) SignatureIterator::obj_parm, // obj
|
||||
(u1) SignatureIterator::done_parm // done
|
||||
T_INT, // byte
|
||||
T_INT, // short
|
||||
T_INT, // int
|
||||
T_LONG, // long
|
||||
T_OBJECT, // obj
|
||||
T_OBJECT, // array
|
||||
};
|
||||
|
||||
uint64_t InterpreterRuntime::normalize_fast_native_fingerprint(uint64_t fingerprint) {
|
||||
@ -73,37 +73,33 @@ uint64_t InterpreterRuntime::normalize_fast_native_fingerprint(uint64_t fingerpr
|
||||
// special signature used when the argument list cannot be encoded in a 64 bits value
|
||||
return fingerprint;
|
||||
}
|
||||
int shift = SignatureIterator::static_feature_size;
|
||||
uint64_t result = fingerprint & ((1 << shift) - 1);
|
||||
fingerprint >>= shift;
|
||||
int shift = SignatureIterator::fp_static_feature_size;
|
||||
SignatureIterator::fingerprint_t result = fingerprint & ((1 << shift) - 1);
|
||||
|
||||
BasicType ret_type = (BasicType) (fingerprint & SignatureIterator::result_feature_mask);
|
||||
BasicType ret_type = SignatureIterator::fp_return_type(fingerprint);
|
||||
// For ARM, the fast signature handler only needs to know whether
|
||||
// the return value must be unboxed. T_OBJECT and T_ARRAY need not
|
||||
// be distinguished from each other and all other return values
|
||||
// behave like integers with respect to the handler except T_BOOLEAN
|
||||
// which must be mapped to the range 0..1.
|
||||
bool unbox = (ret_type == T_OBJECT) || (ret_type == T_ARRAY);
|
||||
if (unbox) {
|
||||
if (is_reference_type(ret_type)) {
|
||||
ret_type = T_OBJECT;
|
||||
} else if (ret_type != T_BOOLEAN) {
|
||||
ret_type = T_INT;
|
||||
}
|
||||
result |= ((uint64_t) ret_type) << shift;
|
||||
shift += SignatureIterator::result_feature_size;
|
||||
fingerprint >>= SignatureIterator::result_feature_size;
|
||||
result |= ((SignatureIterator::fingerprint_t) ret_type) << shift;
|
||||
shift += SignatureIterator::fp_result_feature_size;
|
||||
|
||||
SignatureIterator::fingerprint_t unaccumulator = SignatureIterator::fp_start_parameters(fingerprint);
|
||||
while (true) {
|
||||
uint32_t type = (uint32_t) (fingerprint & SignatureIterator::parameter_feature_mask);
|
||||
if (type == SignatureIterator::done_parm) {
|
||||
result |= ((uint64_t) SignatureIterator::done_parm) << shift;
|
||||
BasicType type = SignatureIterator::fp_next_parameter(unaccumulator);
|
||||
if (type == (BasicType)SignatureIterator::fp_parameters_done) {
|
||||
return result;
|
||||
}
|
||||
assert((type >= SignatureIterator::bool_parm) && (type <= SignatureIterator::obj_parm), "check fingerprint encoding");
|
||||
int shared = shared_type[type - SignatureIterator::bool_parm];
|
||||
result |= ((uint64_t) shared) << shift;
|
||||
shift += SignatureIterator::parameter_feature_size;
|
||||
fingerprint >>= SignatureIterator::parameter_feature_size;
|
||||
assert(SignatureIterator::fp_is_valid_type(type), "garbled fingerprint");
|
||||
BasicType shared = shared_type[type - T_BOOLEAN];
|
||||
result |= ((SignatureIterator::fingerprint_t) shared) << shift;
|
||||
shift += SignatureIterator::fp_parameter_feature_size;
|
||||
}
|
||||
}
|
||||
#endif // SHARING_FAST_NATIVE_FINGERPRINTS
|
||||
@ -222,7 +218,7 @@ void InterpreterRuntime::SignatureHandlerGenerator::pass_double() {
|
||||
void InterpreterRuntime::SignatureHandlerGenerator::generate(uint64_t fingerprint) {
|
||||
iterate(fingerprint);
|
||||
|
||||
BasicType result_type = SignatureIterator::return_type(fingerprint);
|
||||
BasicType result_type = SignatureIterator::fp_return_type(fingerprint);
|
||||
|
||||
address result_handler = Interpreter::result_handler(result_type);
|
||||
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
// Implementation of AddressLiteral
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#define CPU_ARM_MACROASSEMBLER_ARM_HPP
|
||||
|
||||
#include "code/relocInfo.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
class BiasedLockingCounters;
|
||||
|
||||
@ -435,6 +436,26 @@ public:
|
||||
fldmias(SP, FloatRegisterSet(fd), writeback, cond);
|
||||
}
|
||||
|
||||
void fpush(FloatRegisterSet reg_set) {
|
||||
fstmdbd(SP, reg_set, writeback);
|
||||
}
|
||||
|
||||
void fpop(FloatRegisterSet reg_set) {
|
||||
fldmiad(SP, reg_set, writeback);
|
||||
}
|
||||
|
||||
void fpush_hardfp(FloatRegisterSet reg_set) {
|
||||
#ifndef __SOFTFP__
|
||||
fpush(reg_set);
|
||||
#endif
|
||||
}
|
||||
|
||||
void fpop_hardfp(FloatRegisterSet reg_set) {
|
||||
#ifndef __SOFTFP__
|
||||
fpop(reg_set);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Order access primitives
|
||||
enum Membar_mask_bits {
|
||||
StoreStore = 1 << 3,
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_arm.inline.hpp"
|
||||
#ifdef COMPILER1
|
||||
#include "c1/c1_Runtime1.hpp"
|
||||
@ -133,14 +134,14 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm,
|
||||
__ push(SAVED_BASE_REGS);
|
||||
if (HaveVFP) {
|
||||
if (VM_Version::has_vfp3_32()) {
|
||||
__ fstmdbd(SP, FloatRegisterSet(D16, 16), writeback);
|
||||
__ fpush(FloatRegisterSet(D16, 16));
|
||||
} else {
|
||||
if (FloatRegisterImpl::number_of_registers > 32) {
|
||||
assert(FloatRegisterImpl::number_of_registers == 64, "nb fp registers should be 64");
|
||||
__ sub(SP, SP, 32 * wordSize);
|
||||
}
|
||||
}
|
||||
__ fstmdbd(SP, FloatRegisterSet(D0, 16), writeback);
|
||||
__ fpush(FloatRegisterSet(D0, 16));
|
||||
} else {
|
||||
__ sub(SP, SP, fpu_save_size * wordSize);
|
||||
}
|
||||
@ -174,9 +175,9 @@ OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm,
|
||||
|
||||
void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_lr) {
|
||||
if (HaveVFP) {
|
||||
__ fldmiad(SP, FloatRegisterSet(D0, 16), writeback);
|
||||
__ fpop(FloatRegisterSet(D0, 16));
|
||||
if (VM_Version::has_vfp3_32()) {
|
||||
__ fldmiad(SP, FloatRegisterSet(D16, 16), writeback);
|
||||
__ fpop(FloatRegisterSet(D16, 16));
|
||||
} else {
|
||||
if (FloatRegisterImpl::number_of_registers > 32) {
|
||||
assert(FloatRegisterImpl::number_of_registers == 64, "nb fp registers should be 64");
|
||||
@ -221,26 +222,21 @@ static void push_param_registers(MacroAssembler* masm, int fp_regs_in_arguments)
|
||||
// R1-R3 arguments need to be saved, but we push 4 registers for 8-byte alignment
|
||||
__ push(RegisterSet(R0, R3));
|
||||
|
||||
#ifdef __ABI_HARD__
|
||||
// preserve arguments
|
||||
// Likely not needed as the locking code won't probably modify volatile FP registers,
|
||||
// but there is no way to guarantee that
|
||||
if (fp_regs_in_arguments) {
|
||||
// convert fp_regs_in_arguments to a number of double registers
|
||||
int double_regs_num = (fp_regs_in_arguments + 1) >> 1;
|
||||
__ fstmdbd(SP, FloatRegisterSet(D0, double_regs_num), writeback);
|
||||
__ fpush_hardfp(FloatRegisterSet(D0, double_regs_num));
|
||||
}
|
||||
#endif // __ ABI_HARD__
|
||||
}
|
||||
|
||||
static void pop_param_registers(MacroAssembler* masm, int fp_regs_in_arguments) {
|
||||
#ifdef __ABI_HARD__
|
||||
if (fp_regs_in_arguments) {
|
||||
int double_regs_num = (fp_regs_in_arguments + 1) >> 1;
|
||||
__ fldmiad(SP, FloatRegisterSet(D0, double_regs_num), writeback);
|
||||
__ fpop_hardfp(FloatRegisterSet(D0, double_regs_num));
|
||||
}
|
||||
#endif // __ABI_HARD__
|
||||
|
||||
__ pop(RegisterSet(R0, R3));
|
||||
}
|
||||
|
||||
@ -462,11 +458,13 @@ static void patch_callers_callsite(MacroAssembler *masm) {
|
||||
// Pushing an even number of registers for stack alignment.
|
||||
// Selecting R9, which had to be saved anyway for some platforms.
|
||||
__ push(RegisterSet(R0, R3) | R9 | LR);
|
||||
__ fpush_hardfp(FloatRegisterSet(D0, 8));
|
||||
|
||||
__ mov(R0, Rmethod);
|
||||
__ mov(R1, LR);
|
||||
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::fixup_callers_callsite));
|
||||
|
||||
__ fpop_hardfp(FloatRegisterSet(D0, 8));
|
||||
__ pop(RegisterSet(R0, R3) | R9 | LR);
|
||||
|
||||
__ bind(skip);
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "runtime/stubCodeGenerator.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/runtime.hpp"
|
||||
#endif
|
||||
@ -179,9 +180,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
|
||||
__ mov(Rtemp, SP);
|
||||
__ push(RegisterSet(FP) | RegisterSet(LR));
|
||||
#ifndef __SOFTFP__
|
||||
__ fstmdbd(SP, FloatRegisterSet(D8, 8), writeback);
|
||||
#endif
|
||||
__ fpush_hardfp(FloatRegisterSet(D8, 8));
|
||||
__ stmdb(SP, RegisterSet(R0, R2) | RegisterSet(R4, R6) | RegisterSet(R8, R10) | altFP_7_11, writeback);
|
||||
__ mov(Rmethod, R3);
|
||||
__ ldmia(Rtemp, RegisterSet(R1, R3) | Rthread); // stacked arguments
|
||||
@ -243,9 +242,7 @@ class StubGenerator: public StubCodeGenerator {
|
||||
#endif
|
||||
|
||||
__ pop(RegisterSet(R4, R6) | RegisterSet(R8, R10) | altFP_7_11);
|
||||
#ifndef __SOFTFP__
|
||||
__ fldmiad(SP, FloatRegisterSet(D8, 8), writeback);
|
||||
#endif
|
||||
__ fpop_hardfp(FloatRegisterSet(D8, 8));
|
||||
__ pop(RegisterSet(FP) | RegisterSet(PC));
|
||||
|
||||
return start;
|
||||
|
@ -129,7 +129,7 @@ address generate_aescrypt_encryptBlock() {
|
||||
// Register tbox = R3; // transposition box reference
|
||||
|
||||
__ push (RegisterSet(R4, R12) | LR);
|
||||
__ fstmdbd(SP, FloatRegisterSet(D0, 4), writeback);
|
||||
__ fpush(FloatRegisterSet(D0, 4));
|
||||
__ sub(SP, SP, 32);
|
||||
|
||||
// preserve TBox references
|
||||
@ -308,7 +308,7 @@ address generate_aescrypt_encryptBlock() {
|
||||
__ str(R0, Address(R9));
|
||||
|
||||
__ add(SP, SP, 32);
|
||||
__ fldmiad(SP, FloatRegisterSet(D0, 4), writeback);;
|
||||
__ fpop(FloatRegisterSet(D0, 4));
|
||||
|
||||
__ pop(RegisterSet(R4, R12) | PC);
|
||||
return start;
|
||||
@ -326,7 +326,7 @@ address generate_aescrypt_decryptBlock() {
|
||||
// Register tbox = R3; // transposition box reference
|
||||
|
||||
__ push (RegisterSet(R4, R12) | LR);
|
||||
__ fstmdbd(SP, FloatRegisterSet(D0, 4), writeback);
|
||||
__ fpush(FloatRegisterSet(D0, 4));
|
||||
__ sub(SP, SP, 32);
|
||||
|
||||
// retrieve key length
|
||||
@ -521,7 +521,7 @@ address generate_aescrypt_decryptBlock() {
|
||||
__ str(R0, Address(R9));
|
||||
|
||||
__ add(SP, SP, 32);
|
||||
__ fldmiad(SP, FloatRegisterSet(D0, 4), writeback);;
|
||||
__ fpop(FloatRegisterSet(D0, 4));
|
||||
__ pop(RegisterSet(R4, R12) | PC);
|
||||
|
||||
return start;
|
||||
@ -680,7 +680,7 @@ address generate_cipherBlockChaining_decryptAESCrypt() {
|
||||
Label decrypt_8_blocks;
|
||||
int quad = 1;
|
||||
// Process 8 blocks in parallel
|
||||
__ fstmdbd(SP, FloatRegisterSet(D8, 8), writeback);
|
||||
__ fpush(FloatRegisterSet(D8, 8));
|
||||
__ sub(SP, SP, 40);
|
||||
|
||||
// record output buffer end address (used as a block counter)
|
||||
@ -1020,7 +1020,7 @@ address generate_cipherBlockChaining_decryptAESCrypt() {
|
||||
__ b(decrypt_8_blocks, ne);
|
||||
|
||||
__ add(SP, SP, 40);
|
||||
__ fldmiad(SP, FloatRegisterSet(D8, 8), writeback);;
|
||||
__ fpop(FloatRegisterSet(D8, 8));
|
||||
}
|
||||
|
||||
__ bind(cbc_done);
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#ifdef PRODUCT
|
||||
#define BLOCK_COMMENT(str) // nothing
|
||||
@ -78,13 +79,13 @@ int Assembler::branch_destination(int inst, int pos) {
|
||||
|
||||
// Low-level andi-one-instruction-macro.
|
||||
void Assembler::andi(Register a, Register s, const long ui16) {
|
||||
if (is_power_of_2_long(((jlong) ui16)+1)) {
|
||||
if (is_power_of_2(((jlong) ui16)+1)) {
|
||||
// pow2minus1
|
||||
clrldi(a, s, 64-log2_long((((jlong) ui16)+1)));
|
||||
} else if (is_power_of_2_long((jlong) ui16)) {
|
||||
} else if (is_power_of_2((jlong) ui16)) {
|
||||
// pow2
|
||||
rlwinm(a, s, 0, 31-log2_long((jlong) ui16), 31-log2_long((jlong) ui16));
|
||||
} else if (is_power_of_2_long((jlong)-ui16)) {
|
||||
} else if (is_power_of_2((jlong)-ui16)) {
|
||||
// negpow2
|
||||
clrrdi(a, s, log2_long((jlong)-ui16));
|
||||
} else {
|
||||
|
@ -40,6 +40,7 @@
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/safepointMechanism.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
|
||||
@ -1762,7 +1763,7 @@ void LIR_Assembler::logic_op(LIR_Code code, LIR_Opr left, LIR_Opr right, LIR_Opr
|
||||
|
||||
switch (code) {
|
||||
case lir_logic_and:
|
||||
if (uimmss != 0 || (uimms != 0 && (uimm & 0xFFFF) != 0) || is_power_of_2_long(uimm)) {
|
||||
if (uimmss != 0 || (uimms != 0 && (uimm & 0xFFFF) != 0) || is_power_of_2(uimm)) {
|
||||
__ andi(d, l, uimm); // special cases
|
||||
} else if (uimms != 0) { __ andis_(d, l, uimms); }
|
||||
else { __ andi_(d, l, uimm); }
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "ci/ciTypeArrayKlass.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_ppc.inline.hpp"
|
||||
|
||||
#ifdef ASSERT
|
||||
@ -574,13 +575,13 @@ inline bool can_handle_logic_op_as_uimm(ValueType *type, Bytecodes::Code bc) {
|
||||
|
||||
// see Assembler::andi
|
||||
if (bc == Bytecodes::_iand &&
|
||||
(is_power_of_2_long(int_or_long_const+1) ||
|
||||
is_power_of_2_long(int_or_long_const) ||
|
||||
is_power_of_2_long(-int_or_long_const))) return true;
|
||||
(is_power_of_2(int_or_long_const+1) ||
|
||||
is_power_of_2(int_or_long_const) ||
|
||||
is_power_of_2(-int_or_long_const))) return true;
|
||||
if (bc == Bytecodes::_land &&
|
||||
(is_power_of_2_long(int_or_long_const+1) ||
|
||||
(Assembler::is_uimm(int_or_long_const, 32) && is_power_of_2_long(int_or_long_const)) ||
|
||||
(int_or_long_const != min_jlong && is_power_of_2_long(-int_or_long_const)))) return true;
|
||||
(is_power_of_2(int_or_long_const+1) ||
|
||||
(Assembler::is_uimm(int_or_long_const, 32) && is_power_of_2(int_or_long_const)) ||
|
||||
(int_or_long_const != min_jlong && is_power_of_2(-int_or_long_const)))) return true;
|
||||
|
||||
// special case: xor -1
|
||||
if ((bc == Bytecodes::_ixor || bc == Bytecodes::_lxor) &&
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
void C1_MacroAssembler::inline_cache_check(Register receiver, Register iCache) {
|
||||
const Register temp_reg = R12_scratch2;
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "runtime/vframeArray.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_ppc.inline.hpp"
|
||||
|
||||
// Implementation of StubAssembler
|
||||
|
@ -62,7 +62,6 @@ define_pd_global(uintx, InitialCodeCacheSize, 160*K);
|
||||
#endif // !TIERED
|
||||
|
||||
define_pd_global(bool, UseTypeProfile, false);
|
||||
define_pd_global(bool, RoundFPResults, false);
|
||||
|
||||
define_pd_global(bool, LIRFillDelaySlots, false);
|
||||
define_pd_global(bool, OptimizeSinglePrecision, false);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2017 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -55,33 +55,22 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
address fp = (address)_fp;
|
||||
address unextended_sp = (address)_unextended_sp;
|
||||
|
||||
// Consider stack guards when trying to determine "safe" stack pointers
|
||||
static size_t stack_guard_size = os::uses_stack_guard_pages() ?
|
||||
JavaThread::stack_red_zone_size() + JavaThread::stack_yellow_reserved_zone_size() : 0;
|
||||
size_t usable_stack_size = thread->stack_size() - stack_guard_size;
|
||||
|
||||
// consider stack guards when trying to determine "safe" stack pointers
|
||||
// sp must be within the usable part of the stack (not in guards)
|
||||
bool sp_safe = (sp < thread->stack_base()) &&
|
||||
(sp >= thread->stack_base() - usable_stack_size);
|
||||
|
||||
|
||||
if (!sp_safe) {
|
||||
if (!thread->is_in_usable_stack(sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Unextended sp must be within the stack
|
||||
bool unextended_sp_safe = (unextended_sp < thread->stack_base());
|
||||
|
||||
if (!unextended_sp_safe) {
|
||||
if (!thread->is_in_full_stack(unextended_sp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// An fp must be within the stack and above (but not equal) sp.
|
||||
bool fp_safe = (fp <= thread->stack_base()) && (fp > sp);
|
||||
bool fp_safe = thread->is_in_stack_range_excl(fp, sp);
|
||||
// An interpreter fp must be within the stack and above (but not equal) sp.
|
||||
// Moreover, it must be at least the size of the ijava_state structure.
|
||||
bool fp_interp_safe = (fp <= thread->stack_base()) && (fp > sp) &&
|
||||
((fp - sp) >= ijava_state_size);
|
||||
bool fp_interp_safe = fp_safe && ((fp - sp) >= ijava_state_size);
|
||||
|
||||
// We know sp/unextended_sp are safe, only fp is questionable here
|
||||
|
||||
@ -140,7 +129,7 @@ bool frame::safe_for_sender(JavaThread *thread) {
|
||||
|
||||
// sender_fp must be within the stack and above (but not
|
||||
// equal) current frame's fp.
|
||||
if (sender_fp > thread->stack_base() || sender_fp <= fp) {
|
||||
if (!thread->is_in_stack_range_excl(sender_fp, fp)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
// Implementation of InterpreterMacroAssembler.
|
||||
|
||||
|
@ -44,6 +44,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#ifdef COMPILER2
|
||||
#include "opto/intrinsicnode.hpp"
|
||||
#endif
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "oops/accessDecorators.hpp"
|
||||
#include "oops/compressedOops.hpp"
|
||||
#include "runtime/safepointMechanism.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
inline bool MacroAssembler::is_ld_largeoffset(address a) {
|
||||
const int inst1 = *(int *)a;
|
||||
@ -56,7 +57,7 @@ inline int MacroAssembler::get_ld_largeoffset_offset(address a) {
|
||||
}
|
||||
|
||||
inline void MacroAssembler::round_to(Register r, int modulus) {
|
||||
assert(is_power_of_2_long((jlong)modulus), "must be power of 2");
|
||||
assert(is_power_of_2((jlong)modulus), "must be power of 2");
|
||||
addi(r, r, modulus-1);
|
||||
clrrdi(r, r, log2_long((jlong)modulus));
|
||||
}
|
||||
|
@ -2501,8 +2501,7 @@ void Matcher::pd_implicit_null_fixup(MachNode *node, uint idx) {
|
||||
Unimplemented();
|
||||
}
|
||||
|
||||
// Advertise here if the CPU requires explicit rounding operations
|
||||
// to implement the UseStrictFP mode.
|
||||
// Advertise here if the CPU requires explicit rounding operations to implement strictfp mode.
|
||||
const bool Matcher::strict_fp_requires_explicit_rounding = false;
|
||||
|
||||
// Do floats take an entire double register or just half?
|
||||
@ -4351,7 +4350,7 @@ operand immIhi16() %{
|
||||
%}
|
||||
|
||||
operand immInegpow2() %{
|
||||
predicate(is_power_of_2_long((jlong) (julong) (juint) (-(n->get_int()))));
|
||||
predicate(is_power_of_2((jlong) (julong) (juint) (-(n->get_int()))));
|
||||
match(ConI);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
@ -4359,7 +4358,7 @@ operand immInegpow2() %{
|
||||
%}
|
||||
|
||||
operand immIpow2minus1() %{
|
||||
predicate(is_power_of_2_long((((jlong) (n->get_int()))+1)));
|
||||
predicate(is_power_of_2((((jlong) (n->get_int()))+1)));
|
||||
match(ConI);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
@ -4367,7 +4366,7 @@ operand immIpow2minus1() %{
|
||||
%}
|
||||
|
||||
operand immIpowerOf2() %{
|
||||
predicate(is_power_of_2_long((((jlong) (julong) (juint) (n->get_int())))));
|
||||
predicate(is_power_of_2((((jlong) (julong) (juint) (n->get_int())))));
|
||||
match(ConI);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
@ -4601,7 +4600,7 @@ operand immLhighest16() %{
|
||||
%}
|
||||
|
||||
operand immLnegpow2() %{
|
||||
predicate(is_power_of_2_long((jlong)-(n->get_long())));
|
||||
predicate(is_power_of_2((jlong)-(n->get_long())));
|
||||
match(ConL);
|
||||
op_cost(0);
|
||||
format %{ %}
|
||||
@ -4609,7 +4608,7 @@ operand immLnegpow2() %{
|
||||
%}
|
||||
|
||||
operand immLpow2minus1() %{
|
||||
predicate(is_power_of_2_long((((jlong) (n->get_long()))+1)) &&
|
||||
predicate(is_power_of_2((((jlong) (n->get_long()))+1)) &&
|
||||
(n->get_long() != (jlong)0xffffffffffffffffL));
|
||||
match(ConL);
|
||||
op_cost(0);
|
||||
|
@ -41,6 +41,7 @@
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/thread.inline.hpp"
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
// Declaration and definition of StubGenerator (no .hpp file).
|
||||
// For a more detailed description of the stub routine structure
|
||||
|
@ -42,6 +42,7 @@
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "runtime/synchronizer.hpp"
|
||||
#include "utilities/macros.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#undef __
|
||||
#define __ _masm->
|
||||
|
@ -36,6 +36,7 @@
|
||||
#include "utilities/align.hpp"
|
||||
#include "utilities/defaultStream.hpp"
|
||||
#include "utilities/globalDefinitions.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#include <sys/sysinfo.h>
|
||||
#if defined(_AIX)
|
||||
@ -224,6 +225,10 @@ void VM_Version::initialize() {
|
||||
|
||||
assert(AllocatePrefetchStyle >= 0, "AllocatePrefetchStyle should be positive");
|
||||
|
||||
if (FLAG_IS_DEFAULT(ContendedPaddingWidth) && (cache_line_size > ContendedPaddingWidth)) {
|
||||
ContendedPaddingWidth = cache_line_size;
|
||||
}
|
||||
|
||||
// If running on Power8 or newer hardware, the implementation uses the available vector instructions.
|
||||
// In all other cases, the implementation uses only generally available instructions.
|
||||
if (!UseCRC32Intrinsics) {
|
||||
@ -535,6 +540,13 @@ bool VM_Version::use_biased_locking() {
|
||||
|
||||
void VM_Version::print_features() {
|
||||
tty->print_cr("Version: %s L1_data_cache_line_size=%d", features_string(), L1_data_cache_line_size());
|
||||
|
||||
if (Verbose) {
|
||||
if (ContendedPaddingWidth > 0) {
|
||||
tty->cr();
|
||||
tty->print_cr("ContendedPaddingWidth " INTX_FORMAT, ContendedPaddingWidth);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef COMPILER2
|
||||
|
@ -39,6 +39,7 @@
|
||||
#include "runtime/frame.inline.hpp"
|
||||
#include "runtime/safepointMechanism.inline.hpp"
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
#include "vmreg_s390.inline.hpp"
|
||||
|
||||
#define __ _masm->
|
||||
@ -1798,7 +1799,7 @@ void LIR_Assembler::arithmetic_idiv(LIR_Code code, LIR_Opr left, LIR_Opr right,
|
||||
if (left->is_double_cpu()) {
|
||||
// 64 bit integer case
|
||||
assert(left->is_double_cpu(), "left must be register");
|
||||
assert(right->is_double_cpu() || is_power_of_2_long(right->as_jlong()),
|
||||
assert(right->is_double_cpu() || is_power_of_2(right->as_jlong()),
|
||||
"right must be register or power of 2 constant");
|
||||
assert(result->is_double_cpu(), "result must be register");
|
||||
|
||||
|
@ -37,6 +37,7 @@
|
||||
#include "runtime/sharedRuntime.hpp"
|
||||
#include "runtime/stubRoutines.hpp"
|
||||
#include "vmreg_s390.inline.hpp"
|
||||
#include "utilities/powerOfTwo.hpp"
|
||||
|
||||
#ifdef ASSERT
|
||||
#define __ gen()->lir(__FILE__, __LINE__)->
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user