-$1.tar.gz%, dversionmangle=s/~/+/" \
- https://github.com/openjdk/jdk11u-dev/tags \
+ https://github.com/openjdk/jdk11u/tags \
(?:.*?/)?jdk-(\d[\d.]*\+\d[\d]*)\.tar\.gz debian uupdate
diff -Nru openjdk-11-11.0.16+8/doc/building.html openjdk-11-11.0.18+10/doc/building.html
--- openjdk-11-11.0.16+8/doc/building.html 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/doc/building.html 2023-01-10 08:32:35.000000000 +0000
@@ -195,7 +195,7 @@
Windows
Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.
On Windows, it is important that you pay attention to the instructions in the Special Considerations.
-Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layer is Cygwin. (Msys is no longer supported due to a too old bash; msys2 and the new Windows Subsystem for Linux (WSL) would likely be possible to support in a future version but that would require effort to implement.)
+Windows is the only non-POSIX OS supported by the JDK, and as such, requires some extra care. A POSIX support layer is required to build on Windows. Currently, the only supported such layers are Cygwin and MSYS2. (MSYS is no longer supported due to an outdated bash; While OpenJDK can be built with MSYS2, support for it is still experimental, so build failures and unusual errors are not uncommon.)
Internally in the build system, all paths are represented as Unix-style paths, e.g. /cygdrive/c/git/jdk/Makefile
rather than C:\git\jdk\Makefile
. This rule also applies to input to the build system, e.g. in arguments to configure
. So, use --with-msvcr-dll=/cygdrive/c/msvcr100.dll
rather than --with-msvcr-dll=c:\msvcr100.dll
. For details on this conversion, see the section on Fixpath.
Cygwin
A functioning Cygwin environment is thus required for building the JDK on Windows. If you have a 64-bit OS, we strongly recommend using the 64-bit version of Cygwin.
@@ -362,6 +362,7 @@
Microsoft Visual Studio
The minimum accepted version of Visual Studio is 2010. Older versions will not be accepted by configure
. The maximum accepted version of Visual Studio is 2019. Versions older than 2017 are unlikely to continue working for long.
If you have multiple versions of Visual Studio installed, configure
will by default pick the latest. You can request a specific version to be used by setting --with-toolchain-version
, e.g. --with-toolchain-version=2015
.
+If you have Visual Studio installed but configure
fails to detect it, it may be because of spaces in path.
If you get LINK: fatal error LNK1123: failure during conversion to COFF: file invalid
when building using Visual Studio 2010, you have encountered KB2757355, a bug triggered by a specific installation order. However, the solution suggested by the KB article does not always resolve the problem. See this stackoverflow discussion for other suggestions.
IBM XL C/C++
The regular builds by SAP is using version 12.1, described as IBM XL C/C++ for AIX, V12.1 (5765-J02, 5725-C72) Version: 12.01.0000.0017
.
@@ -384,6 +385,7 @@
To install on an apt-based Linux, try running sudo apt-get install libfreetype6-dev
.
To install on an rpm-based Linux, try running sudo yum install freetype-devel
.
To install on Alpine Linux, try running sudo apk add freetype-dev
.
+To install on macOS, try running brew install freetype
.
To install on Solaris, try running pkg install system/library/freetype-2
.
Use --with-freetype-include=<path>
and --with-freetype-lib=<path>
if configure
does not automatically locate the platform FreeType files.
@@ -942,6 +944,8 @@
cannot create ... Permission denied
spawn failed
This can be a sign of a Cygwin problem. See the information about solving problems in the Cygwin section. Rebooting the computer might help temporarily.
+Spaces in Path
+On Windows, when configuring, fixpath.sh
may report that some directory names have spaces. Usually, it assumes those directories have short paths. You can run fsutil file setshortname
in cmd
on certain directories, such as Microsoft Visual Studio
or Windows Kits
, to assign arbitrary short paths so configure
can access them.
Getting Help
If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to build-dev@openjdk.java.net. Please include the relevant parts of the configure and/or build log.
If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on Contributing to OpenJDK for more information.
diff -Nru openjdk-11-11.0.16+8/doc/building.md openjdk-11-11.0.18+10/doc/building.md
--- openjdk-11-11.0.16+8/doc/building.md 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/doc/building.md 2023-01-10 08:32:35.000000000 +0000
@@ -177,10 +177,9 @@
Windows is the only non-POSIX OS supported by the JDK, and as such, requires
some extra care. A POSIX support layer is required to build on Windows.
-Currently, the only supported such layer is Cygwin. (Msys is no longer
-supported due to a too old bash; msys2 and the new Windows Subsystem for Linux
-(WSL) would likely be possible to support in a future version but that would
-require effort to implement.)
+Currently, the only supported such layers are Cygwin and MSYS2. (MSYS is no longer
+supported due to an outdated bash; While OpenJDK can be built with MSYS2,
+support for it is still experimental, so build failures and unusual errors are not uncommon.)
Internally in the build system, all paths are represented as Unix-style paths,
e.g. `/cygdrive/c/git/jdk/Makefile` rather than `C:\git\jdk\Makefile`. This
@@ -403,6 +402,9 @@
does not always resolve the problem. See [this stackoverflow discussion](
https://stackoverflow.com/questions/10888391) for other suggestions.
+If you have Visual Studio installed but `configure` fails to detect it, it may
+be because of [spaces in path](#spaces-in-path).
+
### IBM XL C/C++
The regular builds by SAP is using version 12.1, described as `IBM XL C/C++ for
@@ -473,6 +475,7 @@
* To install on an rpm-based Linux, try running `sudo yum install
freetype-devel`.
* To install on Alpine Linux, try running `sudo apk add freetype-dev`.
+ * To install on macOS, try running `brew install freetype`.
* To install on Solaris, try running `pkg install system/library/freetype-2`.
Use `--with-freetype-include=` and `--with-freetype-lib=`
@@ -1509,6 +1512,15 @@
problems in the [Cygwin](#cygwin) section. Rebooting the computer might help
temporarily.
+#### Spaces in Path
+
+On Windows, when configuring, `fixpath.sh` may report that some directory
+names have spaces. Usually, it assumes those directories have
+[short paths](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name).
+You can run `fsutil file setshortname` in `cmd` on certain directories, such as
+`Microsoft Visual Studio` or `Windows Kits`, to assign arbitrary short paths so
+`configure` can access them.
+
### Getting Help
If none of the suggestions in this document helps you, or if you find what you
diff -Nru openjdk-11-11.0.16+8/make/CreateJmods.gmk openjdk-11-11.0.18+10/make/CreateJmods.gmk
--- openjdk-11-11.0.16+8/make/CreateJmods.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/CreateJmods.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -173,6 +173,11 @@
JMOD_FLAGS += --exclude '$(notdir $(MSVCR_DLL))'
endif
endif
+ ifneq ($(VCRUNTIME_1_DLL), )
+ ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(VCRUNTIME_1_DLL))), )
+ JMOD_FLAGS += --exclude '$(notdir $(VCRUNTIME_1_DLL))'
+ endif
+ endif
ifneq ($(MSVCP_DLL), )
ifneq ($(wildcard $(LIBS_DIR)/$(notdir $(MSVCP_DLL))), )
JMOD_FLAGS += --exclude '$(notdir $(MSVCP_DLL))'
diff -Nru openjdk-11-11.0.16+8/make/GenerateLinkOptData.gmk openjdk-11-11.0.18+10/make/GenerateLinkOptData.gmk
--- openjdk-11-11.0.16+8/make/GenerateLinkOptData.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/GenerateLinkOptData.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -57,7 +57,7 @@
INTERIM_IMAGE_DIR := $(BUILD_JDK)
endif
-$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
+$(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
$(call MakeDir, $(LINK_OPT_DIR))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $@))
$(call LogInfo, Generating $(patsubst $(OUTPUTDIR)/%, %, $(JLI_TRACE_FILE)))
@@ -72,7 +72,7 @@
# dependencies, make will correctly rebuild both jli trace and classlist
# incrementally using the single recipe above.
$(CLASSLIST_FILE): $(JLI_TRACE_FILE)
-$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXE_SUFFIX) $(CLASSLIST_JAR)
+$(JLI_TRACE_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST_JAR)
TARGETS += $(CLASSLIST_FILE) $(JLI_TRACE_FILE)
diff -Nru openjdk-11-11.0.16+8/make/Init.gmk openjdk-11-11.0.18+10/make/Init.gmk
--- openjdk-11-11.0.16+8/make/Init.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/Init.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2012, 2019, 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
@@ -272,7 +272,7 @@
else
$(ECHO) "Re-running configure using default settings"
endif
- ( cd $(OUTPUTDIR) && PATH="$(ORIGINAL_PATH)" \
+ ( cd $(CONFIGURE_START_DIR) && PATH="$(ORIGINAL_PATH)" AUTOCONF="$(AUTOCONF)" \
CUSTOM_ROOT="$(CUSTOM_ROOT)" \
CUSTOM_CONFIG_DIR="$(CUSTOM_CONFIG_DIR)" \
$(BASH) $(TOPDIR)/configure $(CONFIGURE_COMMAND_LINE) )
diff -Nru openjdk-11-11.0.16+8/make/InterimImage.gmk openjdk-11-11.0.18+10/make/InterimImage.gmk
--- openjdk-11-11.0.16+8/make/InterimImage.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/InterimImage.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 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
@@ -32,7 +32,7 @@
################################################################################
# Use this file inside the image as target for make rule
-JIMAGE_TARGET_FILE := bin/java$(EXE_SUFFIX)
+JIMAGE_TARGET_FILE := bin/java$(EXECUTABLE_SUFFIX)
INTERIM_MODULES_LIST := $(call CommaList, $(INTERIM_IMAGE_MODULES))
diff -Nru openjdk-11-11.0.16+8/make/MacBundles.gmk openjdk-11-11.0.18+10/make/MacBundles.gmk
--- openjdk-11-11.0.16+8/make/MacBundles.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/MacBundles.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -38,11 +38,8 @@
MACOSX_PLIST_SRC := $(TOPDIR)/make/data/bundle
- BUNDLE_ID := $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT)
BUNDLE_NAME := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_SHORT)
BUNDLE_INFO := $(MACOSX_BUNDLE_NAME_BASE) $(VERSION_STRING)
- BUNDLE_PLATFORM_VERSION := $(VERSION_FEATURE).$(VERSION_INTERIM)
- BUNDLE_VERSION := $(VERSION_NUMBER)
ifeq ($(COMPANY_NAME), N/A)
BUNDLE_VENDOR := UNDEFINED
else
@@ -75,24 +72,26 @@
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JDK-Info.plist, \
OUTPUT_FILE := $(JDK_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
- @@ID@@ => $(BUNDLE_ID).jdk ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jdk ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
- @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
- @@VERSION@@ => $(BUNDLE_VERSION) ; \
- @@VENDOR@@ => $(BUNDLE_VENDOR) , \
+ @@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
+ @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
+ @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(eval $(call SetupTextFileProcessing, BUILD_JRE_PLIST, \
SOURCE_FILES := $(MACOSX_PLIST_SRC)/JRE-Info.plist, \
OUTPUT_FILE := $(JRE_MACOSX_CONTENTS_DIR)/Info.plist, \
REPLACEMENTS := \
- @@ID@@ => $(BUNDLE_ID).jre ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).jre ; \
@@NAME@@ => $(BUNDLE_NAME) ; \
@@INFO@@ => $(BUNDLE_INFO) ; \
- @@PLATFORM_VERSION@@ => $(BUNDLE_PLATFORM_VERSION) ; \
- @@VERSION@@ => $(BUNDLE_VERSION) ; \
- @@VENDOR@@ => $(BUNDLE_VENDOR) , \
+ @@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(BUNDLE_BUILD_VERSION) ; \
+ @@VENDOR@@ => $(BUNDLE_VENDOR) ; \
+ @@MACOSX_VERSION_MIN@@ => $(MACOSX_VERSION_MIN) , \
))
$(SUPPORT_OUTPUTDIR)/images/_jdk_bundle_attribute_set: $(COPY_JDK_IMAGE)
diff -Nru openjdk-11-11.0.16+8/make/RunTests.gmk openjdk-11-11.0.18+10/make/RunTests.gmk
--- openjdk-11-11.0.16+8/make/RunTests.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/RunTests.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -33,43 +33,6 @@
.NOTPARALLEL:
################################################################################
-# Setup global test running parameters
-################################################################################
-
-# Each factor variable comes in 3 variants. The first one is reserved for users
-# to use on command line. The other two are for predifined configurations in JDL
-# and for machine specific configurations respectively.
-TEST_JOBS_FACTOR ?= 1
-TEST_JOBS_FACTOR_JDL ?= 1
-TEST_JOBS_FACTOR_MACHINE ?= 1
-
-ifeq ($(TEST_JOBS), 0)
- CORES_DIVIDER := 2
- ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
- # For smaller SPARC machines we see reasonable scaling of throughput up to
- # cpus/4 without affecting test reliability. On the bigger machines, cpus/4
- # causes intermittent timeouts.
- ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
- CORES_DIVIDER := 5
- else
- CORES_DIVIDER := 4
- endif
- endif
- MEMORY_DIVIDER := 2048
- TEST_JOBS := $(shell $(AWK) \
- 'BEGIN { \
- c = $(NUM_CORES) / $(CORES_DIVIDER); \
- m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
- if (c > m) c = m; \
- c = c * $(TEST_JOBS_FACTOR); \
- c = c * $(TEST_JOBS_FACTOR_JDL); \
- c = c * $(TEST_JOBS_FACTOR_MACHINE); \
- if (c < 1) c = 1; \
- printf "%.0f", c; \
- }')
-endif
-
-################################################################################
# Parse global control variables
################################################################################
@@ -97,18 +60,13 @@
endif
endef
-# Setup _NT_SYMBOL_PATH on Windows
+# Setup _NT_SYMBOL_PATH on Windows, which points to our pdb files.
ifeq ($(OPENJDK_TARGET_OS), windows)
ifndef _NT_SYMBOL_PATH
- # Can't use PathList here as it adds quotes around the value.
- _NT_SYMBOL_PATH := \
- $(subst $(SPACE),;,$(strip \
- $(foreach p, $(sort $(dir $(wildcard \
- $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb)))), \
- $(call FixPath, $p) \
- ) \
- ))
- export _NT_SYMBOL_PATH
+ SYMBOL_PATH := $(call PathList, $(sort $(patsubst %/, %, $(dir $(wildcard \
+ $(addprefix $(SYMBOLS_IMAGE_DIR)/bin/, *.pdb */*.pdb))))))
+ export _NT_SYMBOL_PATH := $(subst \\,\, $(call FixPath, \
+ $(subst $(DQUOTE),, $(SYMBOL_PATH))))
$(info _NT_SYMBOL_PATH=$(_NT_SYMBOL_PATH))
endif
endif
@@ -241,11 +199,41 @@
TEST_JOBS_FACTOR_MACHINE ?= 1
ifeq ($(TEST_JOBS), 0)
- # Concurrency based on min(cores / 2, 12) * TEST_JOBS_FACTOR
+ CORES_DIVIDER := 2
+ ifeq ($(OPENJDK_TARGET_CPU_ARCH), sparc)
+ # For smaller SPARC machines we see reasonable scaling of throughput up to
+ # cpus/4 without affecting test reliability. On the bigger machines, cpus/4
+ # causes intermittent timeouts.
+ ifeq ($(shell $(EXPR) $(NUM_CORES) \> 16), 1)
+ CORES_DIVIDER := 5
+ else
+ CORES_DIVIDER := 4
+ endif
+ endif
+ # For some big multi-core machines with low ulimit -u setting we hit the max
+ # threads/process limit. In such a setup the memory/cores-only-guided
+ # TEST_JOBS config is insufficient. From experience a concurrency setting of
+ # 14 works reasonably well for low ulimit values (<= 4096). Thus, use
+ # divider 4096/14. For high ulimit -u values this shouldn't make a difference.
+ ULIMIT_DIVIDER := (4096/14)
+ PROC_ULIMIT := -1
+ ifneq ($(OPENJDK_TARGET_OS), windows)
+ PROC_ULIMIT := $(shell $(ULIMIT) -u)
+ ifeq ($(PROC_ULIMIT), unlimited)
+ PROC_ULIMIT := -1
+ endif
+ endif
+ MEMORY_DIVIDER := 2048
TEST_JOBS := $(shell $(AWK) \
'BEGIN { \
- c = $(NUM_CORES) / 2; \
- if (c > 12) c = 12; \
+ c = $(NUM_CORES) / $(CORES_DIVIDER); \
+ m = $(MEMORY_SIZE) / $(MEMORY_DIVIDER); \
+ u = $(PROC_ULIMIT); \
+ if (u > -1) { \
+ u = u / $(ULIMIT_DIVIDER); \
+ if (u < c) c = u; \
+ } \
+ if (c > m) c = m; \
c = c * $(TEST_JOBS_FACTOR); \
c = c * $(TEST_JOBS_FACTOR_JDL); \
c = c * $(TEST_JOBS_FACTOR_MACHINE); \
diff -Nru openjdk-11-11.0.16+8/make/RunTestsPrebuilt.gmk openjdk-11-11.0.18+10/make/RunTestsPrebuilt.gmk
--- openjdk-11-11.0.16+8/make/RunTestsPrebuilt.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/RunTestsPrebuilt.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -209,15 +209,9 @@
endif
ifeq ($(OPENJDK_TARGET_OS), windows)
- ifeq ($(wildcard $(TEST_IMAGE_DIR)/bin/fixpath.exe), )
- $(info Error: fixpath is missing from test image '$(TEST_IMAGE_DIR)')
- $(error Cannot continue.)
- endif
- FIXPATH := $(TEST_IMAGE_DIR)/bin/fixpath.exe -c
- PATH_SEP:=;
+ FIXPATH := $(BASH) $(TOPDIR)/make/scripts/fixpath.sh exec
else
FIXPATH :=
- PATH_SEP:=:
endif
# Check number of cores and memory in MB
@@ -301,7 +295,6 @@
BASH := $(BASH), \
JIB_JAR := $(JIB_JAR), \
FIXPATH := $(FIXPATH), \
- PATH_SEP := $(PATH_SEP), \
OPENJDK_TARGET_OS := $(OPENJDK_TARGET_OS), \
OPENJDK_TARGET_OS_TYPE := $(OPENJDK_TARGET_OS_TYPE), \
OPENJDK_TARGET_OS_ENV := $(OPENJDK_TARGET_OS_ENV), \
diff -Nru openjdk-11-11.0.16+8/make/RunTestsPrebuiltSpec.gmk openjdk-11-11.0.18+10/make/RunTestsPrebuiltSpec.gmk
--- openjdk-11-11.0.16+8/make/RunTestsPrebuiltSpec.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/RunTestsPrebuiltSpec.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -116,7 +116,6 @@
JAR_CMD := $(BOOT_JDK)/bin/jar
JLINK_CMD := $(JDK_OUTPUTDIR)/bin/jlink
JMOD_CMD := $(JDK_OUTPUTDIR)/bin/jmod
-JARSIGNER_CMD := $(BOOT_JDK)/bin/jarsigner
JAVA := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
JAVA_SMALL := $(FIXPATH) $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
@@ -125,7 +124,6 @@
JAR := $(FIXPATH) $(JAR_CMD)
JLINK := $(FIXPATH) $(JLINK_CMD)
JMOD := $(FIXPATH) $(JMOD_CMD)
-JARSIGNER := $(FIXPATH) $(JARSIGNER_CMD)
BUILD_JAVA := $(JDK_IMAGE_DIR)/bin/JAVA
################################################################################
@@ -167,7 +165,6 @@
TEE := tee
TR := tr
TOUCH := touch
-UNIQ := uniq
WC := wc
XARGS := xargs
ZIPEXE := zip
@@ -175,6 +172,7 @@
EXPR := expr
FILE := file
HG := hg
+ULIMIT := ulimit
# On Solaris gnu versions of some tools are required.
ifeq ($(OPENJDK_BUILD_OS), solaris)
@@ -187,7 +185,7 @@
endif
ifeq ($(OPENJDK_BUILD_OS), windows)
- CYGPATH := cygpath
+ PATHTOOL := cygpath
endif
################################################################################
diff -Nru openjdk-11-11.0.16+8/make/TestImage.gmk openjdk-11-11.0.18+10/make/TestImage.gmk
--- openjdk-11-11.0.16+8/make/TestImage.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/TestImage.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -30,13 +30,6 @@
############################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
- FIXPATH_COPY := $(TEST_IMAGE_DIR)/bin/fixpath.exe
-
- $(FIXPATH_COPY): $(firstword $(FIXPATH))
- $(call install-file)
-endif
-
BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
FIXPATH_ECHO := $(FIXPATH) $(call FixPath, $(ECHO))
@@ -44,10 +37,10 @@
$(BUILD_INFO_PROPERTIES):
$(call MakeTargetDir)
$(ECHO) "# Build info properties for JDK tests" > $@
- $(FIXPATH_ECHO) "build.workspace.root=$(WORKSPACE_ROOT)" >> $@
- $(FIXPATH_ECHO) "build.output.root=$(OUTPUTDIR)" >> $@
+ $(ECHO) "build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))" >> $@
+ $(ECHO) "build.output.root=$(call FixPath, $(OUTPUTDIR))" >> $@
-prepare-test-image: $(FIXPATH_COPY) $(BUILD_INFO_PROPERTIES)
+prepare-test-image: $(BUILD_INFO_PROPERTIES)
$(call MakeDir, $(TEST_IMAGE_DIR))
$(ECHO) > $(TEST_IMAGE_DIR)/Readme.txt 'JDK test image'
diff -Nru openjdk-11-11.0.16+8/make/autoconf/basic.m4 openjdk-11-11.0.18+10/make/autoconf/basic.m4
--- openjdk-11-11.0.16+8/make/autoconf/basic.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/basic.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,542 @@
+#
+# 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
+ BASIC_SETUP_PATHS_WINDOWS
+ fi
+
+ # We get the top-level directory from the supporting wrappers.
+ BASIC_WINDOWS_VERIFY_DIR($TOPDIR, source)
+ UTIL_FIXUP_PATH(TOPDIR)
+ AC_MSG_CHECKING([for top-level directory])
+ AC_MSG_RESULT([$TOPDIR])
+ AC_SUBST(TOPDIR)
+
+ if test "x$CUSTOM_ROOT" != x; then
+ BASIC_WINDOWS_VERIFY_DIR($CUSTOM_ROOT, custom root)
+ UTIL_FIXUP_PATH(CUSTOM_ROOT)
+ WORKSPACE_ROOT="${CUSTOM_ROOT}"
+ else
+ WORKSPACE_ROOT="${TOPDIR}"
+ fi
+ AC_SUBST(WORKSPACE_ROOT)
+
+ # We can only call UTIL_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
+ UTIL_FIXUP_PATH(CONFIGURE_START_DIR)
+ UTIL_FIXUP_PATH(TOPDIR)
+
+ AC_SUBST(CONFIGURE_START_DIR)
+
+ # 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
+])
+
+###############################################################################
+# Evaluates platform specific overrides for build devkit variables.
+# $1: Name of variable
+AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
+[
+ if test "x[$]$1" = x; then
+ eval $1="\${$1_${OPENJDK_BUILD_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-vcruntime-1-dll
+ BASIC_EVAL_DEVKIT_VARIABLE([DEVKIT_VCRUNTIME_1_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
+ UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
+ if test x$XCODEBUILD = x; then
+ # fall back on the stub binary in /usr/bin/xcodebuild
+ XCODEBUILD=/usr/bin/xcodebuild
+ fi
+ 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_SUBST(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}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
+ else
+ AC_MSG_RESULT([in build directory with custom name])
+ 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 /build/).])
+ 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])
+
+ BASIC_WINDOWS_VERIFY_DIR($OUTPUTDIR, output)
+ 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(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
+ # No df here, say it's local
+ $2
+ 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.
+ $3
+ 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
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/basic_tools.m4 openjdk-11-11.0.18+10/make/autoconf/basic_tools.m4
--- openjdk-11-11.0.16+8/make/autoconf/basic_tools.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/basic_tools.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,480 @@
+#
+# 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],
+[
+ # Bootstrapping: These tools are needed by UTIL_LOOKUP_PROGS
+ AC_PATH_PROGS(BASENAME, basename)
+ UTIL_CHECK_NONEMPTY(BASENAME)
+ AC_PATH_PROGS(DIRNAME, dirname)
+ UTIL_CHECK_NONEMPTY(DIRNAME)
+ AC_PATH_PROGS(FILE, file)
+ UTIL_CHECK_NONEMPTY(FILE)
+ AC_PATH_PROGS(LDD, ldd)
+
+ # First are all the fundamental required tools.
+ UTIL_REQUIRE_PROGS(BASH, bash)
+ UTIL_REQUIRE_PROGS(CAT, cat)
+ UTIL_REQUIRE_PROGS(CHMOD, chmod)
+ UTIL_REQUIRE_PROGS(CP, cp)
+ UTIL_REQUIRE_PROGS(CUT, cut)
+ UTIL_REQUIRE_PROGS(DATE, date)
+ UTIL_REQUIRE_PROGS(DIFF, gdiff diff)
+ UTIL_REQUIRE_PROGS(ECHO, echo)
+ UTIL_REQUIRE_PROGS(EXPR, expr)
+ UTIL_REQUIRE_PROGS(FIND, find)
+ UTIL_REQUIRE_PROGS(GUNZIP, gunzip)
+ UTIL_REQUIRE_PROGS(GZIP, pigz gzip)
+ UTIL_REQUIRE_PROGS(HEAD, head)
+ 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(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(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])
+
+ # Optional tools, we can do without them
+ UTIL_LOOKUP_PROGS(DF, df)
+ UTIL_LOOKUP_PROGS(NICE, nice)
+ UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
+
+ # These are only needed on some platforms
+ UTIL_LOOKUP_PROGS(PATHTOOL, cygpath wslpath)
+ UTIL_LOOKUP_PROGS(LSB_RELEASE, lsb_release)
+ UTIL_LOOKUP_PROGS(CMD, cmd.exe, $PATH:/cygdrive/c/windows/system32:/mnt/c/windows/system32:/c/windows/system32)
+
+ # For compare.sh only
+ UTIL_LOOKUP_PROGS(CMP, cmp)
+ UTIL_LOOKUP_PROGS(UNIQ, uniq)
+
+ # Always force rm.
+ RM="$RM -f"
+])
+
+###############################################################################
+# 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.msys2"; then
+ MAKE_EXPECTED_ENV='msys'
+ 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
+ UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
+ BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
+
+ if test "x$FOUND_MAKE" = x; then
+ UTIL_LOOKUP_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
+ UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
+ BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
+ if test "x$FOUND_MAKE" = x; then
+ UTIL_LOOKUP_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$($TAR --version | $GREP "busybox")" != "x"; then
+ TAR_TYPE="busybox"
+ 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"
+ elif test "x$TAR_TYPE" = "xbusybox"; then
+ TAR_INCLUDE_PARAM="T"
+ 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_LOOKUP_PROGS(READELF, greadelf readelf)
+ UTIL_LOOKUP_PROGS(DOT, dot)
+ UTIL_LOOKUP_PROGS(HG, hg)
+ UTIL_LOOKUP_PROGS(GIT, git)
+ UTIL_LOOKUP_PROGS(STAT, stat)
+ UTIL_LOOKUP_PROGS(TIME, time)
+ UTIL_LOOKUP_PROGS(FLOCK, flock)
+ # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
+ # be in the user path.
+ UTIL_LOOKUP_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
+ UTIL_LOOKUP_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_LOOKUP_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])
+ # Verify that the codesign has --option runtime
+ AC_MSG_CHECKING([if codesign has --option runtime])
+ $RM codesign-testfile
+ $TOUCH codesign-testfile
+ $CODESIGN --option runtime -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_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
+ else
+ AC_MSG_RESULT([yes])
+ fi
+ 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_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_LOOKUP_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)
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/basic_windows.m4 openjdk-11-11.0.18+10/make/autoconf/basic_windows.m4
--- openjdk-11-11.0.16+8/make/autoconf/basic_windows.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/basic_windows.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,187 @@
+#
+# 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_SETUP_PATHS_WINDOWS],
+[
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
+ # Must be done prior to calling any commands to avoid mangling of command line
+ export MSYS2_ARG_CONV_EXCL="*"
+ fi
+
+ AC_MSG_CHECKING([Windows environment type])
+ WINENV_VENDOR=${OPENJDK_BUILD_OS_ENV#windows.}
+ AC_MSG_RESULT([$WINENV_VENDOR])
+
+ if test "x$WINENV_VENDOR" = x; then
+ AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys2 was detected.])
+ fi
+
+ if test "x$PATHTOOL" = x; then
+ AC_MSG_ERROR([Incorrect $WINENV_VENDOR installation. cygpath was found])
+ fi
+
+ if test "x$CMD" = x; then
+ AC_MSG_ERROR([Incorrect Windows/$WINENV_VENDOR setup. Could not locate cmd.exe])
+ fi
+
+ AC_MSG_CHECKING([$WINENV_VENDOR drive prefix])
+ WINENV_PREFIX=`$PATHTOOL -u c:/ | $SED -e 's!/c/!!'`
+ AC_MSG_RESULT(['$WINENV_PREFIX'])
+ AC_SUBST(WINENV_PREFIX)
+
+ AC_MSG_CHECKING([$WINENV_VENDOR root directory as Windows path])
+ if test "x$OPENJDK_BUILD_OS_ENV" != "xwindows.wsl1"; then
+ WINENV_ROOT=`$PATHTOOL -w / 2> /dev/null`
+ # msys2 has a trailing backslash; strip it
+ WINENV_ROOT=${WINENV_ROOT%\\}
+ else
+ WINENV_ROOT='[[unavailable]]'
+ fi
+ AC_MSG_RESULT(['$WINENV_ROOT'])
+ AC_SUBST(WINENV_ROOT)
+
+ AC_MSG_CHECKING([$WINENV_VENDOR temp directory])
+ WINENV_TEMP_DIR=$($PATHTOOL -u $($CMD /q /c echo %TEMP% 2> /dev/null) | $TR -d '\r\n')
+ AC_MSG_RESULT([$WINENV_TEMP_DIR])
+
+ AC_MSG_CHECKING([$WINENV_VENDOR release])
+ WINENV_UNAME_RELEASE=`$UNAME -r`
+ AC_MSG_RESULT([$WINENV_UNAME_RELEASE])
+
+ AC_MSG_CHECKING([$WINENV_VENDOR version])
+ WINENV_UNAME_VERSION=`$UNAME -v`
+ AC_MSG_RESULT([$WINENV_UNAME_VERSION])
+
+ WINENV_VERSION="$WINENV_UNAME_RELEASE, $WINENV_UNAME_VERSION"
+
+ AC_MSG_CHECKING([Windows version])
+
+ # We must change directory to one guaranteed to work, otherwise WSL1
+ # can complain (since it does not have a WINENV_ROOT so it can't access
+ # unix-style paths from Windows.
+ # Additional [] needed to keep m4 from mangling shell constructs.
+ [ WINDOWS_VERSION=`cd $WINENV_TEMP_DIR && $CMD /c ver | $EGREP -o '([0-9]+\.)+[0-9]+'` ]
+ AC_MSG_RESULT([$WINDOWS_VERSION])
+
+ # Additional handling per specific env
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
+ # Additional [] needed to keep m4 from mangling shell constructs.
+ [ CYGWIN_VERSION_OLD=`$ECHO $WINENV_UNAME_RELEASE | $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$LDD" = x; then
+ AC_MSG_ERROR([ldd is missing, which is needed on cygwin])
+ fi
+ WINENV_MARKER_DLL=cygwin1.dll
+ elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
+ if test "x$LDD" = x; then
+ AC_MSG_ERROR([ldd is missing, which is needed on msys2])
+ fi
+ WINENV_MARKER_DLL=msys-2.0.dll
+ fi
+
+ # Chicken and egg: FIXPATH is needed for UTIL_FIXUP_PATH to work. So for the
+ # first run we use the auto-detect abilities of fixpath.sh.
+ FIXPATH_DIR="$TOPDIR/make/scripts"
+ FIXPATH="$BASH $FIXPATH_DIR/fixpath.sh exec"
+ FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh"
+ FIXPATH_SAVED_PATH="$PATH"
+ UTIL_FIXUP_PATH(FIXPATH_DIR)
+
+ # Now we can use FIXPATH_DIR to rewrite path to fixpath.sh properly.
+ if test "x$WINENV_PREFIX" = x; then
+ # On msys the prefix is empty, but we need to pass something to have the
+ # fixpath.sh options parser happy.
+ WINENV_PREFIX_ARG="NONE"
+ else
+ WINENV_PREFIX_ARG="$WINENV_PREFIX"
+ fi
+ FIXPATH_ARGS="-e $PATHTOOL -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR -c $CMD -q"
+ FIXPATH_BASE="$BASH $FIXPATH_DIR/fixpath.sh $FIXPATH_ARGS"
+ FIXPATH="$FIXPATH_BASE exec"
+
+ AC_SUBST(FIXPATH_BASE)
+ AC_SUBST(FIXPATH)
+
+ SRC_ROOT_LENGTH=`$ECHO "$TOPDIR" | $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
+
+ # Test if windows or unix "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 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
+])
+
+# Verify that the directory is usable on Windows
+AC_DEFUN([BASIC_WINDOWS_VERIFY_DIR],
+[
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then
+ OUTPUTDIR_WIN=`$FIXPATH_BASE print $1`
+ if test "x$OUTPUTDIR_WIN" = x; then
+ AC_MSG_NOTICE([For wsl1, the $2 dir must be located on a Windows drive. Please see doc/building.md for details.])
+ AC_MSG_ERROR([Cannot continue])
+ fi
+ fi
+])
+
+# Create fixpath wrapper
+AC_DEFUN([BASIC_WINDOWS_FINALIZE_FIXPATH],
+[
+ if test "x$OPENJDK_BUILD_OS" = xwindows; then
+ FIXPATH_CMDLINE=". $TOPDIR/make/scripts/fixpath.sh -e $PATHTOOL \
+ -p $WINENV_PREFIX_ARG -r ${WINENV_ROOT//\\/\\\\} -t $WINENV_TEMP_DIR \
+ -c $CMD -q"
+ $ECHO > $OUTPUTDIR/fixpath '#!/bin/bash'
+ $ECHO >> $OUTPUTDIR/fixpath export PATH='"[$]PATH:'$PATH'"'
+ $ECHO >> $OUTPUTDIR/fixpath $FIXPATH_CMDLINE '"[$]@"'
+ $CHMOD +x $OUTPUTDIR/fixpath
+ FIXPATH_BASE="$OUTPUTDIR/fixpath"
+ FIXPATH="$FIXPATH_BASE exec"
+ fi
+])
+
+# Platform-specific finalization
+AC_DEFUN([BASIC_WINDOWS_FINALIZE],
+[
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl2"; then
+ # Change back from temp dir
+ cd $CONFIGURE_START_DIR
+ fi
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/basics.m4 openjdk-11-11.0.18+10/make/autoconf/basics.m4
--- openjdk-11-11.0.16+8/make/autoconf/basics.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/basics.m4 1970-01-01 00:00:00.000000000 +0000
@@ -1,1447 +0,0 @@
-#
-# Copyright (c) 2011, 2018, 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.
-#
-
-###############################################################################
-# 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:
-# BASIC_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([BASIC_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)
- ])
-])
-
-###############################################################################
-# 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([BASIC_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([BASIC_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([BASIC_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([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 -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
-])
-
-# Appends a string to a path variable, only adding the : when needed.
-AC_DEFUN([BASIC_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([BASIC_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 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([BASIC_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
- BASIC_FIXUP_PATH_CYGWIN($1)
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- BASIC_FIXUP_PATH_MSYS($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
-
- # Use eval to expand a potential ~
- eval path="$path"
- if test ! -f "$path" && test ! -d "$path"; then
- AC_MSG_ERROR([The path of $1, which resolves as "$path", is not found.])
- fi
-
- if test -d "$path"; then
- $1="`cd "$path"; $THEPWDCMD -L`"
- else
- dir="`$DIRNAME "$path"`"
- base="`$BASENAME "$path"`"
- $1="`cd "$dir"; $THEPWDCMD -L`/$base"
- fi
- 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([BASIC_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
- BASIC_FIXUP_EXECUTABLE_CYGWIN($1)
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- BASIC_FIXUP_EXECUTABLE_MSYS($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([BASIC_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
-])
-
-###############################################################################
-# Register a --with argument but mark it as deprecated
-# $1: The name of the with argument to deprecate, not including --with-
-AC_DEFUN([BASIC_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([BASIC_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
-])
-
-###############################################################################
-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)
- # 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.])
-])
-
-###############################################################################
-# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
-# $1: variable to check
-AC_DEFUN([BASIC_CHECK_NONEMPTY],
-[
- if test "x[$]$1" = x; then
- AC_MSG_ERROR([Could not find required tool for $1])
- fi
-])
-
-###############################################################################
-# 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 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([BASIC_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"
-
- # Check if we try to supply an empty value
- if test "x[$]$1" = x; then
- AC_MSG_NOTICE([Setting user supplied tool $1= (no value)])
- AC_MSG_CHECKING([for $1])
- AC_MSG_RESULT([disabled])
- else
- # Check if the provided tool contains a complete path.
- tool_specified="[$]$1"
- tool_basename="${tool_specified##*/}"
- if test "x$tool_basename" = "x$tool_specified"; then
- # A command without a complete path is provided, search $PATH.
- AC_MSG_NOTICE([Will search for user supplied tool $1=$tool_basename])
- AC_PATH_PROG($1, $tool_basename)
- if test "x[$]$1" = x; then
- AC_MSG_ERROR([User supplied tool $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 $1=$tool_specified])
- AC_MSG_CHECKING([for $1])
- if test ! -x "$tool_specified"; then
- AC_MSG_RESULT([not found])
- AC_MSG_ERROR([User supplied tool $1=$tool_specified does not exist or is not executable])
- fi
- AC_MSG_RESULT([$tool_specified])
- fi
- fi
- fi
- $3
- fi
-])
-
-###############################################################################
-# Call BASIC_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([BASIC_PATH_PROGS],
-[
- BASIC_SETUP_TOOL($1, [AC_PATH_PROGS($1, $2, , $3)])
-])
-
-###############################################################################
-# Call BASIC_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([BASIC_CHECK_TOOLS],
-[
- BASIC_SETUP_TOOL($1, [AC_CHECK_TOOLS($1, $2)])
-])
-
-###############################################################################
-# Like BASIC_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([BASIC_REQUIRE_PROGS],
-[
- BASIC_PATH_PROGS($1, $2, , $3)
- BASIC_CHECK_NONEMPTY($1)
-])
-
-###############################################################################
-# Like BASIC_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([BASIC_REQUIRE_SPECIAL],
-[
- BASIC_SETUP_TOOL($1, [$2])
- BASIC_CHECK_NONEMPTY($1)
-])
-
-###############################################################################
-# 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.
- BASIC_REQUIRE_PROGS(BASENAME, basename)
- BASIC_REQUIRE_PROGS(BASH, bash)
- BASIC_REQUIRE_PROGS(CAT, cat)
- BASIC_REQUIRE_PROGS(CHMOD, chmod)
- BASIC_REQUIRE_PROGS(CMP, cmp)
- BASIC_REQUIRE_PROGS(COMM, comm)
- BASIC_REQUIRE_PROGS(CP, cp)
- BASIC_REQUIRE_PROGS(CUT, cut)
- BASIC_REQUIRE_PROGS(DATE, date)
- BASIC_REQUIRE_PROGS(DIFF, [gdiff diff])
- BASIC_REQUIRE_PROGS(DIRNAME, dirname)
- BASIC_REQUIRE_PROGS(ECHO, echo)
- BASIC_REQUIRE_PROGS(EXPR, expr)
- BASIC_REQUIRE_PROGS(FILE, file)
- BASIC_REQUIRE_PROGS(FIND, find)
- BASIC_REQUIRE_PROGS(HEAD, head)
- BASIC_REQUIRE_PROGS(GUNZIP, gunzip)
- BASIC_REQUIRE_PROGS(GZIP, pigz gzip)
- BASIC_REQUIRE_PROGS(LN, ln)
- BASIC_REQUIRE_PROGS(LS, ls)
- BASIC_REQUIRE_PROGS(MKDIR, mkdir)
- BASIC_REQUIRE_PROGS(MKTEMP, mktemp)
- BASIC_REQUIRE_PROGS(MV, mv)
- BASIC_REQUIRE_PROGS(NAWK, [nawk gawk awk])
- BASIC_REQUIRE_PROGS(PRINTF, printf)
- BASIC_REQUIRE_PROGS(READLINK, [greadlink readlink])
- BASIC_REQUIRE_PROGS(RM, rm)
- BASIC_REQUIRE_PROGS(RMDIR, rmdir)
- BASIC_REQUIRE_PROGS(SH, sh)
- BASIC_REQUIRE_PROGS(SORT, sort)
- BASIC_REQUIRE_PROGS(TAIL, tail)
- BASIC_REQUIRE_PROGS(TAR, gtar tar)
- BASIC_REQUIRE_PROGS(TEE, tee)
- BASIC_REQUIRE_PROGS(TOUCH, touch)
- BASIC_REQUIRE_PROGS(TR, tr)
- BASIC_REQUIRE_PROGS(UNAME, uname)
- BASIC_REQUIRE_PROGS(UNIQ, uniq)
- BASIC_REQUIRE_PROGS(WC, wc)
- BASIC_REQUIRE_PROGS(WHICH, which)
- BASIC_REQUIRE_PROGS(XARGS, xargs)
-
- # Then required tools that require some special treatment.
- BASIC_REQUIRE_SPECIAL(AWK, [AC_PROG_AWK])
- BASIC_REQUIRE_SPECIAL(GREP, [AC_PROG_GREP])
- BASIC_REQUIRE_SPECIAL(EGREP, [AC_PROG_EGREP])
- BASIC_REQUIRE_SPECIAL(FGREP, [AC_PROG_FGREP])
- BASIC_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
- BASIC_PATH_PROGS(CYGPATH, cygpath)
- BASIC_PATH_PROGS(DF, df)
- BASIC_PATH_PROGS(CPIO, [cpio bsdcpio])
- BASIC_PATH_PROGS(NICE, nice)
- BASIC_PATH_PROGS(PANDOC, pandoc)
-])
-
-###############################################################################
-# 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
- CURDIR="$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=";"
- BASIC_CHECK_PATHS_WINDOWS
- else
- PATH_SEP=":"
- fi
- AC_SUBST(PATH_SEP)
-
- # We get the top-level directory from the supporting wrappers.
- AC_MSG_CHECKING([for top-level directory])
- AC_MSG_RESULT([$TOPDIR])
- AC_SUBST(TOPDIR)
-
- # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
- BASIC_FIXUP_PATH(CURDIR)
- BASIC_FIXUP_PATH(TOPDIR)
-
- if test "x$CUSTOM_ROOT" != x; then
- BASIC_FIXUP_PATH(CUSTOM_ROOT)
- WORKSPACE_ROOT="${CUSTOM_ROOT}"
- else
- WORKSPACE_ROOT="${TOPDIR}"
- fi
- AC_SUBST(WORKSPACE_ROOT)
-
- # 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
-])
-
-###############################################################################
-# Evaluates platform specific overrides for build devkit variables.
-# $1: Name of variable
-AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
-[
- if test "x[$]$1" = x; then
- eval $1="\${$1_${OPENJDK_BUILD_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
- BASIC_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
-
- BASIC_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
- BASIC_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])],
- [BASIC_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)])],
- [BASIC_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])],
- [BASIC_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
- BASIC_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$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
- || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
- || test "x$CURDIR" = "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}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
- else
- AC_MSG_RESULT([in build directory with custom name])
- 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 $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
- fi
- OUTPUTDIR="$CURDIR"
- AC_MSG_RESULT([in current directory])
-
- # WARNING: This might be a bad thing to do. You need to be sure you want to
- # have a configuration in this directory. Do some sanity checks!
-
- 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 $CURDIR.])
- 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 /build/).])
- 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 $CURDIR])
- fi
- fi
- fi
- AC_MSG_CHECKING([what configuration name to use])
- AC_MSG_RESULT([$CONF_NAME])
-
- BASIC_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(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])
-])
-
-#%%% Simple tools %%%
-
-###############################################################################
-# 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'
- 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
- BASIC_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],
-[
- BASIC_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"
- 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
- 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
-
- # These tools might not be installed by default,
- # need hint on how to install them.
- BASIC_REQUIRE_PROGS(UNZIP, unzip)
- # Since zip uses "ZIP" as a environment variable for passing options, we need
- # to name our variable differently, hence ZIPEXE.
- BASIC_REQUIRE_PROGS(ZIPEXE, zip)
-
- # Non-required basic tools
-
- BASIC_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
- BASIC_PATH_PROGS(READELF, [greadelf readelf])
- BASIC_PATH_PROGS(DOT, dot)
- BASIC_PATH_PROGS(HG, hg)
- BASIC_PATH_PROGS(GIT, git)
- BASIC_PATH_PROGS(STAT, stat)
- BASIC_PATH_PROGS(TIME, time)
- BASIC_PATH_PROGS(FLOCK, flock)
- # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
- # be in the user path.
- BASIC_PATH_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
- BASIC_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
- BASIC_REQUIRE_PROGS(DSYMUTIL, dsymutil)
- BASIC_REQUIRE_PROGS(MIG, mig)
- BASIC_REQUIRE_PROGS(XATTR, xattr)
- BASIC_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])
- # Verify that the codesign has --option runtime
- AC_MSG_CHECKING([if codesign has --option runtime])
- $RM codesign-testfile
- $TOUCH codesign-testfile
- $CODESIGN --option runtime -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_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
- else
- AC_MSG_RESULT([yes])
- fi
- fi
- fi
- BASIC_REQUIRE_PROGS(SETFILE, SetFile)
- elif test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
- BASIC_REQUIRE_PROGS(ELFEDIT, elfedit)
- fi
-])
-
-###############################################################################
-# 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
- $3
- 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
-])
-
-###############################################################################
-# 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)
-])
-
-################################################################################
-#
-# 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
-])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/basics_windows.m4 openjdk-11-11.0.18+10/make/autoconf/basics_windows.m4
--- openjdk-11-11.0.16+8/make/autoconf/basics_windows.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/basics_windows.m4 1970-01-01 00:00:00.000000000 +0000
@@ -1,451 +0,0 @@
-#
-# 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.
-#
-
-AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_UNIX_PATH],
-[
- windows_path="[$]$1"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- unix_path=`$CYGPATH -u "$windows_path"`
- $1="$unix_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
- $1="$unix_path"
- fi
-])
-
-AC_DEFUN([BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH],
-[
- unix_path="[$]$1"
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
- windows_path=`$CYGPATH -m "$unix_path"`
- $1="$windows_path"
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- windows_path=`cmd //c echo $unix_path`
- $1="$windows_path"
- fi
-])
-
-# 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],
-[
- input_path="$1"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-._/a-zA-Z0-9@:>@`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- shortmode_path=`$CYGPATH -s -m -a "$input_path"`
- path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
- if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
- # Going to short mode and back again did indeed matter. Since short mode is
- # case insensitive, let's make it lowercase to improve readability.
- shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- # Now convert it back to Unix-style (cygpath)
- input_path=`$CYGPATH -u "$shortmode_path"`
- new_path="$input_path"
- fi
- fi
-
- test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
- if test "x$test_cygdrive_prefix" = x; then
- # As a simple fix, exclude /usr/bin since it's not a real path.
- if test "x`$ECHO $1 | $GREP ^/usr/bin/`" = x; then
- # The path is in a Cygwin special directory (e.g. /home). We need this converted to
- # a path prefixed by /cygdrive for fixpath to work.
- new_path="$CYGWIN_ROOT_PATH$input_path"
- fi
- fi
-])
-
-# 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],
-[
- input_path="$1"
- # Check if we need to convert this using DOS-style short mode. If the path
- # contains just simple characters, use it. Otherwise (spaces, weird characters),
- # take no chances and rewrite it.
- # Note: m4 eats our [], so we need to use @<:@ and @:>@ instead.
- has_forbidden_chars=`$ECHO "$input_path" | $GREP @<:@^-_/:a-zA-Z0-9@:>@`
- if test "x$has_forbidden_chars" != x; then
- # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
- new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
- fi
-])
-
-# FIXME: The BASIC_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],
-[
- # Input might be given as Windows format, start by converting to
- # unix format.
- path="[$]$1"
- new_path=`$CYGPATH -u "$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
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file precense.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
- AC_MSG_ERROR([Cannot locate the the path of $1])
- fi
-
- # 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])
-
- if test "x$path" != "x$new_path"; then
- $1="$new_path"
- AC_MSG_NOTICE([Rewriting $1 to "$new_path"])
- fi
-])
-
-AC_DEFUN([BASIC_FIXUP_PATH_MSYS],
-[
- path="[$]$1"
- has_colon=`$ECHO $path | $GREP ^.:`
- new_path="$path"
- if test "x$has_colon" = x; then
- # Not in mixed or Windows style, start by that.
- new_path=`cmd //c echo $path`
- fi
-
- BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])
- BASIC_WINDOWS_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"])
- fi
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
-])
-
-AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],
-[
- # First separate the path from the arguments. This will split at the first
- # space.
- complete="[$]$1"
- path="${complete%% *}"
- tmp="$complete EOL"
- arguments="${tmp#* }"
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- new_path=`$CYGPATH -u "$path"`
-
- # Now try to locate executable using which
- new_path=`$WHICH "$new_path" 2> /dev/null`
- # bat and cmd files are not always considered executable in cygwin causing which
- # to not find them
- if test "x$new_path" = x \
- && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
- && test "x`$LS \"$path\" 2>/dev/null`" != x; then
- new_path=`$CYGPATH -u "$path"`
- fi
- if test "x$new_path" = x; then
- # Oops. Which didn't find the executable.
- # The splitting of arguments from the executable at a space might have been incorrect,
- # since paths with space are more likely in Windows. Give it another try with the whole
- # argument.
- path="$complete"
- arguments="EOL"
- new_path=`$CYGPATH -u "$path"`
- new_path=`$WHICH "$new_path" 2> /dev/null`
- # bat and cmd files are not always considered executable in cygwin causing which
- # to not find them
- if test "x$new_path" = x \
- && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
- && test "x`$LS \"$path\" 2>/dev/null`" != x; then
- new_path=`$CYGPATH -u "$path"`
- fi
- if test "x$new_path" = x; then
- # It's still not found. Now this is an unrecoverable error.
- 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([You might be mixing spaces in the path and extra arguments, which is not allowed.])
- fi
- AC_MSG_ERROR([Cannot locate the the path of $1])
- fi
- fi
-
- # 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
- # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
- # "foo.exe" is OK but "foo" is an error.
- #
- # This test is therefore slightly more accurate than "test -f" to check for file presence.
- # It is also a way to make sure we got the proper file name for the real test later on.
- test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
- if test "x$test_shortpath" = x; then
- # Short path failed, file does not exist as specified.
- # Try adding .exe or .cmd
- if test -f "${new_path}.exe"; then
- input_to_shortpath="${new_path}.exe"
- elif test -f "${new_path}.cmd"; then
- input_to_shortpath="${new_path}.cmd"
- else
- AC_MSG_NOTICE([The path of $1, which resolves as "$new_path", is invalid.])
- AC_MSG_NOTICE([Neither "$new_path" nor "$new_path.exe/cmd" can be found])
- AC_MSG_ERROR([Cannot locate the the path of $1])
- fi
- else
- input_to_shortpath="$new_path"
- fi
-
- # 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])
- # remove trailing .exe if any
- new_path="${new_path/%.exe/}"
-])
-
-AC_DEFUN([BASIC_FIXUP_EXECUTABLE_MSYS],
-[
- # First separate the path from the arguments. This will split at the first
- # space.
- complete="[$]$1"
- path="${complete%% *}"
- tmp="$complete EOL"
- arguments="${tmp#* }"
-
- # Input might be given as Windows format, start by converting to
- # unix format.
- new_path="$path"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
-
- # Now try to locate executable using which
- new_path=`$WHICH "$new_path" 2> /dev/null`
-
- if test "x$new_path" = x; then
- # Oops. Which didn't find the executable.
- # The splitting of arguments from the executable at a space might have been incorrect,
- # since paths with space are more likely in Windows. Give it another try with the whole
- # argument.
- path="$complete"
- arguments="EOL"
- new_path="$path"
- BASIC_WINDOWS_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
- # to not find them
- if test "x$new_path" = x \
- && 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)
- fi
-
- if test "x$new_path" = x; then
- # It's still not found. Now this is an unrecoverable error.
- 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([You might be mixing spaces in the path and extra arguments, which is not allowed.])
- fi
- AC_MSG_ERROR([Cannot locate the the path of $1])
- fi
- fi
-
- # Now new_path has a complete unix path to the binary
- if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
- # Keep paths in /bin as-is, but remove trailing .exe if any
- new_path="${new_path/%.exe/}"
- # Do not save /bin paths to all_fixpath_prefixes!
- 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])
- # Output is in $new_path
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)
- # remove trailing .exe if any
- new_path="${new_path/%.exe/}"
-
- # Save the first 10 bytes of this path to the storage, so fixpath can work.
- all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}" "${new_path:0:10}")
- fi
-])
-
-# 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"
- else
- AC_MSG_ERROR([Unknown Windows environment. Neither cygwin nor msys 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
- FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
- FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
-
- if test "x$OPENJDK_TARGET_CPU" != "xaarch64"; then
- AC_MSG_CHECKING([if fixpath can be created])
-
- FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
- 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 $CURDIR
-
- 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])
-
- else # OPENJDK_TARGET_CPU is aarch64
- AC_MSG_CHECKING([if fixpath is in place])
-
- FIXPATH_BIN="$TOPDIR/fixpath.exe"
- $RM -rf $FIXPATH_DIR
- $MKDIR -p $FIXPATH_DIR
-
- if test ! -x $FIXPATH_BIN; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find fixpath.exe under $TOPDIR])
- fi
- AC_MSG_RESULT([yes])
- fi
-
- 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"
- 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 $CURDIR
- 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)
-])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/boot-jdk.m4 openjdk-11-11.0.18+10/make/autoconf/boot-jdk.m4
--- openjdk-11-11.0.16+8/make/autoconf/boot-jdk.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/boot-jdk.m4 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, 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
@@ -63,34 +63,57 @@
# If previous step claimed to have found a JDK, check it to see if it seems to be valid.
if test "x$BOOT_JDK_FOUND" = xmaybe; then
# Do we have a bin/java?
- if test ! -x "$BOOT_JDK/bin/java"; then
+ if test ! -x "$BOOT_JDK/bin/java" && test ! -x "$BOOT_JDK/bin/java.exe"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring])
BOOT_JDK_FOUND=no
else
# Do we have a bin/javac?
- if test ! -x "$BOOT_JDK/bin/javac"; then
+ if test ! -x "$BOOT_JDK/bin/javac" && test ! -x "$BOOT_JDK/bin/javac.exe"; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring])
AC_MSG_NOTICE([(This might be an JRE instead of an JDK)])
BOOT_JDK_FOUND=no
else
# Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
- BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
+ java_to_test="$BOOT_JDK/bin/java"
+ UTIL_FIXUP_EXECUTABLE(java_to_test)
+ BOOT_JDK_VERSION_OUTPUT=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1`
+ # Additional [] needed to keep m4 from mangling shell constructs.
+ [ BOOT_JDK_VERSION=`echo $BOOT_JDK_VERSION_OUTPUT | $AWK '/version "[0-9a-zA-Z\._\-]+"/ {print $ 0; exit;}'` ]
+
+ if [ [[ "$BOOT_JDK_VERSION" =~ "Picked up" ]] ]; then
+ AC_MSG_NOTICE([You have _JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. This can mess up the build. Please use --with-boot-jdk-jvmargs instead.])
+ AC_MSG_NOTICE([Java reports: "$BOOT_JDK_VERSION".])
+ AC_MSG_ERROR([Cannot continue])
+ fi
+ if [ [[ "$BOOT_JDK_VERSION" =~ "Unrecognized option" ]] ]; then
+ AC_MSG_NOTICE([The specified --with-boot-jdk-jvmargs is invalid for the tested java])
+ AC_MSG_NOTICE([Error message: "$BOOT_JDK_VERSION".])
+ AC_MSG_NOTICE([Please fix arguments, or point to an explicit boot JDK which accept these arguments])
+ AC_MSG_ERROR([Cannot continue])
+ fi
# Extra M4 quote needed to protect [] in grep expression.
[FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION \
| $EGREP "\"(${DEFAULT_ACCEPTABLE_BOOT_VERSIONS// /|})([\.+-].*)?\""`]
- if test "x$FOUND_CORRECT_VERSION" = x; then
+
+ if test "x$BOOT_JDK_VERSION" = x; then
+ AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is not a working JDK; ignoring])
+ AC_MSG_NOTICE([Output from java -version was: $BOOT_JDK_VERSION_OUTPUT])
+ BOOT_JDK_FOUND=no
+ elif test "x$FOUND_CORRECT_VERSION" = x; then
AC_MSG_NOTICE([Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring])
AC_MSG_NOTICE([(Your Boot JDK version must be one of: $DEFAULT_ACCEPTABLE_BOOT_VERSIONS)])
BOOT_JDK_FOUND=no
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])
- BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' ' '`
+ BOOT_JDK_VERSION=`$java_to_test $USER_BOOT_JDK_OPTIONS -version 2>&1 | $TR -d '\r'`
+ # This is not a no-op; it will portably convert newline to space
+ BOOT_JDK_VERSION=`$ECHO $BOOT_JDK_VERSION`
AC_MSG_RESULT([$BOOT_JDK_VERSION])
fi # end check jdk version
fi # end check javac
@@ -103,16 +126,18 @@
AC_DEFUN([BOOTJDK_CHECK_ARGUMENTS],
[
if test "x$with_boot_jdk" != x; then
- if test -d "$with_boot_jdk"; then
- BOOT_JDK=$with_boot_jdk
+ BOOT_JDK_ARG="$with_boot_jdk"
+ UTIL_FIXUP_PATH(BOOT_JDK_ARG)
+ if test -d "$BOOT_JDK_ARG"; then
+ BOOT_JDK=$BOOT_JDK_ARG
BOOT_JDK_FOUND=maybe
- elif test -f "$with_boot_jdk"; then
- case "$with_boot_jdk" in
+ elif test -f "$BOOT_JDK_ARG"; then
+ case "$BOOT_JDK_ARG" in
*.tar.gz )
BOOT_JDK_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/boot-jdk
$RM -rf $BOOT_JDK_SUPPORT_DIR
$MKDIR -p $BOOT_JDK_SUPPORT_DIR
- $GUNZIP -c $with_boot_jdk | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
+ $GUNZIP -c $BOOT_JDK_ARG | $TAR xf - -C $BOOT_JDK_SUPPORT_DIR
# Try to find javac to determine BOOT_JDK path
BOOT_JDK_JAVAC_PATH=`$FIND $BOOT_JDK_SUPPORT_DIR | $GREP "/bin/javac"`
@@ -139,8 +164,8 @@
[
if test "x$JAVA_HOME" != x; then
JAVA_HOME_PROCESSED="$JAVA_HOME"
- BASIC_FIXUP_PATH(JAVA_HOME_PROCESSED)
- if test ! -d "$JAVA_HOME_PROCESSED"; then
+ UTIL_FIXUP_PATH(JAVA_HOME_PROCESSED, NOFAIL)
+ if test "x$JAVA_HOME_PROCESSED" = x || test ! -d "$JAVA_HOME_PROCESSED"; then
AC_MSG_NOTICE([Your JAVA_HOME points to a non-existing directory!])
else
# Aha, the user has set a JAVA_HOME
@@ -155,8 +180,8 @@
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
AC_DEFUN([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK],
[
- AC_PATH_PROG(JAVAC_CHECK, javac)
- AC_PATH_PROG(JAVA_CHECK, java)
+ UTIL_LOOKUP_PROGS(JAVAC_CHECK, javac, , NOFIXPATH)
+ UTIL_LOOKUP_PROGS(JAVA_CHECK, java, , NOFIXPATH)
BINARY="$JAVAC_CHECK"
if test "x$JAVAC_CHECK" = x; then
BINARY="$JAVA_CHECK"
@@ -166,7 +191,7 @@
# 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
@@ -195,9 +220,9 @@
# First check at user selected default
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME()])
# If that did not work out (e.g. too old), try explicit versions instead
- BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.9])])
- BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.8])])
- BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v 1.7])])
+ for ver in $DEFAULT_ACCEPTABLE_BOOT_VERSIONS ; do
+ BOOTJDK_DO_CHECK([BOOTJDK_CHECK_LIBEXEC_JAVA_HOME([-v $ver])])
+ done
fi
])
@@ -230,8 +255,10 @@
[
if test "x[$]$1" != x; then
VIRTUAL_DIR="[$]$1/Java"
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(VIRTUAL_DIR)
- BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
+ UTIL_FIXUP_PATH(VIRTUAL_DIR, NOFAIL)
+ if test "x$VIRTUAL_DIR" != x; then
+ BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY($VIRTUAL_DIR)
+ fi
fi
])
@@ -258,16 +285,17 @@
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_REQUIRE_SPECIAL($1,
[
- AC_MSG_CHECKING([for $2 in Boot JDK])
+ AC_MSG_CHECKING([for $2 [[Boot JDK]]])
$1=$BOOT_JDK/bin/$2
- if test ! -x [$]$1; then
+ if test ! -x [$]$1 && test ! -x [$]$1.exe; then
AC_MSG_RESULT(not found)
AC_MSG_NOTICE([Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk])
AC_MSG_ERROR([Could not find $2 in the Boot JDK])
fi
- AC_MSG_RESULT(ok)
+ AC_MSG_RESULT(\[$]BOOT_JDK/bin/$2)
+ UTIL_FIXUP_EXECUTABLE($1)
AC_SUBST($1)
])
])
@@ -283,6 +311,11 @@
AC_ARG_WITH(boot-jdk, [AS_HELP_STRING([--with-boot-jdk],
[path to Boot JDK (used to bootstrap build) @<:@probed@:>@])])
+ AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
+ [specify additional arguments to be passed to Boot JDK tools @<:@none@:>@])])
+
+ USER_BOOT_JDK_OPTIONS="$with_boot_jdk_jvmargs"
+
# We look for the Boot JDK through various means, going from more certain to
# more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
# we detected something (if so, the path to the jdk is in BOOT_JDK). But we
@@ -296,12 +329,12 @@
AC_MSG_ERROR([The path given by --with-boot-jdk does not contain a valid Boot JDK])
fi
- # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
- BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
-
# Test: Is $JAVA_HOME set?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_HOME])
+ # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
+ BOOTJDK_DO_CHECK([BOOTJDK_CHECK_MACOSX_JAVA_LOCATOR])
+
# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
BOOTJDK_DO_CHECK([BOOTJDK_CHECK_JAVA_IN_PATH_IS_SYMLINK])
@@ -323,7 +356,6 @@
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, javac)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, javadoc)
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, jar)
- BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER, jarsigner)
# Finally, set some other options...
@@ -335,7 +367,7 @@
AC_SUBST(JAVAC_FLAGS)
# Check if the boot jdk is 32 or 64 bit
- if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
+ if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
BOOT_JDK_BITS="64"
else
BOOT_JDK_BITS="32"
@@ -346,11 +378,11 @@
# 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
- "$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
+ $JAVA $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
if test $? -eq 0; then
BOOTJDK_USE_LOCAL_CDS=true
AC_MSG_RESULT([yes, created])
@@ -372,25 +404,21 @@
# Specify jvm options for anything that is run with the Boot JDK.
# Not all JVM:s accept the same arguments on the command line.
#
- AC_ARG_WITH(boot-jdk-jvmargs, [AS_HELP_STRING([--with-boot-jdk-jvmargs],
- [specify JVM arguments to be passed to all java invocations of boot JDK, overriding the default values,
- e.g --with-boot-jdk-jvmargs="-Xmx8G -enableassertions"])])
-
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
- # Apply user provided options.
- ADD_JVM_ARG_IF_OK([$with_boot_jdk_jvmargs],boot_jdk_jvmargs,[$JAVA])
+ # Finally append user provided options to allow them to override.
+ UTIL_ADD_JVM_ARG_IF_OK([$USER_BOOT_JDK_OPTIONS],boot_jdk_jvmargs,[$JAVA])
AC_MSG_RESULT([$boot_jdk_jvmargs])
@@ -401,7 +429,7 @@
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.
@@ -429,8 +457,8 @@
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])
@@ -457,10 +485,10 @@
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])
@@ -519,7 +547,7 @@
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])
@@ -566,8 +594,12 @@
fi
fi
+ # Since these tools do not yet exist, we cannot use UTIL_FIXUP_EXECUTABLE to
+ # detect the need of fixpath
JMOD="$BUILD_JDK/bin/jmod"
+ UTIL_ADD_FIXPATH(JMOD)
JLINK="$BUILD_JDK/bin/jlink"
+ UTIL_ADD_FIXPATH(JLINK)
AC_SUBST(JMOD)
AC_SUBST(JLINK)
diff -Nru openjdk-11-11.0.16+8/make/autoconf/bootcycle-spec.gmk.in openjdk-11-11.0.18+10/make/autoconf/bootcycle-spec.gmk.in
--- openjdk-11-11.0.16+8/make/autoconf/bootcycle-spec.gmk.in 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/bootcycle-spec.gmk.in 2023-01-10 08:32:35.000000000 +0000
@@ -39,7 +39,6 @@
$(error Bootcycle builds are not possible if --with-sjavac-server-java is specified)
endif
-
# Override specific values to do a boot cycle build
# Use a different Boot JDK
@@ -50,11 +49,10 @@
OUTPUTDIR:=$(OLD_OUTPUTDIR)/bootcycle-build
SJAVAC_SERVER_DIR:=$(patsubst $(OLD_OUTPUTDIR)%, $(OUTPUTDIR)%, $(SJAVAC_SERVER_DIR))
-JAVA_CMD:=$(BOOT_JDK)/bin/java
-JAVAC_CMD:=$(BOOT_JDK)/bin/javac
-JAR_CMD:=$(BOOT_JDK)/bin/jar
-JARSIGNER_CMD:=$(BOOT_JDK)/bin/jarsigner
-SJAVAC_SERVER_JAVA_CMD:=$(JAVA_CMD)
+JAVA_CMD := $(FIXPATH) $(BOOT_JDK)/bin/java
+JAVAC_CMD := $(FIXPATH) $(BOOT_JDK)/bin/javac
+JAR_CMD := $(FIXPATH) $(BOOT_JDK)/bin/jar
+SJAVAC_SERVER_JAVA_CMD := $(JAVA_CMD)
# When building a 32bit target, make sure the sjavac server flags are compatible
# with a 32bit JVM.
ifeq ($(OPENJDK_TARGET_CPU_BITS), 32)
diff -Nru openjdk-11-11.0.16+8/make/autoconf/build-aux/config.sub openjdk-11-11.0.18+10/make/autoconf/build-aux/config.sub
--- openjdk-11-11.0.16+8/make/autoconf/build-aux/config.sub 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/build-aux/config.sub 2023-01-10 08:32:35.000000000 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (c) 2014, 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
@@ -34,6 +34,12 @@
exit
fi
+# Allow msys2
+if echo $* | grep pc-msys >/dev/null ; then
+ echo $*
+ exit
+fi
+
# First, filter out everything that doesn't begin with "aarch64-"
if ! echo $* | grep '^aarch64-' >/dev/null ; then
. $DIR/autoconf-config.sub "$@"
@@ -43,7 +49,7 @@
fi
while test $# -gt 0 ; do
- case $1 in
+ case $1 in
-- ) # Stop option processing
shift; break ;;
aarch64-* )
diff -Nru openjdk-11-11.0.16+8/make/autoconf/build-performance.m4 openjdk-11-11.0.18+10/make/autoconf/build-performance.m4
--- openjdk-11-11.0.16+8/make/autoconf/build-performance.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/build-performance.m4 2023-01-10 08:32:35.000000000 +0000
@@ -180,7 +180,7 @@
if test "x$TOOLCHAIN_PATH" != x; then
PATH=$TOOLCHAIN_PATH:$PATH
fi
- BASIC_REQUIRE_PROGS(CCACHE, ccache)
+ UTIL_LOOKUP_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 @@
[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 @@
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 @@
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],
diff -Nru openjdk-11-11.0.16+8/make/autoconf/compare.sh.in openjdk-11-11.0.18+10/make/autoconf/compare.sh.in
--- openjdk-11-11.0.16+8/make/autoconf/compare.sh.in 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/compare.sh.in 2023-01-10 08:32:35.000000000 +0000
@@ -42,7 +42,7 @@
export CP="@CP@"
export CUT="@CUT@"
export DIFF="@DIFF@"
-export DUMPBIN="@FIXPATH@ @DUMPBIN@"
+export DUMPBIN="@DUMPBIN@"
export EXPR="@EXPR@"
export FILE="@FILE@"
export FIND="@FIND@"
@@ -84,7 +84,7 @@
fi
if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
- export PATH="@VS_PATH@"
+ export PATH="$PATH:@TOOLCHAIN_PATH@"
fi
# Now locate the main script and run it.
diff -Nru openjdk-11-11.0.16+8/make/autoconf/configure.ac openjdk-11-11.0.18+10/make/autoconf/configure.ac
--- openjdk-11-11.0.16+8/make/autoconf/configure.ac 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/configure.ac 2023-01-10 08:32:35.000000000 +0000
@@ -37,9 +37,9 @@
m4_include([build-aux/pkg.m4])
# 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])
@@ -51,7 +51,6 @@
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])
@@ -107,6 +106,8 @@
# To properly create a configuration name, we need to have the OpenJDK target
# and options (variants and debug level) parsed.
BASIC_SETUP_OUTPUT_DIR
+# After we have the output dir we can finalize the fixpath wrapper
+BASIC_WINDOWS_FINALIZE_FIXPATH
# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
HELP_SETUP_DEPENDENCY_HELP
@@ -216,9 +217,6 @@
#
###############################################################################
-# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
-BASIC_COMPILE_FIXPATH
-
LIB_DETERMINE_DEPENDENCIES
LIB_SETUP_LIBRARIES
@@ -288,6 +286,7 @@
CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
# Create the actual output files. Now the main work of configure is done.
+BASIC_WINDOWS_FINALIZE
AC_OUTPUT
# After AC_OUTPUT, we need to do final work
diff -Nru openjdk-11-11.0.16+8/make/autoconf/flags-cflags.m4 openjdk-11-11.0.18+10/make/autoconf/flags-cflags.m4
--- openjdk-11-11.0.16+8/make/autoconf/flags-cflags.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/flags-cflags.m4 2023-01-10 08:32:35.000000000 +0000
@@ -164,6 +164,7 @@
case "${TOOLCHAIN_TYPE}" in
microsoft)
DISABLE_WARNING_PREFIX="-wd"
+ BUILD_CC_DISABLE_WARNING_PREFIX="-wd"
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
;;
solstudio)
@@ -172,8 +173,8 @@
;;
gcc)
DISABLE_WARNING_PREFIX="-Wno-"
- CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
+ CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
;;
clang)
DISABLE_WARNING_PREFIX="-Wno-"
diff -Nru openjdk-11-11.0.16+8/make/autoconf/flags-ldflags.m4 openjdk-11-11.0.18+10/make/autoconf/flags-ldflags.m4
--- openjdk-11-11.0.16+8/make/autoconf/flags-ldflags.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/flags-ldflags.m4 2023-01-10 08:32:35.000000000 +0000
@@ -201,7 +201,7 @@
# JVM_VARIANT_PATH depends on if this is build or target...
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- $1_LDFLAGS_JDK_LIBPATH="-libpath:${OUTPUTDIR}/support/modules_libs/java.base"
+ $1_LDFLAGS_JDK_LIBPATH="-libpath:\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
else
$1_LDFLAGS_JDK_LIBPATH="-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base \
-L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/${$1_JVM_VARIANT_PATH}"
diff -Nru openjdk-11-11.0.16+8/make/autoconf/flags.m4 openjdk-11-11.0.18+10/make/autoconf/flags.m4
--- openjdk-11-11.0.16+8/make/autoconf/flags.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/flags.m4 2023-01-10 08:32:35.000000000 +0000
@@ -238,6 +238,14 @@
fi
fi
+ # For the microsoft toolchain, we need to get the SYSROOT flags from the
+ # Visual Studio environment. Currently we cannot handle this as a separate
+ # build toolchain.
+ if test "x$1" = x && test "x$OPENJDK_BUILD_OS" = "xwindows" \
+ && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
+ TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
+ fi
+
AC_SUBST($1SYSROOT_CFLAGS)
AC_SUBST($1SYSROOT_LDFLAGS)
])
@@ -246,6 +254,7 @@
[
# We should always include user supplied flags
FLAGS_SETUP_USER_SUPPLIED_FLAGS
+
# The sysroot flags are needed for configure to be able to run the compilers
FLAGS_SETUP_SYSROOT_FLAGS
@@ -280,10 +289,6 @@
GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
# FIXME: Don't really know how to do with this, but this was the old behavior
GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
- AC_SUBST(GLOBAL_CFLAGS)
- AC_SUBST(GLOBAL_CXXFLAGS)
- AC_SUBST(GLOBAL_LDFLAGS)
- AC_SUBST(GLOBAL_CPPFLAGS)
# FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
@@ -302,6 +307,14 @@
CXXFLAGS="$GLOBAL_CXXFLAGS"
LDFLAGS="$GLOBAL_LDFLAGS"
CPPFLAGS="$GLOBAL_CPPFLAGS"
+
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ # When autoconf sends both compiler and linker flags to cl.exe at the same
+ # time, linker flags must be last at the command line. Achieve this by
+ # moving them to LIBS.
+ LIBS="$LIBS -link $LDFLAGS"
+ LDFLAGS=""
+ fi
])
AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
@@ -399,9 +412,6 @@
BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
fi
fi
- AC_SUBST(BUILD_SYSROOT_CFLAGS)
- AC_SUBST(BUILD_SYSROOT_LDFLAGS)
-
])
AC_DEFUN([FLAGS_SETUP_FLAGS],
@@ -431,7 +441,7 @@
# 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"])
@@ -462,7 +472,7 @@
# 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"])
@@ -493,7 +503,7 @@
# 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],
@@ -525,7 +535,7 @@
# 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"])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/help.m4 openjdk-11-11.0.18+10/make/autoconf/help.m4
--- openjdk-11-11.0.16+8/make/autoconf/help.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/help.m4 2023-01-10 08:32:35.000000000 +0000
@@ -25,7 +25,7 @@
AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[
- AC_CHECK_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd apk)
+ UTIL_LOOKUP_PROGS(PKGHANDLER, apt-get yum brew port pkgutil pkgadd pacman apk)
])
AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
@@ -36,8 +36,6 @@
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
cygwin_help $MISSING_DEPENDENCY
- elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- msys_help $MISSING_DEPENDENCY
else
PKGHANDLER_COMMAND=
@@ -54,6 +52,8 @@
pkgutil_help $MISSING_DEPENDENCY ;;
pkgadd)
pkgadd_help $MISSING_DEPENDENCY ;;
+ pacman)
+ pacman_help $MISSING_DEPENDENCY ;;
apk)
apk_help $MISSING_DEPENDENCY ;;
esac
@@ -81,10 +81,6 @@
esac
}
-msys_help() {
- PKGHANDLER_COMMAND=""
-}
-
apt_help() {
case $1 in
reduced)
@@ -148,6 +144,17 @@
esac
}
+pacman_help() {
+ case $1 in
+ unzip)
+ PKGHANDLER_COMMAND="sudo pacman -S unzip" ;;
+ zip)
+ PKGHANDLER_COMMAND="sudo pacman -S zip" ;;
+ make)
+ PKGHANDLER_COMMAND="sudo pacman -S make" ;;
+ esac
+}
+
port_help() {
PKGHANDLER_COMMAND=""
}
@@ -256,12 +263,13 @@
printf "\n"
printf "Tools summary:\n"
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
- printf "* Environment: $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
+ printf "* Environment: %s version %s; windows version %s; prefix \"%s\"; root \"%s\"\n" \
+ "$WINENV_VENDOR" "$WINENV_VERSION" "$WINDOWS_VERSION" "$WINENV_PREFIX" "$WINENV_ROOT"
fi
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
- printf "* C Compiler: Version $CC_VERSION_NUMBER (at $CC)\n"
- printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at $CXX)\n"
+ printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
+ printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
printf "\n"
printf "Build performance summary:\n"
diff -Nru openjdk-11-11.0.16+8/make/autoconf/hotspot.m4 openjdk-11-11.0.18+10/make/autoconf/hotspot.m4
--- openjdk-11-11.0.16+8/make/autoconf/hotspot.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/hotspot.m4 2023-01-10 08:32:35.000000000 +0000
@@ -110,7 +110,8 @@
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"])
@@ -119,9 +120,11 @@
# 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
@@ -291,7 +294,7 @@
AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURES],
[
# Prettify the VALID_JVM_FEATURES string
- BASIC_SORT_LIST(VALID_JVM_FEATURES, $VALID_JVM_FEATURES)
+ UTIL_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.
@@ -307,7 +310,7 @@
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)
+ UTIL_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"])
@@ -315,12 +318,12 @@
fi
# Check if the user has provided deprecated features
- BASIC_GET_MATCHING_VALUES(DEPRECATED_FEATURES, $JVM_FEATURES $DISABLED_JVM_FEATURES, $DEPRECATED_JVM_FEATURES)
+ UTIL_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)
+ UTIL_GET_NON_MATCHING_VALUES(JVM_FEATURES, $JVM_FEATURES, $DEPRECATED_FEATURES)
+ UTIL_GET_NON_MATCHING_VALUES(DISABLED_JVM_FEATURES, $DISABLED_JVM_FEATURES, $DEPRECATED_FEATURES)
fi
fi
@@ -554,7 +557,7 @@
AC_SUBST(VALID_JVM_FEATURES)
# We don't support --with-jvm-interpreter anymore, use zero instead.
- BASIC_DEPRECATED_ARG_WITH(jvm-interpreter)
+ UTIL_DEPRECATED_ARG_WITH(jvm-interpreter)
])
###############################################################################
@@ -568,10 +571,10 @@
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)
+ UTIL_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)
+ UTIL_SORT_LIST(JVM_FEATURES_FOR_VARIANT, $JVM_FEATURES_FOR_VARIANT)
# Update real feature set variable
eval $features_var_name='"'$JVM_FEATURES_FOR_VARIANT'"'
@@ -584,7 +587,7 @@
fi
# Validate features (for configure script errors, not user errors)
- BASIC_GET_NON_MATCHING_VALUES(INVALID_FEATURES, $JVM_FEATURES_FOR_VARIANT, $VALID_JVM_FEATURES)
+ UTIL_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
diff -Nru openjdk-11-11.0.16+8/make/autoconf/jdk-options.m4 openjdk-11-11.0.18+10/make/autoconf/jdk-options.m4
--- openjdk-11-11.0.16+8/make/autoconf/jdk-options.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/jdk-options.m4 2023-01-10 08:32:35.000000000 +0000
@@ -129,7 +129,7 @@
# custom-make-dir is deprecated. Please use your custom-hook.m4 to override
# the IncludeCustomExtension macro.
- BASIC_DEPRECATED_ARG_WITH(custom-make-dir)
+ UTIL_DEPRECATED_ARG_WITH(custom-make-dir)
])
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
@@ -346,12 +346,12 @@
# --enable-debug-symbols is deprecated.
# Please use --with-native-debug-symbols=[internal,external,zipped] .
- BASIC_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
+ UTIL_DEPRECATED_ARG_ENABLE(debug-symbols, debug_symbols,
[Please use --with-native-debug-symbols=[[internal,external,zipped]] .])
# --enable-zip-debug-info is deprecated.
# Please use --with-native-debug-symbols=zipped .
- BASIC_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
+ UTIL_DEPRECATED_ARG_ENABLE(zip-debug-info, zip_debug_info,
[Please use --with-native-debug-symbols=zipped .])
AC_SUBST(COMPILE_WITH_DEBUG_SYMBOLS)
diff -Nru openjdk-11-11.0.16+8/make/autoconf/jdk-version.m4 openjdk-11-11.0.18+10/make/autoconf/jdk-version.m4
--- openjdk-11-11.0.16+8/make/autoconf/jdk-version.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/jdk-version.m4 2023-01-10 08:32:35.000000000 +0000
@@ -58,13 +58,13 @@
AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
[
# Warn user that old version arguments are deprecated.
- BASIC_DEPRECATED_ARG_WITH([milestone])
- BASIC_DEPRECATED_ARG_WITH([update-version])
- BASIC_DEPRECATED_ARG_WITH([user-release-suffix])
- BASIC_DEPRECATED_ARG_WITH([build-number])
- BASIC_DEPRECATED_ARG_WITH([version-major])
- BASIC_DEPRECATED_ARG_WITH([version-minor])
- BASIC_DEPRECATED_ARG_WITH([version-security])
+ UTIL_DEPRECATED_ARG_WITH([milestone])
+ UTIL_DEPRECATED_ARG_WITH([update-version])
+ UTIL_DEPRECATED_ARG_WITH([user-release-suffix])
+ UTIL_DEPRECATED_ARG_WITH([build-number])
+ UTIL_DEPRECATED_ARG_WITH([version-major])
+ UTIL_DEPRECATED_ARG_WITH([version-minor])
+ UTIL_DEPRECATED_ARG_WITH([version-security])
# Source the version numbers file
. $AUTOCONF_DIR/version-numbers
@@ -76,34 +76,6 @@
AC_SUBST(JDK_RC_PLATFORM_NAME)
AC_SUBST(HOTSPOT_VM_DISTRO)
- # Set the MACOSX Bundle Name base
- AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
- [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
- @<:@not specified@:>@])])
- if test "x$with_macosx_bundle_name_base" = xyes; then
- AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
- elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
- AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
- elif test "x$with_macosx_bundle_name_base" != x; then
- # Set MACOSX_BUNDLE_NAME_BASE to the configured value.
- MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
- fi
- AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
-
- # Set the MACOSX Bundle ID base
- AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
- [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
- @<:@not specified@:>@])])
- if test "x$with_macosx_bundle_id_base" = xyes; then
- AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
- elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
- AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
- elif test "x$with_macosx_bundle_id_base" != x; then
- # Set MACOSX_BUNDLE_ID_BASE to the configured value.
- MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
- fi
- AC_SUBST(MACOSX_BUNDLE_ID_BASE)
-
# Set the JDK RC name
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
[Set JDK RC name. This is used for FileDescription and ProductName properties
@@ -511,6 +483,60 @@
VENDOR_VERSION_STRING="$with_vendor_version_string"
fi
+ # Set the MACOSX Bundle Name base
+ AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
+ [Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
+ @<:@not specified@:>@])])
+ if test "x$with_macosx_bundle_name_base" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
+ elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
+ elif test "x$with_macosx_bundle_name_base" != x; then
+ # Set MACOSX_BUNDLE_NAME_BASE to the configured value.
+ MACOSX_BUNDLE_NAME_BASE="$with_macosx_bundle_name_base"
+ fi
+ AC_SUBST(MACOSX_BUNDLE_NAME_BASE)
+
+ # Set the MACOSX Bundle ID base
+ AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
+ [Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
+ @<:@not specified@:>@])])
+ if test "x$with_macosx_bundle_id_base" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
+ elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
+ elif test "x$with_macosx_bundle_id_base" != x; then
+ # Set MACOSX_BUNDLE_ID_BASE to the configured value.
+ MACOSX_BUNDLE_ID_BASE="$with_macosx_bundle_id_base"
+ else
+ # If using the default value, append the VERSION_PRE if there is one
+ # to make it possible to tell official builds apart from developer builds
+ if test "x$VERSION_PRE" != x; then
+ MACOSX_BUNDLE_ID_BASE="$MACOSX_BUNDLE_ID_BASE-$VERSION_PRE"
+ fi
+ fi
+ AC_SUBST(MACOSX_BUNDLE_ID_BASE)
+
+ # Set the MACOSX CFBundleVersion field
+ AC_ARG_WITH(macosx-bundle-build-version, [AS_HELP_STRING([--with-macosx-bundle-build-version],
+ [Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
+ string composed of one to three period-separated integers and should represent the
+ build version. Defaults to the build number.])])
+ if test "x$with_macosx_bundle_build_version" = xyes; then
+ AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
+ elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
+ AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
+ elif test "x$with_macosx_bundle_build_version" != x; then
+ MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
+ else
+ MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
+ # If VERSION_OPT consists of only numbers and periods, add it.
+ if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
+ MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
+ fi
+ fi
+ AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
+
# We could define --with flags for these, if really needed
VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
diff -Nru openjdk-11-11.0.16+8/make/autoconf/lib-bundled.m4 openjdk-11-11.0.18+10/make/autoconf/lib-bundled.m4
--- openjdk-11-11.0.16+8/make/autoconf/lib-bundled.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/lib-bundled.m4 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, 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
@@ -214,6 +214,9 @@
LIBZ_LIBS=""
if test "x$USE_EXTERNAL_LIBZ" = "xfalse"; then
LIBZ_CFLAGS="$LIBZ_CFLAGS -I$TOPDIR/src/java.base/share/native/libzip/zlib"
+ if test "x$OPENJDK_TARGET_OS" = xmacosx; then
+ LIBZ_CFLAGS="$LIBZ_CFLAGS -DHAVE_UNISTD_H"
+ fi
else
LIBZ_LIBS="-lz"
fi
diff -Nru openjdk-11-11.0.16+8/make/autoconf/lib-tests.m4 openjdk-11-11.0.18+10/make/autoconf/lib-tests.m4
--- openjdk-11-11.0.16+8/make/autoconf/lib-tests.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/lib-tests.m4 2023-01-10 08:32:35.000000000 +0000
@@ -51,7 +51,6 @@
fi
fi
- BASIC_FIXUP_PATH([GRAALUNIT_LIB])
+ UTIL_FIXUP_PATH([GRAALUNIT_LIB])
AC_SUBST(GRAALUNIT_LIB)
])
-
diff -Nru openjdk-11-11.0.16+8/make/autoconf/libraries.m4 openjdk-11-11.0.18+10/make/autoconf/libraries.m4
--- openjdk-11-11.0.16+8/make/autoconf/libraries.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/libraries.m4 2023-01-10 08:32:35.000000000 +0000
@@ -187,9 +187,9 @@
# Deprecated libraries, keep the flags for backwards compatibility
if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
- BASIC_DEPRECATED_ARG_WITH([dxsdk])
- BASIC_DEPRECATED_ARG_WITH([dxsdk-lib])
- BASIC_DEPRECATED_ARG_WITH([dxsdk-include])
+ UTIL_DEPRECATED_ARG_WITH([dxsdk])
+ UTIL_DEPRECATED_ARG_WITH([dxsdk-lib])
+ UTIL_DEPRECATED_ARG_WITH([dxsdk-include])
fi
# Control if libzip can use mmap. Available for purposes of overriding.
@@ -214,7 +214,7 @@
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])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/platform.m4 openjdk-11-11.0.18+10/make/autoconf/platform.m4
--- openjdk-11-11.0.16+8/make/autoconf/platform.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/platform.m4 2023-01-10 08:32:35.000000000 +0000
@@ -194,9 +194,9 @@
VAR_OS=windows
VAR_OS_ENV=windows.cygwin
;;
- *mingw*)
+ *msys* | *mingw*)
VAR_OS=windows
- VAR_OS_ENV=windows.msys
+ VAR_OS_ENV=windows.msys2
;;
*aix*)
VAR_OS=aix
diff -Nru openjdk-11-11.0.16+8/make/autoconf/source-dirs.m4 openjdk-11-11.0.18+10/make/autoconf/source-dirs.m4
--- openjdk-11-11.0.16+8/make/autoconf/source-dirs.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/source-dirs.m4 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2017, 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
@@ -28,9 +28,6 @@
OUTPUTDIR="$OUTPUTDIR"
AC_SUBST(OUTPUTDIR)
JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
-
- # Where are the sources.
- AC_SUBST(TOPDIR)
])
################################################################################
@@ -46,7 +43,7 @@
&& 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"
diff -Nru openjdk-11-11.0.16+8/make/autoconf/spec.gmk.in openjdk-11-11.0.18+10/make/autoconf/spec.gmk.in
--- openjdk-11-11.0.16+8/make/autoconf/spec.gmk.in 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/spec.gmk.in 2023-01-10 08:32:35.000000000 +0000
@@ -32,10 +32,15 @@
# The command line given to configure.
CONFIGURE_COMMAND_LINE:=@CONFIGURE_COMMAND_LINE@
+# The current directory when configure was run
+CONFIGURE_START_DIR:=@CONFIGURE_START_DIR@
# A self-referential reference to this file.
SPEC:=@SPEC@
+# Path to autoconf if overriden by the user, to be used by "make reconfigure"
+AUTOCONF := @AUTOCONF@
+
# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
# some definitions here, and are needed if MakeBase.gmk is not included before
# this file.
@@ -124,15 +129,21 @@
LIBM:=@LIBM@
LIBDL:=@LIBDL@
-# colon or semicolon
-PATH_SEP:=@PATH_SEP@
+WINENV_ROOT := @WINENV_ROOT@
+WINENV_PREFIX := @WINENV_PREFIX@
+
+ifeq (@OPENJDK_BUILD_OS_ENV@, windows.msys2)
+ # Prohibit msys2 from attemping any path wrangling
+ export MSYS2_ARG_CONV_EXCL := "*"
+endif
# Save the original path before replacing it with the Visual Studio tools
-ORIGINAL_PATH:=@ORIGINAL_PATH@
-ifeq ($(OPENJDK_TARGET_OS), windows)
- # On Windows, the Visual Studio toolchain needs the PATH to be adjusted
- # to include Visual Studio tools (this needs to be in cygwin/msys style).
- export PATH:=@VS_PATH@
+ORIGINAL_PATH := @ORIGINAL_PATH@
+
+ifeq (@TOOLCHAIN_TYPE@, microsoft)
+ # The Visual Studio toolchain needs the PATH to be adjusted to include
+ # Visual Studio tools.
+ export PATH := @TOOLCHAIN_PATH@:$(PATH)
endif
SYSROOT_CFLAGS := @SYSROOT_CFLAGS@
@@ -164,6 +175,7 @@
HOTSPOT_VM_DISTRO:=@HOTSPOT_VM_DISTRO@
MACOSX_BUNDLE_NAME_BASE=@MACOSX_BUNDLE_NAME_BASE@
MACOSX_BUNDLE_ID_BASE=@MACOSX_BUNDLE_ID_BASE@
+MACOSX_BUNDLE_BUILD_VERSION=@MACOSX_BUNDLE_BUILD_VERSION@
USERNAME:=@USERNAME@
VENDOR_URL:=@VENDOR_URL@
VENDOR_URL_BUG:=@VENDOR_URL_BUG@
@@ -461,7 +473,7 @@
ADLC_CXXFLAG=@ADLC_CXXFLAG@
# Tools that potentially need to be cross compilation aware.
-CC:=@FIXPATH@ @CCACHE@ @ICECC@ @CC@
+CC := @CCACHE@ @ICECC@ @CC@
# CFLAGS used to compile the jdk native libraries (C-code)
CFLAGS_JDKLIB:=@CFLAGS_JDKLIB@
@@ -487,12 +499,12 @@
EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
EXTRA_ASFLAGS = @EXTRA_ASFLAGS@
-CXX:=@FIXPATH@ @CCACHE@ @ICECC@ @CXX@
+CXX := @CCACHE@ @ICECC@ @CXX@
-CPP:=@FIXPATH@ @CPP@
+CPP := @CPP@
# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
-LD:=@FIXPATH@ @LD@
+LD := @LD@
# Linker used by the jaotc tool for AOT compilation.
LD_JAOTC:=@LD_JAOTC@
@@ -513,7 +525,7 @@
LDFLAGS_CXX_JDK:=@LDFLAGS_CXX_JDK@
# Sometimes a different linker is needed for c++ libs
-LDCXX:=@FIXPATH@ @LDCXX@
+LDCXX := @LDCXX@
# The flags for linking libstdc++ linker.
LIBCXX:=@LIBCXX@
@@ -522,22 +534,22 @@
# BUILD_CC/BUILD_LD is a compiler/linker that generates code that is runnable on the
# build platform.
-BUILD_CC:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CC@
-BUILD_CXX:=@FIXPATH@ @BUILD_ICECC@ @BUILD_CXX@
-BUILD_LD:=@FIXPATH@ @BUILD_LD@
-BUILD_LDCXX:=@FIXPATH@ @BUILD_LDCXX@
-BUILD_AS:=@FIXPATH@ @BUILD_AS@
-BUILD_AR:=@FIXPATH@ @BUILD_AR@
-BUILD_NM:=@FIXPATH@ @BUILD_NM@
+BUILD_CC := @BUILD_ICECC@ @BUILD_CC@
+BUILD_CXX := @BUILD_ICECC@ @BUILD_CXX@
+BUILD_LD := @BUILD_LD@
+BUILD_LDCXX := @BUILD_LDCXX@
+BUILD_AS := @BUILD_AS@
+BUILD_AR := @BUILD_AR@
+BUILD_NM := @BUILD_NM@
BUILD_OBJCOPY:=@BUILD_OBJCOPY@
BUILD_STRIP:=@BUILD_STRIP@
BUILD_SYSROOT_CFLAGS:=@BUILD_SYSROOT_CFLAGS@
BUILD_SYSROOT_LDFLAGS:=@BUILD_SYSROOT_LDFLAGS@
-AS:=@FIXPATH@ @AS@
+AS := @AS@
# AR is used to create a static library (is ar in unix, lib.exe in windows)
-AR:=@FIXPATH@ @AR@
+AR := @AR@
ARFLAGS:=@ARFLAGS@
NM:=@NM@
@@ -590,7 +602,7 @@
LIBRARY_PREFIX:=@LIBRARY_PREFIX@
SHARED_LIBRARY_SUFFIX:=@SHARED_LIBRARY_SUFFIX@
STATIC_LIBRARY_SUFFIX:=@STATIC_LIBRARY_SUFFIX@
-EXE_SUFFIX:=@EXE_SUFFIX@
+EXECUTABLE_SUFFIX:=@EXECUTABLE_SUFFIX@
OBJ_SUFFIX:=@OBJ_SUFFIX@
STATIC_BUILD:=@STATIC_BUILD@
@@ -612,28 +624,25 @@
JAR_CMD:=@JAR@
JLINK_CMD := @JLINK@
JMOD_CMD := @JMOD@
-JARSIGNER_CMD:=@JARSIGNER@
SJAVAC_SERVER_JAVA_CMD:=@SJAVAC_SERVER_JAVA@
# These variables are meant to be used. They are defined with = instead of := to make
# it possible to override only the *_CMD variables.
-JAVA=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
-JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
-JAVA_JAVAC=@FIXPATH@ $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
-JAVAC=@FIXPATH@ $(JAVAC_CMD)
-JAVADOC=@FIXPATH@ $(JAVADOC_CMD)
-JAR=@FIXPATH@ $(JAR_CMD)
-JLINK = @FIXPATH@ $(JLINK_CMD)
-JMOD = @FIXPATH@ $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
-JARSIGNER=@FIXPATH@ $(JARSIGNER_CMD)
+JAVA = $(JAVA_CMD) $(JAVA_FLAGS_BIG) $(JAVA_FLAGS)
+JAVA_SMALL = $(JAVA_CMD) $(JAVA_FLAGS_SMALL) $(JAVA_FLAGS)
+JAVA_JAVAC = $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS)
+JAVAC = $(JAVAC_CMD)
+JAVADOC = $(JAVADOC_CMD)
+JAR = $(JAR_CMD)
+JLINK = $(JLINK_CMD)
+JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
# A specific java binary with specific options can be used to run
# the long running background sjavac servers and other long running tasks.
-SJAVAC_SERVER_JAVA=@FIXPATH@ @FIXPATH_DETACH_FLAG@ $(SJAVAC_SERVER_JAVA_CMD) \
+SJAVAC_SERVER_JAVA = $(SJAVAC_SERVER_JAVA_CMD) \
$(SJAVAC_SERVER_JAVA_FLAGS)
# Hotspot sets this variable before reading the SPEC when compiling sa-jdi.jar. Avoid
# overriding that value by using ?=.
-JAVAC_FLAGS?=@JAVAC_FLAGS@
-
+JAVAC_FLAGS? = @JAVAC_FLAGS@
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
@@ -690,9 +699,7 @@
CD:=cd
CHMOD:=@CHMOD@
CODESIGN:=@CODESIGN@
-COMM:=@COMM@
CP:=@CP@
-CPIO:=@CPIO@
CUT:=@CUT@
DATE:=@DATE@
DIFF:=@DIFF@
@@ -714,7 +721,7 @@
MV:=@MV@
NAWK:=@NAWK@
NICE:=@NICE@
-PANDOC:=@FIXPATH@ @PANDOC@
+PANDOC:=@PANDOC@
PATCH:=@PATCH@
PRINTF:=@PRINTF@
READLINK:=@READLINK@
@@ -730,15 +737,14 @@
IS_GNU_TIME:=@IS_GNU_TIME@
TR:=@TR@
TOUCH:=@TOUCH@
-UNIQ:=@UNIQ@
WC:=@WC@
XARGS:=@XARGS@
ZIPEXE:=@ZIPEXE@
UNZIP:=@UNZIP@
-MT:=@FIXPATH@ @MT@
-RC:=@FIXPATH@ @RC@
-DUMPBIN:=@FIXPATH@ @DUMPBIN@
-CYGPATH:=@CYGPATH@
+MT:=@MT@
+RC:=@RC@
+DUMPBIN:=@DUMPBIN@
+PATHTOOL:=@PATHTOOL@
LDD:=@LDD@
OTOOL:=@OTOOL@
READELF:=@READELF@
@@ -756,7 +762,9 @@
JIB_HOME:=@JIB_HOME@
XCODEBUILD=@XCODEBUILD@
DTRACE := @DTRACE@
-FIXPATH:=@FIXPATH@
+FIXPATH := @FIXPATH@
+FIXPATH_BASE := @FIXPATH_BASE@
+ULIMIT:=@ULIMIT@
TAR_TYPE:=@TAR_TYPE@
TAR_CREATE_EXTRA_PARAM:=@TAR_CREATE_EXTRA_PARAM@
@@ -773,9 +781,12 @@
LIBZ_LIBS:=@LIBZ_LIBS@
LIBZIP_CAN_USE_MMAP:=@LIBZIP_CAN_USE_MMAP@
MSVCR_DLL:=@MSVCR_DLL@
+VCRUNTIME_1_DLL:=@VCRUNTIME_1_DLL@
MSVCP_DLL:=@MSVCP_DLL@
UCRT_DLL_DIR:=@UCRT_DLL_DIR@
STLPORT_LIB:=@STLPORT_LIB@
+ENABLE_PANDOC:=@ENABLE_PANDOC@
+PANDOC_MARKDOWN_FLAG:=@PANDOC_MARKDOWN_FLAG@
####################################################
#
diff -Nru openjdk-11-11.0.16+8/make/autoconf/toolchain.m4 openjdk-11-11.0.18+10/make/autoconf/toolchain.m4
--- openjdk-11-11.0.16+8/make/autoconf/toolchain.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/toolchain.m4 2023-01-10 08:32:35.000000000 +0000
@@ -32,6 +32,7 @@
# compilers and related tools that are used.
########################################################################
+m4_include([toolchain_microsoft.m4])
# All valid toolchains, regardless of platform (used by help.m4)
VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
@@ -91,7 +92,7 @@
# 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 [].
@@ -142,7 +143,7 @@
# 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 [].
@@ -180,7 +181,7 @@
SHARED_LIBRARY='[$]1.dll'
STATIC_LIBRARY='[$]1.lib'
OBJ_SUFFIX='.obj'
- EXE_SUFFIX='.exe'
+ EXECUTABLE_SUFFIX='.exe'
else
LIBRARY_PREFIX=lib
SHARED_LIBRARY_SUFFIX='.so'
@@ -188,7 +189,7 @@
SHARED_LIBRARY='lib[$]1.so'
STATIC_LIBRARY='lib[$]1.a'
OBJ_SUFFIX='.o'
- EXE_SUFFIX=''
+ EXECUTABLE_SUFFIX=''
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
# For full static builds, we're overloading the SHARED_LIBRARY
# variables in order to limit the amount of changes required.
@@ -212,7 +213,7 @@
AC_SUBST(SHARED_LIBRARY)
AC_SUBST(STATIC_LIBRARY)
AC_SUBST(OBJ_SUFFIX)
- AC_SUBST(EXE_SUFFIX)
+ AC_SUBST(EXECUTABLE_SUFFIX)
])
# Determine which toolchain type to use, and make sure it is valid for this
@@ -337,9 +338,6 @@
# special setup, e.g. additional paths etc.
AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
[
- # FIXME: Is this needed?
- AC_LANG(C++)
-
# Store the CFLAGS etc passed to the configure script.
ORG_CFLAGS="$CFLAGS"
ORG_CXXFLAGS="$CXXFLAGS"
@@ -347,44 +345,26 @@
# autoconf magic only relies on PATH, so update it if tools dir is specified
OLD_PATH="$PATH"
- # On Windows, we need to detect the visual studio installation first.
- # This will change the PATH, but we need to keep that new PATH even
- # after toolchain detection is done, since the compiler (on x86) uses
- # it for DLL resolution in runtime.
- if test "x$OPENJDK_BUILD_OS" = "xwindows" \
- && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
- TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV
- # Reset path to VS_PATH. It will include everything that was on PATH at the time we
- # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
- PATH="$VS_PATH"
- # The microsoft toolchain also requires INCLUDE and LIB to be set.
- export INCLUDE="$VS_INCLUDE"
- export LIB="$VS_LIB"
- else
- if test "x$XCODE_VERSION_OUTPUT" != x; then
- # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
- TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
- TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
- else
- # Currently we do not define this for other toolchains. This might change as the need arise.
- TOOLCHAIN_VERSION=
- fi
+ if test "x$XCODE_VERSION_OUTPUT" != x; then
+ # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
+ TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
+ TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
fi
AC_SUBST(TOOLCHAIN_VERSION)
- # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
+ # Finally prepend TOOLCHAIN_PATH to the PATH, to allow --with-tools-dir to
# override all other locations.
if test "x$TOOLCHAIN_PATH" != x; then
- PATH=$TOOLCHAIN_PATH:$PATH
+ export PATH=$TOOLCHAIN_PATH:$PATH
fi
])
# Restore path, etc
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
[
- # Restore old path, except for the microsoft toolchain, which requires VS_PATH
- # to remain in place. Otherwise the compiler will not work in some siutations
- # in later configure checks.
+ # Restore old path, except for the microsoft toolchain, which requires the
+ # toolchain path to remain in place. Otherwise the compiler will not work in
+ # some siutations in later configure checks.
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
PATH="$OLD_PATH"
fi
@@ -452,7 +432,7 @@
# First line typically looks something like:
# Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
# but the compiler name may vary depending on locale.
- COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
+ COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
# Check that this is likely to be Microsoft CL.EXE.
$ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft" > /dev/null
if test $? -ne 0; then
@@ -531,7 +511,7 @@
if test "x`basename [$]$1`" = "x[$]$1"; then
# A command without a complete path is provided, search $PATH.
- AC_PATH_PROGS(POTENTIAL_$1, [$]$1)
+ UTIL_LOOKUP_PROGS(POTENTIAL_$1, [$]$1)
if test "x$POTENTIAL_$1" != x; then
$1=$POTENTIAL_$1
else
@@ -553,39 +533,21 @@
# If we are not cross compiling, then the default compiler name will be
# used.
- $1=
- # If TOOLCHAIN_PATH is set, check for all compiler names in there first
- # before checking the rest of the PATH.
- # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
- # step, this should not be necessary.
- if test -n "$TOOLCHAIN_PATH"; then
- PATH_save="$PATH"
- PATH="$TOOLCHAIN_PATH"
- AC_PATH_TOOL(TOOLCHAIN_PATH_$1, $SEARCH_LIST)
- $1=$TOOLCHAIN_PATH_$1
- PATH="$PATH_save"
- fi
-
- # AC_PATH_TOOL can't be run multiple times with the same variable,
- # so create a new name for this run.
- if test "x[$]$1" = x; then
- AC_PATH_TOOL(POTENTIAL_$1, $SEARCH_LIST)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(POTENTIAL_$1, $SEARCH_LIST)
+ if test "x$POTENTIAL_$1" != x; then
$1=$POTENTIAL_$1
- fi
-
- if test "x[$]$1" = x; then
+ else
HELP_MSG_MISSING_DEPENDENCY([devkit])
AC_MSG_ERROR([Could not find a $COMPILER_NAME compiler. $HELP_MSG])
fi
fi
# Now we have a compiler binary in $1. Make sure it's okay.
- BASIC_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
@@ -633,7 +595,7 @@
# There is no specific version flag, but all output starts with a version string.
# First line typically looks something like:
# Microsoft (R) Incremental Linker Version 12.00.31101.0
- LINKER_VERSION_STRING=`$LD 2>&1 | $HEAD -n 1 | $TR -d '\r'`
+ LINKER_VERSION_STRING=`$LINKER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
@@ -642,7 +604,7 @@
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
# Copyright (C) 2015 Free Software Foundation, Inc.
# This program is free software; [...]
- LINKER_VERSION_STRING=`$LD -Wl,-version 2>&1 | $HEAD -n 1`
+ LINKER_VERSION_STRING=`$LINKER -Wl,--version 2>&1 | $HEAD -n 1`
# Extract version number
[ LINKER_VERSION_NUMBER=`$ECHO $LINKER_VERSION_STRING | \
$SED -e 's/.* \([0-9][0-9]*\(\.[0-9][0-9]*\)*\).*/\1/'` ]
@@ -654,7 +616,7 @@
# or
# GNU ld (GNU Binutils for Ubuntu) 2.26.1
- LINKER_VERSION_STRING=`$LD -Wl,-v 2>&1 | $HEAD -n 1`
+ LINKER_VERSION_STRING=`$LINKER -Wl,-v 2>&1 | $HEAD -n 1`
# Check if we're using the GNU ld
$ECHO "$LINKER_VERSION_STRING" | $GREP "GNU" > /dev/null
if test $? -eq 0; then
@@ -674,6 +636,23 @@
AC_MSG_NOTICE([Using $TOOLCHAIN_TYPE $LINKER_NAME version $LINKER_VERSION_NUMBER @<:@$LINKER_VERSION_STRING@:>@])
])
+# Make sure we did not pick up /usr/bin/link, which is the unix-style link
+# executable.
+#
+# $1 = linker to test (LD or BUILD_LD)
+AC_DEFUN(TOOLCHAIN_VERIFY_LINK_BINARY,
+[
+ LINKER=[$]$1
+
+ AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
+ $LINKER --version > /dev/null
+ if test $? -eq 0 ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([$LINKER is the winenv link tool. Please check your PATH and rerun configure.])
+ else
+ AC_MSG_RESULT([yes])
+ fi
+])
# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
# archiver (AR). Verify that the compilers are correct according to the
@@ -709,38 +688,27 @@
# 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)
#
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# In the Microsoft toolchain we have a separate LD command "link".
- # 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],[link],,, [$CYGWIN_LINK])
- BASIC_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
- if test $? -eq 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
- else
- AC_MSG_RESULT([yes])
- fi
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(LD, link)
+ TOOLCHAIN_VERIFY_LINK_BINARY(LD)
LDCXX="$LD"
- # jaotc being a windows program expects the linker to be supplied with exe suffix.
- LD_JAOTC="$LD$EXE_SUFFIX"
+ # jaotc being a windows program expects the linker to be supplied with exe suffix.but without
+ # fixpath
+ LD_JAOTC="${LD##$FIXPATH }"
else
# All other toolchains use the compiler to link.
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_LOOKUP_TOOLCHAIN_PROGS(LD_JAOTC, ld)
fi
AC_SUBST(LD)
AC_SUBST(LD_JAOTC)
@@ -762,14 +730,15 @@
# Setup the assembler (AS)
#
if test "x$OPENJDK_TARGET_OS" = xsolaris; then
- BASIC_PATH_PROGS(AS, as)
- BASIC_FIXUP_EXECUTABLE(AS)
+ UTIL_LOOKUP_PROGS(AS, as)
if test "x$AS" = x; then
AC_MSG_ERROR([Solaris assembler (as) is required. Please install via "pkg install pkg:/developer/assembler".])
fi
- else
- # FIXME: is this correct for microsoft?
+ elif test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
AS="$CC -c"
+ else
+ # On windows, the assember is "ml.exe"
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
fi
AC_SUBST(AS)
@@ -778,13 +747,12 @@
#
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# The corresponding ar tool is lib.exe (used to create static libraries)
- AC_CHECK_PROG([AR], [lib],[lib],,,)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, lib)
elif test "x$TOOLCHAIN_TYPE" = xgcc; then
- BASIC_CHECK_TOOLS(AR, ar gcc-ar)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar gcc-ar)
else
- BASIC_CHECK_TOOLS(AR, ar)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(AR, ar)
fi
- BASIC_FIXUP_EXECUTABLE(AR)
])
# Setup additional tools that is considered a part of the toolchain, but not the
@@ -793,49 +761,30 @@
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_LOOKUP_PROGS(LIPO, lipo)
+ UTIL_REQUIRE_PROGS(OTOOL, otool)
+ UTIL_REQUIRE_PROGS(INSTALL_NAME_TOOL, install_name_tool)
fi
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- AC_CHECK_PROG([MT], [mt], [mt],,, [/usr/bin/mt])
- BASIC_FIXUP_EXECUTABLE(MT)
+ # Setup the manifest tool (MT)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(MT, mt)
# Setup the resource compiler (RC)
- AC_CHECK_PROG([RC], [rc], [rc],,, [/usr/bin/rc])
- BASIC_FIXUP_EXECUTABLE(RC)
- AC_CHECK_PROG([DUMPBIN], [dumpbin], [dumpbin],,,)
- BASIC_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
- # 'ac_executable_extensions' is unusable due to performance reasons).
- # Notice that we intentionally don't fix up the path to MSBUILD because we
- # will call it in a DOS shell during freetype detection on Windows (see
- # 'LIB_SETUP_FREETYPE' in "libraries.m4"
- AC_CHECK_PROG([MSBUILD], [msbuild.exe], [msbuild.exe],,,)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(RC, rc)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(DUMPBIN, dumpbin)
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_LOOKUP_PROGS(STRIP, strip)
+ UTIL_LOOKUP_PROGS(NM, nm)
+ UTIL_LOOKUP_PROGS(GNM, 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_LOOKUP_TOOLCHAIN_PROGS(STRIP, strip)
if test "x$TOOLCHAIN_TYPE" = xgcc; then
- BASIC_CHECK_TOOLS(NM, nm gcc-nm)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm gcc-nm)
else
- BASIC_CHECK_TOOLS(NM, nm)
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm)
fi
- BASIC_FIXUP_EXECUTABLE(NM)
GNM="$NM"
AC_SUBST(GNM)
fi
@@ -843,62 +792,51 @@
# 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])
- # Only call fixup if objcopy was found.
- if test -n "$OBJCOPY"; then
- BASIC_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.
- # - version number is last blank separate word on first line
- # - version number formats that have been seen:
- # - .
- # - ..
- OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
- # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
- [ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
- -e 's/.* //' \
- -e '/^[01]\./b bad' \
- -e '/^2\./{' \
- -e ' s/^2\.//' \
- -e ' /^[0-9]$/b bad' \
- -e ' /^[0-9]\./b bad' \
- -e ' /^1[0-9]$/b bad' \
- -e ' /^1[0-9]\./b bad' \
- -e ' /^20\./b bad' \
- -e ' /^21\.0$/b bad' \
- -e ' /^21\.0\./b bad' \
- -e '}' \
- -e ':good' \
- -e 's/.*/VALID_VERSION/p' \
- -e 'q' \
- -e ':bad' \
- -e 's/.*/BAD_VERSION/p' \
- -e 'q'` ]
- if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
- OBJCOPY=
- AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
- AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
- AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
- AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
- AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
- fi
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJCOPY, gobjcopy 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.
+ # - version number is last blank separate word on first line
+ # - version number formats that have been seen:
+ # - .
+ # - ..
+ OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
+ # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
+ [ OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
+ -e 's/.* //' \
+ -e '/^[01]\./b bad' \
+ -e '/^2\./{' \
+ -e ' s/^2\.//' \
+ -e ' /^[0-9]$/b bad' \
+ -e ' /^[0-9]\./b bad' \
+ -e ' /^1[0-9]$/b bad' \
+ -e ' /^1[0-9]\./b bad' \
+ -e ' /^20\./b bad' \
+ -e ' /^21\.0$/b bad' \
+ -e ' /^21\.0\./b bad' \
+ -e '}' \
+ -e ':good' \
+ -e 's/.*/VALID_VERSION/p' \
+ -e 'q' \
+ -e ':bad' \
+ -e 's/.*/BAD_VERSION/p' \
+ -e 'q'` ]
+ if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
+ OBJCOPY=
+ AC_MSG_WARN([Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated.])
+ AC_MSG_NOTICE([objcopy reports version $OBJCOPY_VERSION])
+ AC_MSG_NOTICE([Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version])
+ AC_MSG_NOTICE([Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version])
+ AC_MSG_NOTICE([Note: Solaris 11 Update 1 contains the correct version])
fi
fi
fi
- BASIC_CHECK_TOOLS(OBJDUMP, [gobjdump objdump])
- if test "x$OBJDUMP" != x; then
- # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
- # bails if argument is missing.
- BASIC_FIXUP_EXECUTABLE(OBJDUMP)
- fi
+ UTIL_LOOKUP_TOOLCHAIN_PROGS(OBJDUMP, gobjdump objdump)
case $TOOLCHAIN_TYPE in
gcc|clang|solstudio)
- BASIC_CHECK_TOOLS(CXXFILT, [c++filt])
- BASIC_CHECK_NONEMPTY(CXXFILT)
- BASIC_FIXUP_EXECUTABLE(CXXFILT)
+ UTIL_REQUIRE_TOOLCHAIN_PROGS(CXXFILT, c++filt)
;;
esac
])
@@ -926,7 +864,7 @@
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
@@ -972,63 +910,57 @@
BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- BUILD_VS_INCLUDE="$BUILD_DEVKIT_VS_INCLUDE"
- BUILD_VS_LIB="$BUILD_DEVKIT_VS_LIB"
+ # For historical reasons, paths are separated by ; in devkit.info
+ BUILD_VS_INCLUDE="${BUILD_DEVKIT_VS_INCLUDE//;/:}"
+ BUILD_VS_LIB="${BUILD_DEVKIT_VS_LIB//;/:}"
- TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS([BUILD_])
+ TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_, BUILD_)
fi
fi
- fi
-
- # 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.
- if test "x$OPENJDK_BUILD_OS" = xmacosx; then
- BASIC_REQUIRE_PROGS(BUILD_CC, [clang cl cc gcc])
- BASIC_REQUIRE_PROGS(BUILD_CXX, [clang++ cl CC g++])
else
- BASIC_REQUIRE_PROGS(BUILD_CC, [cl cc gcc])
- BASIC_REQUIRE_PROGS(BUILD_CXX, [cl CC g++])
+ if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
+ # If we got no devkit, we need to go hunting for the proper env
+ TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_BUILD_CPU, [$TOOLCHAIN_VERSION])
+ TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_BUILD_CPU, BUILD_)
+
+ # We cannot currently export the VS_PATH to spec.gmk. This is probably
+ # strictly not correct, but seems to work anyway.
+
+ # Convert VS_INCLUDE and VS_LIB into sysroot flags
+ TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS(BUILD_)
+ fi
fi
- BASIC_FIXUP_EXECUTABLE(BUILD_CC)
- 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)
- # Assume the C compiler is the assembler
- BUILD_AS="$BUILD_CC -c"
+
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
- # In the Microsoft toolchain we have a separate LD command "link".
- # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
- # a cygwin program for something completely different.
- AC_CHECK_PROG([BUILD_LD], [link$EXE_SUFFIX],[link$EXE_SUFFIX],,, [$CYGWIN_LINK])
- BASIC_FIXUP_EXECUTABLE(BUILD_LD)
- # Verify that we indeed succeeded with this trick.
- AC_MSG_CHECKING([if the found link.exe is actually the Visual Studio linker])
-
- # Reset PATH since it can contain a mix of WSL/linux paths and Windows paths from VS,
- # which, in combination with WSLENV, will make the WSL layer complain
- old_path="$PATH"
- PATH=
-
- "$BUILD_LD" --version > /dev/null
-
- if test $? -eq 0 ; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([This is the Cygwin link tool. Please check your PATH and rerun configure.])
- else
- AC_MSG_RESULT([yes])
- fi
+ UTIL_REQUIRE_PROGS(BUILD_CC, cl, [$VS_PATH])
+ UTIL_REQUIRE_PROGS(BUILD_CXX, cl, [$VS_PATH])
- PATH="$old_path"
+ # On windows, the assember is "ml.exe". We currently don't need this so
+ # do not require.
+ UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
+
+ # On windows, the ar tool is lib.exe (used to create static libraries).
+ # We currently don't need this so do not require.
+ UTIL_LOOKUP_PROGS(BUILD_AR, lib, [$VS_PATH])
+ # In the Microsoft toolchain we have a separate LD command "link".
+ UTIL_REQUIRE_PROGS(BUILD_LD, link, [$VS_PATH])
+ TOOLCHAIN_VERIFY_LINK_BINARY(BUILD_LD)
BUILD_LDCXX="$BUILD_LD"
else
+ if test "x$OPENJDK_BUILD_OS" = xmacosx; then
+ UTIL_REQUIRE_PROGS(BUILD_CC, clang cc gcc)
+ UTIL_REQUIRE_PROGS(BUILD_CXX, clang++ CC g++)
+ else
+ UTIL_REQUIRE_PROGS(BUILD_CC, cc gcc)
+ UTIL_REQUIRE_PROGS(BUILD_CXX, CC g++)
+ fi
+ UTIL_LOOKUP_PROGS(BUILD_NM, nm gcc-nm)
+ UTIL_LOOKUP_PROGS(BUILD_AR, ar gcc-ar lib)
+ UTIL_LOOKUP_PROGS(BUILD_OBJCOPY, objcopy)
+ UTIL_LOOKUP_PROGS(BUILD_STRIP, strip)
+ # Assume the C compiler is the assembler
+ BUILD_AS="$BUILD_CC -c"
# Just like for the target compiler, use the compiler as linker
BUILD_LD="$BUILD_CC"
BUILD_LDCXX="$BUILD_CXX"
@@ -1078,7 +1010,7 @@
# Check for extra potential brokenness.
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
# On Windows, double-check that we got the right compiler.
- CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
+ CC_VERSION_OUTPUT=`$CC 2>&1 1>/dev/null | $HEAD -n 1 | $TR -d '\r'`
COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
@@ -1132,7 +1064,7 @@
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
@@ -1172,7 +1104,7 @@
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_LOOKUP_PROGS(JTREGEXE, jtreg)
if test "x$JTREGEXE" != x; then
# That's good, now try to derive JT_HOME
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
@@ -1198,8 +1130,8 @@
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)
])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/toolchain_microsoft.m4 openjdk-11-11.0.18+10/make/autoconf/toolchain_microsoft.m4
--- openjdk-11-11.0.16+8/make/autoconf/toolchain_microsoft.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/toolchain_microsoft.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,763 @@
+#
+# Copyright (c) 2011, 2021, 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.
+#
+
+################################################################################
+# The order of these defines the priority by which we try to find them.
+VALID_VS_VERSIONS="2017 2019 2022 2013 2015 2012 2010"
+
+VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
+VS_VERSION_INTERNAL_2010=100
+VS_MSVCR_2010=msvcr100.dll
+# We don't use msvcp on Visual Studio 2010
+#VS_MSVCP_2010=msvcp100.dll
+VS_ENVVAR_2010="VS100COMNTOOLS"
+VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
+VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
+VS_VS_PLATFORM_NAME_2010="v100"
+VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
+VS_SUPPORTED_2010=false
+
+VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
+VS_VERSION_INTERNAL_2012=110
+VS_MSVCR_2012=msvcr110.dll
+VS_MSVCP_2012=msvcp110.dll
+VS_ENVVAR_2012="VS110COMNTOOLS"
+VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
+VS_SDK_INSTALLDIR_2012=
+VS_VS_PLATFORM_NAME_2012="v110"
+VS_SDK_PLATFORM_NAME_2012=
+VS_SUPPORTED_2012=false
+
+VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
+VS_VERSION_INTERNAL_2013=120
+VS_MSVCR_2013=msvcr120.dll
+VS_MSVCP_2013=msvcp120.dll
+VS_ENVVAR_2013="VS120COMNTOOLS"
+VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
+VS_SDK_INSTALLDIR_2013=
+VS_VS_PLATFORM_NAME_2013="v120"
+VS_SDK_PLATFORM_NAME_2013=
+VS_SUPPORTED_2013=false
+
+VS_DESCRIPTION_2015="Microsoft Visual Studio 2015"
+VS_VERSION_INTERNAL_2015=140
+VS_MSVCR_2015=vcruntime140.dll
+VS_MSVCP_2015=msvcp140.dll
+VS_ENVVAR_2015="VS140COMNTOOLS"
+VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
+VS_SDK_INSTALLDIR_2015=
+VS_VS_PLATFORM_NAME_2015="v140"
+VS_SDK_PLATFORM_NAME_2015=
+# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
+# explicitly specifying Windows Kit 8.1 to be used.
+VS_ENV_ARGS_2015="8.1"
+VS_SUPPORTED_2015=false
+
+VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
+VS_VERSION_INTERNAL_2017=141
+VS_MSVCR_2017=vcruntime140.dll
+VS_MSVCP_2017=msvcp140.dll
+VS_ENVVAR_2017="VS150COMNTOOLS"
+VS_USE_UCRT_2017="true"
+VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
+VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2017=
+VS_VS_PLATFORM_NAME_2017="v141"
+VS_SDK_PLATFORM_NAME_2017=
+VS_SUPPORTED_2017=true
+VS_TOOLSET_SUPPORTED_2017=true
+
+VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
+VS_VERSION_INTERNAL_2019=142
+VS_MSVCR_2019=vcruntime140.dll
+VS_VCRUNTIME_1_2019=vcruntime140_1.dll
+VS_MSVCP_2019=msvcp140.dll
+VS_ENVVAR_2019="VS160COMNTOOLS"
+VS_USE_UCRT_2019="true"
+VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
+VS_EDITIONS_2019="BuildTools Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2019=
+VS_VS_PLATFORM_NAME_2019="v142"
+VS_SDK_PLATFORM_NAME_2019=
+VS_SUPPORTED_2019=false
+VS_TOOLSET_SUPPORTED_2019=false
+
+VS_DESCRIPTION_2022="Microsoft Visual Studio 2022"
+VS_VERSION_INTERNAL_2022=143
+VS_MSVCR_2022=vcruntime140.dll
+VS_VCRUNTIME_1_2022=vcruntime140_1.dll
+VS_MSVCP_2022=msvcp140.dll
+VS_ENVVAR_2022="VS170COMNTOOLS"
+VS_USE_UCRT_2022="true"
+VS_VS_INSTALLDIR_2022="Microsoft Visual Studio/2022"
+VS_EDITIONS_2022="BuildTools Community Professional Enterprise"
+VS_SDK_INSTALLDIR_2022=
+VS_VS_PLATFORM_NAME_2022="v143"
+VS_SDK_PLATFORM_NAME_2022=
+VS_SUPPORTED_2022=true
+VS_TOOLSET_SUPPORTED_2022=true
+
+################################################################################
+
+AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
+[
+ if test "x$VS_ENV_CMD" = x; then
+ TARGET_CPU="$1"
+ VS_VERSION="$2"
+ VS_BASE="$3"
+ METHOD="$4"
+
+ UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
+
+ if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
+ # 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
+ for edition in $VS_EDITIONS; do
+ if test -d "$VS_BASE/$edition"; then
+ VS_BASE="$VS_BASE/$edition"
+ break
+ fi
+ done
+ fi
+
+ AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
+ if test "x$TARGET_CPU" = xx86; then
+ VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
+ elif test "x$TARGET_CPU" = xx86_64; then
+ VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
+ vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
+ elif test "x$TARGET_CPU" = xaarch64; then
+ # for host x86-64, target aarch64
+ VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
+ vc/auxiliary/build/vcvarsx86_arm64.bat"
+ fi
+
+ for VCVARSFILE in $VCVARSFILES; do
+ if test -f "$VS_BASE/$VCVARSFILE"; then
+ VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
+ break
+ fi
+ done
+
+ if test "x$VS_ENV_CMD" = x; then
+ AC_MSG_NOTICE([Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring])
+ else
+ # PLATFORM_TOOLSET is used during the compilation of the freetype sources
+ # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
+ # 'v110' or 'v120' for VS 2010, 2012 or VS2013
+ eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+ fi
+ fi
+ fi
+])
+
+################################################################################
+
+AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
+[
+ if test "x$VS_ENV_CMD" = x; then
+ TARGET_CPU="$1"
+ VS_VERSION="$2"
+ WIN_SDK_BASE="$3"
+ METHOD="$4"
+
+ UTIL_FIXUP_PATH(WIN_SDK_BASE, NOFAIL)
+
+ if test "x$WIN_SDK_BASE" != x && 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.
+ if test ! -d "$WIN_SDK_BASE/lib"; then
+ AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
+ AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
+ elif test -f "$WIN_SDK_BASE/bin/setenv.cmd"; then
+ AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
+ VS_ENV_CMD="$WIN_SDK_BASE/bin/setenv.cmd"
+ if test "x$TARGET_CPU" = xx86; then
+ VS_ENV_ARGS="/x86"
+ elif test "x$TARGET_CPU" = xx86_64; then
+ VS_ENV_ARGS="/x64"
+ elif test "x$TARGET_CPU" = xaarch64; then
+ VS_ENV_ARGS="/arm64"
+ fi
+ # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
+ # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
+ # TODO: improve detection for other versions of SDK
+ eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
+ else
+ AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
+ AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
+ fi
+ fi
+ fi
+])
+
+################################################################################
+# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
+# build environment and assigns it to VS_ENV_CMD
+AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
+[
+ # VS2017 provides the option to install previous minor versions of the MSVC
+ # toolsets. It is not possible to directly download earlier minor versions of
+ # VS2017 and in order to build with a previous minor compiler toolset version,
+ # it is now possible to compile with earlier minor versions by passing
+ # -vcvars_ver= argument to vcvarsall.bat.
+ AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
+ [specific MSVC toolset version to use, passed as -vcvars_ver argument to
+ pass to vcvarsall.bat (Windows only)])])
+
+ TARGET_CPU="$1"
+ VS_VERSION="$2"
+ eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
+ eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
+ eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
+ eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
+ eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
+ eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
+ eval VS_TOOLSET_SUPPORTED="\${VS_TOOLSET_SUPPORTED_${VS_VERSION}}"
+
+ VS_ENV_CMD=""
+
+ # When using --with-tools-dir, assume it points to the correct and default
+ # version of Visual Studio or that --with-toolchain-version was also set.
+ if test "x$with_tools_dir" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$with_tools_dir/../..], [--with-tools-dir])
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$with_tools_dir/../../..], [--with-tools-dir])
+ if test "x$VS_ENV_CMD" = x; then
+ # Having specified an argument which is incorrect will produce an instant failure;
+ # we should not go on looking
+ AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid])
+ AC_MSG_NOTICE([Visual Studio installation. Please point to the VC/bin or VC/bin/amd64])
+ AC_MSG_NOTICE([directory within the Visual Studio installation])
+ AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
+ fi
+ fi
+
+ if test "x$VS_COMNTOOLS" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
+ fi
+ if test "x$PROGRAMFILES" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$PROGRAMFILES/$VS_INSTALL_DIR], [well-known name])
+ fi
+ # Work around the insanely named ProgramFiles(x86) env variable
+ PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
+ if test "x$PROGRAMFILES_X86" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
+ fi
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [c:/program files/$VS_INSTALL_DIR], [well-known name])
+ TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [c:/program files (x86)/$VS_INSTALL_DIR], [well-known name])
+ if test "x$SDK_INSTALL_DIR" != x; then
+ if test "x$ProgramW6432" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$ProgramW6432/$SDK_INSTALL_DIR], [well-known name])
+ fi
+ if test "x$PROGRAMW6432" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$PROGRAMW6432/$SDK_INSTALL_DIR], [well-known name])
+ fi
+ if test "x$PROGRAMFILES" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
+ fi
+ TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [c:/program files/$SDK_INSTALL_DIR], [well-known name])
+ TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([$TARGET_CPU], [$VS_VERSION],
+ [c:/program files (x86)/$SDK_INSTALL_DIR], [well-known name])
+ fi
+
+ VCVARS_VER=auto
+ if test "x$VS_TOOLSET_SUPPORTED" != x; then
+ if test "x$with_msvc_toolset_version" != x; then
+ VCVARS_VER="$with_msvc_toolset_version"
+ fi
+ fi
+])
+
+################################################################################
+
+AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
+[
+ AC_ARG_WITH(toolchain-version, [AS_HELP_STRING([--with-toolchain-version],
+ [the version of the toolchain to look for, use '--help' to show possible values @<:@platform dependent@:>@])])
+
+ if test "x$with_toolchain_version" = xlist; then
+ # List all toolchains
+ AC_MSG_NOTICE([The following toolchain versions are valid on this platform:])
+ for version in $VALID_VS_VERSIONS; do
+ eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
+ $PRINTF " %-10s %s\n" $version "$VS_DESCRIPTION"
+ done
+
+ exit 0
+ elif test "x$DEVKIT_VS_VERSION" != x; then
+ VS_VERSION=$DEVKIT_VS_VERSION
+ TOOLCHAIN_VERSION=$VS_VERSION
+ # If the devkit has a name, use that as description
+ VS_DESCRIPTION="$DEVKIT_NAME"
+ if test "x$VS_DESCRIPTION" = x; then
+ eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+ fi
+ eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+ eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+ eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
+ eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+ eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
+ eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
+ eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
+
+ # For historical reasons, paths are separated by ; in devkit.info
+ VS_INCLUDE=${DEVKIT_VS_INCLUDE//;/:}
+ VS_LIB=${DEVKIT_VS_LIB//;/:}
+
+ AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
+
+ elif test "x$with_toolchain_version" != x; then
+ # User override; check that it is valid
+ if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
+ AC_MSG_NOTICE([Visual Studio version $with_toolchain_version is not valid.])
+ AC_MSG_NOTICE([Valid Visual Studio versions: $VALID_VS_VERSIONS.])
+ AC_MSG_ERROR([Cannot continue.])
+ fi
+ VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
+ else
+ # No flag given, use default
+ VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
+ fi
+
+ for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
+ TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE($OPENJDK_TARGET_CPU, [$VS_VERSION])
+ if test "x$VS_ENV_CMD" != x; then
+ TOOLCHAIN_VERSION=$VS_VERSION
+ eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
+ eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
+ eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
+ eval VCRUNTIME_1_NAME="\${VS_VCRUNTIME_1_${VS_VERSION}}"
+ eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
+ eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
+ eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
+ # The rest of the variables are already evaled while probing
+ AC_MSG_NOTICE([Found $VS_DESCRIPTION])
+ break
+ fi
+ done
+
+ TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
+ if test "x$VS_SUPPORTED" = "xfalse"; then
+ UNSUPPORTED_TOOLCHAIN_VERSION=yes
+ fi
+])
+
+AC_DEFUN([TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV],
+[
+ TARGET_CPU=$1
+
+ AC_MSG_NOTICE([Trying to extract Visual Studio environment variables for $TARGET_CPU])
+ AC_MSG_NOTICE([using $VS_ENV_CMD $VS_ENV_ARGS])
+
+ VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env-$TARGET_CPU"
+ $MKDIR -p $VS_ENV_TMP_DIR
+
+ # 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.
+
+ OLDPATH="$PATH"
+ # Make sure we only capture additions to PATH needed by VS.
+ # Clear out path, but need system dir present for vsvars cmd file to be able to run
+ export PATH=$WINENV_PREFIX/c/windows/system32
+ # The "| cat" is to stop SetEnv.Cmd to mess with system colors on some systems
+ # We can't pass -vcvars_ver=$VCVARS_VER here because cmd.exe eats all '='
+ # in bat file arguments. :-(
+ $FIXPATH $CMD /c "$TOPDIR/make/scripts/extract-vs-env.cmd" "$VS_ENV_CMD" \
+ "$VS_ENV_TMP_DIR/set-vs-env.sh" $VCVARS_VER $VS_ENV_ARGS \
+ > $VS_ENV_TMP_DIR/extract-vs-env.log | $CAT 2>&1
+ PATH="$OLDPATH"
+
+ if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
+ AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
+ AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
+ AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
+ AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
+ AC_MSG_ERROR([Cannot continue])
+ fi
+
+ # Remove windows line endings
+ $SED -i -e 's|\r||g' $VS_ENV_TMP_DIR/set-vs-env.sh
+
+ # Now set all paths and other env variables by executing the generated
+ # shell script. This will allow the rest of the configure script to find
+ # and run the compiler in the proper way.
+ AC_MSG_NOTICE([Setting extracted environment variables for $TARGET_CPU])
+ . $VS_ENV_TMP_DIR/set-vs-env.sh
+
+ # Extract only what VS_ENV_CMD added to the PATH
+ VS_PATH=${PATH_AFTER/"$PATH_BEFORE"}
+ VS_PATH=${VS_PATH//::/:}
+
+ # Remove any paths containing # (typically F#) as that messes up make. This
+ # is needed if visual studio was installed with F# support.
+ [ VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'` ]
+
+ # Sometimes case is off
+ if test -z "$WINDOWSSDKDIR"; then
+ WINDOWSSDKDIR="$WindowsSdkDir"
+ fi
+ # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+ # also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
+ # unix style.
+])
+
+################################################################################
+# Check if the VS env variables were setup prior to running configure.
+# If not, then find vcvarsall.bat and run it automatically, and integrate
+# the set env variables into the spec file.
+AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
+[
+ # Locate the vsvars bat file and save it as VS_ENV_CMD
+ TOOLCHAIN_FIND_VISUAL_STUDIO
+
+ # If we have a devkit, we don't need to run VS_ENV_CMD
+ 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 into shell variables in the configure script.
+ TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV($OPENJDK_TARGET_CPU)
+
+ # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
+ # also define VCINSTALLDIR and WINDOWSSDKDIR. All are in
+ # unix style.
+ else
+ # We did not find a vsvars bat file.
+ AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
+ fi
+ fi
+
+ # At this point, we should have correct variables in the environment
+ AC_MSG_CHECKING([that Visual Studio variables have been correctly extracted])
+
+ if test "x$VCINSTALLDIR" != x || test "x$WINDOWSSDKDIR" != x \
+ || test "x$DEVKIT_NAME" != x; then
+ if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
+ AC_MSG_RESULT([no; Visual Studio present but broken])
+ AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
+ else
+ AC_MSG_RESULT([ok])
+
+ # Turn VS_PATH into TOOLCHAIN_PATH
+ TOOLCHAIN_PATH="$TOOLCHAIN_PATH:$VS_PATH"
+
+ # Convert VS_INCLUDE and VS_LIB into sysroot flags
+ TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS
+ fi
+ else
+ AC_MSG_RESULT([not found])
+
+ if test "x$VS_ENV_CMD" = x; then
+ AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk])
+ else
+ AC_MSG_NOTICE([Running the extraction script failed])
+ fi
+ AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
+ AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
+ AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
+ AC_MSG_ERROR([Cannot continue])
+ fi
+])
+
+AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
+[
+ DLL_NAME="$1"
+ POSSIBLE_MSVC_DLL="$2"
+ METHOD="$3"
+ if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
+ AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD])
+
+ # Need to check if the found msvcr is correct architecture
+ AC_MSG_CHECKING([found $DLL_NAME architecture])
+ MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ CORRECT_MSVCR_ARCH=386
+ elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ CORRECT_MSVCR_ARCH=x86-64
+ elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
+ # The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
+ # without specifying which architecture it is for specifically. This has been fixed upstream.
+ # https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142
+ CORRECT_MSVCR_ARCH="PE32+ executable"
+ fi
+ if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
+ AC_MSG_RESULT([ok])
+ MSVC_DLL="$POSSIBLE_MSVC_DLL"
+ AC_MSG_CHECKING([for $DLL_NAME])
+ AC_MSG_RESULT([$MSVC_DLL])
+ else
+ AC_MSG_RESULT([incorrect, ignoring])
+ AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE])
+ fi
+ fi
+])
+
+AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
+[
+ DLL_NAME="$1"
+ MSVC_DLL=
+
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ vs_target_cpu=x86
+ elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ vs_target_cpu=x64
+ elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
+ vs_target_cpu=arm64
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ if test "x$VCINSTALLDIR" != x; then
+ if test "$VS_VERSION" -lt 2017; then
+ # Probe: Using well-known location from Visual Studio 12.0 and older
+ POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
+ else
+ # Probe: Using well-known location from VS 2017 and VS 2019
+ POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
+ fi
+ # In case any of the above finds more than one file, loop over them.
+ for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
+ [well-known location in VCINSTALLDIR])
+ done
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Check in the Boot JDK directory.
+ POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
+ [well-known location in Boot JDK])
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Look in the Windows system32 directory
+ WIN_SYSTEMROOT="$SYSTEMROOT"
+ UTIL_FIXUP_PATH(WIN_SYSTEMROOT, NOFAIL)
+ if test "x$WIN_SYSTEMROOT" != x; then
+ POSSIBLE_MSVC_DLL="$WIN_SYSTEMROOT/system32/$DLL_NAME"
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
+ [well-known location in SYSTEMROOT])
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: If Visual Studio Express is installed, there is usually one with the debugger
+ if test "x$VS100COMNTOOLS" != x; then
+ WIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
+ UTIL_FIXUP_PATH(WIN_VS_TOOLS_DIR, NOFAIL)
+ if test "x$WIN_VS_TOOLS_DIR" != x; then
+ POSSIBLE_MSVC_DLL=`$FIND "$WIN_VS_TOOLS_DIR" -name $DLL_NAME \
+ | $GREP -i /$vs_target_cpu/ | $HEAD --lines 1`
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
+ [search of VS100COMNTOOLS])
+ fi
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
+ # (This was the original behaviour; kept since it might turn something up)
+ if test "x$VCINSTALLDIR" != x; then
+ if test "x$OPENJDK_TARGET_CPU" = xx86; then
+ POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
+ | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
+ if test "x$POSSIBLE_MSVC_DLL" = x; then
+ # We're grasping at straws now...
+ POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
+ | $HEAD --lines 1`
+ fi
+ else
+ POSSIBLE_MSVC_DLL=`$FIND "$VCINSTALLDIR" -name $DLL_NAME \
+ | $GREP x64 | $HEAD --lines 1`
+ fi
+
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
+ [search of VCINSTALLDIR])
+ fi
+ fi
+
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_CHECKING([for $DLL_NAME])
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
+ fi
+])
+
+AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
+[
+ AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
+ [path to microsoft C runtime dll (msvcr*.dll) (Windows only) @<:@probed@:>@])])
+
+ if test "x$with_msvcr_dll" != x; then
+ # If given explicitly by user, do not probe. If not present, fail directly.
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
+ fi
+ MSVCR_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCR_DLL" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
+ fi
+ MSVCR_DLL="$MSVC_DLL"
+ else
+ TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
+ MSVCR_DLL="$MSVC_DLL"
+ fi
+ AC_SUBST(MSVCR_DLL)
+
+ AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
+ [path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
+
+ if test "x$MSVCP_NAME" != "x"; then
+ if test "x$with_msvcp_dll" != x; then
+ # If given explicitly by user, do not probe. If not present, fail directly.
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
+ fi
+ MSVCP_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_MSVCP_DLL" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
+ fi
+ MSVCP_DLL="$MSVC_DLL"
+ else
+ TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
+ MSVCP_DLL="$MSVC_DLL"
+ fi
+ AC_SUBST(MSVCP_DLL)
+ fi
+
+ AC_ARG_WITH(vcruntime-1-dll, [AS_HELP_STRING([--with-vcruntime-1-dll],
+ [path to microsoft C++ runtime dll (vcruntime*_1.dll) (Windows x64 only) @<:@probed@:>@])])
+
+ if test "x$VCRUNTIME_1_NAME" != "x" && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
+ if test "x$with_vcruntime_1_dll" != x; then
+ # If given explicitly by user, do not probe. If not present, fail directly.
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$with_vcruntime_1_dll],
+ [--with-vcruntime-1-dll])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by --with-vcruntime-1-dll])
+ fi
+ VCRUNTIME_1_DLL="$MSVC_DLL"
+ elif test "x$DEVKIT_VCRUNTIME_1_DLL" != x; then
+ TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($VCRUNTIME_1_NAME, [$DEVKIT_VCRUNTIME_1_DLL], [devkit])
+ if test "x$MSVC_DLL" = x; then
+ AC_MSG_ERROR([Could not find a proper $VCRUNTIME_1_NAME as specified by devkit])
+ fi
+ VCRUNTIME_1_DLL="$MSVC_DLL"
+ else
+ TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
+ VCRUNTIME_1_DLL="$MSVC_DLL"
+ fi
+ fi
+ AC_SUBST(VCRUNTIME_1_DLL)
+
+ AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
+ [path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])
+
+ if test "x$USE_UCRT" = "xtrue" && test "x$OPENJDK_TARGET_CPU" != xaarch64; then
+ AC_MSG_CHECKING([for UCRT DLL dir])
+ if test "x$with_ucrt_dll_dir" != x; then
+ if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not find any dlls in $with_ucrt_dll_dir])
+ else
+ AC_MSG_RESULT([$with_ucrt_dll_dir])
+ UCRT_DLL_DIR="$with_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
+ dll_subdir=$OPENJDK_TARGET_CPU
+ if test "x$dll_subdir" = "xaarch64"; then
+ dll_subdir="arm64"
+ elif test "x$dll_subdir" = "xx86_64"; then
+ dll_subdir="x64"
+ fi
+ UCRT_DLL_DIR="$WINDOWSSDKDIR/redist/ucrt/dlls/$dll_subdir"
+ if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
+ # Try with version subdir
+ UCRT_DLL_DIR="`ls -d $WINDOWSSDKDIR/redist/*/ucrt/dlls/$dll_subdir \
+ 2> /dev/null | $SORT -d | $HEAD -n1`"
+ if test -z "$UCRT_DLL_DIR" \
+ || test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Could not find any dlls in $UCRT_DLL_DIR])
+ else
+ AC_MSG_RESULT($UCRT_DLL_DIR)
+ fi
+ else
+ AC_MSG_RESULT($UCRT_DLL_DIR)
+ fi
+ fi
+ else
+ UCRT_DLL_DIR=
+ fi
+ AC_SUBST(UCRT_DLL_DIR)
+])
+
+# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
+# that configure can use them while detecting compilers.
+# TOOLCHAIN_TYPE is available here.
+# Param 1 - Optional prefix to SYSROOT variables. (e.g BUILD_)
+# Param 2 - Optional prefix to VS variables. (e.g BUILD_)
+AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS],
+[
+ # Convert $1VS_INCLUDE into $1SYSROOT_CFLAGS
+ OLDIFS="$IFS"
+ IFS=":"
+
+ # Convert VS_INCLUDE into SYSROOT_CFLAGS
+ for ipath in [$]$2VS_INCLUDE; do
+ $1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath"
+ done
+
+ # Convert VS_LIB into SYSROOT_LDFLAGS
+ for libpath in [$]$2VS_LIB; do
+ $1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath"
+ done
+
+ IFS="$OLDIFS"
+
+ AC_SUBST($1SYSROOT_CFLAGS)
+ AC_SUBST($1SYSROOT_LDFLAGS)
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/toolchain_windows.m4 openjdk-11-11.0.18+10/make/autoconf/toolchain_windows.m4
--- openjdk-11-11.0.16+8/make/autoconf/toolchain_windows.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/toolchain_windows.m4 1970-01-01 00:00:00.000000000 +0000
@@ -1,792 +0,0 @@
-#
-# Copyright (c) 2011, 2019, 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.
-#
-
-################################################################################
-# The order of these defines the priority by which we try to find them.
-VALID_VS_VERSIONS="2017 2019 2013 2015 2012 2010"
-
-VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
-VS_VERSION_INTERNAL_2010=100
-VS_MSVCR_2010=msvcr100.dll
-# We don't use msvcp on Visual Studio 2010
-#VS_MSVCP_2010=msvcp100.dll
-VS_ENVVAR_2010="VS100COMNTOOLS"
-VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
-VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
-VS_VS_PLATFORM_NAME_2010="v100"
-VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
-VS_SUPPORTED_2010=false
-
-VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
-VS_VERSION_INTERNAL_2012=110
-VS_MSVCR_2012=msvcr110.dll
-VS_MSVCP_2012=msvcp110.dll
-VS_ENVVAR_2012="VS110COMNTOOLS"
-VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
-VS_SDK_INSTALLDIR_2012=
-VS_VS_PLATFORM_NAME_2012="v110"
-VS_SDK_PLATFORM_NAME_2012=
-VS_SUPPORTED_2012=false
-
-VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
-VS_VERSION_INTERNAL_2013=120
-VS_MSVCR_2013=msvcr120.dll
-VS_MSVCP_2013=msvcp120.dll
-VS_ENVVAR_2013="VS120COMNTOOLS"
-VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
-VS_SDK_INSTALLDIR_2013=
-VS_VS_PLATFORM_NAME_2013="v120"
-VS_SDK_PLATFORM_NAME_2013=
-VS_SUPPORTED_2013=false
-
-VS_DESCRIPTION_2015="Microsoft Visual Studio 2015"
-VS_VERSION_INTERNAL_2015=140
-VS_MSVCR_2015=vcruntime140.dll
-VS_MSVCP_2015=msvcp140.dll
-VS_ENVVAR_2015="VS140COMNTOOLS"
-VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
-VS_SDK_INSTALLDIR_2015=
-VS_VS_PLATFORM_NAME_2015="v140"
-VS_SDK_PLATFORM_NAME_2015=
-# The vcvars of 2015 breaks if 2017 is also installed. Work around this by
-# explicitly specifying Windows Kit 8.1 to be used.
-VS_ENV_ARGS_2015="8.1"
-VS_SUPPORTED_2015=false
-
-VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
-VS_VERSION_INTERNAL_2017=141
-VS_MSVCR_2017=vcruntime140.dll
-VS_MSVCP_2017=msvcp140.dll
-VS_ENVVAR_2017="VS150COMNTOOLS"
-VS_USE_UCRT_2017="true"
-VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
-VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
-VS_SDK_INSTALLDIR_2017=
-VS_VS_PLATFORM_NAME_2017="v141"
-VS_SDK_PLATFORM_NAME_2017=
-VS_SUPPORTED_2017=true
-VS_TOOLSET_SUPPORTED_2017=true
-
-VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
-VS_VERSION_INTERNAL_2019=141
-VS_MSVCR_2019=vcruntime140.dll
-VS_MSVCP_2019=msvcp140.dll
-VS_ENVVAR_2019="VS160COMNTOOLS"
-VS_USE_UCRT_2019="true"
-VS_VS_INSTALLDIR_2019="Microsoft Visual Studio/2019"
-VS_EDITIONS_2019="BuildTools Community Professional Enterprise"
-VS_SDK_INSTALLDIR_2019=
-VS_VS_PLATFORM_NAME_2019="v142"
-VS_SDK_PLATFORM_NAME_2019=
-VS_SUPPORTED_2019=false
-VS_TOOLSET_SUPPORTED_2019=false
-
-################################################################################
-
-AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
-[
- if test "x$VS_ENV_CMD" = x; then
- VS_VERSION="$1"
- VS_BASE="$2"
- METHOD="$3"
-
- BASIC_WINDOWS_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
- for edition in $VS_EDITIONS; do
- if test -d "$VS_BASE/$edition"; then
- VS_BASE="$VS_BASE/$edition"
- break
- fi
- done
- fi
-
- if test -d "$VS_BASE"; then
- AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
- elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
- vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
- elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- # for host x86-64, target aarch64
- VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
- vc/auxiliary/build/vcvarsx86_arm64.bat"
- fi
-
- for VCVARSFILE in $VCVARSFILES; do
- if test -f "$VS_BASE/$VCVARSFILE"; then
- VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
- break
- fi
- done
-
- if test "x$VS_ENV_CMD" = x; then
- AC_MSG_NOTICE([Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring])
- else
- # PLATFORM_TOOLSET is used during the compilation of the freetype sources
- # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
- # 'v110' or 'v120' for VS 2010, 2012 or VS2013
- eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
- fi
- fi
- fi
-])
-
-################################################################################
-
-AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
-[
- if test "x$VS_ENV_CMD" = x; then
- VS_VERSION="$1"
- WIN_SDK_BASE="$2"
- METHOD="$3"
- BASIC_WINDOWS_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.
- if test ! -d "$WIN_SDK_BASE/lib"; then
- AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
- AC_MSG_NOTICE([Warning: Installation is broken, lib dir is missing. Ignoring])
- elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
- AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
- VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- VS_ENV_ARGS="/x86"
- elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- VS_ENV_ARGS="/x64"
- elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- VS_ENV_ARGS="/arm64"
- fi
- # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
- # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
- # TODO: improve detection for other versions of SDK
- eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
- else
- AC_MSG_NOTICE([Found Windows SDK installation at $WIN_SDK_BASE using $METHOD])
- AC_MSG_NOTICE([Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring])
- fi
- fi
- fi
-])
-
-################################################################################
-# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
-# build environment and assigns it to VS_ENV_CMD
-AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
-[
- # VS2017 provides the option to install previous minor versions of the MSVC
- # toolsets. It is not possible to directly download earlier minor versions of
- # VS2017 and in order to build with a previous minor compiler toolset version,
- # it is now possible to compile with earlier minor versions by passing
- # -vcvars_ver= argument to vcvarsall.bat.
- AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
- [specific MSVC toolset version to use, passed as -vcvars_ver argument to
- pass to vcvarsall.bat (Windows only)])])
-
- VS_VERSION="$1"
- eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
- eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
- eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
- eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
- eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
- eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
- eval VS_TOOLSET_SUPPORTED="\${VS_TOOLSET_SUPPORTED_${VS_VERSION}}"
-
- VS_ENV_CMD=""
-
- # When using --with-tools-dir, assume it points to the correct and default
- # version of Visual Studio or that --with-toolchain-version was also set.
- if test "x$with_tools_dir" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [$with_tools_dir/../..], [--with-tools-dir])
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [$with_tools_dir/../../..], [--with-tools-dir])
- if test "x$VS_ENV_CMD" = x; then
- # Having specified an argument which is incorrect will produce an instant failure;
- # we should not go on looking
- AC_MSG_NOTICE([The path given by --with-tools-dir does not contain a valid])
- AC_MSG_NOTICE([Visual Studio installation. Please point to the VC/bin or VC/bin/amd64])
- AC_MSG_NOTICE([directory within the Visual Studio installation])
- AC_MSG_ERROR([Cannot locate a valid Visual Studio installation])
- fi
- fi
-
- if test "x$VS_COMNTOOLS" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [$VS_COMNTOOLS/../..], [$VS_COMNTOOLS_VAR variable])
- fi
- if test "x$PROGRAMFILES" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [$PROGRAMFILES/$VS_INSTALL_DIR], [well-known name])
- fi
- # Work around the insanely named ProgramFiles(x86) env variable
- PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
- if test "x$PROGRAMFILES_X86" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [$PROGRAMFILES_X86/$VS_INSTALL_DIR], [well-known name])
- fi
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [C:/Program Files/$VS_INSTALL_DIR], [well-known name])
- TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],
- [C:/Program Files (x86)/$VS_INSTALL_DIR], [well-known name])
-
- if test "x$SDK_INSTALL_DIR" != x; then
- if test "x$ProgramW6432" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
- [$ProgramW6432/$SDK_INSTALL_DIR], [well-known name])
- fi
- if test "x$PROGRAMW6432" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
- [$PROGRAMW6432/$SDK_INSTALL_DIR], [well-known name])
- fi
- if test "x$PROGRAMFILES" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
- [$PROGRAMFILES/$SDK_INSTALL_DIR], [well-known name])
- fi
- TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
- [C:/Program Files/$SDK_INSTALL_DIR], [well-known name])
- TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],
- [C:/Program Files (x86)/$SDK_INSTALL_DIR], [well-known name])
- fi
-
- if test "x$VS_TOOLSET_SUPPORTED" != x; then
- if test "x$with_msvc_toolset_version" != x; then
- VS_ENV_ARGS="$VS_ENV_ARGS -vcvars_ver=$with_msvc_toolset_version"
- fi
- fi
-])
-
-################################################################################
-
-AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
-[
- AC_ARG_WITH(toolchain-version, [AS_HELP_STRING([--with-toolchain-version],
- [the version of the toolchain to look for, use '--help' to show possible values @<:@platform dependent@:>@])])
-
- if test "x$with_toolchain_version" = xlist; then
- # List all toolchains
- AC_MSG_NOTICE([The following toolchain versions are valid on this platform:])
- for version in $VALID_VS_VERSIONS; do
- eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
- $PRINTF " %-10s %s\n" $version "$VS_DESCRIPTION"
- done
-
- exit 0
- elif test "x$DEVKIT_VS_VERSION" != x; then
- VS_VERSION=$DEVKIT_VS_VERSION
- TOOLCHAIN_VERSION=$VS_VERSION
- # If the devkit has a name, use that as description
- VS_DESCRIPTION="$DEVKIT_NAME"
- if test "x$VS_DESCRIPTION" = x; then
- eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
- fi
- eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
- eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
- eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
- eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
- eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
- eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
- VS_PATH="$TOOLCHAIN_PATH:$PATH"
-
- # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
- # can still be exported as INCLUDE for compiler invocations without
- # SYSROOT_CFLAGS
- OLDIFS="$IFS"
- IFS=";"
- for i in $DEVKIT_VS_INCLUDE; do
- ipath=$i
- BASIC_WINDOWS_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])
- VS_LIB="$VS_LIB;$libpath"
- done
- IFS="$OLDIFS"
-
- AC_MSG_NOTICE([Found devkit $VS_DESCRIPTION])
-
- elif test "x$with_toolchain_version" != x; then
- # User override; check that it is valid
- if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
- AC_MSG_NOTICE([Visual Studio version $with_toolchain_version is not valid.])
- AC_MSG_NOTICE([Valid Visual Studio versions: $VALID_VS_VERSIONS.])
- AC_MSG_ERROR([Cannot continue.])
- fi
- VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
- else
- # No flag given, use default
- VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
- fi
-
- for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
- TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE([$VS_VERSION])
- if test "x$VS_ENV_CMD" != x; then
- TOOLCHAIN_VERSION=$VS_VERSION
- eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
- eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
- eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
- eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
- eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
- eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
- # The rest of the variables are already evaled while probing
- AC_MSG_NOTICE([Found $VS_DESCRIPTION])
- break
- fi
- done
-
- TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
- if test "x$VS_SUPPORTED" = "xfalse"; then
- UNSUPPORTED_TOOLCHAIN_VERSION=yes
- fi
-])
-
-################################################################################
-# Check if the VS env variables were setup prior to running configure.
-# If not, then find vcvarsall.bat and run it automatically, and integrate
-# the set env variables into the spec file.
-AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV],
-[
- # Store path to cygwin link.exe to help excluding it when searching for
- # VS linker. This must be done before changing the PATH when looking for VS.
- AC_PATH_PROG(CYGWIN_LINK, link)
- if test "x$CYGWIN_LINK" != x; then
- AC_MSG_CHECKING([if the first found link.exe is actually the Cygwin link tool])
- "$CYGWIN_LINK" --version > /dev/null
- if test $? -eq 0 ; then
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- # This might be the VS linker. Don't exclude it later on.
- CYGWIN_LINK=""
- fi
- fi
-
- # First-hand choice is to locate and run the vsvars bat file.
- TOOLCHAIN_FIND_VISUAL_STUDIO
-
- # If we have a devkit, skip all of the below.
- 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)
-
- # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
- AC_MSG_NOTICE([Trying to extract Visual Studio environment variables])
-
- # We need to create a couple of temporary files.
- VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
- $MKDIR -p $VS_ENV_TMP_DIR
-
- # 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])
- WINPATH_BASH="$BASH"
- BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])
-
- # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
- # script (executable by bash) that will setup the important variables.
- EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
- $ECHO "@echo off" > $EXTRACT_VC_ENV_BAT_FILE
- # This will end up something like:
- # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
- $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
- # In some cases, the VS_ENV_CMD will change directory, change back so
- # the set-vs-env.sh ends up in the right place.
- $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
- # These will end up something like:
- # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
- # The trailing space for everyone except PATH is no typo, but is needed due
- # to trailing \ in the Windows paths. These will be stripped later.
- $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo VCToolsRedistDir="'\"$VCToolsRedistDir \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
- $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
- >> $EXTRACT_VC_ENV_BAT_FILE
-
- # Now execute the newly created bat file.
- # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
- # Change directory so we don't need to mess with Windows paths in redirects.
- cd $VS_ENV_TMP_DIR
- cmd /c extract-vs-env.bat | $CAT
- cd $CURDIR
-
- if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
- AC_MSG_NOTICE([Could not succesfully extract the envionment variables needed for the VS setup.])
- AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
- AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
- AC_MSG_ERROR([Cannot continue])
- fi
-
- # Now set all paths and other env variables. This will allow the rest of
- # the configure script to find and run the compiler in the proper way.
- AC_MSG_NOTICE([Setting extracted environment variables])
- . $VS_ENV_TMP_DIR/set-vs-env.sh
- # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
- # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
- else
- # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
- AC_MSG_NOTICE([Cannot locate a valid Visual Studio installation, checking current environment])
- fi
- fi
-
- # At this point, we should have correct variables in the environment, or we can't continue.
- AC_MSG_CHECKING([for Visual Studio variables])
-
- if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
- || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
- if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
- AC_MSG_RESULT([present but broken])
- AC_MSG_ERROR([Your VC command prompt seems broken, INCLUDE and/or LIB is missing.])
- else
- AC_MSG_RESULT([ok])
- # Remove any trailing "\" ";" and " " from the variables.
- VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
- VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
- VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
- VCToolsRedistDir=`$ECHO "$VCToolsRedistDir" | $SED 's/\\\\* *$//'`
- WindowsSdkDir=`$ECHO "$WindowsSdkDir" | $SED 's/\\\\* *$//'`
- WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
- if test -z "$WINDOWSSDKDIR"; then
- WINDOWSSDKDIR="$WindowsSdkDir"
- fi
- # Remove any paths containing # (typically F#) as that messes up make. This
- # is needed if visual studio was installed with F# support.
- VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[[^:#]]*#[^:]*://g'`
-
- AC_SUBST(VS_PATH)
- AC_SUBST(VS_INCLUDE)
- AC_SUBST(VS_LIB)
-
- TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS
- fi
- else
- AC_MSG_RESULT([not found])
-
- if test "x$VS_ENV_CMD" = x; then
- AC_MSG_NOTICE([Cannot locate a valid Visual Studio or Windows SDK installation on disk,])
- AC_MSG_NOTICE([nor is this script run from a Visual Studio command prompt.])
- else
- AC_MSG_NOTICE([Running the extraction script failed.])
- fi
- AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation])
- AC_MSG_NOTICE([or run "bash.exe -l" from a VS command prompt and then run configure from there.])
- AC_MSG_ERROR([Cannot continue])
- fi
-])
-
-AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
-[
- DLL_NAME="$1"
- POSSIBLE_MSVC_DLL="$2"
- METHOD="$3"
- if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
- AC_MSG_NOTICE([Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD])
-
- # Need to check if the found msvcr is correct architecture
- AC_MSG_CHECKING([found $DLL_NAME architecture])
- MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
- if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
- # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
- # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
- if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
- CORRECT_MSVCR_ARCH="PE32 executable"
- else
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- else
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- CORRECT_MSVCR_ARCH=386
- elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- CORRECT_MSVCR_ARCH=x86-64
- elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- # The cygwin 'file' command only returns "PE32+ executable (DLL) (console), for MS Windows",
- # without specifying which architecture it is for specifically. This has been fixed upstream.
- # https://github.com/file/file/commit/b849b1af098ddd530094bf779b58431395db2e10#diff-ff2eced09e6860de75057dd731d092aeR142
- CORRECT_MSVCR_ARCH="PE32+ executable"
- fi
- fi
- if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
- AC_MSG_RESULT([ok])
- MSVC_DLL="$POSSIBLE_MSVC_DLL"
- AC_MSG_CHECKING([for $DLL_NAME])
- AC_MSG_RESULT([$MSVC_DLL])
- else
- AC_MSG_RESULT([incorrect, ignoring])
- AC_MSG_NOTICE([The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE])
- fi
- fi
-])
-
-AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
-[
- DLL_NAME="$1"
- MSVC_DLL=
-
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- vs_target_cpu=x86
- elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
- vs_target_cpu=x64
- elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
- vs_target_cpu=arm64
- fi
-
- 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)
- if test "$VS_VERSION" -lt 2017; then
- # Probe: Using well-known location from Visual Studio 12.0 and older
- POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
- else
- CYGWIN_VC_TOOLS_REDIST_DIR="$VCToolsRedistDir"
- BASIC_FIXUP_PATH(CYGWIN_VC_TOOLS_REDIST_DIR)
- # Probe: Using well-known location from VS 2017 and VS 2019
- POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_TOOLS_REDIST_DIR/$vs_target_cpu/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
- fi
- # In case any of the above finds more than one file, loop over them.
- for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
- $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
- [well-known location in VCINSTALLDIR])
- done
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Check in the Boot JDK directory.
- POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
- [well-known location in Boot JDK])
- fi
-
- 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)
- POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
- [well-known location in SYSTEMROOT])
- fi
-
- if test "x$MSVC_DLL" = x; then
- # 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)
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
- | $GREP -i /$vs_target_cpu/ | $HEAD --lines 1`
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
- [search of VS100COMNTOOLS])
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
- # (This was the original behaviour; kept since it might turn something up)
- if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
- if test "x$OPENJDK_TARGET_CPU" = xx86; then
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $GREP -v arm64 | $HEAD --lines 1`
- if test "x$POSSIBLE_MSVC_DLL" = x; then
- # We're grasping at straws now...
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $HEAD --lines 1`
- fi
- else
- POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
- | $GREP $vs_target_cpu | $HEAD --lines 1`
- fi
-
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$POSSIBLE_MSVC_DLL],
- [search of VCINSTALLDIR])
- fi
- fi
-
- if test "x$MSVC_DLL" = x; then
- AC_MSG_CHECKING([for $DLL_NAME])
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
- fi
-])
-
-AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
-[
- AC_ARG_WITH(msvcr-dll, [AS_HELP_STRING([--with-msvcr-dll],
- [path to microsoft C runtime dll (msvcr*.dll) (Windows only) @<:@probed@:>@])])
-
- if test "x$with_msvcr_dll" != x; then
- # If given explicitly by user, do not probe. If not present, fail directly.
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$with_msvcr_dll], [--with-msvcr-dll])
- if test "x$MSVC_DLL" = x; then
- AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll])
- fi
- MSVCR_DLL="$MSVC_DLL"
- elif test "x$DEVKIT_MSVCR_DLL" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCR_NAME, [$DEVKIT_MSVCR_DLL], [devkit])
- if test "x$MSVC_DLL" = x; then
- AC_MSG_ERROR([Could not find a proper $MSVCR_NAME as specified by devkit])
- fi
- MSVCR_DLL="$MSVC_DLL"
- else
- TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
- MSVCR_DLL="$MSVC_DLL"
- fi
- AC_SUBST(MSVCR_DLL)
-
- AC_ARG_WITH(msvcp-dll, [AS_HELP_STRING([--with-msvcp-dll],
- [path to microsoft C++ runtime dll (msvcp*.dll) (Windows only) @<:@probed@:>@])])
-
- if test "x$MSVCP_NAME" != "x"; then
- if test "x$with_msvcp_dll" != x; then
- # If given explicitly by user, do not probe. If not present, fail directly.
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$with_msvcp_dll], [--with-msvcp-dll])
- if test "x$MSVC_DLL" = x; then
- AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll])
- fi
- MSVCP_DLL="$MSVC_DLL"
- elif test "x$DEVKIT_MSVCP_DLL" != x; then
- TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL($MSVCP_NAME, [$DEVKIT_MSVCP_DLL], [devkit])
- if test "x$MSVC_DLL" = x; then
- AC_MSG_ERROR([Could not find a proper $MSVCP_NAME as specified by devkit])
- fi
- MSVCP_DLL="$MSVC_DLL"
- else
- TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
- MSVCP_DLL="$MSVC_DLL"
- fi
- AC_SUBST(MSVCP_DLL)
- fi
-
- AC_ARG_WITH(ucrt-dll-dir, [AS_HELP_STRING([--with-ucrt-dll-dir],
- [path to Microsoft Windows Kit UCRT DLL dir (Windows only) @<:@probed@:>@])])
-
- if test "x$USE_UCRT" = "xtrue"; then
- AC_MSG_CHECKING([for UCRT DLL dir])
- if test "x$with_ucrt_dll_dir" != x; then
- if test -z "$(ls -d "$with_ucrt_dll_dir/"*.dll 2> /dev/null)"; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find any dlls in $with_ucrt_dll_dir])
- else
- AC_MSG_RESULT([$with_ucrt_dll_dir])
- UCRT_DLL_DIR="$with_ucrt_dll_dir"
- BASIC_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])
- dll_subdir=$OPENJDK_TARGET_CPU
- if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
- dll_subdir="arm64"
- elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
- dll_subdir="x64"
- elif test "x$OPENJDK_TARGET_CPU" = "xx86"; then
- dll_subdir="x86"
- fi
- UCRT_DLL_DIR="$CYGWIN_WINDOWSSDKDIR/Redist/ucrt/DLLs/$dll_subdir"
- if test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
- # Try with version subdir
- UCRT_DLL_DIR="`ls -d $CYGWIN_WINDOWSSDKDIR/Redist/*/ucrt/DLLs/$dll_subdir \
- 2> /dev/null | $SORT -d | $HEAD -n1`"
- if test -z "$UCRT_DLL_DIR" \
- || test -z "$(ls -d "$UCRT_DLL_DIR/"*.dll 2> /dev/null)"; then
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([Could not find any dlls in $UCRT_DLL_DIR])
- else
- AC_MSG_RESULT($UCRT_DLL_DIR)
- fi
- else
- AC_MSG_RESULT($UCRT_DLL_DIR)
- fi
- fi
- else
- UCRT_DLL_DIR=
- fi
- AC_SUBST(UCRT_DLL_DIR)
-])
-
-# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
-# that configure can use them while detecting compilers.
-# TOOLCHAIN_TYPE is available here.
-# Param 1 - Optional prefix to all variables. (e.g BUILD_)
-AC_DEFUN([TOOLCHAIN_SETUP_VISUAL_STUDIO_SYSROOT_FLAGS],
-[
- # Convert $1VS_INCLUDE into $1SYSROOT_CFLAGS
- OLDIFS="$IFS"
- IFS=";"
- for i in [$]$1VS_INCLUDE; do
- ipath=$i
- # Only process non-empty elements
- if test "x$ipath" != x; then
- IFS="$OLDIFS"
- # Check that directory exists before calling fixup_path
- testpath=$ipath
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
- if test -d "$testpath"; then
- BASIC_FIXUP_PATH([ipath])
- $1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS -I$ipath"
- fi
- IFS=";"
- fi
- done
- # Convert $1VS_LIB into $1SYSROOT_LDFLAGS
- for i in [$]$1VS_LIB; do
- libpath=$i
- # Only process non-empty elements
- if test "x$libpath" != x; then
- IFS="$OLDIFS"
- # Check that directory exists before calling fixup_path
- testpath=$libpath
- BASIC_WINDOWS_REWRITE_AS_UNIX_PATH([testpath])
- if test -d "$testpath"; then
- BASIC_FIXUP_PATH([libpath])
- $1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS -libpath:$libpath"
- fi
- IFS=";"
- fi
- done
- IFS="$OLDIFS"
-
- AC_SUBST($1SYSROOT_CFLAGS)
- AC_SUBST($1SYSROOT_LDFLAGS)
-])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/util.m4 openjdk-11-11.0.18+10/make/autoconf/util.m4
--- openjdk-11-11.0.16+8/make/autoconf/util.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/util.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,228 @@
+#
+# 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])
+
+###############################################################################
+# 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)
+ ])
+])
+
+###############################################################################
+# 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"
+ translit(patsubst($2, --), -, _)="$[enable_]translit($1, -, _)"
+ ])
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/util_paths.m4 openjdk-11-11.0.18+10/make/autoconf/util_paths.m4
--- openjdk-11-11.0.16+8/make/autoconf/util_paths.m4 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/util_paths.m4 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,540 @@
+#
+# 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 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
+# $2: if NOFAIL, errors will be silently ignored
+AC_DEFUN([UTIL_FIXUP_PATH],
+[
+ # Only process if variable expands to non-empty
+ path="[$]$1"
+ if test "x$path" != x; then
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$2" = "xNOFAIL"; then
+ quiet_option="-q"
+ fi
+ imported_path=`$FIXPATH_BASE $quiet_option import "$path"`
+ $FIXPATH_BASE verify "$imported_path"
+ if test $? -ne 0; then
+ if test "x$2" != "xNOFAIL"; then
+ AC_MSG_ERROR([The path of $1, which resolves as "$path", could not be imported.])
+ else
+ imported_path=""
+ fi
+ fi
+ if test "x$imported_path" != "x$path"; then
+ $1="$imported_path"
+ fi
+ else
+ [ if [[ "$path" =~ " " ]]; then ]
+ if test "x$2" != "xNOFAIL"; then
+ AC_MSG_NOTICE([The path of $1, which resolves as "$path", is invalid.])
+ AC_MSG_ERROR([Spaces are not allowed in this path.])
+ else
+ path=""
+ fi
+ fi
+
+ # Use eval to expand a potential ~.
+ eval new_path="$path"
+ if test ! -e "$new_path"; then
+ if test "x$2" != "xNOFAIL"; then
+ AC_MSG_ERROR([The path of $1, which resolves as "$new_path", is not found.])
+ else
+ new_path=""
+ fi
+ fi
+
+ # Make the path absolute
+ if test "x$new_path" != x; then
+ if test -d "$new_path"; then
+ path="`cd "$new_path"; pwd -L`"
+ else
+ dir="`$DIRNAME "$new_path"`"
+ base="`$BASENAME "$new_path"`"
+ path="`cd "$dir"; pwd -L`/$base"
+ fi
+ else
+ path=""
+ fi
+
+ $1="$path"
+ fi
+ fi
+])
+
+###############################################################################
+# Check if the given file is a unix-style or windows-style executable, that is,
+# if it expects paths in unix-style or windows-style.
+# Returns "windows" or "unix" in $RESULT.
+AC_DEFUN([UTIL_CHECK_WINENV_EXEC_TYPE],
+[
+ # For cygwin and msys2, if it's linked with the correct helper lib, it
+ # accept unix paths
+ if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin" || \
+ test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys2"; then
+ linked_libs=`$LDD $1 2>&1`
+ if test $? -ne 0; then
+ # Non-binary files (e.g. shell scripts) are unix files
+ RESULT=unix
+ else
+ [ if [[ "$linked_libs" =~ $WINENV_MARKER_DLL ]]; then ]
+ RESULT=unix
+ else
+ RESULT=windows
+ fi
+ fi
+ elif test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # On WSL, we can check if it is a PE file
+ file_type=`$FILE -b $1 2>&1`
+ [ if [[ $file_type =~ PE.*Windows ]]; then ]
+ RESULT=windows
+ else
+ RESULT=unix
+ fi
+ else
+ RESULT=unix
+ 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
+# $2: Where to look for the command (replaces $PATH)
+# $3: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
+AC_DEFUN([UTIL_FIXUP_EXECUTABLE],
+[
+ input="[$]$1"
+
+ # Only process if variable expands to non-empty
+ if test "x$input" != x; then
+ # First separate the path from the arguments. This will split at the first
+ # space.
+ [ if [[ "$OPENJDK_BUILD_OS" = "windows" && input =~ ^$FIXPATH ]]; then
+ line="${input#$FIXPATH }"
+ fixpath_prefix="$FIXPATH "
+ else
+ line="$input"
+ fixpath_prefix=""
+ fi ]
+ path="${line%% *}"
+ arguments="${line#"$path"}"
+
+ [ if ! [[ "$path" =~ /|\\ ]]; then ]
+ # This is a command without path (e.g. "gcc" or "echo")
+ command_type=`type -t "$path"`
+ if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
+ # Shell builtin or keyword; we're done here
+ new_path="$path"
+ else
+ # Search in $PATH using bash built-in 'type -p'.
+ saved_path="$PATH"
+ if test "x$2" != x; then
+ PATH="$2"
+ fi
+ new_path=`type -p "$path"`
+ if test "x$new_path" = x && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # Try again with .exe
+ new_path="`type -p "$path.exe"`"
+ fi
+ PATH="$saved_path"
+
+ if test "x$new_path" = x; then
+ AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found in the PATH.])
+ AC_MSG_ERROR([Cannot locate $path])
+ fi
+ fi
+ else
+ # This is a path with slashes, don't look at $PATH
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # fixpath.sh import will do all heavy lifting for us
+ new_path=`$FIXPATH_BASE import "$path"`
+
+ if test ! -e $new_path; then
+ # It failed, but maybe spaces were part of the path and not separating
+ # the command and argument. Retry using that assumption.
+ new_path=`$FIXPATH_BASE import "$input"`
+ if test ! -e $new_path; then
+ AC_MSG_NOTICE([The command for $1, which resolves as "$input", can not be found.])
+ AC_MSG_ERROR([Cannot locate $input])
+ fi
+ # It worked, clear all "arguments"
+ arguments=""
+ fi
+ else # on unix
+ # Make absolute
+ $1="$path"
+ UTIL_FIXUP_PATH($1, NOFAIL)
+ new_path="[$]$1"
+
+ if test ! -e $new_path; then
+ AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not found])
+ [ if [[ "$path" =~ " " ]]; then ]
+ AC_MSG_NOTICE([This might be caused by spaces in the path, which is not allowed.])
+ fi
+ AC_MSG_ERROR([Cannot locate $path])
+ fi
+ if test ! -x $new_path; then
+ AC_MSG_NOTICE([The command for $1, which resolves as "$input", is not executable.])
+ AC_MSG_ERROR([Cannot execute command at $path])
+ fi
+ fi # end on unix
+ fi # end with or without slashes
+
+ # Now we have a usable command as new_path, with arguments in arguments
+ if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ if test "x$fixpath_prefix" = x; then
+ # Only mess around if fixpath_prefix was not given
+ UTIL_CHECK_WINENV_EXEC_TYPE("$new_path")
+ if test "x$RESULT" = xwindows; then
+ fixpath_prefix="$FIXPATH "
+ # make sure we have an .exe suffix (but not two)
+ new_path="${new_path%.exe}.exe"
+ else
+ # If we have gotten a .exe suffix, remove it
+ new_path="${new_path%.exe}"
+ fi
+ fi
+ fi
+
+ if test "x$3" = xNOFIXPATH; then
+ fixpath_prefix=""
+ fi
+
+ # Now join together the path and the arguments once again
+ new_complete="$fixpath_prefix$new_path$arguments"
+ $1="$new_complete"
+ 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
+
+ # 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 by user]]])
+ 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_PROGS($1, $tool_basename ${tool_basename}.exe)
+ tool_command="[$]$1"
+ if test "x$tool_command" = x; then
+ AC_MSG_ERROR([User supplied tool $1="$tool_basename" could not be found in PATH])
+ fi
+ else
+ # Otherwise we believe it is a complete path. Use it as it is.
+ if test ! -x "$tool_command" && test ! -x "${tool_command}.exe"; then
+ AC_MSG_ERROR([User supplied tool $1="$tool_command" does not exist or is not executable])
+ fi
+ if test ! -x "$tool_command"; then
+ tool_command="${tool_command}.exe"
+ fi
+ $1="$tool_command"
+ 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
+ AC_MSG_CHECKING([for $1])
+ AC_MSG_RESULT([[$]$1 [[user supplied]]])
+ fi
+ fi
+ $3
+ fi
+])
+
+###############################################################################
+# Locate a tool using proper methods.
+# $1: variable to set
+# $2: executable name (or list of names) to look for
+# $3: [path]
+# $4: set to NOFIXPATH to skip prefixing FIXPATH, even if needed on platform
+AC_DEFUN([UTIL_LOOKUP_PROGS],
+[
+ UTIL_SETUP_TOOL($1, [
+ $1=""
+
+ if test "x$3" != x; then
+ old_path="$PATH"
+ PATH="$3"
+ fi
+
+ for name in $2; do
+ AC_MSG_CHECKING(for $name)
+
+ command_type=`type -t "$name"`
+ if test "x$command_type" = xbuiltin || test "x$command_type" = xkeyword; then
+ # Shell builtin or keyword; we're done here
+ full_path="$name"
+ $1="$full_path"
+ AC_MSG_RESULT([[$full_path [builtin]]])
+ break
+ else
+ # Search in $PATH
+ old_ifs="$IFS"
+ IFS=":"
+ for elem in $PATH; do
+ IFS="$old_ifs"
+ if test "x$elem" = x; then
+ continue
+ fi
+ full_path="$elem/$name"
+ if test ! -e "$full_path" && test "x$OPENJDK_BUILD_OS" = "xwindows"; then
+ # Try again with .exe
+ full_path="$elem/$name.exe"
+ fi
+ if test -e "$full_path"; then
+ $1="$full_path"
+ UTIL_FIXUP_EXECUTABLE($1, $3, $4)
+ result="[$]$1"
+
+ # If we have FIXPATH enabled, strip all instances of it and prepend
+ # a single one, to avoid double fixpath prefixing.
+ if test "x$4" != xNOFIXPATH; then
+ [ if [[ $FIXPATH != "" && $result =~ ^"$FIXPATH " ]]; then ]
+ result="\$FIXPATH ${result#"$FIXPATH "}"
+ fi
+ fi
+ AC_MSG_RESULT([$result])
+ break 2;
+ fi
+ done
+ IFS="$old_ifs"
+ fi
+ AC_MSG_RESULT([[[not found]]])
+ done
+
+ if test "x$3" != x; then
+ PATH="$old_path"
+ fi
+ ])
+])
+
+###############################################################################
+# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
+# first for cross-compilation tools.
+# $1: variable to set
+# $2: executable name (or list of names) to look for
+# $3: [path]
+AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
+[
+ if test "x$ac_tool_prefix" = x; then
+ UTIL_LOOKUP_PROGS($1, $2, $3)
+ else
+ prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
+ UTIL_LOOKUP_PROGS($1, $prefixed_names, $3)
+ fi
+])
+
+###############################################################################
+# 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
+])
+
+###############################################################################
+# Like UTIL_LOOKUP_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_LOOKUP_PROGS($1, $2, $3)
+ UTIL_CHECK_NONEMPTY($1)
+])
+
+###############################################################################
+# Like UTIL_LOOKUP_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_TOOLCHAIN_PROGS],
+[
+ UTIL_LOOKUP_TOOLCHAIN_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)
+ # The special macro will return an absolute path, and is only used for
+ # unix tools. No further processing needed.
+])
+
+###############################################################################
+# Add FIXPATH prefix to variable. Normally this is done by UTIL_LOOKUP_PROGS
+# or UTIL_FIXUP_EXECUTABLE, but in some circumstances this has to be done
+# explicitly, such as when the command in question does not exist yet.
+#
+# $1: variable to add fixpath to
+AC_DEFUN([UTIL_ADD_FIXPATH],
+[
+ if test "x$FIXPATH" != x; then
+ $1="$FIXPATH [$]$1"
+ 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 `pwd -P`
+ sym_link_dir=`pwd -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=`pwd -P`
+ sym_link_file=`$BASENAME $ISLINK`
+ let COUNTER=COUNTER+1
+ done
+ cd $STARTDIR
+ $1=$sym_link_dir/$sym_link_file
+ fi
+ fi
+])
diff -Nru openjdk-11-11.0.16+8/make/autoconf/version-numbers openjdk-11-11.0.18+10/make/autoconf/version-numbers
--- openjdk-11-11.0.16+8/make/autoconf/version-numbers 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/autoconf/version-numbers 2023-01-10 08:32:35.000000000 +0000
@@ -28,12 +28,12 @@
DEFAULT_VERSION_FEATURE=11
DEFAULT_VERSION_INTERIM=0
-DEFAULT_VERSION_UPDATE=16
+DEFAULT_VERSION_UPDATE=18
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
-DEFAULT_VERSION_DATE=2022-07-19
+DEFAULT_VERSION_DATE=2023-01-17
DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11"
diff -Nru openjdk-11-11.0.16+8/make/common/JavaCompilation.gmk openjdk-11-11.0.18+10/make/common/JavaCompilation.gmk
--- openjdk-11-11.0.16+8/make/common/JavaCompilation.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/common/JavaCompilation.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -341,8 +341,8 @@
$1_SJAVAC:=$$(subst com.sun.tools.javac.Main,com.sun.tools.sjavac.Main,$$($1_JAVAC))
# Set the $1_REMOTE to spawn a background javac server.
- $1_REMOTE:=--server:portfile=$$($1_SJAVAC_PORTFILE),id=$1,sjavac=$$(subst \
- $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$($1_SERVER_JVM) $$($1_SJAVAC))))
+ $1_REMOTE:=--server:portfile=$$(call FixPath,$$($1_SJAVAC_PORTFILE)),id=$1,sjavac=$$(subst \
+ $$(SPACE),%20,$$(subst $$(COMMA),%2C,$$(strip $$(call FixPath, $$($1_SERVER_JVM) $$($1_SJAVAC)))))
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
diff -Nru openjdk-11-11.0.16+8/make/common/MakeBase.gmk openjdk-11-11.0.18+10/make/common/MakeBase.gmk
--- openjdk-11-11.0.16+8/make/common/MakeBase.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/common/MakeBase.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -64,6 +64,9 @@
endef
+# Make sure we have a value (could be overridden on command line by caller)
+CREATING_BUILDJDK ?= false
+
# Certain features only work in newer version of GNU Make. The build will still
# function in 3.81, but will be less performant.
ifeq (4.0, $(firstword $(sort 4.0 $(MAKE_VERSION))))
@@ -944,11 +947,13 @@
# On Windows, converts a path from cygwin/unix style (e.g. /bin/foo) into
# "mixed mode" (e.g. c:/cygwin/bin/foo). On other platforms, return the path
# unchanged.
+# This also converts a colon-separated list of paths to a semicolon-separated
+# list.
# This is normally not needed since we use the FIXPATH prefix for command lines,
# but might be needed in certain circumstances.
ifeq ($(OPENJDK_TARGET_OS), windows)
FixPath = \
- $(shell $(CYGPATH) -m $1)
+ $(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
else
FixPath = \
$1
@@ -984,22 +989,6 @@
endif
################################################################################
-# FixPathList
-#
-# On Windows, converts a cygwin/unix style path list (colon-separated) into
-# the native format (mixed mode, semicolon-separated). On other platforms,
-# return the path list unchanged.
-################################################################################
-ifeq ($(OPENJDK_TARGET_OS), windows)
- FixPathList = \
- $(subst @,$(SPACE),$(subst $(SPACE),;,$(foreach entry,$(subst :,$(SPACE),\
- $(subst $(SPACE),@,$(strip $1))),$(call FixPath, $(entry)))))
-else
- FixPathList = \
- $1
-endif
-
-################################################################################
# DependOnVariable
#
# This macro takes a variable name and puts the value in a file only if the
@@ -1104,7 +1093,7 @@
# param 1 : A space separated list of classpath entries
# The surrounding strip is needed to keep additional whitespace out
PathList = \
- "$(subst $(SPACE),$(PATH_SEP),$(strip $(subst $(DQUOTE),,$1)))"
+ "$(subst $(SPACE),:,$(strip $(subst $(DQUOTE),,$1)))"
################################################################################
# Check if a specified hotspot variant is being built, or at least one of a
diff -Nru openjdk-11-11.0.16+8/make/common/NativeCompilation.gmk openjdk-11-11.0.18+10/make/common/NativeCompilation.gmk
--- openjdk-11-11.0.16+8/make/common/NativeCompilation.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/common/NativeCompilation.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -73,11 +73,11 @@
$(call LogInfo, Creating compile commands fragment for $(notdir $3))
$(call MakeDir, $(dir $1))
$(call WriteFile,{ \
- "directory": "$(strip $2)"$(COMMA) \
- "file": "$(strip $3)"$(COMMA) \
+ "directory": "$(strip $(call FixPath, $2))"$(COMMA) \
+ "file": "$(strip $(call FixPath, $3))"$(COMMA) \
"command": "$(strip $(subst $(DQUOTE),\$(DQUOTE),$(subst \,\\,\
- $(subst $(FIXPATH),,$4))))"$(COMMA) \
- "output": "$(strip $5)" \
+ $(subst $(FIXPATH),,$(call FixPath, $4)))))"$(COMMA) \
+ "output": "$(strip $(call FixPath, $5))" \
}$(COMMA), \
$1)
endef
@@ -177,12 +177,6 @@
)
endef
-ifeq ($(OPENJDK_BUILD_OS_ENV), windows.cygwin)
- UNIX_PATH_PREFIX := /cygdrive
-else ifeq ($(OPENJDK_BUILD_OS_ENV), windows.msys)
- UNIX_PATH_PREFIX :=
-endif
-
# This pattern is used to transform the output of the microsoft CL compiler
# into a make syntax dependency file (.d)
WINDOWS_SHOWINCLUDE_SED_PATTERN := \
@@ -190,7 +184,7 @@
-e 's|Note: including file: *||' \
-e 's|\r||g' \
-e 's|\\|/|g' \
- -e 's|^\([a-zA-Z]\):|$(UNIX_PATH_PREFIX)/\1|g' \
+ -e 's|^\([a-zA-Z]\):|$(WINENV_PREFIX)/\1|g' \
-e '\|$(TOPDIR)|I !d' \
-e 's|$$$$| \\|g' \
#
@@ -558,7 +552,7 @@
ifeq ($$($1_TYPE), EXECUTABLE)
$1_PREFIX :=
ifeq ($$($1_SUFFIX), )
- $1_SUFFIX := $(EXE_SUFFIX)
+ $1_SUFFIX := $(EXECUTABLE_SUFFIX)
endif
else
$1_PREFIX := $(LIBRARY_PREFIX)
diff -Nru openjdk-11-11.0.16+8/make/common/ProcessMarkdown.gmk openjdk-11-11.0.18+10/make/common/ProcessMarkdown.gmk
--- openjdk-11-11.0.16+8/make/common/ProcessMarkdown.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/common/ProcessMarkdown.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -51,7 +51,8 @@
$$(call LogInfo, Converting $2 to html)
$$(call MakeDir, $$($1_$2_TARGET_DIR) $$(SUPPORT_OUTPUTDIR)/markdown)
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER), \
- $$(PANDOC) $$($1_OPTIONS) -f markdown -t html5 --standalone \
+ $$(PANDOC) $$($1_OPTIONS) -f $$(PANDOC_MARKDOWN_FLAG) \
+ -t html5 --standalone \
$$($1_$2_CSS_OPTION) $$($1_$2_OPTIONS) '$$<' -o '$$@')
ifneq ($$(findstring $$(LOG_LEVEL), debug trace),)
TOO_LONG_LINES=`$$(GREP) -E -e '^.{80}.+$$$$' $$<` || true ; \
diff -Nru openjdk-11-11.0.16+8/make/conf/jib-profiles.js openjdk-11-11.0.18+10/make/conf/jib-profiles.js
--- openjdk-11-11.0.16+8/make/conf/jib-profiles.js 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/conf/jib-profiles.js 2023-01-10 08:32:35.000000000 +0000
@@ -232,7 +232,7 @@
// List of the main profile names used for iteration
common.main_profile_names = [
"linux-x64", "linux-x86", "macosx-x64", "solaris-x64",
- "solaris-sparcv9", "windows-x64", "windows-x86",
+ "solaris-sparcv9", "windows-x64", "windows-x86", "windows-aarch64",
"linux-aarch64", "linux-arm32", "linux-arm64", "linux-arm-vfp-hflt",
"linux-arm-vfp-hflt-dyn"
];
@@ -449,6 +449,15 @@
configure_args: concat(common.configure_args_32bit),
},
+ "windows-aarch64": {
+ target_os: "windows",
+ target_cpu: "aarch64",
+ dependencies: ["devkit", "build_devkit"],
+ configure_args: [
+ "--openjdk-target=aarch64-unknown-cygwin",
+ ],
+ },
+
"linux-aarch64": {
target_os: "linux",
target_cpu: "aarch64",
@@ -624,6 +633,10 @@
platform: "windows-x86",
jdk_suffix: "zip",
},
+ "windows-aarch64": {
+ platform: "windows-aarch64",
+ jdk_suffix: "zip",
+ },
"linux-aarch64": {
platform: "linux-aarch64",
},
@@ -853,7 +866,7 @@
macosx_x64: "Xcode11.3.1-MacOSX10.15+1.0",
solaris_x64: "SS12u4-Solaris11u1+1.0",
solaris_sparcv9: "SS12u4-Solaris11u1+1.1",
- windows_x64: "VS2017-15.9.16+1.0",
+ windows_x64: "VS2017-15.9.16+1.1",
linux_aarch64: (input.profile != null && input.profile.indexOf("arm64") >= 0
? "gcc-linaro-aarch64-linux-gnu-4.8-2013.11_linux+1.0"
: "gcc7.3.0-Fedora27+1.1"),
@@ -869,6 +882,16 @@
var devkit_platform = (input.target_cpu == "x86"
? input.target_os + "_x64"
: input.target_platform);
+ if (input.target_platform == "windows_aarch64") {
+ devkit_platform = "windows_x64";
+ }
+ var devkit_cross_prefix = "";
+ if (!(input.target_os == "windows")) {
+ if (input.build_platform != input.target_platform
+ && input.build_platform != devkit_platform) {
+ devkit_cross_prefix = input.build_platform + "-to-";
+ }
+ }
var boot_jdk_platform = (input.build_os == "macosx" ? "osx" : input.build_os)
+ "-" + input.build_cpu;
@@ -916,10 +939,9 @@
jtreg: {
server: "jpg",
product: "jtreg",
- version: "5.1",
- build_number: "b01",
- checksum_file: "MD5_VALUES",
- file: "bundles/jtreg_bin-5.1.zip",
+ version: "6",
+ build_number: "1",
+ file: "bundles/jtreg-6+1.zip",
environment_name: "JT_HOME",
environment_path: input.get("jtreg", "install_path") + "/jtreg/bin"
},
@@ -1183,13 +1205,17 @@
"--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"),
"--without-version-opt");
} else if (input.build_type == "ci") {
- var optString = input.build_id_data.ciBuildNumber;
+ var ciBuildNumber = input.build_id_data.ciBuildNumber;
var preString = input.build_id_data.projectName;
if (preString == "jdk") {
preString = version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE");
}
args = concat(args, "--with-version-pre=" + preString,
- "--with-version-opt=" + optString);
+ "--with-version-opt=" + ciBuildNumber);
+ if (input.target_os == "macosx") {
+ args = concat(args, "--with-macosx-bundle-build-version="
+ + common.build_number + "." + ciBuildNumber);
+ }
} else {
args = concat(args, "--with-version-opt=" + common.build_id);
}
diff -Nru openjdk-11-11.0.16+8/make/conf/test-dependencies openjdk-11-11.0.18+10/make/conf/test-dependencies
--- openjdk-11-11.0.16+8/make/conf/test-dependencies 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/conf/test-dependencies 2023-01-10 08:32:35.000000000 +0000
@@ -26,8 +26,8 @@
# Versions and download locations for dependencies used by pre-submit testing.
BOOT_JDK_VERSION=11
-JTREG_VERSION=5.1
-JTREG_BUILD=b01
+JTREG_VERSION=6
+JTREG_BUILD=1
GTEST_VERSION=1.8.1
LINUX_X64_BOOT_JDK_FILENAME=openjdk-11.0.14.1_linux-x64_bin.tar.gz
diff -Nru openjdk-11-11.0.16+8/make/copy/Copy-java.base.gmk openjdk-11-11.0.18+10/make/copy/Copy-java.base.gmk
--- openjdk-11-11.0.16+8/make/copy/Copy-java.base.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/copy/Copy-java.base.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -43,8 +43,11 @@
endif
################################################################################
-# Copy the microsoft runtime libraries on windows
-ifeq ($(OPENJDK_TARGET_OS), windows)
+# Copy the microsoft runtime libraries on windows, but only if we are not
+# creating a buildjdk. If we are, the provided runtime librareis are made for
+# the target platform, not the build platform (and we should not need to bundle
+# anything with the minimalistic, locally-only buildjdk.)
+ifeq ($(OPENJDK_TARGET_OS)+$(CREATING_BUILDJDK), windows+false)
# Chmod to avoid permission issues if bundles are unpacked on unix platforms.
define copy-and-chmod
@@ -59,12 +62,17 @@
FILES := $(MSVCR_DLL), \
MACRO := copy-and-chmod))
+ $(eval $(call SetupCopyFiles,COPY_VCRUNTIME_1, \
+ DEST := $(LIB_DST_DIR), \
+ FILES := $(VCRUNTIME_1_DLL), \
+ MACRO := copy-and-chmod))
+
$(eval $(call SetupCopyFiles,COPY_MSVCP, \
DEST := $(LIB_DST_DIR), \
FILES := $(MSVCP_DLL), \
MACRO := copy-and-chmod))
- TARGETS += $(COPY_MSVCR) $(COPY_MSVCP)
+ TARGETS += $(COPY_MSVCR) $(COPY_VCRUNTIME_1) $(COPY_MSVCP)
ifneq ($(UCRT_DLL_DIR), )
$(eval $(call SetupCopyFiles, COPY_UCRT_DLLS, \
diff -Nru openjdk-11-11.0.16+8/make/data/bundle/JDK-Info.plist openjdk-11-11.0.18+10/make/data/bundle/JDK-Info.plist
--- openjdk-11-11.0.16+8/make/data/bundle/JDK-Info.plist 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/bundle/JDK-Info.plist 2023-01-10 08:32:35.000000000 +0000
@@ -17,11 +17,11 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.0
+ @@VERSION@@
CFBundleSignature
????
CFBundleVersion
- @@VERSION@@
+ @@BUILD_VERSION@@
NSMicrophoneUsageDescription
The application is requesting access to the microphone.
JavaVM
@@ -33,9 +33,9 @@
JVMMinimumFrameworkVersion
13.2.9
JVMMinimumSystemVersion
- 10.6.0
+ @@MACOSX_VERSION_MIN@@
JVMPlatformVersion
- @@PLATFORM_VERSION@@
+ @@VERSION@@
JVMVendor
@@VENDOR@@
JVMVersion
diff -Nru openjdk-11-11.0.16+8/make/data/bundle/JRE-Info.plist openjdk-11-11.0.18+10/make/data/bundle/JRE-Info.plist
--- openjdk-11-11.0.16+8/make/data/bundle/JRE-Info.plist 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/bundle/JRE-Info.plist 2023-01-10 08:32:35.000000000 +0000
@@ -17,11 +17,11 @@
CFBundlePackageType
BNDL
CFBundleShortVersionString
- 1.0
+ @@VERSION@@
CFBundleSignature
????
CFBundleVersion
- @@VERSION@@
+ @@BUILD_VERSION@@
NSMicrophoneUsageDescription
The application is requesting access to the microphone.
JavaVM
@@ -29,9 +29,9 @@
JVMMinimumFrameworkVersion
13.2.9
JVMMinimumSystemVersion
- 10.6.0
+ @@MACOSX_VERSION_MIN@@
JVMPlatformVersion
- @@PLATFORM_VERSION@@
+ @@VERSION@@
JVMVendor
@@VENDOR@@
JVMVersion
diff -Nru openjdk-11-11.0.16+8/make/data/bundle/cmdline-Info.plist openjdk-11-11.0.18+10/make/data/bundle/cmdline-Info.plist
--- openjdk-11-11.0.16+8/make/data/bundle/cmdline-Info.plist 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/bundle/cmdline-Info.plist 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,17 @@
+
+
+
+
+ CFBundleIdentifier
+ @@ID@@
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleShortVersionString
+ @@VERSION@@
+ CFBundleVersion
+ @@BUILD_VERSION@@
+ NSMicrophoneUsageDescription
+ The application is requesting access to the microphone.
+ @@EXTRA@@
+
+
diff -Nru openjdk-11-11.0.16+8/make/data/currency/CurrencyData.properties openjdk-11-11.0.18+10/make/data/currency/CurrencyData.properties
--- openjdk-11-11.0.16+8/make/data/currency/CurrencyData.properties 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/currency/CurrencyData.properties 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2000, 2022, 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
@@ -32,7 +32,7 @@
# Version of the currency code information in this class.
# It is a serial number that accompanies with each amendment.
-dataVersion=170
+dataVersion=174
# List of all valid ISO 4217 currency codes.
# To ensure compatibility, do not remove codes.
@@ -51,7 +51,7 @@
MTL470-MUR480-MVR462-MWK454-MXN484-MXV979-MYR458-MZM508-MZN943-NAD516-NGN566-\
NIO558-NLG528-NOK578-NPR524-NZD554-OMR512-PAB590-PEN604-PGK598-PHP608-\
PKR586-PLN985-PTE620-PYG600-QAR634-ROL642-RON946-RSD941-RUB643-RUR810-RWF646-SAR682-\
- SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLL694-SOS706-\
+ SBD090-SCR690-SDD736-SDG938-SEK752-SGD702-SHP654-SIT705-SKK703-SLE925-SLL694-SOS706-\
SRD968-SRG740-SSP728-STD678-STN930-SVC222-SYP760-SZL748-THB764-TJS972-TMM795-TMT934-TND788-TOP776-\
TPE626-TRL792-TRY949-TTD780-TWD901-TZS834-UAH980-UGX800-USD840-USN997-USS998-UYI940-\
UYU858-UZS860-VEB862-VED926-VEF937-VES928-VND704-VUV548-WST882-XAF950-XAG961-XAU959-XBA955-\
@@ -189,7 +189,7 @@
# COTE D'IVOIRE
CI=XOF
# CROATIA
-HR=HRK
+HR=HRK;2022-12-31-23-00-00;EUR
# CUBA
CU=CUP
# Cura\u00e7ao
@@ -317,6 +317,8 @@
KP=KPW
# KOREA (THE REPUBLIC OF)
KR=KRW
+# KOSOVO - Not in ISO 3166/4217
+XK=EUR
# KUWAIT
KW=KWD
# KYRGYZSTAN
@@ -482,7 +484,7 @@
# SEYCHELLES
SC=SCR
# SIERRA LEONE
-SL=SLL
+SL=SLE
# SINGAPORE
SG=SGD
# SLOVAKIA
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/VERSION openjdk-11-11.0.18+10/make/data/tzdata/VERSION
--- openjdk-11-11.0.16+8/make/data/tzdata/VERSION 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/VERSION 2023-01-10 08:32:35.000000000 +0000
@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any
# questions.
#
-tzdata2022a
+tzdata2022g
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/africa openjdk-11-11.0.18+10/make/data/tzdata/africa
--- openjdk-11-11.0.16+8/make/data/tzdata/africa 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/africa 2023-01-10 08:32:35.000000000 +0000
@@ -120,22 +120,6 @@
0:00 Algeria WE%sT 1981 May
1:00 - CET
-# Angola
-# Benin
-# See Africa/Lagos.
-
-# Botswana
-# See Africa/Maputo.
-
-# Burkina Faso
-# See Africa/Abidjan.
-
-# Burundi
-# See Africa/Maputo.
-
-# Cameroon
-# See Africa/Lagos.
-
# Cape Verde / Cabo Verde
#
# From Paul Eggert (2018-02-16):
@@ -150,9 +134,6 @@
-2:00 - -02 1975 Nov 25 2:00
-1:00 - -01
-# Central African Republic
-# See Africa/Lagos.
-
# Chad
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Ndjamena 1:00:12 - LMT 1912 # N'Djamena
@@ -160,39 +141,36 @@
1:00 1:00 WAST 1980 Mar 8
1:00 - WAT
-# Comoros
-# See Africa/Nairobi.
-
-# Democratic Republic of the Congo
-# See Africa/Lagos for the western part and Africa/Maputo for the eastern.
+# Burkina Faso
+# Côte d'Ivoire (Ivory Coast)
+# The Gambia
+# Ghana
+# Guinea
+# Iceland
+# Mali
+# Mauritania
+# St Helena
+# Senegal
+# Sierra Leone
+# Togo
-# Republic of the Congo
-# See Africa/Lagos.
+# The other parts of the St Helena territory are similar:
+# Tristan da Cunha: on GMT, say Whitman and the CIA
+# Ascension: on GMT, say the USNO (1995-12-21) and the CIA
+# Gough (scientific station since 1955; sealers wintered previously):
+# on GMT, says the CIA
+# Inaccessible, Nightingale: uninhabited
-# Côte d'Ivoire / Ivory Coast
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Abidjan -0:16:08 - LMT 1912
0:00 - GMT
-Link Africa/Abidjan Africa/Accra # Ghana
-Link Africa/Abidjan Africa/Bamako # Mali
-Link Africa/Abidjan Africa/Banjul # The Gambia
-Link Africa/Abidjan Africa/Conakry # Guinea
-Link Africa/Abidjan Africa/Dakar # Senegal
-Link Africa/Abidjan Africa/Freetown # Sierra Leone
-Link Africa/Abidjan Africa/Lome # Togo
-Link Africa/Abidjan Africa/Nouakchott # Mauritania
-Link Africa/Abidjan Africa/Ouagadougou # Burkina Faso
-Link Africa/Abidjan Atlantic/St_Helena # St Helena
-
-# Djibouti
-# See Africa/Nairobi.
###############################################################################
# Egypt
# Milne says Cairo used 2:05:08.9, the local mean time of the Abbasizeh
-# observatory; round to nearest. Milne also says that the official time for
+# observatory. Milne also says that the official time for
# Egypt was mean noon at the Great Pyramid, 2:04:30.5, but apparently this
# did not apply to Cairo, Alexandria, or Port Said.
@@ -377,36 +355,10 @@
Rule Egypt 2014 only - Sep lastThu 24:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF 2:05:08.9
Zone Africa/Cairo 2:05:09 - LMT 1900 Oct
2:00 Egypt EE%sT
-# Equatorial Guinea
-# See Africa/Lagos.
-
-# Eritrea
-# See Africa/Nairobi.
-
-# Eswatini (formerly Swaziland)
-# See Africa/Johannesburg.
-
-# Ethiopia
-# See Africa/Nairobi.
-#
-# Unfortunately tzdb records only Western clock time in use in Ethiopia,
-# as the tzdb format is not up to properly recording a common Ethiopian
-# timekeeping practice that is based on solar time. See:
-# Mortada D. If you have a meeting in Ethiopia, you'd better double
-# check the time. PRI's The World. 2015-01-30 15:15 -05.
-# https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time
-
-# Gabon
-# See Africa/Lagos.
-
-# The Gambia
-# Ghana
-# Guinea
-# See Africa/Abidjan.
-
# Guinea-Bissau
#
# From Paul Eggert (2018-02-16):
@@ -419,7 +371,16 @@
-1:00 - -01 1975
0:00 - GMT
+# Comoros
+# Djibouti
+# Eritrea
+# Ethiopia
# Kenya
+# Madagascar
+# Mayotte
+# Somalia
+# Tanzania
+# Uganda
# From P Chan (2020-10-24):
#
@@ -430,7 +391,7 @@
# At midnight on 30 June 1928 the clocks throughout Kenya was put forward
# half an hour by the Alteration of Time Ordinance, 1928.
# https://gazettes.africa/archive/ke/1928/ke-government-gazette-dated-1928-05-11-no-28.pdf
-# [Ordinance No. 11 of 1928, The Offical Gazette, 1928-06-26, p 813]
+# [Ordinance No. 11 of 1928, The Official Gazette, 1928-06-26, p 813]
# https://books.google.com/books?id=2S0S6os32ZUC&pg=PA813
#
# The 1928 ordinance was repealed by the Alteration of Time (repeal) Ordinance,
@@ -462,6 +423,14 @@
# The 1908-05-01 announcement does not give an effective date,
# so just say "1908 May".
+# From Paul Eggert (2018-09-11):
+# Unfortunately tzdb records only Western clock time in use in Ethiopia,
+# as the tzdb format is not up to properly recording a common Ethiopian
+# timekeeping practice that is based on solar time. See:
+# Mortada D. If you have a meeting in Ethiopia, you'd better double
+# check the time. PRI's The World. 2015-01-30 15:15 -05.
+# https://www.pri.org/stories/2015-01-30/if-you-have-meeting-ethiopia-you-better-double-check-time
+
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Nairobi 2:27:16 - LMT 1908 May
2:30 - +0230 1928 Jun 30 24:00
@@ -469,18 +438,6 @@
2:30 - +0230 1936 Dec 31 24:00
2:45 - +0245 1942 Jul 31 24:00
3:00 - EAT
-Link Africa/Nairobi Africa/Addis_Ababa # Ethiopia
-Link Africa/Nairobi Africa/Asmara # Eritrea
-Link Africa/Nairobi Africa/Dar_es_Salaam # Tanzania
-Link Africa/Nairobi Africa/Djibouti
-Link Africa/Nairobi Africa/Kampala # Uganda
-Link Africa/Nairobi Africa/Mogadishu # Somalia
-Link Africa/Nairobi Indian/Antananarivo # Madagascar
-Link Africa/Nairobi Indian/Comoro
-Link Africa/Nairobi Indian/Mayotte
-
-# Lesotho
-# See Africa/Johannesburg.
# Liberia
#
@@ -561,16 +518,6 @@
1:00 Libya CE%sT 2013 Oct 25 2:00
2:00 - EET
-# Madagascar
-# See Africa/Nairobi.
-
-# Malawi
-# See Africa/Maputo.
-
-# Mali
-# Mauritania
-# See Africa/Abidjan.
-
# Mauritius
# From Steffen Thorsen (2008-06-25):
@@ -664,8 +611,6 @@
# Agalega Is, Rodriguez
# no information; probably like Indian/Mauritius
-# Mayotte
-# See Africa/Nairobi.
# Morocco
# See Africa/Ceuta for Spanish Morocco.
@@ -1158,7 +1103,14 @@
0:00 Morocco +00/+01 2018 Oct 28 3:00
1:00 Morocco +01/+00
+# Botswana
+# Burundi
+# Democratic Republic of the Congo (eastern)
+# Malawi
# Mozambique
+# Rwanda
+# Zambia
+# Zimbabwe
#
# Shanks gives 1903-03-01 for the transition to CAT.
# Perhaps the 1911-05-26 Portuguese decree
@@ -1168,14 +1120,6 @@
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Africa/Maputo 2:10:20 - LMT 1903 Mar
2:00 - CAT
-Link Africa/Maputo Africa/Blantyre # Malawi
-Link Africa/Maputo Africa/Bujumbura # Burundi
-Link Africa/Maputo Africa/Gaborone # Botswana
-Link Africa/Maputo Africa/Harare # Zimbabwe
-Link Africa/Maputo Africa/Kigali # Rwanda
-Link Africa/Maputo Africa/Lubumbashi # E Dem. Rep. of Congo
-Link Africa/Maputo Africa/Lusaka # Zambia
-
# Namibia
@@ -1254,9 +1198,16 @@
# 2:00 - CAT
# End of rearguard section.
-# Niger
-# See Africa/Lagos.
+# Angola
+# Benin
+# Cameroon
+# Central African Republic
+# Democratic Republic of the Congo (western)
+# Republic of the Congo
+# Equatorial Guinea
+# Gabon
+# Niger
# Nigeria
# From P Chan (2020-12-03):
@@ -1322,44 +1273,6 @@
0:13:35 - LMT 1914 Jan 1
0:30 - +0030 1919 Sep 1
1:00 - WAT
-Link Africa/Lagos Africa/Bangui # Central African Republic
-Link Africa/Lagos Africa/Brazzaville # Rep. of the Congo
-Link Africa/Lagos Africa/Douala # Cameroon
-Link Africa/Lagos Africa/Kinshasa # Dem. Rep. of the Congo (west)
-Link Africa/Lagos Africa/Libreville # Gabon
-Link Africa/Lagos Africa/Luanda # Angola
-Link Africa/Lagos Africa/Malabo # Equatorial Guinea
-Link Africa/Lagos Africa/Niamey # Niger
-Link Africa/Lagos Africa/Porto-Novo # Benin
-
-# Réunion
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Indian/Reunion 3:41:52 - LMT 1911 Jun # Saint-Denis
- 4:00 - +04
-#
-# Scattered Islands (Îles Éparses) administered from Réunion are as follows.
-# The following information about them is taken from
-# Îles Éparses (, 1997-07-22,
-# in French; no longer available as of 1999-08-17).
-# We have no info about their time zone histories.
-#
-# Bassas da India - uninhabited
-# Europa Island - inhabited from 1905 to 1910 by two families
-# Glorioso Is - inhabited until at least 1958
-# Juan de Nova - uninhabited
-# Tromelin - inhabited until at least 1958
-
-# Rwanda
-# See Africa/Maputo.
-
-# St Helena
-# See Africa/Abidjan.
-# The other parts of the St Helena territory are similar:
-# Tristan da Cunha: on GMT, say Whitman and the CIA
-# Ascension: on GMT, say the USNO (1995-12-21) and the CIA
-# Gough (scientific station since 1955; sealers wintered previously):
-# on GMT, says the CIA
-# Inaccessible, Nightingale: uninhabited
# São Tomé and Príncipe
@@ -1379,48 +1292,19 @@
# From Michael Deckers (2018-12-30):
# https://www.legis-palop.org/download.jsp?idFile=102818
# ... [The legal time of the country, which coincides with universal
-# coordinated time, will be restituted at 2 o'clock on day 1 of January, 2019.]
+# coordinated time, will be reinstituted at 2 o'clock on day 1 of January, 2019.]
Zone Africa/Sao_Tome 0:26:56 - LMT 1884
+ #STDOFF -0:36:44.68
-0:36:45 - LMT 1912 Jan 1 00:00u # Lisbon MT
0:00 - GMT 2018 Jan 1 01:00
1:00 - WAT 2019 Jan 1 02:00
0:00 - GMT
-# Senegal
-# See Africa/Abidjan.
-
-# Seychelles
-
-# From P Chan (2020-11-27):
-# Standard Time was adopted on 1907-01-01.
-#
-# Standard Time Ordinance (Chapter 237)
-# The Laws of Seychelles in Force on the 31st December, 1971, Vol. 6, p 571
-# https://books.google.com/books?id=efE-AQAAIAAJ&pg=PA571
-#
-# From Tim Parenti (2020-12-05):
-# A footnote on https://books.google.com/books?id=DYdDAQAAMAAJ&pg=PA1689
-# confirms that Ordinance No. 9 of 1906 "was brought into force on the 1st
-# January, 1907."
-
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Indian/Mahe 3:41:48 - LMT 1907 Jan 1 # Victoria
- 4:00 - +04
-# From Paul Eggert (2001-05-30):
-# Aldabra, Farquhar, and Desroches, originally dependencies of the
-# Seychelles, were transferred to the British Indian Ocean Territory
-# in 1965 and returned to Seychelles control in 1976. We don't know
-# whether this affected their time zone, so omit this for now.
-# Possibly the islands were uninhabited.
-
-# Sierra Leone
-# See Africa/Abidjan.
-
-# Somalia
-# See Africa/Nairobi.
-
+# Eswatini (Swaziland)
+# Lesotho
# South Africa
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule SA 1942 1943 - Sep Sun>=15 2:00 1:00 -
Rule SA 1943 1944 - Mar Sun>=15 2:00 0 -
@@ -1428,8 +1312,6 @@
Zone Africa/Johannesburg 1:52:00 - LMT 1892 Feb 8
1:30 - SAST 1903 Mar
2:00 SA SAST
-Link Africa/Johannesburg Africa/Maseru # Lesotho
-Link Africa/Johannesburg Africa/Mbabane # Eswatini
#
# Marion and Prince Edward Is
# scientific station since 1947
@@ -1478,12 +1360,6 @@
3:00 - EAT 2021 Feb 1 00:00
2:00 - CAT
-# Tanzania
-# See Africa/Nairobi.
-
-# Togo
-# See Africa/Abidjan.
-
# Tunisia
# From Gwillim Law (2005-04-30):
@@ -1581,10 +1457,3 @@
Zone Africa/Tunis 0:40:44 - LMT 1881 May 12
0:09:21 - PMT 1911 Mar 11 # Paris Mean Time
1:00 Tunisia CE%sT
-
-# Uganda
-# See Africa/Nairobi.
-
-# Zambia
-# Zimbabwe
-# See Africa/Maputo.
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/antarctica openjdk-11-11.0.18+10/make/data/tzdata/antarctica
--- openjdk-11-11.0.16+8/make/data/tzdata/antarctica 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/antarctica 2023-01-10 08:32:35.000000000 +0000
@@ -180,9 +180,7 @@
# St Paul Island - near Amsterdam, uninhabited
# fishing stations operated variously 1819/1931
#
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Indian/Kerguelen 0 - -00 1950 # Port-aux-Français
- 5:00 - +05
+# Kerguelen - see Indian/Maldives.
#
# year-round base in the main continent
# Dumont d'Urville - see Pacific/Port_Moresby.
@@ -265,31 +263,7 @@
# year-round from 1960/61 to 1992
# Vostok, since 1957-12-16, temporarily closed 1994-02/1994-11
-# From Craig Mundell (1994-12-15):
-# http://quest.arc.nasa.gov/antarctica/QA/computers/Directions,Time,ZIP
-# Vostok, which is one of the Russian stations, is set on the same
-# time as Moscow, Russia.
-#
-# From Lee Hotz (2001-03-08):
-# I queried the folks at Columbia who spent the summer at Vostok and this is
-# what they had to say about time there:
-# "in the US Camp (East Camp) we have been on New Zealand (McMurdo)
-# time, which is 12 hours ahead of GMT. The Russian Station Vostok was
-# 6 hours behind that (although only 2 miles away, i.e. 6 hours ahead
-# of GMT). This is a time zone I think two hours east of Moscow. The
-# natural time zone is in between the two: 8 hours ahead of GMT."
-#
-# From Paul Eggert (2001-05-04):
-# This seems to be hopelessly confusing, so I asked Lee Hotz about it
-# in person. He said that some Antarctic locations set their local
-# time so that noon is the warmest part of the day, and that this
-# changes during the year and does not necessarily correspond to mean
-# solar noon. So the Vostok time might have been whatever the clocks
-# happened to be during their visit. So we still don't really know what time
-# it is at Vostok. But we'll guess +06.
-#
-Zone Antarctica/Vostok 0 - -00 1957 Dec 16
- 6:00 - +06
+# See Asia/Urumqi.
# S Africa - year-round bases
# Marion Island, -4653+03752
@@ -355,4 +329,4 @@
# we have to go around and set them back 5 minutes or so.
# Maybe if we let them run fast all of the time, we'd get to leave here sooner!!
#
-# See 'australasia' for Antarctica/McMurdo.
+# See Pacific/Auckland.
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/asia openjdk-11-11.0.18+10/make/data/tzdata/asia
--- openjdk-11-11.0.16+8/make/data/tzdata/asia 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/asia 2023-01-10 08:32:35.000000000 +0000
@@ -172,9 +172,6 @@
4:00 EUAsia +04/+05 1997
4:00 Azer +04/+05
-# Bahrain
-# See Asia/Qatar.
-
# Bangladesh
# From Alexander Krivenyshev (2009-05-13):
# According to newspaper Asian Tribune (May 6, 2009) Bangladesh may introduce
@@ -277,13 +274,8 @@
5:00 - +05 1996
6:00 - +06
-# Brunei
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Brunei 7:39:40 - LMT 1926 Mar # Bandar Seri Begawan
- 7:30 - +0730 1933
- 8:00 - +08
-
-# Burma / Myanmar
+# Cocos (Keeling) Islands
+# Myanmar (Burma)
# Milne says 6:24:40 was the meridian of the time ball observatory at Rangoon.
@@ -300,10 +292,6 @@
9:00 - +09 1945 May 3
6:30 - +0630
-# Cambodia
-# See Asia/Bangkok.
-
-
# China
# From Phake Nick (2020-04-15):
@@ -367,12 +355,9 @@
# in the city at the time for people who use different time standard to adjust
# their clock to their preferred time.
#
-# a. For the 1940 May 31 spring forward, the essay claim that it was
-# coordinared between the international settlement authority and the French
-# concession authority and have gathered support from Hong Kong and Xiamen,
-# that it would spring forward an hour from May 31 "midnight", and the essay
-# claim "Hong Kong government implemented the spring forward in the same time
-# on the same date as Shanghai".
+# a. For the 1940 May 31 spring forward, the essay [says] ... "Hong
+# Kong government implemented the spring forward in the same time on
+# the same date as Shanghai".
#
# b. For the 1940 fall back, it was said that they initially intended to do
# so on September 30 00:59 at night, however they postponed it to October 12
@@ -568,7 +553,7 @@
# Zhongyuan Time ("Central plain Time") UT +08
# Now part of Asia/Shanghai.
# most of China
-# Milne gives 8:05:43.2 for Xujiahui Observatory time; round to nearest.
+# Milne gives 8:05:43.2 for Xujiahui Observatory time....
# Guo says Shanghai switched to UT +08 "from the end of the 19th century".
#
# Long-shu Time (probably as Long and Shu were two names of the area) UT +07
@@ -687,18 +672,19 @@
# Zone NAME STDOFF RULES FORMAT [UNTIL]
# Beijing time, used throughout China; represented by Shanghai.
+ #STDOFF 8:05:43.2
Zone Asia/Shanghai 8:05:43 - LMT 1901
8:00 Shang C%sT 1949 May 28
8:00 PRC C%sT
# Xinjiang time, used by many in western China; represented by Ürümqi / Ürümchi
# / Wulumuqi. (Please use Asia/Shanghai if you prefer Beijing time.)
+# Vostok base in Antarctica matches this since 1970.
Zone Asia/Urumqi 5:50:20 - LMT 1928
6:00 - +06
-
# Hong Kong
-# Milne gives 7:36:41.7; round this.
+# Milne gives 7:36:41.7.
# From Lee Yiu Chung (2009-10-24):
# I found there are some mistakes for the...DST rule for Hong
@@ -882,7 +868,8 @@
Rule HK 1979 only - May 13 3:30 1:00 S
Rule HK 1979 only - Oct 21 3:30 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 30 0:36:42
+ #STDOFF 7:36:41.7
+Zone Asia/Hong_Kong 7:36:42 - LMT 1904 Oct 29 17:00u
8:00 - HKT 1941 Jun 15 3:00
8:00 1:00 HKST 1941 Oct 1 4:00
8:00 0:30 HKWT 1941 Dec 25
@@ -1197,10 +1184,6 @@
3:00 - +03 2017 Oct 29 1:00u
2:00 EUAsia EE%sT
-# Classically, Cyprus belongs to Asia; e.g. see Herodotus, Histories, I.72.
-# However, for various reasons many users expect to find it under Europe.
-Link Asia/Nicosia Europe/Nicosia
-
# Georgia
# From Paul Eggert (1994-11-19):
# Today's _Economist_ (p 60) reports that Georgia moved its clocks forward
@@ -1357,7 +1340,7 @@
#
# From Paul Eggert (2014-09-06):
# The 1876 Report of the Secretary of the [US] Navy, p 306 says that Batavia
-# civil time was 7:07:12.5; round to even for Jakarta.
+# civil time was 7:07:12.5.
#
# From Gwillim Law (2001-05-28), overriding Shanks & Pottenger:
# http://www.sumatera-inc.com/go_to_invest/about_indonesia.asp#standtime
@@ -1393,10 +1376,11 @@
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
# Java, Sumatra
+ #STDOFF 7:07:12.5
Zone Asia/Jakarta 7:07:12 - LMT 1867 Aug 10
# Shanks & Pottenger say the next transition was at 1924 Jan 1 0:13,
# but this must be a typo.
- 7:07:12 - BMT 1923 Dec 31 23:47:12 # Batavia
+ 7:07:12 - BMT 1923 Dec 31 16:40u # Batavia
7:20 - +0720 1932 Nov
7:30 - +0730 1942 Mar 23
9:00 - +09 1945 Sep 23
@@ -1428,6 +1412,111 @@
# Iran
+# From Roozbeh Pournader (2022-05-30):
+# Here's an order from the Cabinet to the rest of the government to switch to
+# Tehran time, which is mentioned to be already at +03:30:
+# https://qavanin.ir/Law/TreeText/180138
+# Just in case that goes away, I also saved a copy at archive.org:
+# https://web.archive.org/web/20220530111940/https://qavanin.ir/Law/TreeText/180138
+# Here's my translation:
+#
+# "Circular on Matching the Hours of Governmental and Official Circles
+# in Provinces
+# Approved 1314/03/22 [=1935-06-13]
+# According to the ruling of the Honorable Cabinet, it is ordered that from
+# now on in all internal provinces of the country, governmental and official
+# circles set their time to match Tehran time (three hours and half before
+# Greenwich)....
+#
+# I still haven't found out when Tehran itself switched to +03:30....
+#
+# From Paul Eggert (2022-06-05):
+# Although the above says Tehran was at +03:30 before 1935-06-13, we don't
+# know when it switched to +03:30. For now, use 1935-06-13 as the switch date.
+# Although most likely wrong, we have no better info.
+
+# From Roozbeh Pournader (2022-06-01):
+# This is from Kayhan newspaper, one of the major Iranian newspapers, from
+# March 20, 1978, page 2:
+#
+# "Pull the clocks 60 minutes forward
+# As we informed before, from the fourth day of the month Farvardin of the
+# new year [=1978-03-24], clocks will be pulled forward, and people's daily
+# work and life program will start one hour earlier than the current program.
+# On the 1st day of the month Farvardin of this year [=1977-03-21], they had
+# pulled the clocks forward by one hour, but in the month of Mehr
+# [=1977-09-23], the clocks were pulled back by 30 minutes.
+# In this way, from the 4th day of the month Farvardin, clocks will be ahead
+# of the previous years by one hour and a half.
+# According to the new program, during the night of 4th of Farvardin, when
+# the midnight, meaning 24 o'clock is announced, the hands of the clock must
+# be pulled forward by one hour and thus consider midnight 1 o'clock in the
+# forenoon."
+#
+# This implies that in September 1977, when the daylight savings time was
+# done with, Iran didn't go back to +03:30, but immediately to +04:00.
+#
+#
+# This is from the major Iranian newspaper Ettela'at, dated [1978-08-03]...,
+# page 32. It looks like they decided to get the clocks back to +4:00
+# just in time for Ramadan that year:
+#
+# "Tomorrow Night, Pull the Clocks Back by One Hour
+# At 1 o'clock in the forenoon of Saturday 14 Mordad [=1978-08-05], the
+# clocks will be pulled one hour back and instead of 1 o'clock in the
+# forenoon, Radio Iran will announce 24 o'clock.
+# This decision was made in the Cabinet of Ministers meeting of 25 Tir
+# [=1978-07-16], [...]
+# At the beginning of the year 2537 [=March 1978: Iran was using a different
+# year number for a few years then, based on the Coronation of Cyrus the
+# Great], the country's official time was pulled forward by one hour and now
+# the official time is one hour and a half ahead compared to last year,
+# because in Farvardin of last year [=March 1977], the official time was
+# pulled forward one hour and this continued until the second half of last
+# year [=September 1977] until in the second half of last year the official
+# time was pulled back half an hour and that half hour still remains."
+#
+# This matches the time of the true noon published in the newspapers, as they
+# clearly go from +05:00 to +04:00 after that date (which happened during a
+# long weekend in Iran).
+
+# From Roozbeh Pournader (2022-05-31):
+# [Movahedi S. Cultural preconceptions of time: Can we use operational time
+# to meddle in God's Time? Comp Stud Soc Hist. 1985;27(3):385-400]
+# https://www.jstor.org/stable/178704
+# Here's the quotes from the paper:
+# 1. '"Iran's official time keeper moved the clock one hour forward as from
+# March 22, 1977 (Farvardin 2, 2536) to make maximum use of daylight and save
+# in energy consumption. Thus Iran joined such other countries as Britain in
+# observing what is known as 'daylight saving.' The proposal was originally
+# put forward by the Ministry of Energy, in no way having any influence on
+# observing religious ceremonies. Moving time one hour forward in summer
+# means that at 11:00 o'clock on March 21, the official time was set as
+# midnight March 22. Then September 24 will actually begin one hour later
+# than the end of September 23 [...]." Iran's time base thus continued to be
+# Greenwich Mean Time plus three and one-half hours (plus four and one-half
+# hours in summer).'
+#
+# The article sources this from Iran Almanac and Book of Facts, 1977, Tehran:
+# Echo of Iran, which is on Google Books at
+# https://www.google.com/books/edition/Iran_Almanac_and_Book_of_Facts/9ybVAAAAMAAJ.
+# (I confirmed it by searching for snippets.)
+#
+# 2. "After the fall of the shah, the revolutionary government returned to
+# daylight-saving time (DST) on 26 May 1979."
+#
+# This seems to have been announced just one day in advance, on 25 May 1979.
+#
+# The change in 1977 clearly seems to be the first daylight savings effort in
+# Iran. But the article doesn't mention what happened in 1978 (which was
+# still during the shah's government), or how things continued in 1979
+# onwards (which was during the Islamic Republic).
+
+# From Francis Santoni (2022-06-01):
+# for Iran and 1977 the effective change is only 20 October
+# (UIT No. 143 17.XI.1977) and not 23 September (UIT No. 141 13.IX.1977).
+# UIT is the Operational Bulletin of International Telecommunication Union.
+
# From Roozbeh Pournader (2003-03-15):
# This is an English translation of what I just found (originally in Persian).
# The Gregorian dates in brackets are mine:
@@ -1462,65 +1551,12 @@
# leap year calculation involved. There has never been any serious
# plan to change that law....
#
-# From Paul Eggert (2018-11-30):
-# Go with Shanks & Pottenger before Sept. 1991, and with Pournader thereafter.
-# I used the following code in GNU Emacs 26.1 to generate the "Rule Iran"
-# lines from 2008 through 2087. Emacs 26.1 uses Ed Reingold's
-# cal-persia implementation of Birashk's approximation, which in the
-# 2008-2087 range disagrees with the astronomical Persian calendar
-# for Persian years 1404 (Gregorian 2025) and 1437 (Gregorian 2058), so
-# the following code special-cases those years. See Table 15.1, page 264, of:
-# Edward M. Reingold and Nachum Dershowitz, Calendrical Calculations:
-# The Ultimate Edition, Cambridge University Press (2018).
-# https://www.cambridge.org/fr/academic/subjects/computer-science/computing-general-interest/calendrical-calculations-ultimate-edition-4th-edition
-# Page 258, footnote 2, of this book says there is some dispute over what will
-# happen in 2091 (and some other years after that), so this code
-# stops in 2087, as 2088 and 2089 agree with the "max" rule below.
-# (cl-loop
-# initially (require 'cal-persia)
-# with first-persian-year = 1387
-# with last-persian-year = 1466
-# ;; Exceptional years in the above range,
-# ;; from Reingold & Dershowitz Table 15.1, page 264:
-# with exceptional-persian-years = '(1404 1437)
-# with range-start = nil
-# for persian-year from first-persian-year to last-persian-year
-# do
-# (let*
-# ((exceptional-year-offset
-# (if (member persian-year exceptional-persian-years) 1 0))
-# (beg-dst-absolute
-# (+ (calendar-persian-to-absolute (list 1 1 persian-year))
-# exceptional-year-offset))
-# (end-dst-absolute
-# (+ (calendar-persian-to-absolute (list 6 30 persian-year))
-# exceptional-year-offset))
-# (next-year-beg-dst-absolute
-# (+ (calendar-persian-to-absolute (list 1 1 (1+ persian-year)))
-# (if (member (1+ persian-year) exceptional-persian-years) 1 0)))
-# (beg-dst (calendar-gregorian-from-absolute beg-dst-absolute))
-# (end-dst (calendar-gregorian-from-absolute end-dst-absolute))
-# (next-year-beg-dst (calendar-gregorian-from-absolute
-# next-year-beg-dst-absolute))
-# (year (calendar-extract-year beg-dst))
-# (range-end (if range-start year "only")))
-# (setq range-start (or range-start year))
-# (when (or (/= (calendar-extract-day beg-dst)
-# (calendar-extract-day next-year-beg-dst))
-# (= persian-year last-persian-year))
-# (insert
-# (format
-# "Rule\tIran\t%d\t%s\t-\t%s\t%2d\t24:00\t1:00\t-\n"
-# range-start range-end
-# (calendar-month-name (calendar-extract-month beg-dst) t)
-# (calendar-extract-day beg-dst)))
-# (insert
-# (format
-# "Rule\tIran\t%d\t%s\t-\t%s\t%2d\t24:00\t0\t-\n"
-# range-start range-end
-# (calendar-month-name (calendar-extract-month end-dst) t)
-# (calendar-extract-day end-dst)))
-# (setq range-start nil))))
+# From Paul Eggert (2022-06-30):
+# Go with Pournader for 1935 through spring 1979, and for timestamps
+# after August 1991; go with with Shanks & Pottenger for other timestamps.
+# Go with Santoni's citation of the UIT for fall 1977, as 20 October 1977
+# is 28 Mehr 1356, consistent with the "Mehr" in Pournader's source.
+# Assume that the UIT's "1930" is UTC, i.e., 24:00 local time.
#
# From Oscar van Vlijmen (2005-03-30), writing about future
# discrepancies between cal-persia and the Iranian calendar:
@@ -1554,10 +1590,23 @@
# be changed back to its previous state on the 24 hours of the
# thirtieth day of Shahrivar.
#
+# From Ali Mirjamali (2022-05-10):
+# Official IR News Agency announcement: irna.ir/xjJ3TT
+# ...
+# Highlights: DST will be cancelled for the next Iranian year 1402
+# (i.e 2023-March-21) and forthcoming years.
+#
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Iran 1978 1980 - Mar 20 24:00 1:00 -
-Rule Iran 1978 only - Oct 20 24:00 0 -
+# Work around a bug in zic 2022a and earlier.
+Rule Iran 1910 only - Jan 1 00:00 0 -
+#
+Rule Iran 1977 only - Mar 21 23:00 1:00 -
+Rule Iran 1977 only - Oct 20 24:00 0 -
+Rule Iran 1978 only - Mar 24 24:00 1:00 -
+Rule Iran 1978 only - Aug 5 01:00 0 -
+Rule Iran 1979 only - May 26 24:00 1:00 -
Rule Iran 1979 only - Sep 18 24:00 0 -
+Rule Iran 1980 only - Mar 20 24:00 1:00 -
Rule Iran 1980 only - Sep 22 24:00 0 -
Rule Iran 1991 only - May 2 24:00 1:00 -
Rule Iran 1992 1995 - Mar 21 24:00 1:00 -
@@ -1588,85 +1637,13 @@
Rule Iran 2017 2019 - Sep 21 24:00 0 -
Rule Iran 2020 only - Mar 20 24:00 1:00 -
Rule Iran 2020 only - Sep 20 24:00 0 -
-Rule Iran 2021 2023 - Mar 21 24:00 1:00 -
-Rule Iran 2021 2023 - Sep 21 24:00 0 -
-Rule Iran 2024 only - Mar 20 24:00 1:00 -
-Rule Iran 2024 only - Sep 20 24:00 0 -
-Rule Iran 2025 2027 - Mar 21 24:00 1:00 -
-Rule Iran 2025 2027 - Sep 21 24:00 0 -
-Rule Iran 2028 2029 - Mar 20 24:00 1:00 -
-Rule Iran 2028 2029 - Sep 20 24:00 0 -
-Rule Iran 2030 2031 - Mar 21 24:00 1:00 -
-Rule Iran 2030 2031 - Sep 21 24:00 0 -
-Rule Iran 2032 2033 - Mar 20 24:00 1:00 -
-Rule Iran 2032 2033 - Sep 20 24:00 0 -
-Rule Iran 2034 2035 - Mar 21 24:00 1:00 -
-Rule Iran 2034 2035 - Sep 21 24:00 0 -
-Rule Iran 2036 2037 - Mar 20 24:00 1:00 -
-Rule Iran 2036 2037 - Sep 20 24:00 0 -
-Rule Iran 2038 2039 - Mar 21 24:00 1:00 -
-Rule Iran 2038 2039 - Sep 21 24:00 0 -
-Rule Iran 2040 2041 - Mar 20 24:00 1:00 -
-Rule Iran 2040 2041 - Sep 20 24:00 0 -
-Rule Iran 2042 2043 - Mar 21 24:00 1:00 -
-Rule Iran 2042 2043 - Sep 21 24:00 0 -
-Rule Iran 2044 2045 - Mar 20 24:00 1:00 -
-Rule Iran 2044 2045 - Sep 20 24:00 0 -
-Rule Iran 2046 2047 - Mar 21 24:00 1:00 -
-Rule Iran 2046 2047 - Sep 21 24:00 0 -
-Rule Iran 2048 2049 - Mar 20 24:00 1:00 -
-Rule Iran 2048 2049 - Sep 20 24:00 0 -
-Rule Iran 2050 2051 - Mar 21 24:00 1:00 -
-Rule Iran 2050 2051 - Sep 21 24:00 0 -
-Rule Iran 2052 2053 - Mar 20 24:00 1:00 -
-Rule Iran 2052 2053 - Sep 20 24:00 0 -
-Rule Iran 2054 2055 - Mar 21 24:00 1:00 -
-Rule Iran 2054 2055 - Sep 21 24:00 0 -
-Rule Iran 2056 2057 - Mar 20 24:00 1:00 -
-Rule Iran 2056 2057 - Sep 20 24:00 0 -
-Rule Iran 2058 2059 - Mar 21 24:00 1:00 -
-Rule Iran 2058 2059 - Sep 21 24:00 0 -
-Rule Iran 2060 2062 - Mar 20 24:00 1:00 -
-Rule Iran 2060 2062 - Sep 20 24:00 0 -
-Rule Iran 2063 only - Mar 21 24:00 1:00 -
-Rule Iran 2063 only - Sep 21 24:00 0 -
-Rule Iran 2064 2066 - Mar 20 24:00 1:00 -
-Rule Iran 2064 2066 - Sep 20 24:00 0 -
-Rule Iran 2067 only - Mar 21 24:00 1:00 -
-Rule Iran 2067 only - Sep 21 24:00 0 -
-Rule Iran 2068 2070 - Mar 20 24:00 1:00 -
-Rule Iran 2068 2070 - Sep 20 24:00 0 -
-Rule Iran 2071 only - Mar 21 24:00 1:00 -
-Rule Iran 2071 only - Sep 21 24:00 0 -
-Rule Iran 2072 2074 - Mar 20 24:00 1:00 -
-Rule Iran 2072 2074 - Sep 20 24:00 0 -
-Rule Iran 2075 only - Mar 21 24:00 1:00 -
-Rule Iran 2075 only - Sep 21 24:00 0 -
-Rule Iran 2076 2078 - Mar 20 24:00 1:00 -
-Rule Iran 2076 2078 - Sep 20 24:00 0 -
-Rule Iran 2079 only - Mar 21 24:00 1:00 -
-Rule Iran 2079 only - Sep 21 24:00 0 -
-Rule Iran 2080 2082 - Mar 20 24:00 1:00 -
-Rule Iran 2080 2082 - Sep 20 24:00 0 -
-Rule Iran 2083 only - Mar 21 24:00 1:00 -
-Rule Iran 2083 only - Sep 21 24:00 0 -
-Rule Iran 2084 2086 - Mar 20 24:00 1:00 -
-Rule Iran 2084 2086 - Sep 20 24:00 0 -
-Rule Iran 2087 only - Mar 21 24:00 1:00 -
-Rule Iran 2087 only - Sep 21 24:00 0 -
-#
-# The following rules are approximations starting in the year 2088.
-# These are the best post-2088 approximations available, given the
-# restrictions of a single rule using ordinary Gregorian dates.
-# At some point this table will need to be extended, though quite
-# possibly Iran will change the rules first.
-Rule Iran 2088 max - Mar 20 24:00 1:00 -
-Rule Iran 2088 max - Sep 20 24:00 0 -
+Rule Iran 2021 2022 - Mar 21 24:00 1:00 -
+Rule Iran 2021 2022 - Sep 21 24:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Tehran 3:25:44 - LMT 1916
- 3:25:44 - TMT 1946 # Tehran Mean Time
- 3:30 - +0330 1977 Nov
+ 3:25:44 - TMT 1935 Jun 13 # Tehran Mean Time
+ 3:30 Iran +0330/+0430 1977 Oct 20 24:00
4:00 Iran +04/+05 1979
3:30 Iran +0330/+0430
@@ -2262,6 +2239,17 @@
# From the Arabic version, it seems to say it would be at midnight
# (assume 24:00) on the last Thursday in February, starting from 2022.
+# From Issam Al-Zuwairi (2022-10-05):
+# The Council of Ministers in Jordan decided Wednesday 5th October 2022,
+# that daylight saving time (DST) will be throughout the year....
+#
+# From Brian Inglis (2022-10-06):
+# https://petra.gov.jo/Include/InnerPage.jsp?ID=45567&lang=en&name=en_news
+#
+# From Paul Eggert (2022-10-05):
+# Like Syria, model this as a transition from EEST +03 (DST) to plain +03
+# (non-DST) at the point where DST would otherwise have ended.
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Jordan 1973 only - Jun 6 0:00 1:00 S
Rule Jordan 1973 1975 - Oct 1 0:00 0 -
@@ -2293,11 +2281,12 @@
Rule Jordan 2006 2011 - Oct lastFri 0:00s 0 -
Rule Jordan 2013 only - Dec 20 0:00 0 -
Rule Jordan 2014 2021 - Mar lastThu 24:00 1:00 S
-Rule Jordan 2014 max - Oct lastFri 0:00s 0 -
-Rule Jordan 2022 max - Feb lastThu 24:00 1:00 S
+Rule Jordan 2014 2022 - Oct lastFri 0:00s 0 -
+Rule Jordan 2022 only - Feb lastThu 24:00 1:00 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Amman 2:23:44 - LMT 1931
- 2:00 Jordan EE%sT
+ 2:00 Jordan EE%sT 2022 Oct 28 0:00s
+ 3:00 - +03
# Kazakhstan
@@ -2488,9 +2477,9 @@
# the third time belt (before 1930 this means +03).
# From Alexander Konzurovski (2018-12-20):
-# Qyzyolrda Region (Asia/Qyzylorda) is changing its time zone from
-# UTC+6 to UTC+5 effective December 21st, 2018. The legal document is
-# located here: http://adilet.zan.kz/rus/docs/P1800000817 (russian language).
+# (Asia/Qyzylorda) is changing its time zone from UTC+6 to UTC+5
+# effective December 21st, 2018....
+# http://adilet.zan.kz/rus/docs/P1800000817 (russian language).
# Zone NAME STDOFF RULES FORMAT [UNTIL]
#
@@ -2723,14 +2712,6 @@
8:30 - KST 2018 May 4 23:30
9:00 - KST
-###############################################################################
-
-# Kuwait
-# See Asia/Riyadh.
-
-# Laos
-# See Asia/Bangkok.
-
# Lebanon
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
@@ -2762,25 +2743,15 @@
Zone Asia/Beirut 2:22:00 - LMT 1880
2:00 Lebanon EE%sT
-# Malaysia
+# Brunei
+# Malaysia (eastern)
+#
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule NBorneo 1935 1941 - Sep 14 0:00 0:20 -
Rule NBorneo 1935 1941 - Dec 14 0:00 0 -
#
-# peninsular Malaysia
-# taken from Mok Ly Yng (2003-10-30)
-# https://web.archive.org/web/20190822231045/http://www.math.nus.edu.sg/~mathelmr/teaching/timezone.html
-# This agrees with Singapore since 1905-06-01.
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Kuala_Lumpur 6:46:46 - LMT 1901 Jan 1
- 6:55:25 - SMT 1905 Jun 1 # Singapore M.T.
- 7:00 - +07 1933 Jan 1
- 7:00 0:20 +0720 1936 Jan 1
- 7:20 - +0720 1941 Sep 1
- 7:30 - +0730 1942 Feb 16
- 9:00 - +09 1945 Sep 12
- 7:30 - +0730 1982 Jan 1
- 8:00 - +08
+# For peninsular Malaysia see Asia/Singapore.
+#
# Sabah & Sarawak
# From Paul Eggert (2014-08-12):
# The data entries here are mostly from Shanks & Pottenger, but the 1942, 1945
@@ -2959,9 +2930,6 @@
5:30 - +0530 1986
5:45 - +0545
-# Oman
-# See Asia/Dubai.
-
# Pakistan
# From Rives McDow (2002-03-13):
@@ -3416,10 +3384,6 @@
# The winter time in 2015 started on October 23 at 01:00.
# https://wafa.ps/ar_page.aspx?id=CgpCdYa670694628582aCgpCdY
# http://www.palestinecabinet.gov.ps/portal/meeting/details/27583
-#
-# From Paul Eggert (2019-04-10):
-# For now, guess spring-ahead transitions are at 00:00 on the Saturday
-# preceding March's last Sunday (i.e., Sat>=24).
# From P Chan (2021-10-18):
# http://wafa.ps/Pages/Details/34701
@@ -3436,6 +3400,18 @@
# From Heba Hamad (2022-03-10):
# summer time will begin in Palestine from Sunday 03-27-2022, 00:00 AM.
+# From Heba Hamad (2022-08-30):
+# winter time will begin in Palestine from Saturday 10-29, 02:00 AM by
+# 60 minutes backwards. Also the state of Palestine adopted the summer
+# and winter time for the years: 2023,2024,2025,2026 ...
+# https://mm.icann.org/pipermail/tz/attachments/20220830/9f024566/Time-0001.pdf
+# (2022-08-31): ... the Saturday before the last Sunday in March and October
+# at 2:00 AM ,for the years from 2023 to 2026.
+# (2022-09-05): https://mtit.pna.ps/Site/New/1453
+#
+# From Paul Eggert (2022-08-31):
+# For now, assume that this rule will also be used after 2026.
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
Rule EgyptAsia 1957 1958 - Oct 1 0:00 0 -
@@ -3466,14 +3442,16 @@
Rule Palestine 2014 only - Oct 24 0:00 0 -
Rule Palestine 2015 only - Mar 28 0:00 1:00 S
Rule Palestine 2015 only - Oct 23 1:00 0 -
-Rule Palestine 2016 2018 - Mar Sat>=24 1:00 1:00 S
-Rule Palestine 2016 2018 - Oct Sat>=24 1:00 0 -
+Rule Palestine 2016 2018 - Mar Sat<=30 1:00 1:00 S
+Rule Palestine 2016 2018 - Oct Sat<=30 1:00 0 -
Rule Palestine 2019 only - Mar 29 0:00 1:00 S
-Rule Palestine 2019 only - Oct Sat>=24 0:00 0 -
-Rule Palestine 2020 2021 - Mar Sat>=24 0:00 1:00 S
+Rule Palestine 2019 only - Oct Sat<=30 0:00 0 -
+Rule Palestine 2020 2021 - Mar Sat<=30 0:00 1:00 S
Rule Palestine 2020 only - Oct 24 1:00 0 -
-Rule Palestine 2021 max - Oct Fri>=23 1:00 0 -
-Rule Palestine 2022 max - Mar Sun>=25 0:00 1:00 S
+Rule Palestine 2021 only - Oct 29 1:00 0 -
+Rule Palestine 2022 only - Mar 27 0:00 1:00 S
+Rule Palestine 2022 max - Oct Sat<=30 2:00 0 -
+Rule Palestine 2023 max - Mar Sat<=30 2:00 1:00 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
@@ -3562,14 +3540,18 @@
9:00 - JST 1944 Nov
8:00 Phil P%sT
+# Bahrain
# Qatar
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Qatar 3:26:08 - LMT 1920 # Al Dawhah / Doha
4:00 - +04 1972 Jun
3:00 - +03
-Link Asia/Qatar Asia/Bahrain
+# Kuwait
# Saudi Arabia
+# Yemen
+#
+# Japan's year-round bases in Antarctica match this since 1970.
#
# From Paul Eggert (2018-08-29):
# Time in Saudi Arabia and other countries in the Arabian peninsula was not
@@ -3614,9 +3596,6 @@
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Riyadh 3:06:52 - LMT 1947 Mar 14
3:00 - +03
-Link Asia/Riyadh Antarctica/Syowa
-Link Asia/Riyadh Asia/Aden # Yemen
-Link Asia/Riyadh Asia/Kuwait
# Singapore
# taken from Mok Ly Yng (2003-10-30)
@@ -3629,7 +3608,7 @@
7:20 - +0720 1941 Sep 1
7:30 - +0730 1942 Feb 16
9:00 - +09 1945 Sep 12
- 7:30 - +0730 1982 Jan 1
+ 7:30 - +0730 1981 Dec 31 16:00u
8:00 - +08
# Spratly Is
@@ -3845,19 +3824,27 @@
# Our brief summary:
# https://www.timeanddate.com/news/time/syria-dst-2012.html
-# From Arthur David Olson (2012-03-27):
-# Assume last Friday in March going forward XXX.
+# From Steffen Thorsen (2022-10-05):
+# Syria is adopting year-round DST, starting this autumn....
+# From https://www.enabbaladi.net/archives/607812
+# "This [the decision] came after the weekly government meeting today,
+# Tuesday 4 October ..."
+#
+# From Paul Eggert (2022-10-05):
+# Like Jordan, model this as a transition from EEST +03 (DST) to plain +03
+# (non-DST) at the point where DST would otherwise have ended.
Rule Syria 2008 only - Apr Fri>=1 0:00 1:00 S
Rule Syria 2008 only - Nov 1 0:00 0 -
Rule Syria 2009 only - Mar lastFri 0:00 1:00 S
Rule Syria 2010 2011 - Apr Fri>=1 0:00 1:00 S
-Rule Syria 2012 max - Mar lastFri 0:00 1:00 S
-Rule Syria 2009 max - Oct lastFri 0:00 0 -
+Rule Syria 2012 2022 - Mar lastFri 0:00 1:00 S
+Rule Syria 2009 2022 - Oct lastFri 0:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Damascus 2:25:12 - LMT 1920 # Dimashq
- 2:00 Syria EE%sT
+ 2:00 Syria EE%sT 2022 Oct 28 0:00
+ 3:00 - +03
# Tajikistan
# From Shanks & Pottenger.
@@ -3865,16 +3852,18 @@
Zone Asia/Dushanbe 4:35:12 - LMT 1924 May 2
5:00 - +05 1930 Jun 21
6:00 RussiaAsia +06/+07 1991 Mar 31 2:00s
- 5:00 1:00 +05/+06 1991 Sep 9 2:00s
+ 5:00 1:00 +06 1991 Sep 9 2:00s
5:00 - +05
+# Cambodia
+# Christmas I
+# Laos
# Thailand
+# Vietnam (northern)
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Bangkok 6:42:04 - LMT 1880
6:42:04 - BMT 1920 Apr # Bangkok Mean Time
7:00 - +07
-Link Asia/Bangkok Asia/Phnom_Penh # Cambodia
-Link Asia/Bangkok Asia/Vientiane # Laos
# Turkmenistan
# From Shanks & Pottenger.
@@ -3885,11 +3874,15 @@
4:00 RussiaAsia +04/+05 1992 Jan 19 2:00
5:00 - +05
+# Oman
+# Réunion
+# Seychelles
# United Arab Emirates
+#
+# The Crozet Is also observe Réunion time; see the 'antarctica' file.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Asia/Dubai 3:41:12 - LMT 1920
4:00 - +04
-Link Asia/Dubai Asia/Muscat # Oman
# Uzbekistan
# Byalokoz 1919 says Uzbekistan was 4:27:53.
@@ -3901,14 +3894,15 @@
6:00 - +06 1982 Apr 1
5:00 RussiaAsia +05/+06 1992
5:00 - +05
-# Milne says Tashkent was 4:37:10.8; round to nearest.
+# Milne says Tashkent was 4:37:10.8.
+ #STDOFF 4:37:10.8
Zone Asia/Tashkent 4:37:11 - LMT 1924 May 2
5:00 - +05 1930 Jun 21
6:00 RussiaAsia +06/+07 1991 Mar 31 2:00
5:00 RussiaAsia +05/+06 1992
5:00 - +05
-# Vietnam
+# Vietnam (southern)
# From Paul Eggert (2014-10-04):
# Milne gives 7:16:56 for the meridian of Saigon in 1899, as being
@@ -3920,7 +3914,7 @@
# The English-language name of Vietnam's most populous city is "Ho Chi Minh
# City"; use Ho_Chi_Minh below to avoid a name of more than 14 characters.
-# From Paul Eggert (2014-10-21) after a heads-up from Trần Ngọc Quân:
+# From Paul Eggert (2022-07-27) after a 2014 heads-up from Trần Ngọc Quân:
# Trần Tiến Bình's authoritative book "Lịch Việt Nam: thế kỷ XX-XXI (1901-2100)"
# (Nhà xuất bản Văn Hoá - Thông Tin, Hanoi, 2005), pp 49-50,
# is quoted verbatim in:
@@ -3932,8 +3926,8 @@
# The 1906 transition was effective July 1 and standardized Indochina to
# Phù Liễn Observatory, legally 104° 17' 17" east of Paris.
# It's unclear whether this meant legal Paris Mean Time (00:09:21) or
-# the Paris Meridian (2° 20' 14.03" E); the former yields 07:06:30.1333...
-# and the latter 07:06:29.333... so either way it rounds to 07:06:30,
+# the Paris Meridian; for now guess the former and round the exact
+# 07:06:30.1333... to 07:06:30.13 as the legal spec used 66 2/3 ms precision.
# which is used below even though the modern-day Phù Liễn Observatory
# is closer to 07:06:31. Abbreviate Phù Liễn Mean Time as PLMT.
#
@@ -3960,7 +3954,8 @@
# NXB Thuận Hoá, Huế, 1995.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Asia/Ho_Chi_Minh 7:06:40 - LMT 1906 Jul 1
+ #STDOFF 7:06:30.13
+Zone Asia/Ho_Chi_Minh 7:06:30 - LMT 1906 Jul 1
7:06:30 - PLMT 1911 May 1 # Phù Liễn MT
7:00 - +07 1942 Dec 31 23:00
8:00 - +08 1945 Mar 14 23:00
@@ -3981,7 +3976,3 @@
# For timestamps in north Vietnam back to 1970 (the tzdb cutoff),
# use Asia/Bangkok; see the VN entries in the file zone1970.tab.
# For timestamps before 1970, see Asia/Hanoi in the file 'backzone'.
-
-
-# Yemen
-# See Asia/Riyadh.
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/australasia openjdk-11-11.0.18+10/make/data/tzdata/australasia
--- openjdk-11-11.0.16+8/make/data/tzdata/australasia 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/australasia 2023-01-10 08:32:35.000000000 +0000
@@ -274,19 +274,6 @@
10:00 1:00 AEDT 2011
10:00 AT AE%sT
-# Christmas
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Indian/Christmas 7:02:52 - LMT 1895 Feb
- 7:00 - +07
-
-# Cocos (Keeling) Is
-# These islands were ruled by the Ross family from about 1830 to 1978.
-# We don't know when standard time was introduced; for now, we guess 1900.
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Indian/Cocos 6:27:40 - LMT 1900
- 6:30 - +0630
-
-
# Fiji
# Milne gives 11:55:44 for Suva.
@@ -422,8 +409,14 @@
# concerned shifting arrival and departure times, which may look like a simple
# thing but requires some significant logistical adjustments domestically and
# internationally."
-# Assume for now that DST will resume with the recent pre-2020 rules for the
-# 2022/2023 season.
+
+# From Shalvin Narayan (2022-10-27):
+# Please note that there will not be any daylight savings time change
+# in Fiji for 2022-2023....
+# https://www.facebook.com/FijianGovernment/posts/pfbid0mmWVTYmTibn66ybpFda75pDcf34SSpoSaskJW5gXwaKo5Sgc7273Q4fXWc6kQV6Hl
+#
+# From Paul Eggert (2022-10-27):
+# For now, assume DST is suspended indefinitely.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Fiji 1998 1999 - Nov Sun>=1 2:00 1:00 -
@@ -438,8 +431,6 @@
Rule Fiji 2015 2021 - Jan Sun>=12 3:00 0 -
Rule Fiji 2019 only - Nov Sun>=8 2:00 1:00 -
Rule Fiji 2020 only - Dec 20 2:00 1:00 -
-Rule Fiji 2022 max - Nov Sun>=8 2:00 1:00 -
-Rule Fiji 2023 max - Jan Sun>=12 3:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Fiji 11:55:44 - LMT 1915 Oct 26 # Suva
12:00 Fiji +12/+13
@@ -455,7 +446,9 @@
# Clipperton (near North America) is administered from French Polynesia;
# it is uninhabited.
+
# Guam
+# N Mariana Is
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
# http://guamlegislature.com/Public_Laws_5th/PL05-025.pdf
@@ -495,12 +488,20 @@
9:00 - +09 1944 Jul 31
10:00 Guam G%sT 2000 Dec 23
10:00 - ChST # Chamorro Standard Time
-Link Pacific/Guam Pacific/Saipan # N Mariana Is
-# Kiribati
+
+# Kiribati (Gilbert Is)
+# Marshall Is
+# Tuvalu
+# Wake
+# Wallis & Futuna
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Tarawa 11:32:04 - LMT 1901 # Bairiki
12:00 - +12
+
+# Kiribati (except Gilbert Is)
+# See Pacific/Tarawa for the Gilbert Is.
+# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Pacific/Kanton 0 - -00 1937 Aug 31
-12:00 - -12 1979 Oct
-11:00 - -11 1994 Dec 31
@@ -510,19 +511,9 @@
-10:00 - -10 1994 Dec 31
14:00 - +14
-# N Mariana Is
-# See Pacific/Guam.
-
# Marshall Is
+# See Pacific/Tarawa for most locations.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Pacific/Majuro 11:24:48 - LMT 1901
- 11:00 - +11 1914 Oct
- 9:00 - +09 1919 Feb 1
- 11:00 - +11 1937
- 10:00 - +10 1941 Apr 1
- 9:00 - +09 1944 Jan 30
- 11:00 - +11 1969 Oct
- 12:00 - +12
Zone Pacific/Kwajalein 11:09:20 - LMT 1901
11:00 - +11 1937
10:00 - +10 1941 Apr 1
@@ -532,22 +523,9 @@
12:00 - +12
# Micronesia
+# For Chuuk and Yap see Pacific/Port_Moresby.
+# For Pohnpei see Pacific/Guadalcanal.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Pacific/Chuuk -13:52:52 - LMT 1844 Dec 31
- 10:07:08 - LMT 1901
- 10:00 - +10 1914 Oct
- 9:00 - +09 1919 Feb 1
- 10:00 - +10 1941 Apr 1
- 9:00 - +09 1945 Aug
- 10:00 - +10
-Zone Pacific/Pohnpei -13:27:08 - LMT 1844 Dec 31 # Kolonia
- 10:32:52 - LMT 1901
- 11:00 - +11 1914 Oct
- 9:00 - +09 1919 Feb 1
- 11:00 - +11 1937
- 10:00 - +10 1941 Apr 1
- 9:00 - +09 1945 Aug
- 11:00 - +11
Zone Pacific/Kosrae -13:08:04 - LMT 1844 Dec 31
10:51:56 - LMT 1901
11:00 - +11 1914 Oct
@@ -582,6 +560,7 @@
###############################################################################
# New Zealand
+# McMurdo Station and Scott Base in Antarctica use Auckland time.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule NZ 1927 only - Nov 6 2:00 1:00 S
@@ -617,12 +596,11 @@
Zone Pacific/Auckland 11:39:04 - LMT 1868 Nov 2
11:30 NZ NZ%sT 1946 Jan 1
12:00 NZ NZ%sT
+
Zone Pacific/Chatham 12:13:48 - LMT 1868 Nov 2
12:15 - +1215 1946 Jan 1
12:45 Chatham +1245/+1345
-Link Pacific/Auckland Antarctica/McMurdo
-
# Auckland Is
# uninhabited; Māori and Moriori, colonial settlers, pastoralists, sealers,
# and scientific personnel have wintered
@@ -681,7 +659,7 @@
# Niue
-# See Pacific/Raratonga comments for 1952 transition.
+# See Pacific/Rarotonga comments for 1952 transition.
#
# From Tim Parenti (2021-09-13):
# Consecutive contemporaneous editions of The Air Almanac listed -11:20 for
@@ -716,7 +694,6 @@
Zone Pacific/Port_Moresby 9:48:40 - LMT 1880
9:48:32 - PMMT 1895 # Port Moresby Mean Time
10:00 - +10
-Link Pacific/Port_Moresby Antarctica/DumontDUrville
#
# From Paul Eggert (2014-10-13):
# Base the Bougainville entry on the Arawa-Kieta region, which appears to have
@@ -749,10 +726,10 @@
-8:00 - -08
# American Samoa
+# Midway
Zone Pacific/Pago_Pago 12:37:12 - LMT 1892 Jul 5
-11:22:48 - LMT 1911
-11:00 - SST # S=Samoa
-Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Samoa (formerly and also known as Western Samoa)
@@ -883,11 +860,6 @@
13:00 - +13 1999
13:00 Tonga +13/+14
-# Tuvalu
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Pacific/Funafuti 11:56:52 - LMT 1901
- 12:00 - +12
-
# US minor outlying islands
@@ -938,17 +910,9 @@
# Kingman
# uninhabited
-# Midway
-# See Pacific/Pago_Pago.
-
# Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritimati
-# Wake
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Pacific/Wake 11:06:28 - LMT 1901
- 12:00 - +12
-
# Vanuatu
@@ -985,11 +949,6 @@
Zone Pacific/Efate 11:13:16 - LMT 1912 Jan 13 # Vila
11:00 Vanuatu +11/+12
-# Wallis and Futuna
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Pacific/Wallis 12:15:20 - LMT 1901
- 12:00 - +12
-
###############################################################################
# NOTES
@@ -1306,6 +1265,7 @@
# to have the extra hour of sunshine removed from their area." See:
# Daylight saving coming to WA in 2019. Guardian Express. 2018-04-01.
# https://www.communitynews.com.au/guardian-express/news/exclusive-daylight-savings-coming-wa-summer-2018/
+# [The article ends with "Today's date is April 1."]
# Queensland
@@ -1849,16 +1809,12 @@
# "In Marshall Islands, Friday is followed by Sunday", NY Times. 1993-08-22.
# https://www.nytimes.com/1993/08/22/world/in-marshall-islands-friday-is-followed-by-sunday.html
-# From Phake Nick (2018-10-27):
-# ... pointed out that
-# currently tzdata say Pacific/Kwajalein switched from GMT+11 to GMT-12 in
-# 1969 October without explanation, however an 1993 article from NYT say it
-# synchorized its day with US mainland about 40 years ago and thus the switch
-# should occur at around 1950s instead.
-#
-# From Paul Eggert (2018-11-18):
-# The NYT (actually, AP) article is vague and possibly wrong about this.
-# The article says the earlier switch was "40 years ago when the United States
+# From Paul Eggert (2022-03-31):
+# Phake Nick (2018-10-27) noted 's
+# citation of a 1993 AP article published in the New York Times saying
+# Kwajalein synchronized its day with the US mainland about 40 years earlier.
+# However the AP article is vague and possibly wrong about this. The article
+# says the earlier switch was "about 40 years ago when the United States
# Army established a missile test range here". However, the Kwajalein Test
# Center was established on 1960-10-01 and was run by the US Navy. It was
# transferred to the US Army on 1964-07-01. See "Seize the High Ground"
@@ -1905,13 +1861,6 @@
# Like the Ladrones (see Guam commentary), assume the Spanish East Indies
# kept American time until the Philippines switched at the end of 1844.
-# Alan Eugene Davis writes (1996-03-16),
-# "I am certain, having lived there for the past decade, that 'Truk'
-# (now properly known as Chuuk) ... is in the time zone GMT+10."
-#
-# Shanks & Pottenger write that Truk switched from UT +10 to +11
-# on 1978-10-01; ignore this for now.
-
# From Paul Eggert (1999-10-29):
# The Federated States of Micronesia Visitors Board writes in
# The Federated States of Micronesia - Visitor Information (1999-01-26)
@@ -2242,7 +2191,7 @@
# through the third Sunday in January at 03:00, like Fiji, for now.
# From David Wade (2017-10-18):
-# In August government was disolved by the King. The current prime minister
+# In August government was dissolved by the King. The current prime minister
# continued in office in care taker mode. It is easy to see that few
# decisions will be made until elections 16th November.
#
@@ -2250,26 +2199,6 @@
# For now, guess that DST is discontinued. That's what the IATA is guessing.
-# Wake
-
-# From Vernice Anderson, Personal Secretary to Philip Jessup,
-# US Ambassador At Large (oral history interview, 1971-02-02):
-#
-# Saturday, the 14th [of October, 1950] - ... The time was all the
-# more confusing at that point, because we had crossed the
-# International Date Line, thus getting two Sundays. Furthermore, we
-# discovered that Wake Island had two hours of daylight saving time
-# making calculation of time in Washington difficult if not almost
-# impossible.
-#
-# https://www.trumanlibrary.org/oralhist/andrsonv.htm
-
-# From Paul Eggert (2003-03-23):
-# We have no other report of DST in Wake Island, so omit this info for now.
-
-# See also the commentary for Micronesia.
-
-
###############################################################################
# The International Date Line
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/backward openjdk-11-11.0.18+10/make/data/tzdata/backward
--- openjdk-11-11.0.16+8/make/data/tzdata/backward 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/backward 2023-01-10 08:32:35.000000000 +0000
@@ -27,54 +27,33 @@
# 2009-05-17 by Arthur David Olson.
# This file provides links from old or merged timezone names to current ones.
-# Many names changed in late 1993. Several of these names are
+# Many names changed in 1993 and in 1995, and many merged names moved here
+# in the period from 2013 through 2022. Several of these names are
# also present in the file 'backzone', which has data important only
# for pre-1970 timestamps and so is out of scope for tzdb proper.
-# Link TARGET LINK-NAME
-Link Africa/Nairobi Africa/Asmera
-Link Africa/Abidjan Africa/Timbuktu
-Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
-Link America/Adak America/Atka
-Link America/Argentina/Buenos_Aires America/Buenos_Aires
-Link America/Argentina/Catamarca America/Catamarca
-Link America/Panama America/Coral_Harbour
-Link America/Argentina/Cordoba America/Cordoba
-Link America/Tijuana America/Ensenada
-Link America/Indiana/Indianapolis America/Fort_Wayne
-Link America/Nuuk America/Godthab
-Link America/Indiana/Indianapolis America/Indianapolis
-Link America/Argentina/Jujuy America/Jujuy
-Link America/Indiana/Knox America/Knox_IN
-Link America/Kentucky/Louisville America/Louisville
-Link America/Argentina/Mendoza America/Mendoza
-Link America/Toronto America/Montreal
-Link America/Rio_Branco America/Porto_Acre
-Link America/Argentina/Cordoba America/Rosario
-Link America/Tijuana America/Santa_Isabel
-Link America/Denver America/Shiprock
-Link America/Puerto_Rico America/Virgin
-Link Pacific/Auckland Antarctica/South_Pole
-Link Asia/Ashgabat Asia/Ashkhabad
-Link Asia/Kolkata Asia/Calcutta
-Link Asia/Shanghai Asia/Chongqing
-Link Asia/Shanghai Asia/Chungking
-Link Asia/Dhaka Asia/Dacca
-Link Asia/Shanghai Asia/Harbin
-Link Asia/Urumqi Asia/Kashgar
-Link Asia/Kathmandu Asia/Katmandu
-Link Asia/Macau Asia/Macao
-Link Asia/Yangon Asia/Rangoon
-Link Asia/Ho_Chi_Minh Asia/Saigon
-Link Asia/Jerusalem Asia/Tel_Aviv
-Link Asia/Thimphu Asia/Thimbu
-Link Asia/Makassar Asia/Ujung_Pandang
-Link Asia/Ulaanbaatar Asia/Ulan_Bator
-Link Atlantic/Faroe Atlantic/Faeroe
-Link Europe/Oslo Atlantic/Jan_Mayen
-Link Australia/Sydney Australia/ACT
-Link Australia/Sydney Australia/Canberra
-Link Australia/Hobart Australia/Currie
+# Although this file is optional and tzdb will work if you omit it by
+# building with 'make BACKWARD=', in practice downstream users
+# typically use this file for backward compatibility.
+
+# This file is divided into sections, one for each major reason for a
+# backward compatibility link. Each section is sorted by link name.
+
+# A "#= TARGET1" comment labels each link inserted only because some
+# .zi parsers (including tzcode through 2022e) mishandle links to links.
+# The comment says what the target would be if these parsers were fixed
+# so that data could contain links to links. For example, the line
+# "Link Australia/Sydney Australia/ACT #= Australia/Canberra" would be
+# "Link Australia/Canberra Australia/ACT" were it not that data lines
+# refrain from linking to links like Australia/Canberra, which means
+# the Australia/ACT line links instead to Australia/Sydney,
+# Australia/Canberra's target.
+
+
+# Pre-1993 naming conventions
+
+# Link TARGET LINK-NAME #= TARGET1
+Link Australia/Sydney Australia/ACT #= Australia/Canberra
Link Australia/Lord_Howe Australia/LHI
Link Australia/Sydney Australia/NSW
Link Australia/Darwin Australia/North
@@ -84,7 +63,7 @@
Link Australia/Melbourne Australia/Victoria
Link Australia/Perth Australia/West
Link Australia/Broken_Hill Australia/Yancowinna
-Link America/Rio_Branco Brazil/Acre
+Link America/Rio_Branco Brazil/Acre #= America/Porto_Acre
Link America/Noronha Brazil/DeNoronha
Link America/Sao_Paulo Brazil/East
Link America/Manaus Brazil/West
@@ -104,17 +83,36 @@
Link America/Havana Cuba
Link Africa/Cairo Egypt
Link Europe/Dublin Eire
+# Vanguard section, for most .zi parsers.
+#Link GMT Etc/GMT
+#Link GMT Etc/GMT+0
+#Link GMT Etc/GMT-0
+#Link GMT Etc/GMT0
+#Link GMT Etc/Greenwich
+# Rearguard section, for TZUpdater 2.3.2 and earlier.
+Link Etc/GMT Etc/GMT+0
+Link Etc/GMT Etc/GMT-0
+Link Etc/GMT Etc/GMT0
+Link Etc/GMT Etc/Greenwich
+# End of rearguard section.
Link Etc/UTC Etc/UCT
-Link Europe/London Europe/Belfast
-Link Europe/Chisinau Europe/Tiraspol
+Link Etc/UTC Etc/Universal
+Link Etc/UTC Etc/Zulu
Link Europe/London GB
Link Europe/London GB-Eire
+# Vanguard section, for most .zi parsers.
+#Link GMT GMT+0
+#Link GMT GMT-0
+#Link GMT GMT0
+#Link GMT Greenwich
+# Rearguard section, for TZUpdater 2.3.2 and earlier.
Link Etc/GMT GMT+0
Link Etc/GMT GMT-0
Link Etc/GMT GMT0
Link Etc/GMT Greenwich
+# End of rearguard section.
Link Asia/Hong_Kong Hongkong
-Link Atlantic/Reykjavik Iceland
+Link Africa/Abidjan Iceland #= Atlantic/Reykjavik
Link Asia/Tehran Iran
Link Asia/Jerusalem Israel
Link America/Jamaica Jamaica
@@ -126,14 +124,8 @@
Link America/Mexico_City Mexico/General
Link Pacific/Auckland NZ
Link Pacific/Chatham NZ-CHAT
-Link America/Denver Navajo
+Link America/Denver Navajo #= America/Shiprock
Link Asia/Shanghai PRC
-Link Pacific/Kanton Pacific/Enderbury
-Link Pacific/Honolulu Pacific/Johnston
-Link Pacific/Pohnpei Pacific/Ponape
-Link Pacific/Pago_Pago Pacific/Samoa
-Link Pacific/Chuuk Pacific/Truk
-Link Pacific/Chuuk Pacific/Yap
Link Europe/Warsaw Poland
Link Europe/Lisbon Portugal
Link Asia/Taipei ROC
@@ -157,3 +149,193 @@
Link Etc/UTC Universal
Link Europe/Moscow W-SU
Link Etc/UTC Zulu
+
+
+# Two-part names that were renamed mostly to three-part names in 1995
+
+# Link TARGET LINK-NAME #= TARGET1
+Link America/Argentina/Buenos_Aires America/Buenos_Aires
+Link America/Argentina/Catamarca America/Catamarca
+Link America/Argentina/Cordoba America/Cordoba
+Link America/Indiana/Indianapolis America/Indianapolis
+Link America/Argentina/Jujuy America/Jujuy
+Link America/Indiana/Knox America/Knox_IN
+Link America/Kentucky/Louisville America/Louisville
+Link America/Argentina/Mendoza America/Mendoza
+Link America/Puerto_Rico America/Virgin #= America/St_Thomas
+Link Pacific/Pago_Pago Pacific/Samoa
+
+
+# Pre-2013 practice, which typically had a Zone per zone.tab line
+
+# Link TARGET LINK-NAME
+Link Africa/Abidjan Africa/Accra
+Link Africa/Nairobi Africa/Addis_Ababa
+Link Africa/Nairobi Africa/Asmara
+Link Africa/Abidjan Africa/Bamako
+Link Africa/Lagos Africa/Bangui
+Link Africa/Abidjan Africa/Banjul
+Link Africa/Maputo Africa/Blantyre
+Link Africa/Lagos Africa/Brazzaville
+Link Africa/Maputo Africa/Bujumbura
+Link Africa/Abidjan Africa/Conakry
+Link Africa/Abidjan Africa/Dakar
+Link Africa/Nairobi Africa/Dar_es_Salaam
+Link Africa/Nairobi Africa/Djibouti
+Link Africa/Lagos Africa/Douala
+Link Africa/Abidjan Africa/Freetown
+Link Africa/Maputo Africa/Gaborone
+Link Africa/Maputo Africa/Harare
+Link Africa/Nairobi Africa/Kampala
+Link Africa/Maputo Africa/Kigali
+Link Africa/Lagos Africa/Kinshasa
+Link Africa/Lagos Africa/Libreville
+Link Africa/Abidjan Africa/Lome
+Link Africa/Lagos Africa/Luanda
+Link Africa/Maputo Africa/Lubumbashi
+Link Africa/Maputo Africa/Lusaka
+Link Africa/Lagos Africa/Malabo
+Link Africa/Johannesburg Africa/Maseru
+Link Africa/Johannesburg Africa/Mbabane
+Link Africa/Nairobi Africa/Mogadishu
+Link Africa/Lagos Africa/Niamey
+Link Africa/Abidjan Africa/Nouakchott
+Link Africa/Abidjan Africa/Ouagadougou
+Link Africa/Lagos Africa/Porto-Novo
+Link America/Puerto_Rico America/Anguilla
+Link America/Puerto_Rico America/Antigua
+Link America/Puerto_Rico America/Aruba
+Link America/Panama America/Atikokan
+Link America/Puerto_Rico America/Blanc-Sablon
+Link America/Panama America/Cayman
+Link America/Phoenix America/Creston
+Link America/Puerto_Rico America/Curacao
+Link America/Puerto_Rico America/Dominica
+Link America/Puerto_Rico America/Grenada
+Link America/Puerto_Rico America/Guadeloupe
+Link America/Puerto_Rico America/Kralendijk
+Link America/Puerto_Rico America/Lower_Princes
+Link America/Puerto_Rico America/Marigot
+Link America/Puerto_Rico America/Montserrat
+Link America/Toronto America/Nassau
+Link America/Puerto_Rico America/Port_of_Spain
+Link America/Puerto_Rico America/St_Barthelemy
+Link America/Puerto_Rico America/St_Kitts
+Link America/Puerto_Rico America/St_Lucia
+Link America/Puerto_Rico America/St_Thomas
+Link America/Puerto_Rico America/St_Vincent
+Link America/Puerto_Rico America/Tortola
+Link Pacific/Port_Moresby Antarctica/DumontDUrville
+Link Pacific/Auckland Antarctica/McMurdo
+Link Asia/Riyadh Antarctica/Syowa
+Link Asia/Urumqi Antarctica/Vostok
+Link Europe/Berlin Arctic/Longyearbyen
+Link Asia/Riyadh Asia/Aden
+Link Asia/Qatar Asia/Bahrain
+Link Asia/Kuching Asia/Brunei
+Link Asia/Singapore Asia/Kuala_Lumpur
+Link Asia/Riyadh Asia/Kuwait
+Link Asia/Dubai Asia/Muscat
+Link Asia/Bangkok Asia/Phnom_Penh
+Link Asia/Bangkok Asia/Vientiane
+Link Africa/Abidjan Atlantic/Reykjavik
+Link Africa/Abidjan Atlantic/St_Helena
+Link Europe/Brussels Europe/Amsterdam
+Link Europe/Prague Europe/Bratislava
+Link Europe/Zurich Europe/Busingen
+Link Europe/Berlin Europe/Copenhagen
+Link Europe/London Europe/Guernsey
+Link Europe/London Europe/Isle_of_Man
+Link Europe/London Europe/Jersey
+Link Europe/Belgrade Europe/Ljubljana
+Link Europe/Brussels Europe/Luxembourg
+Link Europe/Helsinki Europe/Mariehamn
+Link Europe/Paris Europe/Monaco
+Link Europe/Berlin Europe/Oslo
+Link Europe/Belgrade Europe/Podgorica
+Link Europe/Rome Europe/San_Marino
+Link Europe/Belgrade Europe/Sarajevo
+Link Europe/Belgrade Europe/Skopje
+Link Europe/Berlin Europe/Stockholm
+Link Europe/Zurich Europe/Vaduz
+Link Europe/Rome Europe/Vatican
+Link Europe/Belgrade Europe/Zagreb
+Link Africa/Nairobi Indian/Antananarivo
+Link Asia/Bangkok Indian/Christmas
+Link Asia/Yangon Indian/Cocos
+Link Africa/Nairobi Indian/Comoro
+Link Indian/Maldives Indian/Kerguelen
+Link Asia/Dubai Indian/Mahe
+Link Africa/Nairobi Indian/Mayotte
+Link Asia/Dubai Indian/Reunion
+Link Pacific/Port_Moresby Pacific/Chuuk
+Link Pacific/Tarawa Pacific/Funafuti
+Link Pacific/Tarawa Pacific/Majuro
+Link Pacific/Pago_Pago Pacific/Midway
+Link Pacific/Guadalcanal Pacific/Pohnpei
+Link Pacific/Guam Pacific/Saipan
+Link Pacific/Tarawa Pacific/Wake
+Link Pacific/Tarawa Pacific/Wallis
+
+
+# Non-zone.tab locations with timestamps since 1970 that duplicate
+# those of an existing location
+
+# Link TARGET LINK-NAME
+Link Africa/Abidjan Africa/Timbuktu
+Link America/Argentina/Catamarca America/Argentina/ComodRivadavia
+Link America/Adak America/Atka
+Link America/Panama America/Coral_Harbour
+Link America/Tijuana America/Ensenada
+Link America/Indiana/Indianapolis America/Fort_Wayne
+Link America/Toronto America/Montreal
+Link America/Toronto America/Nipigon
+Link America/Iqaluit America/Pangnirtung
+Link America/Rio_Branco America/Porto_Acre
+Link America/Winnipeg America/Rainy_River
+Link America/Argentina/Cordoba America/Rosario
+Link America/Tijuana America/Santa_Isabel
+Link America/Denver America/Shiprock
+Link America/Toronto America/Thunder_Bay
+Link Pacific/Auckland Antarctica/South_Pole
+Link Asia/Shanghai Asia/Chongqing
+Link Asia/Shanghai Asia/Harbin
+Link Asia/Urumqi Asia/Kashgar
+Link Asia/Jerusalem Asia/Tel_Aviv
+Link Europe/Berlin Atlantic/Jan_Mayen
+Link Australia/Sydney Australia/Canberra
+Link Australia/Hobart Australia/Currie
+Link Europe/London Europe/Belfast
+Link Europe/Chisinau Europe/Tiraspol
+Link Europe/Kyiv Europe/Uzhgorod
+Link Europe/Kyiv Europe/Zaporozhye
+Link Pacific/Kanton Pacific/Enderbury
+Link Pacific/Honolulu Pacific/Johnston
+Link Pacific/Port_Moresby Pacific/Yap
+
+
+# Alternate names for the same location
+
+# Link TARGET LINK-NAME #= TARGET1
+Link Africa/Nairobi Africa/Asmera #= Africa/Asmara
+Link America/Nuuk America/Godthab
+Link Asia/Ashgabat Asia/Ashkhabad
+Link Asia/Kolkata Asia/Calcutta
+Link Asia/Shanghai Asia/Chungking #= Asia/Chongqing
+Link Asia/Dhaka Asia/Dacca
+# Istanbul is in both continents.
+Link Europe/Istanbul Asia/Istanbul
+Link Asia/Kathmandu Asia/Katmandu
+Link Asia/Macau Asia/Macao
+Link Asia/Yangon Asia/Rangoon
+Link Asia/Ho_Chi_Minh Asia/Saigon
+Link Asia/Thimphu Asia/Thimbu
+Link Asia/Makassar Asia/Ujung_Pandang
+Link Asia/Ulaanbaatar Asia/Ulan_Bator
+Link Atlantic/Faroe Atlantic/Faeroe
+Link Europe/Kyiv Europe/Kiev
+# Classically, Cyprus is in Asia; e.g. see Herodotus, Histories, I.72.
+# However, for various reasons many users expect to find it under Europe.
+Link Asia/Nicosia Europe/Nicosia
+Link Pacific/Guadalcanal Pacific/Ponape #= Pacific/Pohnpei
+Link Pacific/Port_Moresby Pacific/Truk #= Pacific/Chuuk
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/etcetera openjdk-11-11.0.18+10/make/data/tzdata/etcetera
--- openjdk-11-11.0.16+8/make/data/tzdata/etcetera 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/etcetera 2023-01-10 08:32:35.000000000 +0000
@@ -39,22 +39,23 @@
# Do not use a POSIX TZ setting like TZ='GMT+4', which is four hours
# behind GMT but uses the completely misleading abbreviation "GMT".
-Zone Etc/GMT 0 - GMT
+# The following zone is used by tzcode functions like gmtime,
+# which load the "UTC" file to handle seconds properly.
Zone Etc/UTC 0 - UTC
+# Functions like gmtime load the "GMT" file to handle leap seconds properly.
+# Vanguard section, which works with most .zi parsers.
+#Zone GMT 0 - GMT
+# Rearguard section, for TZUpdater 2.3.2 and earlier.
+Zone Etc/GMT 0 - GMT
+
# The following link uses older naming conventions,
# but it belongs here, not in the file 'backward',
-# as functions like gmtime load the "GMT" file to handle leap seconds properly.
-# We want this to work even on installations that omit the other older names.
+# as it is needed for tzcode releases through 2022a,
+# where functions like gmtime load "GMT" instead of the "Etc/UTC".
+# We want this to work even on installations that omit 'backward'.
Link Etc/GMT GMT
-
-Link Etc/UTC Etc/Universal
-Link Etc/UTC Etc/Zulu
-
-Link Etc/GMT Etc/Greenwich
-Link Etc/GMT Etc/GMT-0
-Link Etc/GMT Etc/GMT+0
-Link Etc/GMT Etc/GMT0
+# End of rearguard section.
# Be consistent with POSIX TZ settings in the Zone names,
# even though this is the opposite of what many people expect.
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/europe openjdk-11-11.0.18+10/make/data/tzdata/europe
--- openjdk-11-11.0.16+8/make/data/tzdata/europe 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/europe 2023-01-10 08:32:35.000000000 +0000
@@ -326,8 +326,7 @@
# UT-00:25:22 and cites the International Telegraph Bureau. As it is
# not clear that there was any practical significance to the change
# from UT-00:25:22 to UT-00:25:21.1 in civil timekeeping, omit this
-# transition for now and just use the latter value, omitting its
-# fraction since our format cannot represent fractions.
+# transition for now and just use the latter value.
# "Countess Markievicz ... claimed that the [1916] abolition of Dublin Mean Time
# was among various actions undertaken by the 'English' government that
@@ -523,14 +522,11 @@
# Use Europe/London for Jersey, Guernsey, and the Isle of Man.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/London -0:01:15 - LMT 1847 Dec 1 0:00s
+Zone Europe/London -0:01:15 - LMT 1847 Dec 1
0:00 GB-Eire %s 1968 Oct 27
1:00 - BST 1971 Oct 31 2:00u
0:00 GB-Eire %s 1996
0:00 EU GMT/BST
-Link Europe/London Europe/Jersey
-Link Europe/London Europe/Guernsey
-Link Europe/London Europe/Isle_of_Man
# From Paul Eggert (2018-02-15):
# In January 2018 we discovered that the negative SAVE values in the
@@ -561,7 +557,8 @@
Rule Eire 1996 max - Oct lastSun 1:00u -1:00 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Dublin -0:25:00 - LMT 1880 Aug 2
+ #STDOFF -0:25:21.1
+Zone Europe/Dublin -0:25:21 - LMT 1880 Aug 2
-0:25:21 - DMT 1916 May 21 2:00s
-0:25:21 1:00 IST 1916 Oct 1 2:00s
0:00 GB-Eire %s 1921 Dec 6 # independence
@@ -902,6 +899,8 @@
3:00 - +03
# Belgium
+# Luxembourg
+# Netherlands
#
# From Michael Deckers (2019-08-25):
# The exposition in the web page
@@ -985,9 +984,6 @@
1:00 Belgium CE%sT 1977
1:00 EU CE%sT
-# Bosnia and Herzegovina
-# See Europe/Belgrade.
-
# Bulgaria
#
# From Plamen Simenov via Steffen Thorsen (1999-09-09):
@@ -1013,13 +1009,11 @@
2:00 E-Eur EE%sT 1997
2:00 EU EE%sT
-# Croatia
-# See Europe/Belgrade.
-
# Cyprus
# Please see the 'asia' file for Asia/Nicosia.
-# Czech Republic / Czechia
+# Czech Republic (Czechia)
+# Slovakia
#
# From Paul Eggert (2018-04-15):
# The source for Czech data is: Kdy začíná a končí letní čas. 2018-04-15.
@@ -1046,65 +1040,14 @@
# End of rearguard section.
1:00 Czech CE%sT 1979
1:00 EU CE%sT
-# Use Europe/Prague also for Slovakia.
-
-# Denmark, Faroe Islands, and Greenland
-# From Jesper Nørgaard Welen (2005-04-26):
-# the law [introducing standard time] was in effect from 1894-01-01....
-# The page https://www.retsinformation.dk/eli/lta/1893/83
-# confirms this, and states that the law was put forth 1893-03-29.
-#
-# The EU [actually, EEC and Euratom] treaty with effect from 1973:
-# https://www.retsinformation.dk/eli/lta/1972/21100
-#
-# This provoked a new law from 1974 to make possible summer time changes
-# in subsequent decrees with the law
-# https://www.retsinformation.dk/eli/lta/1974/223
-#
-# It seems however that no decree was set forward until 1980. I have
-# not found any decree, but in another related law, the effecting DST
-# changes are stated explicitly to be from 1980-04-06 at 02:00 to
-# 1980-09-28 at 02:00. If this is true, this differs slightly from
-# the EU rule in that DST runs to 02:00, not 03:00. We don't know
-# when Denmark began using the EU rule correctly, but we have only
-# confirmation of the 1980-time, so I presume it was correct in 1981:
-# The law is about the management of the extra hour, concerning
-# working hours reported and effect on obligatory-rest rules (which
-# was suspended on that night):
-# https://web.archive.org/web/20140104053304/https://www.retsinformation.dk/Forms/R0710.aspx?id=60267
-
-# From Jesper Nørgaard Welen (2005-06-11):
-# The Herning Folkeblad (1980-09-26) reported that the night between
-# Saturday and Sunday the clock is set back from three to two.
-
-# From Paul Eggert (2005-06-11):
-# Hence the "02:00" of the 1980 law refers to standard time, not
-# wall-clock time, and so the EU rules were in effect in 1980.
-
-# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Denmark 1916 only - May 14 23:00 1:00 S
-Rule Denmark 1916 only - Sep 30 23:00 0 -
-Rule Denmark 1940 only - May 15 0:00 1:00 S
-Rule Denmark 1945 only - Apr 2 2:00s 1:00 S
-Rule Denmark 1945 only - Aug 15 2:00s 0 -
-Rule Denmark 1946 only - May 1 2:00s 1:00 S
-Rule Denmark 1946 only - Sep 1 2:00s 0 -
-Rule Denmark 1947 only - May 4 2:00s 1:00 S
-Rule Denmark 1947 only - Aug 10 2:00s 0 -
-Rule Denmark 1948 only - May 9 2:00s 1:00 S
-Rule Denmark 1948 only - Aug 8 2:00s 0 -
-#
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Copenhagen 0:50:20 - LMT 1890
- 0:50:20 - CMT 1894 Jan 1 # Copenhagen MT
- 1:00 Denmark CE%sT 1942 Nov 2 2:00s
- 1:00 C-Eur CE%sT 1945 Apr 2 2:00
- 1:00 Denmark CE%sT 1980
- 1:00 EU CE%sT
+# Faroe Is
+# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Atlantic/Faroe -0:27:04 - LMT 1908 Jan 11 # Tórshavn
0:00 - WET 1981
0:00 EU WE%sT
+
+# Greenland
#
# From Paul Eggert (2004-10-31):
# During World War II, Germany maintained secret manned weather stations in
@@ -1183,7 +1126,30 @@
# "National Park" by Executive Order:
# http://naalakkersuisut.gl/~/media/Nanoq/Files/Attached%20Files/Engelske-tekster/Legislation/Executive%20Order%20National%20Park.rtf
# It is their only National Park.
+
+# From Jonas Nyrup (2022-11-24):
+# On last Saturday in October 2023 when DST ends America/Nuuk will switch
+# from -03/-02 to -02/-01
+# https://sermitsiaq.ag/forslagtidsforskel-danmark-mindskes-sommertid-beholdes
+# ...
+# https://sermitsiaq.ag/groenland-skifte-tidszone-trods-bekymringer
#
+# From Jürgen Appel (2022-11-25):
+# https://ina.gl/samlinger/oversigt-over-samlinger/samling/dagsordener/dagsorden.aspx?lang=da&day=24-11-2022
+# If I understand this correctly, from the next planned switch to
+# summer time, Greenland will permanently stay at that time, i.e. no
+# switch back to winter time in 2023 will occur.
+#
+# From Paul Eggert (2022-11-28):
+# The official document in Danish
+# https://naalakkersuisut.gl/-/media/naalakkersuisut/filer/kundgoerelser/2022/11/2511/31_da_inatsisartutlov-om-tidens-bestemmelse.pdf?la=da&hash=A33597D8A38CC7038465241119EF34F3
+# says standard time for Greenland is -02, that Naalakkersuisut can lay down
+# rules for DST and can require some areas to use a different time zone,
+# and that this all takes effect 2023-03-25 22:00. The abovementioned
+# "bekymringer" URL says the intent is no transition March 25, that
+# Greenland will not go back to winter time in fall 2023, and that
+# only America/Nuuk is affected (though further changes may occur).
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Thule 1991 1992 - Mar lastSun 2:00 1:00 D
Rule Thule 1991 1992 - Sep lastSun 2:00 0 S
@@ -1206,7 +1172,8 @@
-1:00 EU -01/+00
Zone America/Nuuk -3:26:56 - LMT 1916 Jul 28 # Godthåb
-3:00 - -03 1980 Apr 6 2:00
- -3:00 EU -03/-02
+ -3:00 EU -03/-02 2023 Mar 25 22:00
+ -2:00 - -02
Zone America/Thule -4:35:08 - LMT 1916 Jul 28 # Pituffik
-4:00 Thule A%sT
@@ -1321,20 +1288,17 @@
Rule Finland 1981 1982 - Mar lastSun 2:00 1:00 S
Rule Finland 1981 1982 - Sep lastSun 3:00 0 -
-# Milne says Helsinki (Helsingfors) time was 1:39:49.2 (official document);
-# round to nearest.
+# Milne says Helsinki (Helsingfors) time was 1:39:49.2 (official document).
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF 1:39:49.2
Zone Europe/Helsinki 1:39:49 - LMT 1878 May 31
1:39:49 - HMT 1921 May # Helsinki Mean Time
2:00 Finland EE%sT 1983
2:00 EU EE%sT
-# Åland Is
-Link Europe/Helsinki Europe/Mariehamn
-
-
# France
+# Monaco
# From Ciro Discepolo (2000-12-20):
#
@@ -1472,7 +1436,10 @@
1:00 France CE%sT 1977
1:00 EU CE%sT
+# Denmark
# Germany
+# Norway
+# Sweden
# From Markus Kuhn (1998-09-29):
# The German time zone web site by the Physikalisch-Technische
@@ -1490,6 +1457,53 @@
# However, Moscow did not observe daylight saving in 1945, so
# this was equivalent to UT +03, not +04.
+# Svalbard & Jan Mayen
+
+# From Steffen Thorsen (2001-05-01):
+# Although I could not find it explicitly, it seems that Jan Mayen and
+# Svalbard have been using the same time as Norway at least since the
+# time they were declared as parts of Norway. Svalbard was declared
+# as a part of Norway by law of 1925-07-17 no 11, section 4 and Jan
+# Mayen by law of 1930-02-27 no 2, section 2. (From
+# and
+# ). The law/regulation
+# for normal/standard time in Norway is from 1894-06-29 no 1 (came
+# into operation on 1895-01-01) and Svalbard/Jan Mayen seem to be a
+# part of this law since 1925/1930. (From
+# ) I have not been
+# able to find if Jan Mayen used a different time zone (e.g. -0100)
+# before 1930. Jan Mayen has only been "inhabited" since 1921 by
+# Norwegian meteorologists and maybe used the same time as Norway ever
+# since 1921. Svalbard (Arctic/Longyearbyen) has been inhabited since
+# before 1895, and therefore probably changed the local time somewhere
+# between 1895 and 1925 (inclusive).
+
+# From Paul Eggert (2013-09-04):
+#
+# Actually, Jan Mayen was never occupied by Germany during World War II,
+# so it must have diverged from Oslo time during the war, as Oslo was
+# keeping Berlin time.
+#
+# says that the meteorologists
+# burned down their station in 1940 and left the island, but returned in
+# 1941 with a small Norwegian garrison and continued operations despite
+# frequent air attacks from Germans. In 1943 the Americans established a
+# radiolocating station on the island, called "Atlantic City". Possibly
+# the UT offset changed during the war, but I think it unlikely that
+# Jan Mayen used German daylight-saving rules.
+#
+# Svalbard is more complicated, as it was raided in August 1941 by an
+# Allied party that evacuated the civilian population to England (says
+# ). The Svalbard FAQ
+# says that the Germans were
+# expelled on 1942-05-14. However, small parties of Germans did return,
+# and according to Wilhelm Dege's book "War North of 80" (1954)
+# http://www.ucalgary.ca/UofC/departments/UP/1-55238/1-55238-110-2.html
+# the German armed forces at the Svalbard weather station code-named
+# Haudegen did not surrender to the Allies until September 1945.
+#
+# All these events predate our cutoff date of 1970, so use Europe/Berlin
+# for these regions.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Germany 1946 only - Apr 14 2:00s 1:00 S
@@ -1515,21 +1529,6 @@
1:00 Germany CE%sT 1980
1:00 EU CE%sT
-# From Tobias Conradi (2011-09-12):
-# Büsingen , surrounded by the Swiss canton
-# Schaffhausen, did not start observing DST in 1980 as the rest of DE
-# (West Germany at that time) and DD (East Germany at that time) did.
-# DD merged into DE, the area is currently covered by code DE in ISO 3166-1,
-# which in turn is covered by the zone Europe/Berlin.
-#
-# Source for the time in Büsingen 1980:
-# http://www.srf.ch/player/video?id=c012c029-03b7-4c2b-9164-aa5902cd58d3
-
-# From Arthur David Olson (2012-03-03):
-# Büsingen and Zurich have shared clocks since 1970.
-
-Link Europe/Zurich Europe/Busingen
-
# Georgia
# Please see the "asia" file for Asia/Tbilisi.
# Herodotus (Histories, IV.45) says Georgia north of the Phasis (now Rioni)
@@ -1537,7 +1536,7 @@
# Gibraltar
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2 0:00s
+Zone Europe/Gibraltar -0:21:24 - LMT 1880 Aug 2
0:00 GB-Eire %s 1957 Apr 14 2:00
1:00 - CET 1982
1:00 EU CE%sT
@@ -1647,65 +1646,9 @@
1:00 Hungary CE%sT 1984
1:00 EU CE%sT
-# Iceland
-#
-# From Adam David (1993-11-06):
-# The name of the timezone in Iceland for system / mail / news purposes is GMT.
-#
-# (1993-12-05):
-# This material is paraphrased from the 1988 edition of the University of
-# Iceland Almanak.
-#
-# From January 1st, 1908 the whole of Iceland was standardised at 1 hour
-# behind GMT. Previously, local mean solar time was used in different parts
-# of Iceland, the almanak had been based on Reykjavík mean solar time which
-# was 1 hour and 28 minutes behind GMT.
-#
-# "first day of winter" referred to [below] means the first day of the 26 weeks
-# of winter, according to the old icelandic calendar that dates back to the
-# time the norsemen first settled Iceland. The first day of winter is always
-# Saturday, but is not dependent on the Julian or Gregorian calendars.
-#
-# (1993-12-10):
-# I have a reference from the Oxford Icelandic-English dictionary for the
-# beginning of winter, which ties it to the ecclesiastical calendar (and thus
-# to the julian/gregorian calendar) over the period in question.
-# the winter begins on the Saturday next before St. Luke's day
-# (old style), or on St. Luke's day, if a Saturday.
-# St. Luke's day ought to be traceable from ecclesiastical sources. "old style"
-# might be a reference to the Julian calendar as opposed to Gregorian, or it
-# might mean something else (???).
-#
-# From Paul Eggert (2014-11-22):
-# The information below is taken from the 1988 Almanak; see
-# http://www.almanak.hi.is/klukkan.html
-#
-# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Iceland 1917 1919 - Feb 19 23:00 1:00 -
-Rule Iceland 1917 only - Oct 21 1:00 0 -
-Rule Iceland 1918 1919 - Nov 16 1:00 0 -
-Rule Iceland 1921 only - Mar 19 23:00 1:00 -
-Rule Iceland 1921 only - Jun 23 1:00 0 -
-Rule Iceland 1939 only - Apr 29 23:00 1:00 -
-Rule Iceland 1939 only - Oct 29 2:00 0 -
-Rule Iceland 1940 only - Feb 25 2:00 1:00 -
-Rule Iceland 1940 1941 - Nov Sun>=2 1:00s 0 -
-Rule Iceland 1941 1942 - Mar Sun>=2 1:00s 1:00 -
-# 1943-1946 - first Sunday in March until first Sunday in winter
-Rule Iceland 1943 1946 - Mar Sun>=1 1:00s 1:00 -
-Rule Iceland 1942 1948 - Oct Sun>=22 1:00s 0 -
-# 1947-1967 - first Sunday in April until first Sunday in winter
-Rule Iceland 1947 1967 - Apr Sun>=1 1:00s 1:00 -
-# 1949 and 1967 Oct transitions delayed by 1 week
-Rule Iceland 1949 only - Oct 30 1:00s 0 -
-Rule Iceland 1950 1966 - Oct Sun>=22 1:00s 0 -
-Rule Iceland 1967 only - Oct 29 1:00s 0 -
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Atlantic/Reykjavik -1:28 - LMT 1908
- -1:00 Iceland -01/+00 1968 Apr 7 1:00s
- 0:00 - GMT
-
# Italy
+# San Marino
+# Vatican City
#
# From Paul Eggert (2001-03-06):
# Sicily and Sardinia each had their own time zones from 1866 to 1893,
@@ -1819,19 +1762,12 @@
Rule Italy 1979 only - Sep 30 0:00s 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Europe/Rome 0:49:56 - LMT 1866 Dec 12
- 0:49:56 - RMT 1893 Oct 31 23:49:56 # Rome Mean
+ 0:49:56 - RMT 1893 Oct 31 23:00u # Rome Mean
1:00 Italy CE%sT 1943 Sep 10
1:00 C-Eur CE%sT 1944 Jun 4
1:00 Italy CE%sT 1980
1:00 EU CE%sT
-# Kosovo
-# See Europe/Belgrade.
-
-
-Link Europe/Rome Europe/Vatican
-Link Europe/Rome Europe/San_Marino
-
# Latvia
# From Liene Kanepe (1998-09-17):
@@ -1914,19 +1850,6 @@
2:00 - EET 2001 Jan 2
2:00 EU EE%sT
-# Liechtenstein
-
-# From Paul Eggert (2013-09-09):
-# Shanks & Pottenger say Vaduz is like Zurich.
-
-# From Alois Treindl (2019-07-04):
-# I was able to access the online archive of the Vaduz paper Vaterland ...
-# I could confirm from the paper that Liechtenstein did in fact follow
-# the same DST in 1941 and 1942 as Switzerland did.
-
-Link Europe/Zurich Europe/Vaduz
-
-
# Lithuania
# From Paul Eggert (2016-03-18):
@@ -1979,45 +1902,6 @@
2:00 - EET 2003 Jan 1
2:00 EU EE%sT
-# Luxembourg
-# Whitman disagrees with most of these dates in minor ways;
-# go with Shanks & Pottenger.
-# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Lux 1916 only - May 14 23:00 1:00 S
-Rule Lux 1916 only - Oct 1 1:00 0 -
-Rule Lux 1917 only - Apr 28 23:00 1:00 S
-Rule Lux 1917 only - Sep 17 1:00 0 -
-Rule Lux 1918 only - Apr Mon>=15 2:00s 1:00 S
-Rule Lux 1918 only - Sep Mon>=15 2:00s 0 -
-Rule Lux 1919 only - Mar 1 23:00 1:00 S
-Rule Lux 1919 only - Oct 5 3:00 0 -
-Rule Lux 1920 only - Feb 14 23:00 1:00 S
-Rule Lux 1920 only - Oct 24 2:00 0 -
-Rule Lux 1921 only - Mar 14 23:00 1:00 S
-Rule Lux 1921 only - Oct 26 2:00 0 -
-Rule Lux 1922 only - Mar 25 23:00 1:00 S
-Rule Lux 1922 only - Oct Sun>=2 1:00 0 -
-Rule Lux 1923 only - Apr 21 23:00 1:00 S
-Rule Lux 1923 only - Oct Sun>=2 2:00 0 -
-Rule Lux 1924 only - Mar 29 23:00 1:00 S
-Rule Lux 1924 1928 - Oct Sun>=2 1:00 0 -
-Rule Lux 1925 only - Apr 5 23:00 1:00 S
-Rule Lux 1926 only - Apr 17 23:00 1:00 S
-Rule Lux 1927 only - Apr 9 23:00 1:00 S
-Rule Lux 1928 only - Apr 14 23:00 1:00 S
-Rule Lux 1929 only - Apr 20 23:00 1:00 S
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Luxembourg 0:24:36 - LMT 1904 Jun
- 1:00 Lux CE%sT 1918 Nov 25
- 0:00 Lux WE%sT 1929 Oct 6 2:00s
- 0:00 Belgium WE%sT 1940 May 14 3:00
- 1:00 C-Eur WE%sT 1944 Sep 18 3:00
- 1:00 Belgium CE%sT 1977
- 1:00 EU CE%sT
-
-# North Macedonia
-# See Europe/Belgrade.
-
# Malta
#
# From Paul Eggert (2016-10-21):
@@ -2032,7 +1916,7 @@
Rule Malta 1975 1980 - Sep Sun>=15 2:00 0 -
Rule Malta 1980 only - Mar 31 2:00 1:00 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 0:00s # Valletta
+Zone Europe/Malta 0:58:04 - LMT 1893 Nov 2 # Valletta
1:00 Italy CE%sT 1973 Mar 31
1:00 Malta CE%sT 1981
1:00 EU CE%sT
@@ -2113,177 +1997,6 @@
# See Romania commentary for the guessed 1997 transition to EU rules.
2:00 Moldova EE%sT
-# Monaco
-#
-# From Michael Deckers (2020-06-12):
-# In the "Journal de Monaco" of 1892-05-24, online at
-# https://journaldemonaco.gouv.mc/var/jdm/storage/original/application/b1c67c12c5af11b41ea888fb048e4fe8.pdf
-# we read: ...
-# [In virtue of a Sovereign Ordinance of the May 13 of the current [year],
-# legal time in the Principality will be set to, from the date of June 1,
-# 1892 onwards, to the meridian of Paris, as in France.]
-# In the "Journal de Monaco" of 1911-03-28, online at
-# https://journaldemonaco.gouv.mc/var/jdm/storage/original/application/de74ffb7db53d4f599059fe8f0ed482a.pdf
-# we read an ordinance of 1911-03-16: ...
-# [Legal time in the Principality will be set, from the date of promulgation
-# of the present ordinance, to legal time in France.... Consequently, legal
-# time will be retarded by 9 minutes and 21 seconds.]
-#
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Monaco 0:29:32 - LMT 1892 Jun 1
- 0:09:21 - PMT 1911 Mar 29 # Paris Mean Time
- 0:00 France WE%sT 1945 Sep 16 3:00
- 1:00 France CE%sT 1977
- 1:00 EU CE%sT
-
-# Montenegro
-# See Europe/Belgrade.
-
-# Netherlands
-
-# Howse writes that the Netherlands' railways used GMT between 1892 and 1940,
-# but for other purposes the Netherlands used Amsterdam mean time.
-
-# However, Robert H. van Gent writes (2001-04-01):
-# Howse's statement is only correct up to 1909. From 1909-05-01 (00:00:00
-# Amsterdam mean time) onwards, the whole of the Netherlands (including
-# the Dutch railways) was required by law to observe Amsterdam mean time
-# (19 minutes 32.13 seconds ahead of GMT). This had already been the
-# common practice (except for the railways) for many decades but it was
-# not until 1909 when the Dutch government finally defined this by law.
-# On 1937-07-01 this was changed to 20 minutes (exactly) ahead of GMT and
-# was generally known as Dutch Time ("Nederlandse Tijd").
-#
-# (2001-04-08):
-# 1892-05-01 was the date when the Dutch railways were by law required to
-# observe GMT while the remainder of the Netherlands adhered to the common
-# practice of following Amsterdam mean time.
-#
-# (2001-04-09):
-# In 1835 the authorities of the province of North Holland requested the
-# municipal authorities of the towns and cities in the province to observe
-# Amsterdam mean time but I do not know in how many cases this request was
-# actually followed.
-#
-# From 1852 onwards the Dutch telegraph offices were by law required to
-# observe Amsterdam mean time. As the time signals from the observatory of
-# Leiden were also distributed by the telegraph system, I assume that most
-# places linked up with the telegraph (and railway) system automatically
-# adopted Amsterdam mean time.
-#
-# Although the early Dutch railway companies initially observed a variety
-# of times, most of them had adopted Amsterdam mean time by 1858 but it
-# was not until 1866 when they were all required by law to observe
-# Amsterdam mean time.
-
-# The data entries before 1945 are taken from
-# https://www.staff.science.uu.nl/~gent0113/wettijd/wettijd.htm
-
-# From Paul Eggert (2021-05-09):
-# I invented the abbreviations AMT for Amsterdam Mean Time and NST for
-# Netherlands Summer Time, used in the Netherlands from 1835 to 1937.
-
-# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Neth 1916 only - May 1 0:00 1:00 NST # Netherlands Summer Time
-Rule Neth 1916 only - Oct 1 0:00 0 AMT # Amsterdam Mean Time
-Rule Neth 1917 only - Apr 16 2:00s 1:00 NST
-Rule Neth 1917 only - Sep 17 2:00s 0 AMT
-Rule Neth 1918 1921 - Apr Mon>=1 2:00s 1:00 NST
-Rule Neth 1918 1921 - Sep lastMon 2:00s 0 AMT
-Rule Neth 1922 only - Mar lastSun 2:00s 1:00 NST
-Rule Neth 1922 1936 - Oct Sun>=2 2:00s 0 AMT
-Rule Neth 1923 only - Jun Fri>=1 2:00s 1:00 NST
-Rule Neth 1924 only - Mar lastSun 2:00s 1:00 NST
-Rule Neth 1925 only - Jun Fri>=1 2:00s 1:00 NST
-# From 1926 through 1939 DST began 05-15, except that it was delayed by a week
-# in years when 05-15 fell in the Pentecost weekend.
-Rule Neth 1926 1931 - May 15 2:00s 1:00 NST
-Rule Neth 1932 only - May 22 2:00s 1:00 NST
-Rule Neth 1933 1936 - May 15 2:00s 1:00 NST
-Rule Neth 1937 only - May 22 2:00s 1:00 NST
-Rule Neth 1937 only - Jul 1 0:00 1:00 S
-Rule Neth 1937 1939 - Oct Sun>=2 2:00s 0 -
-Rule Neth 1938 1939 - May 15 2:00s 1:00 S
-Rule Neth 1945 only - Apr 2 2:00s 1:00 S
-Rule Neth 1945 only - Sep 16 2:00s 0 -
-#
-# Amsterdam Mean Time was +00:19:32.13, but the .13 is omitted
-# below because the current format requires STDOFF to be an integer.
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Amsterdam 0:19:32 - LMT 1835
- 0:19:32 Neth %s 1937 Jul 1
- 0:20 Neth +0020/+0120 1940 May 16 0:00
- 1:00 C-Eur CE%sT 1945 Apr 2 2:00
- 1:00 Neth CE%sT 1977
- 1:00 EU CE%sT
-
-# Norway
-# http://met.no/met/met_lex/q_u/sommertid.html (2004-01) agrees with Shanks &
-# Pottenger.
-# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule Norway 1916 only - May 22 1:00 1:00 S
-Rule Norway 1916 only - Sep 30 0:00 0 -
-Rule Norway 1945 only - Apr 2 2:00s 1:00 S
-Rule Norway 1945 only - Oct 1 2:00s 0 -
-Rule Norway 1959 1964 - Mar Sun>=15 2:00s 1:00 S
-Rule Norway 1959 1965 - Sep Sun>=15 2:00s 0 -
-Rule Norway 1965 only - Apr 25 2:00s 1:00 S
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
- 1:00 Norway CE%sT 1940 Aug 10 23:00
- 1:00 C-Eur CE%sT 1945 Apr 2 2:00
- 1:00 Norway CE%sT 1980
- 1:00 EU CE%sT
-
-# Svalbard & Jan Mayen
-
-# From Steffen Thorsen (2001-05-01):
-# Although I could not find it explicitly, it seems that Jan Mayen and
-# Svalbard have been using the same time as Norway at least since the
-# time they were declared as parts of Norway. Svalbard was declared
-# as a part of Norway by law of 1925-07-17 no 11, section 4 and Jan
-# Mayen by law of 1930-02-27 no 2, section 2. (From
-# and
-# ). The law/regulation
-# for normal/standard time in Norway is from 1894-06-29 no 1 (came
-# into operation on 1895-01-01) and Svalbard/Jan Mayen seem to be a
-# part of this law since 1925/1930. (From
-# ) I have not been
-# able to find if Jan Mayen used a different time zone (e.g. -0100)
-# before 1930. Jan Mayen has only been "inhabited" since 1921 by
-# Norwegian meteorologists and maybe used the same time as Norway ever
-# since 1921. Svalbard (Arctic/Longyearbyen) has been inhabited since
-# before 1895, and therefore probably changed the local time somewhere
-# between 1895 and 1925 (inclusive).
-
-# From Paul Eggert (2013-09-04):
-#
-# Actually, Jan Mayen was never occupied by Germany during World War II,
-# so it must have diverged from Oslo time during the war, as Oslo was
-# keeping Berlin time.
-#
-# says that the meteorologists
-# burned down their station in 1940 and left the island, but returned in
-# 1941 with a small Norwegian garrison and continued operations despite
-# frequent air attacks from Germans. In 1943 the Americans established a
-# radiolocating station on the island, called "Atlantic City". Possibly
-# the UT offset changed during the war, but I think it unlikely that
-# Jan Mayen used German daylight-saving rules.
-#
-# Svalbard is more complicated, as it was raided in August 1941 by an
-# Allied party that evacuated the civilian population to England (says
-# ). The Svalbard FAQ
-# says that the Germans were
-# expelled on 1942-05-14. However, small parties of Germans did return,
-# and according to Wilhelm Dege's book "War North of 80" (1954)
-# http://www.ucalgary.ca/UofC/departments/UP/1-55238/1-55238-110-2.html
-# the German armed forces at the Svalbard weather station code-named
-# Haudegen did not surrender to the Allies until September 1945.
-#
-# All these events predate our cutoff date of 1970, so use Europe/Oslo
-# for these regions.
-Link Europe/Oslo Arctic/Longyearbyen
-
# Poland
# The 1919 dates and times can be found in Tygodnik Urzędowy nr 1 (1919-03-20),
@@ -2336,7 +2049,6 @@
# According to a Portuguese decree (1911-05-26)
# https://dre.pt/application/dir/pdf1sdip/1911/05/12500/23132313.pdf
# Lisbon was at -0:36:44.68, but switched to GMT on 1912-01-01 at 00:00.
-# Round the old offset to -0:36:45. This agrees with Willett....
#
# From Michael Deckers (2018-02-15):
# article 5 [of the 1911 decree; Deckers's translation] ...:
@@ -2423,6 +2135,7 @@
Rule Port 1983 only - Mar lastSun 2:00s 1:00 S
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -0:36:44.68
Zone Europe/Lisbon -0:36:45 - LMT 1884
-0:36:45 - LMT 1912 Jan 1 0:00u # Lisbon MT
0:00 Port WE%sT 1966 Apr 3 2:00
@@ -2431,9 +2144,13 @@
0:00 W-Eur WE%sT 1992 Sep 27 1:00s
1:00 EU CE%sT 1996 Mar 31 1:00u
0:00 EU WE%sT
-# This Zone can be simplified once we assume zic %z.
Zone Atlantic/Azores -1:42:40 - LMT 1884 # Ponta Delgada
-1:54:32 - HMT 1912 Jan 1 2:00u # Horta MT
+# Vanguard section, for zic and other parsers that support %z.
+# -2:00 Port %z 1966 Apr 3 2:00
+# -1:00 Port %z 1983 Sep 25 1:00s
+# -1:00 W-Eur %z 1992 Sep 27 1:00s
+# Rearguard section, for parsers lacking %z; see ziguard.awk.
-2:00 Port -02/-01 1942 Apr 25 22:00s
-2:00 Port +00 1942 Aug 15 22:00s
-2:00 Port -02/-01 1943 Apr 17 22:00s
@@ -2445,11 +2162,14 @@
-2:00 Port -02/-01 1966 Apr 3 2:00
-1:00 Port -01/+00 1983 Sep 25 1:00s
-1:00 W-Eur -01/+00 1992 Sep 27 1:00s
+# End of rearguard section.
0:00 EU WE%sT 1993 Mar 28 1:00u
-1:00 EU -01/+00
-# This Zone can be simplified once we assume zic %z.
Zone Atlantic/Madeira -1:07:36 - LMT 1884 # Funchal
-1:07:36 - FMT 1912 Jan 1 1:00u # Funchal MT
+# Vanguard section, for zic and other parsers that support %z.
+# -1:00 Port %z 1966 Apr 3 2:00
+# Rearguard section, for parsers lacking %z; see ziguard.awk.
-1:00 Port -01/+00 1942 Apr 25 22:00s
-1:00 Port +01 1942 Aug 15 22:00s
-1:00 Port -01/+00 1943 Apr 17 22:00s
@@ -2459,6 +2179,7 @@
-1:00 Port -01/+00 1945 Apr 21 22:00s
-1:00 Port +01 1945 Aug 25 22:00s
-1:00 Port -01/+00 1966 Apr 3 2:00
+# End of rearguard section.
0:00 Port WE%sT 1983 Sep 25 1:00s
0:00 EU WE%sT
@@ -2877,28 +2598,31 @@
2:00 - EET 1992 Mar 20
# Central Crimea used Moscow time 1994/1997.
#
-# From Paul Eggert (2006-03-22):
-# The _Economist_ (1994-05-28, p 45) reports that central Crimea switched
-# from Kiev to Moscow time sometime after the January 1994 elections.
+# From Paul Eggert (2022-07-21):
+# The _Economist_ (1994-05-28, p 45) reported that central Crimea switched
+# from Kyiv to Moscow time sometime after the January 1994 elections.
# Shanks (1999) says "date of change uncertain", but implies that it happened
# sometime between the 1994 DST switches. Shanks & Pottenger simply say
# 1994-09-25 03:00, but that can't be right. For now, guess it
-# changed in May.
+# changed in May. This change evidently didn't last long; see below.
2:00 C-Eur EE%sT 1994 May
-# From IATA SSIM (1994/1997), which also says that Kerch is still like Kiev.
- 3:00 E-Eur MSK/MSD 1996 Mar 31 0:00s
+# From IATA SSIM (1994/1997), which also said that Kerch is still like Kyiv.
+ 3:00 C-Eur MSK/MSD 1996 Mar 31 0:00s
3:00 1:00 MSD 1996 Oct 27 3:00s
-# IATA SSIM (1997-09) says Crimea switched to EET/EEST.
+# IATA SSIM (1997-09) said Crimea switched to EET/EEST.
# Assume it happened in March by not changing the clocks.
- 3:00 Russia MSK/MSD 1997
3:00 - MSK 1997 Mar lastSun 1:00u
# From Alexander Krivenyshev (2014-03-17):
# time change at 2:00 (2am) on March 30, 2014
# https://vz.ru/news/2014/3/17/677464.html
-# From Paul Eggert (2014-03-30):
-# Simferopol and Sevastopol reportedly changed their central town clocks
-# late the previous day, but this appears to have been ceremonial
-# and the discrepancies are small enough to not worry about.
+# From Tim Parenti (2022-07-01), per Paul Eggert (2014-03-30):
+# The clocks at the railway station in Simferopol were put forward from 22:00
+# to 24:00 the previous day in a "symbolic ceremony"; however, per
+# contemporaneous news reports, "ordinary Crimeans [made] the daylight savings
+# time switch at 2am" on Sunday.
+# https://www.business-standard.com/article/pti-stories/crimea-to-set-clocks-to-russia-time-114033000014_1.html
+# https://www.reuters.com/article/us-ukraine-crisis-crimea-time/crimea-switches-to-moscow-time-amid-incorporation-frenzy-idUKBREA2S0LT20140329
+# https://www.bbc.com/news/av/world-europe-26806583
2:00 EU EE%sT 2014 Mar 30 2:00
4:00 - MSK 2014 Oct 26 2:00s
3:00 - MSK
@@ -3059,11 +2783,12 @@
# Note: Effective 2005-12-01, (59) Perm Oblast and (81) Komi-Permyak
# Autonomous Okrug merged to form (90, RU-PER) Perm Krai.
-# Milne says Yekaterinburg was 4:02:32.9; round to nearest.
+# Milne says Yekaterinburg was 4:02:32.9.
# Byalokoz 1919 says its provincial time was based on Perm, at 3:45:05.
# Assume it switched on 1916-07-03, the time of the new standard.
# The 1919 and 1930 transitions are from Shanks.
+ #STDOFF 4:02:32.9
Zone Asia/Yekaterinburg 4:02:33 - LMT 1916 Jul 3
3:45:05 - PMT 1919 Jul 15 4:00
4:00 - +04 1930 Jun 21
@@ -3375,8 +3100,8 @@
# 14-28 **** Tomponsky District
# 14-30 **** Ust-Maysky District
-# From Arthur David Olson (2012-05-09):
-# Tomponskij and Ust'-Majskij switched from Vladivostok time to Yakutsk time
+# From Arthur David Olson (2022-03-21):
+# Tomponsky and Ust-Maysky switched from Vladivostok time to Yakutsk time
# in 2011.
# From Paul Eggert (2012-11-25):
@@ -3501,8 +3226,8 @@
# Asia/Ust-Nera covers parts of (14, RU-SA) Sakha (Yakutia) Republic:
# 14-22 **** Oymyakonsky District
-# From Arthur David Olson (2012-05-09):
-# Ojmyakonskij [and the Kuril Islands] switched from
+# From Arthur David Olson (2022-03-21):
+# Oymyakonsky and the Kuril Islands switched from
# Magadan time to Vladivostok time in 2011.
#
# From Tim Parenti (2014-07-06), per Alexander Krivenyshev (2014-07-02):
@@ -3553,11 +3278,13 @@
11:00 Russia +11/+12 2011 Mar 27 2:00s
12:00 - +12
-
-# San Marino
-# See Europe/Rome.
-
+# Bosnia & Herzegovina
+# Croatia
+# Kosovo
+# Montenegro
+# North Macedonia
# Serbia
+# Slovenia
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone Europe/Belgrade 1:22:00 - LMT 1884
1:00 - CET 1941 Apr 18 23:00
@@ -3569,17 +3296,6 @@
# Shanks & Pottenger don't give as much detail, so go with Koželj.
1:00 - CET 1982 Nov 27
1:00 EU CE%sT
-Link Europe/Belgrade Europe/Ljubljana # Slovenia
-Link Europe/Belgrade Europe/Podgorica # Montenegro
-Link Europe/Belgrade Europe/Sarajevo # Bosnia and Herzegovina
-Link Europe/Belgrade Europe/Skopje # North Macedonia
-Link Europe/Belgrade Europe/Zagreb # Croatia
-
-# Slovakia
-Link Europe/Prague Europe/Bratislava
-
-# Slovenia
-# See Europe/Belgrade.
# Spain
#
@@ -3665,11 +3381,11 @@
Rule SpainAfrica 1978 only - Jun 1 0:00 1:00 S
Rule SpainAfrica 1978 only - Aug 4 0:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Madrid -0:14:44 - LMT 1900 Dec 31 23:45:16
+Zone Europe/Madrid -0:14:44 - LMT 1901 Jan 1 0:00u
0:00 Spain WE%sT 1940 Mar 16 23:00
1:00 Spain CE%sT 1979
1:00 EU CE%sT
-Zone Africa/Ceuta -0:21:16 - LMT 1900 Dec 31 23:38:44
+Zone Africa/Ceuta -0:21:16 - LMT 1901 Jan 1 0:00u
0:00 - WET 1918 May 6 23:00
0:00 1:00 WEST 1918 Oct 7 23:00
0:00 - WET 1924
@@ -3686,64 +3402,11 @@
# IATA SSIM (1996-09) says the Canaries switch at 2:00u, not 1:00u.
# Ignore this for now, as the Canaries are part of the EU.
-# Sweden
-
-# From Ivan Nilsson (2001-04-13), superseding Shanks & Pottenger:
-#
-# The law "Svensk författningssamling 1878, no 14" about standard time in 1879:
-# From the beginning of 1879 (that is 01-01 00:00) the time for all
-# places in the country is "the mean solar time for the meridian at
-# three degrees, or twelve minutes of time, to the west of the
-# meridian of the Observatory of Stockholm". The law is dated 1878-05-31.
-#
-# The observatory at that time had the meridian 18° 03' 30"
-# eastern longitude = 01:12:14 in time. Less 12 minutes gives the
-# national standard time as 01:00:14 ahead of GMT....
-#
-# About the beginning of CET in Sweden. The lawtext ("Svensk
-# författningssamling 1899, no 44") states, that "from the beginning
-# of 1900... ... the same as the mean solar time for the meridian at
-# the distance of one hour of time from the meridian of the English
-# observatory at Greenwich, or at 12 minutes 14 seconds to the west
-# from the meridian of the Observatory of Stockholm". The law is dated
-# 1899-06-16. In short: At 1900-01-01 00:00:00 the new standard time
-# in Sweden is 01:00:00 ahead of GMT.
-#
-# 1916: The lawtext ("Svensk författningssamling 1916, no 124") states
-# that "1916-05-15 is considered to begin one hour earlier". It is
-# pretty obvious that at 05-14 23:00 the clocks are set to 05-15 00:00....
-# Further the law says, that "1916-09-30 is considered to end one hour later".
-#
-# The laws regulating [DST] are available on the site of the Swedish
-# Parliament beginning with 1985 - the laws regulating 1980/1984 are
-# not available on the site (to my knowledge they are only available
-# in Swedish): (type
-# "sommartid" without the quotes in the field "Fritext" and then click
-# the Sök-button).
-#
-# (2001-05-13):
-#
-# I have now found a newspaper stating that at 1916-10-01 01:00
-# summertime the church-clocks etc were set back one hour to show
-# 1916-10-01 00:00 standard time. The article also reports that some
-# people thought the switch to standard time would take place already
-# at 1916-10-01 00:00 summer time, but they had to wait for another
-# hour before the event took place.
-#
-# Source: The newspaper "Dagens Nyheter", 1916-10-01, page 7 upper left.
-
-# An extra-special abbreviation style is SET for Swedish Time (svensk
-# normaltid) 1879-1899, 3° west of the Stockholm Observatory.
-
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone Europe/Stockholm 1:12:12 - LMT 1879 Jan 1
- 1:00:14 - SET 1900 Jan 1 # Swedish Time
- 1:00 - CET 1916 May 14 23:00
- 1:00 1:00 CEST 1916 Oct 1 1:00
- 1:00 - CET 1980
- 1:00 EU CE%sT
+# Germany (Busingen enclave)
+# Liechtenstein
# Switzerland
+#
# From Howse:
# By the end of the 18th century clocks and watches became commonplace
# and their performance improved enormously. Communities began to keep
@@ -3835,6 +3498,19 @@
# 1853-07-16, though it probably occurred at some other date in Zurich, and
# legal civil time probably changed at still some other transition date.
+# From Tobias Conradi (2011-09-12):
+# Büsingen , surrounded by the Swiss canton
+# Schaffhausen, did not start observing DST in 1980 as the rest of DE
+# (West Germany at that time) and DD (East Germany at that time) did.
+# DD merged into DE, the area is currently covered by code DE in ISO 3166-1,
+# which in turn is covered by the zone Europe/Berlin.
+#
+# Source for the time in Büsingen 1980:
+# http://www.srf.ch/player/video?id=c012c029-03b7-4c2b-9164-aa5902cd58d3
+#
+# From Arthur David Olson (2012-03-03):
+# Büsingen and Zurich have shared clocks since 1970.
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Swiss 1941 1942 - May Mon>=1 1:00 1:00 S
Rule Swiss 1941 1942 - Oct Mon>=1 2:00 0 -
@@ -4047,11 +3723,10 @@
2:00 1:00 EEST 2015 Nov 8 1:00u
2:00 EU EE%sT 2016 Sep 7
3:00 - +03
-Link Europe/Istanbul Asia/Istanbul # Istanbul is in both continents.
# Ukraine
#
-# From Alois Triendl (2014-03-01):
+# From Alois Treindl (2014-03-01):
# REGULATION A N O V A on March 20, 1992 N 139 ... means that from
# 1992 on, Ukraine had DST with begin time at 02:00 am, on last Sunday
# in March, and end time 03:00 am, last Sunday in September....
@@ -4068,8 +3743,8 @@
# US colleague David Cochrane) are still trying to get more
# information upon these local deviations from Kiev rules.
#
-# From Paul Eggert (2022-02-08):
-# For now, assume that Ukraine's other three zones followed the same rules,
+# From Paul Eggert (2022-08-27):
+# For now, assume that Ukraine's zones all followed the same rules,
# except that Crimea switched to Moscow time in 1994 as described elsewhere.
# From Igor Karpov, who works for the Ukrainian Ministry of Justice,
@@ -4111,7 +3786,7 @@
# The law documents themselves are at
# http://w1.c1.rada.gov.ua/pls/zweb_n/webproc4_1?id=&pf3511=41484
-# From Vladimir in Moscow via Alois Treindl re Kiev time 1991/2 (2014-02-28):
+# From Vladimir in Moscow via Alois Treindl re Kyiv time 1991/2 (2014-02-28):
# First in Ukraine they changed Time zone from UTC+3 to UTC+2 with DST:
# 03 25 1990 02:00 -03.00 1 Time Zone 3 with DST
# 07 01 1990 02:00 -02.00 1 Time Zone 2 with DST
@@ -4139,23 +3814,9 @@
# * Ukrainian Government's Resolution of 20.03.1992, No. 139.
# http://www.uazakon.com/documents/date_8u/pg_grcasa.htm
-# From Paul Eggert (2018-10-03):
-# As is usual in tzdb, Ukrainian zones use the most common English spellings.
-# For example, tzdb uses Europe/Kiev, as "Kiev" is the most common spelling in
-# English for Ukraine's capital, even though it is certainly wrong as a
-# transliteration of the Ukrainian "Київ". This is similar to tzdb's use of
-# Europe/Prague, which is certainly wrong as a transliteration of the Czech
-# "Praha". ("Kiev" came from old Slavic via Russian to English, and "Prague"
-# came from old Slavic via French to English, so the two cases have something
-# in common.) Admittedly English-language spelling of Ukrainian names is
-# controversial, and some day "Kyiv" may become substantially more popular in
-# English; in the meantime, stick with the traditional English "Kiev" as that
-# means less disruption for our users.
-
-# Zone NAME STDOFF RULES FORMAT [UNTIL]
-# This represents most of Ukraine. See above for the spelling of "Kiev".
-Zone Europe/Kiev 2:02:04 - LMT 1880
- 2:02:04 - KMT 1924 May 2 # Kiev Mean Time
+# Zone NAME STDOFF RULES FORMAT [UNTIL]
+Zone Europe/Kyiv 2:02:04 - LMT 1880
+ 2:02:04 - KMT 1924 May 2 # Kyiv Mean Time
2:00 - EET 1930 Jun 21
3:00 - MSK 1941 Sep 20
1:00 C-Eur CE%sT 1943 Nov 6
@@ -4163,37 +3824,6 @@
2:00 1:00 EEST 1991 Sep 29 3:00
2:00 C-Eur EE%sT 1996 May 13
2:00 EU EE%sT
-# Transcarpathia used CET 1990/1991.
-# "Uzhhorod" is the transliteration of the Rusyn/Ukrainian pronunciation, but
-# "Uzhgorod" is more common in English.
-Zone Europe/Uzhgorod 1:29:12 - LMT 1890 Oct
- 1:00 - CET 1940
- 1:00 C-Eur CE%sT 1944 Oct
- 1:00 1:00 CEST 1944 Oct 26
- 1:00 - CET 1945 Jun 29
- 3:00 Russia MSK/MSD 1990
- 3:00 - MSK 1990 Jul 1 2:00
- 1:00 - CET 1991 Mar 31 3:00
- 2:00 - EET 1992 Mar 20
- 2:00 C-Eur EE%sT 1996 May 13
- 2:00 EU EE%sT
-# Zaporozh'ye and eastern Lugansk oblasts observed DST 1990/1991.
-# "Zaporizhia" is the transliteration of the Ukrainian name, but
-# "Zaporozh'ye" is more common in English. Use the common English
-# spelling, except omit the apostrophe as it is not allowed in
-# portable Posix file names.
-Zone Europe/Zaporozhye 2:20:40 - LMT 1880
- 2:20 - +0220 1924 May 2
- 2:00 - EET 1930 Jun 21
- 3:00 - MSK 1941 Aug 25
- 1:00 C-Eur CE%sT 1943 Oct 25
- 3:00 Russia MSK/MSD 1991 Mar 31 2:00
- 2:00 E-Eur EE%sT 1992 Mar 20
- 2:00 C-Eur EE%sT 1996 May 13
- 2:00 EU EE%sT
-
-# Vatican City
-# See Europe/Rome.
###############################################################################
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/iso3166.tab openjdk-11-11.0.18+10/make/data/tzdata/iso3166.tab
--- openjdk-11-11.0.16+8/make/data/tzdata/iso3166.tab 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/iso3166.tab 2023-01-10 08:32:35.000000000 +0000
@@ -26,13 +26,13 @@
# This file is in the public domain, so clarified as of
# 2009-05-17 by Arthur David Olson.
#
-# From Paul Eggert (2015-05-02):
+# From Paul Eggert (2022-11-18):
# This file contains a table of two-letter country codes. Columns are
# separated by a single tab. Lines beginning with '#' are comments.
# All text uses UTF-8 encoding. The columns of the table are as follows:
#
# 1. ISO 3166-1 alpha-2 country code, current as of
-# ISO 3166-1 N976 (2018-11-06). See: Updates on ISO 3166-1
+# ISO 3166-1 N1087 (2022-09-02). See: Updates on ISO 3166-1
# https://isotc.iso.org/livelink/livelink/Open/16944257
# 2. The usual English name for the coded region,
# chosen so that alphabetic sorting of subsets produces helpful lists.
@@ -261,7 +261,7 @@
SZ Eswatini (Swaziland)
TC Turks & Caicos Is
TD Chad
-TF French Southern & Antarctic Lands
+TF French Southern Territories
TG Togo
TH Thailand
TJ Tajikistan
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/leapseconds openjdk-11-11.0.18+10/make/data/tzdata/leapseconds
--- openjdk-11-11.0.16+8/make/data/tzdata/leapseconds 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/leapseconds 2023-01-10 08:32:35.000000000 +0000
@@ -95,11 +95,11 @@
# Any additional leap seconds will come after this.
# This Expires line is commented out for now,
# so that pre-2020a zic implementations do not reject this file.
-#Expires 2022 Dec 28 00:00:00
+#Expires 2023 Jun 28 00:00:00
# POSIX timestamps for the data in this file:
#updated 1467936000 (2016-07-08 00:00:00 UTC)
-#expires 1672185600 (2022-12-28 00:00:00 UTC)
+#expires 1687910400 (2023-06-28 00:00:00 UTC)
-# Updated through IERS Bulletin C63
-# File expires on: 28 December 2022
+# Updated through IERS Bulletin C64
+# File expires on: 28 June 2023
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/northamerica openjdk-11-11.0.18+10/make/data/tzdata/northamerica
--- openjdk-11-11.0.16+8/make/data/tzdata/northamerica 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/northamerica 2023-01-10 08:32:35.000000000 +0000
@@ -367,8 +367,7 @@
# From Paul Eggert (2014-09-06):
# Monthly Notices of the Royal Astronomical Society 44, 4 (1884-02-08), 208
# says that New York City Hall time was 3 minutes 58.4 seconds fast of
-# Eastern time (i.e., -4:56:01.6) just before the 1883 switch. Round to the
-# nearest second.
+# Eastern time (i.e., -4:56:01.6) just before the 1883 switch.
# Rule NAME FROM TO - IN ON AT SAVE LETTER
Rule NYC 1920 only - Mar lastSun 2:00 1:00 D
@@ -377,7 +376,8 @@
Rule NYC 1921 1954 - Sep lastSun 2:00 0 S
Rule NYC 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/New_York -4:56:02 - LMT 1883 Nov 18 12:03:58
+ #STDOFF -4:56:01.6
+Zone America/New_York -4:56:02 - LMT 1883 Nov 18 17:00u
-5:00 US E%sT 1920
-5:00 NYC E%sT 1942
-5:00 US E%sT 1946
@@ -462,7 +462,7 @@
Rule Chicago 1922 1954 - Sep lastSun 2:00 0 S
Rule Chicago 1955 1966 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 12:09:24
+Zone America/Chicago -5:50:36 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1920
-6:00 Chicago C%sT 1936 Mar 1 2:00
-5:00 - EST 1936 Nov 15 2:00
@@ -471,7 +471,7 @@
-6:00 Chicago C%sT 1967
-6:00 US C%sT
# Oliver County, ND switched from mountain to central time on 1992-10-25.
-Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 12:14:48
+Zone America/North_Dakota/Center -6:45:12 - LMT 1883 Nov 18 19:00u
-7:00 US M%sT 1992 Oct 25 2:00
-6:00 US C%sT
# Morton County, ND, switched from mountain to central time on
@@ -481,7 +481,7 @@
# Jones, Mellette, and Todd Counties in South Dakota;
# but in practice these other counties were already observing central time.
# See .
-Zone America/North_Dakota/New_Salem -6:45:39 - LMT 1883 Nov 18 12:14:21
+Zone America/North_Dakota/New_Salem -6:45:39 - LMT 1883 Nov 18 19:00u
-7:00 US M%sT 2003 Oct 26 2:00
-6:00 US C%sT
@@ -498,7 +498,7 @@
# largest city in Mercer County). Google Maps places Beulah's city hall
# at 47° 15' 51" N, 101° 46' 40" W, which yields an offset of 6h47'07".
-Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 12:12:53
+Zone America/North_Dakota/Beulah -6:47:07 - LMT 1883 Nov 18 19:00u
-7:00 US M%sT 2010 Nov 7 2:00
-6:00 US C%sT
@@ -530,7 +530,7 @@
Rule Denver 1965 1966 - Apr lastSun 2:00 1:00 D
Rule Denver 1965 1966 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Denver -6:59:56 - LMT 1883 Nov 18 12:00:04
+Zone America/Denver -6:59:56 - LMT 1883 Nov 18 19:00u
-7:00 US M%sT 1920
-7:00 Denver M%sT 1942
-7:00 US M%sT 1946
@@ -583,7 +583,7 @@
Rule CA 1950 1961 - Sep lastSun 2:00 0 S
Rule CA 1962 1966 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 12:07:02
+Zone America/Los_Angeles -7:52:58 - LMT 1883 Nov 18 20:00u
-8:00 US P%sT 1946
-8:00 CA P%sT 1967
-8:00 US P%sT
@@ -845,14 +845,13 @@
# Go with the Arizona State Library instead.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 11:31:42
+Zone America/Phoenix -7:28:18 - LMT 1883 Nov 18 19:00u
-7:00 US M%sT 1944 Jan 1 0:01
-7:00 - MST 1944 Apr 1 0:01
-7:00 US M%sT 1944 Oct 1 0:01
-7:00 - MST 1967
-7:00 US M%sT 1968 Mar 21
-7:00 - MST
-Link America/Phoenix America/Creston
# From Arthur David Olson (1988-02-13):
# A writer from the Inter Tribal Council of Arizona, Inc.,
@@ -873,7 +872,7 @@
# switched four weeks late in 1974.
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Boise -7:44:49 - LMT 1883 Nov 18 12:15:11
+Zone America/Boise -7:44:49 - LMT 1883 Nov 18 20:00u
-8:00 US P%sT 1923 May 13 2:00
-7:00 US M%sT 1974
-7:00 - MST 1974 Feb 3 2:00
@@ -945,7 +944,7 @@
Rule Indianapolis 1941 1954 - Sep lastSun 2:00 0 S
Rule Indianapolis 1946 1954 - Apr lastSun 2:00 1:00 D
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Indianapolis -5:44:38 - LMT 1883 Nov 18 12:15:22
+Zone America/Indiana/Indianapolis -5:44:38 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1920
-6:00 Indianapolis C%sT 1942
-6:00 US C%sT 1946
@@ -965,7 +964,7 @@
Rule Marengo 1954 1960 - Apr lastSun 2:00 1:00 D
Rule Marengo 1954 1960 - Sep lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 12:14:37
+Zone America/Indiana/Marengo -5:45:23 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1951
-6:00 Marengo C%sT 1961 Apr 30 2:00
-5:00 - EST 1969
@@ -989,7 +988,7 @@
Rule Vincennes 1961 only - Sep lastSun 2:00 0 S
Rule Vincennes 1962 1963 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 12:09:53
+Zone America/Indiana/Vincennes -5:50:07 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1946
-6:00 Vincennes C%sT 1964 Apr 26 2:00
-5:00 - EST 1969
@@ -1009,7 +1008,7 @@
Rule Perry 1956 1963 - Apr lastSun 2:00 1:00 D
Rule Perry 1961 1963 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 12:12:57
+Zone America/Indiana/Tell_City -5:47:03 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1946
-6:00 Perry C%sT 1964 Apr 26 2:00
-5:00 - EST 1967 Oct 29 2:00
@@ -1026,7 +1025,7 @@
Rule Pike 1956 1964 - Apr lastSun 2:00 1:00 D
Rule Pike 1961 1964 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Petersburg -5:49:07 - LMT 1883 Nov 18 12:10:53
+Zone America/Indiana/Petersburg -5:49:07 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1955
-6:00 Pike C%sT 1965 Apr 25 2:00
-5:00 - EST 1966 Oct 30 2:00
@@ -1048,7 +1047,7 @@
Rule Starke 1957 1958 - Sep lastSun 2:00 0 S
Rule Starke 1959 1961 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 12:13:30
+Zone America/Indiana/Knox -5:46:30 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1947
-6:00 Starke C%sT 1962 Apr 29 2:00
-5:00 - EST 1963 Oct 27 2:00
@@ -1064,7 +1063,7 @@
Rule Pulaski 1955 1956 - Oct lastSun 2:00 0 S
Rule Pulaski 1957 1960 - Sep lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 12:13:35
+Zone America/Indiana/Winamac -5:46:25 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1946
-6:00 Pulaski C%sT 1961 Apr 30 2:00
-5:00 - EST 1969
@@ -1075,7 +1074,7 @@
#
# Switzerland County, Indiana, did not observe DST from 1973 through 2005.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 12:19:44
+Zone America/Indiana/Vevay -5:40:16 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1954 Apr 25 2:00
-5:00 - EST 1969
-5:00 US E%sT 1973
@@ -1111,7 +1110,7 @@
Rule Louisville 1950 1955 - Sep lastSun 2:00 0 S
Rule Louisville 1956 1961 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 12:16:58
+Zone America/Kentucky/Louisville -5:43:02 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1921
-6:00 Louisville C%sT 1942
-6:00 US C%sT 1946
@@ -1145,7 +1144,7 @@
# Federal Register 65, 160 (2000-08-17), pp 50154-50158.
# https://www.gpo.gov/fdsys/pkg/FR-2000-08-17/html/00-20854.htm
#
-Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 12:20:36
+Zone America/Kentucky/Monticello -5:39:24 - LMT 1883 Nov 18 18:00u
-6:00 US C%sT 1946
-6:00 - CST 1968
-6:00 US C%sT 2000 Oct 29 2:00
@@ -1626,23 +1625,6 @@
# Ontario
-# From Paul Eggert (2006-07-09):
-# Shanks & Pottenger write that since 1970 most of Ontario has been like
-# Toronto.
-# Thunder Bay skipped DST in 1973.
-# Many smaller locales did not observe peacetime DST until 1974;
-# Nipigon (EST) and Rainy River (CST) are the largest that we know of.
-# Far west Ontario is like Winnipeg; far east Quebec is like Halifax.
-
-# From Jeffery Nichols (2020-02-06):
-# According to the [Shanks] atlas, those western Ontario zones are huge,
-# covering most of Ontario northwest of Sault Ste Marie and Timmins.
-# The zones seem to include towns bigger than the ones they're named after,
-# like Dryden in America/Rainy_River and Wawa (and maybe Attawapiskat) in
-# America/Nipigon. I assume it's too much trouble to change the name of the
-# zone (like when you found out that America/Glace_Bay includes Sydney, Nova
-# Scotia)....
-
# From Mark Brader (2003-07-26):
# [According to the Toronto Star] Orillia, Ontario, adopted DST
# effective Saturday, 1912-06-22, 22:00; the article mentions that
@@ -1663,17 +1645,6 @@
# From Mark Brader (2010-03-06):
#
-# Currently the database has:
-#
-# # Ontario
-#
-# # From Paul Eggert (2006-07-09):
-# # Shanks & Pottenger write that since 1970 most of Ontario has been like
-# # Toronto.
-# # Thunder Bay skipped DST in 1973.
-# # Many smaller locales did not observe peacetime DST until 1974;
-# # Nipigon (EST) and Rainy River (CST) are the largest that we know of.
-#
# In the (Toronto) Globe and Mail for Saturday, 1955-09-24, in the bottom
# right corner of page 1, it says that Toronto will return to standard
# time at 2 am Sunday morning (which agrees with the database), and that:
@@ -1681,10 +1652,8 @@
# The one-hour setback will go into effect throughout most of Ontario,
# except in areas like Windsor which remains on standard time all year.
#
-# Windsor is, of course, a lot larger than Nipigon.
-#
-# I only came across this incidentally. I don't know if Windsor began
-# observing DST when Detroit did, or in 1974, or on some other date.
+# ... I don't know if Windsor began observing DST when Detroit did,
+# or in 1974, or on some other date.
#
# By the way, the article continues by noting that:
#
@@ -1766,23 +1735,7 @@
# Toronto Star, which said that DST was ending 1971-10-31 as usual.
Rule Toronto 1957 1973 - Oct lastSun 2:00 0 S
-# From Paul Eggert (2003-07-27):
-# Willett (1914-03) writes (p. 17) "In the Cities of Fort William, and
-# Port Arthur, Ontario, the principle of the Bill has been in
-# operation for the past three years, and in the City of Moose Jaw,
-# Saskatchewan, for one year."
-
-# From David Bryan via Tory Tronrud, Director/Curator,
-# Thunder Bay Museum (2003-11-12):
-# There is some suggestion, however, that, by-law or not, daylight
-# savings time was being practiced in Fort William and Port Arthur
-# before 1909.... [I]n 1910, the line between the Eastern and Central
-# Time Zones was permanently moved about two hundred miles west to
-# include the Thunder Bay area.... When Canada adopted daylight
-# savings time in 1916, Fort William and Port Arthur, having done so
-# already, did not change their clocks.... During the Second World
-# War,... [t]he cities agreed to implement DST during the summer
-# months for the remainder of the war years.
+# The Bahamas match Toronto since 1970.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Toronto -5:17:32 - LMT 1895
@@ -1791,22 +1744,6 @@
-5:00 Canada E%sT 1946
-5:00 Toronto E%sT 1974
-5:00 Canada E%sT
-Link America/Toronto America/Nassau
-Zone America/Thunder_Bay -5:57:00 - LMT 1895
- -6:00 - CST 1910
- -5:00 - EST 1942
- -5:00 Canada E%sT 1970
- -5:00 Toronto E%sT 1973
- -5:00 - EST 1974
- -5:00 Canada E%sT
-Zone America/Nipigon -5:53:04 - LMT 1895
- -5:00 Canada E%sT 1940 Sep 29
- -5:00 1:00 EDT 1942 Feb 9 2:00s
- -5:00 Canada E%sT
-Zone America/Rainy_River -6:18:16 - LMT 1895
- -6:00 Canada C%sT 1940 Sep 29
- -6:00 1:00 CDT 1942 Feb 9 2:00s
- -6:00 Canada C%sT
# For Atikokan see America/Panama.
@@ -2055,6 +1992,37 @@
# Northwest Territories, Nunavut, Yukon
+# From Chris Walton (2022-11-06):
+# Whitehorse Star - Thursday April 22, 1965 - page 1
+# title: DST Starts Monday ...
+# https://www.newspapers.com/image/578587481/
+# The title of this first article is wrong and/or misleading.
+# Also, the start time shown in the article is vague; it simply says "after
+# midnight" when it probably should have stated 2:00a.m....
+#
+# Whitehorse Star - Monday October 25, 1965 - page 15 ...
+# https://www.newspapers.com/image/578589147/
+# The 1965 Yukon Council minutes can be found here:
+# http://assets.yukonarchives.ca/PER_YG_06_1965_C20_S02_v1.pdf
+# ... I do not currently believe that NWT touched any of its clocks in 1965....
+#
+# Whitehorse Star - Thursday Feb 24,1966 - page 2
+# title: It's Time for YDT ...
+# https://www.newspapers.com/image/578575979/ ...
+# America/Whitehorse as a permanent change from UTC-9(YST) to
+# UTC-8(PST) at 00:00 on Sunday February 27, 1966....
+#
+# Whitehorse Star - Friday April 28,1972 - page 6
+# title: Daylight Saving Time for N.W.T....
+# https://www.newspapers.com/image/578701610/ ...
+# Nunavut and NWT zones ... DST starting in 1972.... Start and End ...
+# should be the same as the rest of Canada
+#
+#
+# From Paul Eggert (2022-11-06):
+# For now, assume Yukon's 1965-04-22 spring forward was 00:00 -> 02:00, as this
+# seems likely than 02:00 -> 04:00 and matches "after midnight".
+
# From Paul Eggert (2006-03-22):
# Dawson switched to PST in 1973. Inuvik switched to MST in 1979.
# Mathew Englander (1996-10-07) gives the following refs:
@@ -2169,6 +2137,13 @@
# * Interpretation Act, RSY 2002, c 125
# https://www.canlii.org/en/yk/laws/stat/rsy-2002-c-125/latest/rsy-2002-c-125.html
+# From Chris Walton (2022-11-06):
+# The 5th edition of the Atlas of Canada contains a time zone map that
+# shows both legislated and observed time zone boundaries.
+# All communities on Baffin Island are shown to be observing Eastern time.
+# The date on the map is 1984.
+# https://ftp.maps.canada.ca/pub/nrcan_rncan/raster/atlas_5_ed/eng/other/referencemaps/mcr4056.pdf
+
# From Rives McDow (1999-09-04):
# Nunavut ... moved ... to incorporate the whole territory into one time zone.
# Nunavut moves to single time zone Oct. 31
@@ -2181,40 +2156,7 @@
# From Paul Eggert (1999-09-20):
# Basic Facts: The New Territory
# http://www.nunavut.com/basicfacts/english/basicfacts_1territory.html
-# (1999) reports that Pangnirtung operates on eastern time,
-# and that Coral Harbour does not observe DST. We don't know when
-# Pangnirtung switched to eastern time; we'll guess 1995.
-
-# From Rives McDow (1999-11-08):
-# On October 31, when the rest of Nunavut went to Central time,
-# Pangnirtung wobbled. Here is the result of their wobble:
-#
-# The following businesses and organizations in Pangnirtung use Central Time:
-#
-# First Air, Power Corp, Nunavut Construction, Health Center, RCMP,
-# Eastern Arctic National Parks, A & D Specialist
-#
-# The following businesses and organizations in Pangnirtung use Eastern Time:
-#
-# Hamlet office, All other businesses, Both schools, Airport operator
-#
-# This has made for an interesting situation there, which warranted the news.
-# No one there that I spoke with seems concerned, or has plans to
-# change the local methods of keeping time, as it evidently does not
-# really interfere with any activities or make things difficult locally.
-# They plan to celebrate New Year's turn-over twice, one hour apart,
-# so it appears that the situation will last at least that long.
-# The Nunavut Intergovernmental Affairs hopes that they will "come to
-# their senses", but the locals evidently don't see any problem with
-# the current state of affairs.
-
-# From Michaela Rodrigue, writing in the
-# Nunatsiaq News (1999-11-19):
-# http://www.nunatsiaqonline.ca/archives/nunavut991130/nvt91119_17.html
-# Clyde River, Pangnirtung and Sanikiluaq now operate with two time zones,
-# central - or Nunavut time - for government offices, and eastern time
-# for municipal offices and schools.... Igloolik [was similar but then]
-# made the switch to central time on Saturday, Nov. 6.
+# (1999) reports that ... Coral Harbour does not observe DST.
# From Paul Eggert (2000-10-02):
# Matthews and Vincent (1998) say the following, but we lack histories
@@ -2373,18 +2315,12 @@
Rule NT_YK 1942 only - Feb 9 2:00 1:00 W # War
Rule NT_YK 1945 only - Aug 14 23:00u 1:00 P # Peace
Rule NT_YK 1945 only - Sep 30 2:00 0 S
-Rule NT_YK 1965 only - Apr lastSun 0:00 2:00 DD
-Rule NT_YK 1965 only - Oct lastSun 2:00 0 S
-Rule NT_YK 1980 1986 - Apr lastSun 2:00 1:00 D
-Rule NT_YK 1980 2006 - Oct lastSun 2:00 0 S
+Rule NT_YK 1972 1986 - Apr lastSun 2:00 1:00 D
+Rule NT_YK 1972 2006 - Oct lastSun 2:00 0 S
Rule NT_YK 1987 2006 - Apr Sun>=1 2:00 1:00 D
+Rule Yukon 1965 only - Apr lastSun 0:00 2:00 DD
+Rule Yukon 1965 only - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
-# aka Panniqtuuq
-Zone America/Pangnirtung 0 - -00 1921 # trading post est.
- -4:00 NT_YK A%sT 1995 Apr Sun>=1 2:00
- -5:00 Canada E%sT 1999 Oct 31 2:00
- -6:00 Canada C%sT 2000 Oct 29 2:00
- -5:00 Canada E%sT
# formerly Frobisher Bay
Zone America/Iqaluit 0 - -00 1942 Aug # Frobisher Bay est.
-5:00 NT_YK E%sT 1999 Oct 31 2:00
@@ -2417,13 +2353,15 @@
-7:00 NT_YK M%sT 1980
-7:00 Canada M%sT
Zone America/Whitehorse -9:00:12 - LMT 1900 Aug 20
- -9:00 NT_YK Y%sT 1967 May 28 0:00
- -8:00 NT_YK P%sT 1980
+ -9:00 NT_YK Y%sT 1965
+ -9:00 Yukon Y%sT 1966 Feb 27 0:00
+ -8:00 - PST 1980
-8:00 Canada P%sT 2020 Nov 1
-7:00 - MST
Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
- -9:00 NT_YK Y%sT 1973 Oct 28 0:00
- -8:00 NT_YK P%sT 1980
+ -9:00 NT_YK Y%sT 1965
+ -9:00 Yukon Y%sT 1973 Oct 28 0:00
+ -8:00 - PST 1980
-8:00 Canada P%sT 2020 Nov 1
-7:00 - MST
@@ -2639,7 +2577,23 @@
# 5- The islands, reefs and keys shall take their timezone from the
# longitude they are located at.
+# From Paul Eggert (2022-10-28):
+# The new Mexican law was published today:
+# https://www.dof.gob.mx/nota_detalle.php?codigo=5670045&fecha=28/10/2022
+# This abolishes DST except where US DST rules are observed,
+# and in addition changes all of Chihuahua to -06 with no DST.
+
+# From Heitor David Pinto (2022-11-28):
+# Now the northern municipalities want to have the same time zone as the
+# respective neighboring cities in the US, for example Juárez in UTC-7 with
+# DST, matching El Paso, and Ojinaga in UTC-6 with DST, matching Presidio....
+# the president authorized the publication of the decree for November 29,
+# so the time change would occur on November 30 at 0:00.
+# http://puentelibre.mx/noticia/ciudad_juarez_cambio_horario_noviembre_2022/
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
+Rule Mexico 1931 only - May 1 23:00 1:00 D
+Rule Mexico 1931 only - Oct 1 0:00 0 S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D
Rule Mexico 1939 only - Jun 25 0:00 0 S
Rule Mexico 1940 only - Dec 9 0:00 1:00 D
@@ -2652,89 +2606,108 @@
Rule Mexico 1996 2000 - Oct lastSun 2:00 0 S
Rule Mexico 2001 only - May Sun>=1 2:00 1:00 D
Rule Mexico 2001 only - Sep lastSun 2:00 0 S
-Rule Mexico 2002 max - Apr Sun>=1 2:00 1:00 D
-Rule Mexico 2002 max - Oct lastSun 2:00 0 S
+Rule Mexico 2002 2022 - Apr Sun>=1 2:00 1:00 D
+Rule Mexico 2002 2022 - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
# Quintana Roo; represented by Cancún
-Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 0:12:56
+Zone America/Cancun -5:47:04 - LMT 1922 Jan 1 6:00u
-6:00 - CST 1981 Dec 23
-5:00 Mexico E%sT 1998 Aug 2 2:00
-6:00 Mexico C%sT 2015 Feb 1 2:00
-5:00 - EST
# Campeche, Yucatán; represented by Mérida
-Zone America/Merida -5:58:28 - LMT 1922 Jan 1 0:01:32
+Zone America/Merida -5:58:28 - LMT 1922 Jan 1 6:00u
-6:00 - CST 1981 Dec 23
-5:00 - EST 1982 Dec 2
-6:00 Mexico C%sT
# Coahuila, Nuevo León, Tamaulipas (near US border)
# This includes the following municipalities:
-# in Coahuila: Ocampo, Acuña, Zaragoza, Jiménez, Piedras Negras, Nava,
-# Guerrero, Hidalgo.
-# in Nuevo León: Anáhuac, Los Aldama.
+# in Coahuila: Acuña, Allende, Guerrero, Hidalgo, Jiménez, Morelos, Nava,
+# Ocampo, Piedras Negras, Villa Unión, Zaragoza
+# in Nuevo León: Anáhuac
# in Tamaulipas: Nuevo Laredo, Guerrero, Mier, Miguel Alemán, Camargo,
# Gustavo Díaz Ordaz, Reynosa, Río Bravo, Valle Hermoso, Matamoros.
-# See: Inicia mañana Horario de Verano en zona fronteriza, El Universal,
-# 2016-03-12
-# http://www.eluniversal.com.mx/articulo/estados/2016/03/12/inicia-manana-horario-de-verano-en-zona-fronteriza
-Zone America/Matamoros -6:40:00 - LMT 1921 Dec 31 23:20:00
+# https://www.dof.gob.mx/nota_detalle.php?codigo=5670045&fecha=28/10/2022
+Zone America/Matamoros -6:30:00 - LMT 1922 Jan 1 6:00u
-6:00 - CST 1988
-6:00 US C%sT 1989
-6:00 Mexico C%sT 2010
-6:00 US C%sT
# Durango; Coahuila, Nuevo León, Tamaulipas (away from US border)
-Zone America/Monterrey -6:41:16 - LMT 1921 Dec 31 23:18:44
+Zone America/Monterrey -6:41:16 - LMT 1922 Jan 1 6:00u
-6:00 - CST 1988
-6:00 US C%sT 1989
-6:00 Mexico C%sT
# Central Mexico
-Zone America/Mexico_City -6:36:36 - LMT 1922 Jan 1 0:23:24
+Zone America/Mexico_City -6:36:36 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1927 Jun 10 23:00
-6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
+ -7:00 Mexico M%sT 1932 Apr 1
-6:00 Mexico C%sT 2001 Sep 30 2:00
-6:00 - CST 2002 Feb 20
-6:00 Mexico C%sT
-# Chihuahua (near US border)
+# Chihuahua (near US border - western side)
# This includes the municipalities of Janos, Ascensión, Juárez, Guadalupe,
-# Práxedis G Guerrero, Coyame del Sotol, Ojinaga, and Manuel Benavides.
-# (See the 2016-03-12 El Universal source mentioned above.)
-Zone America/Ojinaga -6:57:40 - LMT 1922 Jan 1 0:02:20
+# and Práxedis G Guerrero.
+# http://gaceta.diputados.gob.mx/PDF/65/2a022/nov/20221124-VII.pdf
+Zone America/Ciudad_Juarez -7:05:56 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1927 Jun 10 23:00
-6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
+ -7:00 Mexico M%sT 1932 Apr 1
-6:00 - CST 1996
-6:00 Mexico C%sT 1998
-6:00 - CST 1998 Apr Sun>=1 3:00
-7:00 Mexico M%sT 2010
+ -7:00 US M%sT 2022 Oct 30 2:00
+ -6:00 - CST 2022 Nov 30 0:00
-7:00 US M%sT
+# Chihuahua (near US border - eastern side)
+# The municipalities of Coyame del Sotol, Ojinaga, and Manuel Benavides.
+# http://gaceta.diputados.gob.mx/PDF/65/2a022/nov/20221124-VII.pdf
+Zone America/Ojinaga -6:57:40 - LMT 1922 Jan 1 7:00u
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 Mexico M%sT 1932 Apr 1
+ -6:00 - CST 1996
+ -6:00 Mexico C%sT 1998
+ -6:00 - CST 1998 Apr Sun>=1 3:00
+ -7:00 Mexico M%sT 2010
+ -7:00 US M%sT 2022 Oct 30 2:00
+ -6:00 - CST 2022 Nov 30 0:00
+ -6:00 US C%sT
# Chihuahua (away from US border)
-Zone America/Chihuahua -7:04:20 - LMT 1921 Dec 31 23:55:40
+Zone America/Chihuahua -7:04:20 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1927 Jun 10 23:00
-6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
+ -7:00 Mexico M%sT 1932 Apr 1
-6:00 - CST 1996
-6:00 Mexico C%sT 1998
-6:00 - CST 1998 Apr Sun>=1 3:00
- -7:00 Mexico M%sT
+ -7:00 Mexico M%sT 2022 Oct 30 2:00
+ -6:00 - CST
# Sonora
-Zone America/Hermosillo -7:23:52 - LMT 1921 Dec 31 23:36:08
+Zone America/Hermosillo -7:23:52 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1927 Jun 10 23:00
-6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
+ -7:00 Mexico M%sT 1932 Apr 1
-6:00 - CST 1942 Apr 24
-7:00 - MST 1949 Jan 14
-8:00 - PST 1970
-7:00 Mexico M%sT 1999
-7:00 - MST
+# Baja California Sur, Nayarit (except Bahía de Banderas), Sinaloa
+Zone America/Mazatlan -7:05:40 - LMT 1922 Jan 1 7:00u
+ -7:00 - MST 1927 Jun 10 23:00
+ -6:00 - CST 1930 Nov 15
+ -7:00 Mexico M%sT 1932 Apr 1
+ -6:00 - CST 1942 Apr 24
+ -7:00 - MST 1949 Jan 14
+ -8:00 - PST 1970
+ -7:00 Mexico M%sT
+
+# Bahía de Banderas
+
# From Alexander Krivenyshev (2010-04-21):
# According to news, Bahía de Banderas (Mexican state of Nayarit)
# changed time zone UTC-7 to new time zone UTC-6 on April 4, 2010 (to
@@ -2762,25 +2735,10 @@
# From Arthur David Olson (2010-05-01):
# Use "Bahia_Banderas" to keep the name to fourteen characters.
-# Mazatlán
-Zone America/Mazatlan -7:05:40 - LMT 1921 Dec 31 23:54:20
- -7:00 - MST 1927 Jun 10 23:00
- -6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
- -6:00 - CST 1942 Apr 24
- -7:00 - MST 1949 Jan 14
- -8:00 - PST 1970
- -7:00 Mexico M%sT
-
-# Bahía de Banderas
-Zone America/Bahia_Banderas -7:01:00 - LMT 1921 Dec 31 23:59:00
+Zone America/Bahia_Banderas -7:01:00 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1927 Jun 10 23:00
-6:00 - CST 1930 Nov 15
- -7:00 - MST 1931 May 1 23:00
- -6:00 - CST 1931 Oct
- -7:00 - MST 1932 Apr 1
+ -7:00 Mexico M%sT 1932 Apr 1
-6:00 - CST 1942 Apr 24
-7:00 - MST 1949 Jan 14
-8:00 - PST 1970
@@ -2788,7 +2746,7 @@
-6:00 Mexico C%sT
# Baja California
-Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 0:11:56
+Zone America/Tijuana -7:48:04 - LMT 1922 Jan 1 7:00u
-7:00 - MST 1924
-8:00 - PST 1927 Jun 10 23:00
-7:00 - MST 1930 Nov 15
@@ -2825,23 +2783,19 @@
# http://dof.gob.mx/nota_detalle.php?codigo=5127480&fecha=06/01/2010
# It has been moved to the 'backward' file.
#
+# From Paul Eggert (2022-10-28):
+# Today's new law states that the entire state of Baja California
+# follows US DST rules, which agrees with simplifications noted above.
+#
#
# Revillagigedo Is
# no information
###############################################################################
-# Anguilla
-# Antigua and Barbuda
-# See America/Puerto_Rico.
-
-# The Bahamas
-# See America/Toronto.
-
-
# Barbados
-# For 1899 Milne gives -3:58:29.2; round that.
+# For 1899 Milne gives -3:58:29.2.
# From P Chan (2020-12-09 and 2020-12-11):
# Standard time of GMT-4 was adopted in 1911.
@@ -2885,6 +2839,7 @@
Rule Barb 1979 only - Sep 30 2:00 0 S
Rule Barb 1980 only - Sep 25 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -3:58:29.2
Zone America/Barbados -3:58:29 - LMT 1911 Aug 28 # Bridgetown
-4:00 Barb A%sT 1944
-4:00 Barb AST/-0330 1945
@@ -2945,10 +2900,10 @@
# Bermuda
-# From Paul Eggert (2020-11-24):
+# From Paul Eggert (2022-07-27):
# For 1899 Milne gives -4:19:18.3 as the meridian of the clock tower,
# Bermuda dockyard, Ireland I. This agrees with standard offset given in the
-# Daylight Saving Act, 1917 cited below. Round that to the nearest second.
+# Daylight Saving Act, 1917 cited below.
# It is not known when this time became standard for Bermuda; guess 1890.
# The transition to -04 was specified by:
# 1930: The Time Zone Act, 1929 (1929: No. 39) [1929-11-08]
@@ -3043,21 +2998,16 @@
Rule Bermuda 1956 only - Oct lastSun 2:00 0 S
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -4:19:18.3
Zone Atlantic/Bermuda -4:19:18 - LMT 1890 # Hamilton
-4:19:18 Bermuda BMT/BST 1930 Jan 1 2:00
-4:00 Bermuda A%sT 1974 Apr 28 2:00
-4:00 Canada A%sT 1976
-4:00 US A%sT
-# Caribbean Netherlands
-# See America/Puerto_Rico.
-
-# Cayman Is
-# See America/Panama.
-
# Costa Rica
-# Milne gives -5:36:13.3 as San José mean time; round to nearest.
+# Milne gives -5:36:13.3 as San José mean time.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule CR 1979 1980 - Feb lastSun 0:00 1:00 D
@@ -3069,6 +3019,7 @@
Rule CR 1992 only - Mar 15 0:00 0 S
# There are too many San Josés elsewhere, so we'll use 'Costa Rica'.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -5:36:13.3
Zone America/Costa_Rica -5:36:13 - LMT 1890 # San José
-5:36:13 - SJMT 1921 Jan 15 # San José Mean Time
-6:00 CR C%sT
@@ -3279,9 +3230,6 @@
-5:29:36 - HMT 1925 Jul 19 12:00 # Havana MT
-5:00 Cuba C%sT
-# Dominica
-# See America/Puerto_Rico.
-
# Dominican Republic
# From Steffen Thorsen (2000-10-30):
@@ -3328,12 +3276,6 @@
Zone America/El_Salvador -5:56:48 - LMT 1921 # San Salvador
-6:00 Salv C%sT
-# Grenada
-# Guadeloupe
-# St Barthélemy
-# St Martin (French part)
-# See America/Puerto_Rico.
-
# Guatemala
#
# From Gwillim Law (2006-04-22), after a heads-up from Oscar van Vlijmen:
@@ -3491,7 +3433,7 @@
# Jamaica
# Shanks & Pottenger give -5:07:12, but Milne records -5:07:10.41 from an
# unspecified official document, and says "This time is used throughout the
-# island". Go with Milne. Round to the nearest second as required by zic.
+# island". Go with Milne.
#
# Shanks & Pottenger give April 28 for the 1974 spring-forward transition, but
# Lance Neita writes that Prime Minister Michael Manley decreed it January 5.
@@ -3504,6 +3446,7 @@
# http://www.jamaicaobserver.com/columns/The-politician-in-all-of-us_17573647
#
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -5:07:10.41
Zone America/Jamaica -5:07:10 - LMT 1890 # Kingston
-5:07:10 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1974
@@ -3518,9 +3461,6 @@
-4:00 1:00 ADT 1980 Sep 28
-4:00 - AST
-# Montserrat
-# See America/Puerto_Rico.
-
# Nicaragua
#
# This uses Shanks & Pottenger for times before 2005.
@@ -3586,44 +3526,39 @@
-5:00 - EST 1997
-6:00 Nic C%sT
+# Cayman Is
# Panama
+#
+# Atikokan and Coral Harbour, Canada, match Panama since 1970.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST
-Link America/Panama America/Atikokan
-Link America/Panama America/Cayman
+# Anguilla
+# Antigua & Barbuda
+# Aruba
+# Caribbean Netherlands
+# Curaçao
+# Dominica
+# Grenada
+# Guadeloupe
+# Montserrat
# Puerto Rico
+# St Barthélemy
+# St Kitts-Nevis
+# Sint Maarten / St Martin
+# St Lucia
+# St Vincent & the Grenadines
+# Trinidad & Tobago
+# Virgin Is (UK & US)
+#
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Puerto_Rico -4:24:25 - LMT 1899 Mar 28 12:00 # San Juan
-4:00 - AST 1942 May 3
-4:00 US A%sT 1946
-4:00 - AST
-Link America/Puerto_Rico America/Anguilla
-Link America/Puerto_Rico America/Antigua
-Link America/Puerto_Rico America/Aruba
-Link America/Puerto_Rico America/Curacao
-Link America/Puerto_Rico America/Blanc-Sablon # Quebec (Lower North Shore)
-Link America/Puerto_Rico America/Dominica
-Link America/Puerto_Rico America/Grenada
-Link America/Puerto_Rico America/Guadeloupe
-Link America/Puerto_Rico America/Kralendijk # Caribbean Netherlands
-Link America/Puerto_Rico America/Lower_Princes # Sint Maarten
-Link America/Puerto_Rico America/Marigot # St Martin (French part)
-Link America/Puerto_Rico America/Montserrat
-Link America/Puerto_Rico America/Port_of_Spain # Trinidad & Tobago
-Link America/Puerto_Rico America/St_Barthelemy # St Barthélemy
-Link America/Puerto_Rico America/St_Kitts # St Kitts & Nevis
-Link America/Puerto_Rico America/St_Lucia
-Link America/Puerto_Rico America/St_Thomas # Virgin Islands (US)
-Link America/Puerto_Rico America/St_Vincent
-Link America/Puerto_Rico America/Tortola # Virgin Islands (UK)
-
-# St Kitts-Nevis
-# St Lucia
-# See America/Puerto_Rico.
# St Pierre and Miquelon
# There are too many St Pierres elsewhere, so we'll use 'Miquelon'.
@@ -3633,12 +3568,6 @@
-3:00 - -03 1987
-3:00 Canada -03/-02
-# St Vincent and the Grenadines
-# See America/Puerto_Rico.
-
-# Sint Maarten
-# See America/Puerto_Rico.
-
# Turks and Caicos
#
# From Chris Dunn in
@@ -3701,17 +3630,13 @@
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/Grand_Turk -4:44:32 - LMT 1890
+ #STDOFF -5:07:10.41
-5:07:10 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST 1979
-5:00 US E%sT 2015 Mar 8 2:00
-4:00 - AST 2018 Mar 11 3:00
-5:00 US E%sT
-# British Virgin Is
-# US Virgin Is
-# See America/Puerto_Rico.
-
-
# Local Variables:
# coding: utf-8
# End:
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/southamerica openjdk-11-11.0.18+10/make/data/tzdata/southamerica
--- openjdk-11-11.0.16+8/make/data/tzdata/southamerica 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/southamerica 2023-01-10 08:32:35.000000000 +0000
@@ -423,6 +423,7 @@
#
# Buenos Aires (BA), Capital Federal (CF),
Zone America/Argentina/Buenos_Aires -3:53:48 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May # Córdoba Mean Time
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -440,6 +441,7 @@
# - Santiago del Estero switched to -4:00 on 1991-04-01,
# then to -3:00 on 1991-04-26.
#
+ #STDOFF -4:16:48.25
Zone America/Argentina/Cordoba -4:16:48 - LMT 1894 Oct 31
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
@@ -452,6 +454,7 @@
#
# Salta (SA), La Pampa (LP), Neuquén (NQ), Rio Negro (RN)
Zone America/Argentina/Salta -4:21:40 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -464,6 +467,7 @@
#
# Tucumán (TM)
Zone America/Argentina/Tucuman -4:20:52 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -477,6 +481,7 @@
#
# La Rioja (LR)
Zone America/Argentina/La_Rioja -4:27:24 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -491,6 +496,7 @@
#
# San Juan (SJ)
Zone America/Argentina/San_Juan -4:34:04 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -505,6 +511,7 @@
#
# Jujuy (JY)
Zone America/Argentina/Jujuy -4:21:12 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -520,6 +527,7 @@
#
# Catamarca (CT), Chubut (CH)
Zone America/Argentina/Catamarca -4:23:08 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -534,6 +542,7 @@
#
# Mendoza (MZ)
Zone America/Argentina/Mendoza -4:35:16 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -556,6 +565,7 @@
Rule SanLuis 2007 2008 - Oct Sun>=8 0:00 1:00 -
Zone America/Argentina/San_Luis -4:25:24 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -574,6 +584,7 @@
#
# Santa Cruz (SC)
Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -586,6 +597,7 @@
#
# Tierra del Fuego, Antártida e Islas del Atlántico Sur (TF)
Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
+ #STDOFF -4:16:48.25
-4:16:48 - CMT 1920 May
-4:00 - -04 1930 Dec
-4:00 Arg -04/-03 1969 Oct 5
@@ -596,9 +608,6 @@
-3:00 Arg -03/-02 2008 Oct 18
-3:00 - -03
-# Aruba
-# See America/Puerto_Rico.
-
# Bolivia
# Zone NAME STDOFF RULES FORMAT [UNTIL]
Zone America/La_Paz -4:32:36 - LMT 1890
@@ -668,7 +677,7 @@
# From Rodrigo Severo (2004-10-04):
# It's just the biannual change made necessary by the much hyped, supposedly
-# modern Brazilian eletronic voting machines which, apparently, can't deal
+# modern Brazilian ... voting machines which, apparently, can't deal
# with a time change between the first and the second rounds of the elections.
# From Steffen Thorsen (2007-09-20):
@@ -1164,7 +1173,7 @@
# this is known to work for DST transitions starting in 2008 and
# may well be true for earlier transitions.
-# From Tim Parenti (2022-03-15):
+# From Tim Parenti (2022-07-06):
# For a brief period of roughly six weeks in 1946, DST was only observed on an
# emergency basis in specific regions of central Chile; namely, "the national
# territory between the provinces of Coquimbo and Concepción, inclusive".
@@ -1182,7 +1191,14 @@
# Law Number 8,522, promulgated 1946-08-27, reunified Chilean clocks at their
# new "Summer Time" of -04, reckoned as that of "the meridian of the
# Astronomical Observatory of Lo Espejo, advanced by 42 minutes and 45
-# seconds".
+# seconds". Although this law specified the new Summer Time to start on 1
+# September each year, a special "transitional article" started it a few days
+# early, as soon as the law took effect. As the law was to take force "from
+# the date of its publication in the 'Diario Oficial', which happened the
+# following day, presume the change took place in Santiago and its environs
+# from 24:00 -03 to 23:00 -04 on Wednesday 1946-08-28. Although this was a
+# no-op for wall clocks in the north and south of the country, put their formal
+# start to DST an hour later when they reached 24:00 -04.
# https://www.diariooficial.interior.gob.cl/versiones-anteriores/do-h/19460828/#page/1
# After a brief "Winter Time" stint at -05 beginning 1947-04-01, Law Number
# 8,777, promulgated 1947-05-17, established year-round -04 "from 23:00 on the
@@ -1302,11 +1318,25 @@
# So we extend the new rules on Saturdays at 24:00 mainland time indefinitely.
# From Juan Correa (2019-02-04):
# http://www.diariooficial.interior.gob.cl/publicaciones/2018/11/23/42212/01/1498738.pdf
-# From Paul Eggert (2019-09-01):
-# The above says the Magallanes exception expires 2022-04-02 at 24:00,
-# so in theory, they will revert to -04/-03 after that.
-# For now, assume that they will not revert,
-# since they have extended the expiration date once already.
+
+# From Juan Correa (2022-04-02):
+# I found there was a decree published last Thursday that will keep
+# Magallanes region to UTC -3 "indefinitely". The decree is available at
+# https://www.diariooficial.interior.gob.cl/publicaciones/2022/03/31/43217-B/01/2108910.pdf
+
+# From Juan Correa (2022-08-09):
+# the Internal Affairs Ministry (Ministerio del Interior) informed DST
+# for America/Santiago will start on midnight of September 11th;
+# and will end on April 1st, 2023. Magallanes region (America/Punta_Arenas)
+# will keep UTC -3 "indefinitely"... This is because on September 4th
+# we will have a voting whether to approve a new Constitution.
+#
+# From Eduardo Romero Urra (2022-08-17):
+# https://www.diariooficial.interior.gob.cl/publicaciones/2022/08/13/43327/01/2172567.pdf
+#
+# From Paul Eggert (2022-08-17):
+# Although the presidential decree stops at fall 2026, assume that
+# similar DST rules will continue thereafter.
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
Rule Chile 1927 1931 - Sep 1 0:00 1:00 -
@@ -1344,7 +1374,9 @@
Rule Chile 2016 2018 - May Sun>=9 3:00u 0 -
Rule Chile 2016 2018 - Aug Sun>=9 4:00u 1:00 -
Rule Chile 2019 max - Apr Sun>=2 3:00u 0 -
-Rule Chile 2019 max - Sep Sun>=2 4:00u 1:00 -
+Rule Chile 2019 2021 - Sep Sun>=2 4:00u 1:00 -
+Rule Chile 2022 only - Sep Sun>=9 4:00u 1:00 -
+Rule Chile 2023 max - Sep Sun>=2 4:00u 1:00 -
# IATA SSIM anomalies: (1992-02) says 1992-03-14;
# (1996-09) says 1998-03-08. Ignore these.
# Zone NAME STDOFF RULES FORMAT [UNTIL]
@@ -1357,9 +1389,9 @@
-5:00 Chile -05/-04 1932 Sep 1
-4:00 - -04 1942 Jun 1
-5:00 - -05 1942 Aug 1
- -4:00 - -04 1946 Jul 15
- -4:00 1:00 -03 1946 Sep 1 # central Chile
- -4:00 - -04 1947 Apr 1
+ -4:00 - -04 1946 Jul 14 24:00
+ -4:00 1:00 -03 1946 Aug 28 24:00 # central CL
+ -5:00 1:00 -04 1947 Mar 31 24:00
-5:00 - -05 1947 May 21 23:00
-4:00 Chile -04/-03
Zone America/Punta_Arenas -4:43:40 - LMT 1890
@@ -1371,7 +1403,8 @@
-5:00 Chile -05/-04 1932 Sep 1
-4:00 - -04 1942 Jun 1
-5:00 - -05 1942 Aug 1
- -4:00 - -04 1947 Apr 1
+ -4:00 - -04 1946 Aug 28 24:00
+ -5:00 1:00 -04 1947 Mar 31 24:00
-5:00 - -05 1947 May 21 23:00
-4:00 Chile -04/-03 2016 Dec 4
-3:00 - -03
@@ -1405,28 +1438,25 @@
# Colombia
-# Milne gives 4:56:16.4 for Bogotá time in 1899; round to nearest. He writes,
+# Milne gives 4:56:16.4 for Bogotá time in 1899. He writes,
# "A variation of fifteen minutes in the public clocks of Bogota is not rare."
+# From Alois Treindl (2022-11-10):
+# End of time change in Colombia 1993 ... should be 6 February 24h ...
+# DECRETO 267 DE 1993
+# https://www.suin-juriscol.gov.co/viewDocument.asp?ruta=Decretos/1061335
+
# Rule NAME FROM TO - IN ON AT SAVE LETTER/S
-Rule CO 1992 only - May 3 0:00 1:00 -
-Rule CO 1993 only - Apr 4 0:00 0 -
+Rule CO 1992 only - May 3 0:00 1:00 -
+Rule CO 1993 only - Feb 6 24:00 0 -
# Zone NAME STDOFF RULES FORMAT [UNTIL]
+ #STDOFF -4:56:16.4
Zone America/Bogota -4:56:16 - LMT 1884 Mar 13
-4:56:16 - BMT 1914 Nov 23 # Bogotá Mean Time
-5:00 CO -05/-04
# Malpelo, Providencia, San Andres
# no information; probably like America/Bogota
-# Curaçao
-# See America/Puerto_Rico.
-#
-# From Arthur David Olson (2011-06-15):
-# use links for places with new iso3166 codes.
-# The name "Lower Prince's Quarter" is both longer than fourteen characters
-# and contains an apostrophe; use "Lower_Princes"....
-# From Paul Eggert (2021-09-29):
-# These backward-compatibility links now are in the 'northamerica' file.
# Ecuador
#
@@ -1742,9 +1772,6 @@
-3:30 - -0330 1984 Oct
-3:00 - -03
-# Trinidad and Tobago
-# See America/Puerto_Rico.
-
# Uruguay
# From Paul Eggert (1993-11-18):
# Uruguay wins the prize for the strangest peacetime manipulation of the rules.
diff -Nru openjdk-11-11.0.16+8/make/data/tzdata/zone.tab openjdk-11-11.0.18+10/make/data/tzdata/zone.tab
--- openjdk-11-11.0.16+8/make/data/tzdata/zone.tab 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/data/tzdata/zone.tab 2023-01-10 08:32:35.000000000 +0000
@@ -137,13 +137,9 @@
CA +5320-06025 America/Goose_Bay Atlantic - Labrador (most areas)
CA +5125-05707 America/Blanc-Sablon AST - QC (Lower North Shore)
CA +4339-07923 America/Toronto Eastern - ON, QC (most areas)
-CA +4901-08816 America/Nipigon Eastern - ON, QC (no DST 1967-73)
-CA +4823-08915 America/Thunder_Bay Eastern - ON (Thunder Bay)
-CA +6344-06828 America/Iqaluit Eastern - NU (most east areas)
-CA +6608-06544 America/Pangnirtung Eastern - NU (Pangnirtung)
+CA +6344-06828 America/Iqaluit Eastern - NU (most areas)
CA +484531-0913718 America/Atikokan EST - ON (Atikokan); NU (Coral H)
CA +4953-09709 America/Winnipeg Central - ON (west); Manitoba
-CA +4843-09434 America/Rainy_River Central - ON (Rainy R, Ft Frances)
CA +744144-0944945 America/Resolute Central - NU (Resolute)
CA +624900-0920459 America/Rankin_Inlet Central - NU (central)
CA +5024-10439 America/Regina CST - SK (most areas)
@@ -153,7 +149,7 @@
CA +6227-11421 America/Yellowknife Mountain - NT (central)
CA +682059-1334300 America/Inuvik Mountain - NT (west)
CA +4906-11631 America/Creston MST - BC (Creston)
-CA +5946-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John)
+CA +5546-12014 America/Dawson_Creek MST - BC (Dawson Cr, Ft St John)
CA +5848-12242 America/Fort_Nelson MST - BC (Ft Nelson)
CA +6043-13503 America/Whitehorse MST - Yukon (east)
CA +6404-13925 America/Dawson MST - Yukon (west)
@@ -303,17 +299,18 @@
MU -2010+05730 Indian/Mauritius
MV +0410+07330 Indian/Maldives
MW -1547+03500 Africa/Blantyre
-MX +1924-09909 America/Mexico_City Central Time
-MX +2105-08646 America/Cancun Eastern Standard Time - Quintana Roo
-MX +2058-08937 America/Merida Central Time - Campeche, Yucatan
-MX +2540-10019 America/Monterrey Central Time - Durango; Coahuila, Nuevo Leon, Tamaulipas (most areas)
-MX +2550-09730 America/Matamoros Central Time US - Coahuila, Nuevo Leon, Tamaulipas (US border)
-MX +2313-10625 America/Mazatlan Mountain Time - Baja California Sur, Nayarit, Sinaloa
-MX +2838-10605 America/Chihuahua Mountain Time - Chihuahua (most areas)
-MX +2934-10425 America/Ojinaga Mountain Time US - Chihuahua (US border)
-MX +2904-11058 America/Hermosillo Mountain Standard Time - Sonora
-MX +3232-11701 America/Tijuana Pacific Time US - Baja California
-MX +2048-10515 America/Bahia_Banderas Central Time - Bahia de Banderas
+MX +1924-09909 America/Mexico_City Central Mexico
+MX +2105-08646 America/Cancun Quintana Roo
+MX +2058-08937 America/Merida Campeche, Yucatan
+MX +2540-10019 America/Monterrey Durango; Coahuila, Nuevo Leon, Tamaulipas (most areas)
+MX +2550-09730 America/Matamoros Coahuila, Nuevo Leon, Tamaulipas (US border)
+MX +2838-10605 America/Chihuahua Chihuahua (most areas)
+MX +3144-10629 America/Ciudad_Juarez Chihuahua (US border - west)
+MX +2934-10425 America/Ojinaga Chihuahua (US border - east)
+MX +2313-10625 America/Mazatlan Baja California Sur, Nayarit (most areas), Sinaloa
+MX +2048-10515 America/Bahia_Banderas Bahia de Banderas
+MX +2904-11058 America/Hermosillo Sonora
+MX +3232-11701 America/Tijuana Baja California
MY +0310+10142 Asia/Kuala_Lumpur Malaysia (peninsula)
MY +0133+11020 Asia/Kuching Sabah, Sarawak
MZ -2558+03235 Africa/Maputo
@@ -423,9 +420,7 @@
TV -0831+17913 Pacific/Funafuti
TW +2503+12130 Asia/Taipei
TZ -0648+03917 Africa/Dar_es_Salaam
-UA +5026+03031 Europe/Kiev Ukraine (most areas)
-UA +4837+02218 Europe/Uzhgorod Transcarpathia
-UA +4750+03510 Europe/Zaporozhye Zaporozhye and east Lugansk
+UA +5026+03031 Europe/Kyiv Ukraine (most areas)
UG +0019+03225 Africa/Kampala
UM +2813-17722 Pacific/Midway Midway Islands
UM +1917+16637 Pacific/Wake Wake Island
diff -Nru openjdk-11-11.0.16+8/make/devkit/createWindowsDevkit2019.sh openjdk-11-11.0.18+10/make/devkit/createWindowsDevkit2019.sh
--- openjdk-11-11.0.16+8/make/devkit/createWindowsDevkit2019.sh 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/devkit/createWindowsDevkit2019.sh 2023-01-10 08:32:35.000000000 +0000
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2019, 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
@@ -33,7 +33,7 @@
VS_DLL_VERSION="140"
SDK_VERSION="10"
SDK_FULL_VERSION="10.0.17763.0"
-MSVC_DIR="Microsoft.VC141.CRT"
+MSVC_DIR="Microsoft.VC142.CRT"
MSVC_FULL_VERSION="14.12.27508"
REDIST_FULL_VERSION="14.20.27508"
@@ -102,6 +102,7 @@
echo "Creating devkit in $DEVKIT_ROOT"
MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
+VCRUNTIME_1_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
################################################################################
@@ -188,6 +189,7 @@
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
+echo-info "DEVKIT_VCRUNTIME_1_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$VCRUNTIME_1_DLL\""
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\""
echo-info ""
diff -Nru openjdk-11-11.0.16+8/make/gensrc/GensrcCharacterData.gmk openjdk-11-11.0.18+10/make/gensrc/GensrcCharacterData.gmk
--- openjdk-11-11.0.16+8/make/gensrc/GensrcCharacterData.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/gensrc/GensrcCharacterData.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -32,13 +32,18 @@
CHARACTERDATA = $(TOPDIR)/make/data/characterdata
UNICODEDATA = $(TOPDIR)/make/data/unicodedata
+ifneq ($(DEBUG_LEVEL), release)
+ ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), true)
+ DEBUG_OPTION := -d
+ endif
+endif
+
define SetupCharacterData
$(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/lang/$1.java: \
$(CHARACTERDATA)/$1.java.template
$$(call LogInfo, Generating $1.java)
$$(call MakeDir, $$(@D))
- $(TOOL_GENERATECHARACTER) $2 \
- $(if $(call equals, $(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT), true), -d) \
+ $(TOOL_GENERATECHARACTER) $2 $(DEBUG_OPTION) \
-template $(CHARACTERDATA)/$1.java.template \
-spec $(UNICODEDATA)/UnicodeData.txt \
-specialcasing $(UNICODEDATA)/SpecialCasing.txt \
diff -Nru openjdk-11-11.0.16+8/make/gensrc/GensrcCharsetCoder.gmk openjdk-11-11.0.18+10/make/gensrc/GensrcCharsetCoder.gmk
--- openjdk-11-11.0.16+8/make/gensrc/GensrcCharsetCoder.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/gensrc/GensrcCharsetCoder.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -36,7 +36,8 @@
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
-$(RM) $@.tmp
- $(TOOL_SPP) < $< >$@.tmp \
+ $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_decoder, \
+ $(TOOL_SPP) < $< >$@.tmp \
-Kdecoder \
-DA='A' \
-Da='a' \
@@ -61,7 +62,7 @@
-DItypesPerOtype='CharsPerByte' \
-DnotLegal='not legal for this charset' \
-Dotypes-per-itype='chars-per-byte' \
- -DoutSequence='Unicode character'
+ -DoutSequence='Unicode character')
$(MV) $@.tmp $@
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
@@ -71,7 +72,8 @@
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
-$(RM) $@.tmp
- $(TOOL_SPP) < $< >$@.tmp \
+ $(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_encoder, \
+ $(TOOL_SPP) < $< >$@.tmp \
-Kencoder \
-DA='An' \
-Da='an' \
@@ -96,7 +98,7 @@
-DItypesPerOtype='BytesPerChar' \
-DnotLegal='not a legal sixteen-bit Unicode sequence' \
-Dotypes-per-itype='bytes-per-char' \
- -DoutSequence='byte sequence in the given charset'
+ -DoutSequence='byte sequence in the given charset')
$(MV) $@.tmp $@
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
diff -Nru openjdk-11-11.0.16+8/make/gensrc/GensrcCommonLangtools.gmk openjdk-11-11.0.18+10/make/gensrc/GensrcCommonLangtools.gmk
--- openjdk-11-11.0.16+8/make/gensrc/GensrcCommonLangtools.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/gensrc/GensrcCommonLangtools.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -91,14 +91,16 @@
$$(addprefix _SPACE_, $$(PROPJAVAS)))))
# Now setup the rule for the generation of the resource bundles.
- $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props: $$(PROPSOURCES)
+ PROPS_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props
+ $$(PROPS_BASE): $$(PROPSOURCES)
$(MKDIR) -p $$(@D) $$(PROPDIRS)
$(FIND) $$(@D) -name "*.java" -a ! -name "*Properties.java" $(FIND_DELETE)
$(ECHO) Compiling $$(words $$(PROPSOURCES)) properties into resource bundles for $(MODULE)
- $(TOOL_COMPILEPROPS_CMD) $$(PROPCMDLINE)
+ $$(call ExecuteWithLog, $$(PROPS_BASE)_exec, \
+ $(TOOL_COMPILEPROPS_CMD) $$(PROPCMDLINE))
$(TOUCH) $$@
- $$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props
+ $$(strip $1) += $$(PROPS_BASE)
endef
################################################################################
diff -Nru openjdk-11-11.0.16+8/make/hotspot/ide/CreateVSProject.gmk openjdk-11-11.0.18+10/make/hotspot/ide/CreateVSProject.gmk
--- openjdk-11-11.0.16+8/make/hotspot/ide/CreateVSProject.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/hotspot/ide/CreateVSProject.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -44,10 +44,9 @@
# Reset targets so we don't build libjvm.
TARGETS :=
- # Helper macro to convert a unix path to a Windows path, suitable for
- # inclusion in a command line.
- FixPath = \
- $(strip $(subst \,\\,$(shell $(CYGPATH) -w $1)))
+ ifeq ($(call isBuildOsEnv, windows.cygwin windows.msys2), true)
+ FixLinuxExecutable = $(call FixPath, $1)
+ endif
JVM_DEFINES_client := $(patsubst -D%,%, $(filter -D%, $(JVM_CFLAGS)))
EXTRACTED_DEFINES_client := $(addprefix -define , $(JVM_DEFINES_client))
diff -Nru openjdk-11-11.0.16+8/make/hotspot/lib/CompileGtest.gmk openjdk-11-11.0.18+10/make/hotspot/lib/CompileGtest.gmk
--- openjdk-11-11.0.16+8/make/hotspot/lib/CompileGtest.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/hotspot/lib/CompileGtest.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2021, 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
@@ -77,7 +77,7 @@
CFLAGS_windows := -EHsc, \
CFLAGS_solaris := -DGTEST_HAS_EXCEPTIONS=0 -library=stlport4 +d, \
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
- DISABLED_WARNINGS_gcc := undef, \
+ DISABLED_WARNINGS_gcc := undef stringop-overflow, \
DISABLED_WARNINGS_clang := undef switch format-nonliteral \
tautological-undefined-compare $(BUILD_LIBJVM_DISABLED_WARNINGS_clang), \
DISABLED_WARNINGS_solstudio := identexpected, \
diff -Nru openjdk-11-11.0.16+8/make/hotspot/test/GtestImage.gmk openjdk-11-11.0.18+10/make/hotspot/test/GtestImage.gmk
--- openjdk-11-11.0.16+8/make/hotspot/test/GtestImage.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/hotspot/test/GtestImage.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -32,7 +32,7 @@
$(eval $(call SetupCopyFiles, COPY_GTEST_$v, \
SRC := $(HOTSPOT_OUTPUTDIR)/variant-$v/libjvm/gtest, \
DEST := $(TEST_IMAGE_DIR)/hotspot/gtest/$v, \
- FILES := $(call SHARED_LIBRARY,jvm) gtestLauncher$(EXE_SUFFIX), \
+ FILES := $(call SHARED_LIBRARY,jvm) gtestLauncher$(EXECUTABLE_SUFFIX), \
)) \
$(eval TARGETS += $$(COPY_GTEST_$v)) \
)
@@ -41,7 +41,7 @@
$(foreach v, $(JVM_VARIANTS), \
$(eval $(call SetupCopyFiles, COPY_GTEST_MSVCR_$v, \
DEST := $(TEST_IMAGE_DIR)/hotspot/gtest/$v, \
- FILES := $(MSVCR_DLL) $(MSVCP_DLL), \
+ FILES := $(MSVCR_DLL) $(VCRUNTIME_1_DLL) $(MSVCP_DLL), \
FLATTEN := true, \
)) \
$(eval TARGETS += $$(COPY_GTEST_MSVCR_$v)) \
diff -Nru openjdk-11-11.0.16+8/make/idea/idea.gmk openjdk-11-11.0.18+10/make/idea/idea.gmk
--- openjdk-11-11.0.16+8/make/idea/idea.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/idea/idea.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -26,7 +26,7 @@
$(ECHO) "MODULE_NAMES=\"$(strip $(foreach mod, $(SEL_MODULES), $(mod)))\"" >> $(OUT)
$(ECHO) "SEL_MODULES=\"$(SEL_MODULES)\"" >> $(OUT)
$(ECHO) "BOOT_JDK=\"$(BOOT_JDK)\"" >> $(OUT)
- $(ECHO) "CYGPATH=\"$(CYGPATH)\"" >> $(OUT)
+ $(ECHO) "CYGPATH=\"$(PATHTOOL)\"" >> $(OUT)
$(ECHO) "SPEC=\"$(SPEC)\"" >> $(OUT)
$(ECHO) "JT_HOME=\"$(JT_HOME)\"" >> $(OUT)
diff -Nru openjdk-11-11.0.16+8/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java openjdk-11-11.0.18+10/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java
--- openjdk-11-11.0.16+8/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/jdk/src/classes/build/tools/generatecharacter/GenerateCharacter.java 2023-01-10 08:32:35.000000000 +0000
@@ -1819,7 +1819,7 @@
}
commentStart = (Csyntax ? "/*" : "//");
commentEnd = (Csyntax ? " */" : "");
- commandLineDescription = desc.toString();
+ commandLineDescription = desc.toString().replace("\\", "\\\\");
}
private static void searchBins(long[] map, int binsOccupied) throws Exception {
diff -Nru openjdk-11-11.0.16+8/make/launcher/LauncherCommon.gmk openjdk-11-11.0.18+10/make/launcher/LauncherCommon.gmk
--- openjdk-11-11.0.16+8/make/launcher/LauncherCommon.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/launcher/LauncherCommon.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -119,9 +119,7 @@
$1_LIBS :=
ifeq ($(OPENJDK_TARGET_OS), macosx)
ifeq ($$($1_MACOSX_PRIVILEGED), true)
- $1_PLIST_SRC_FILE := Info-privileged.plist
- else
- $1_PLIST_SRC_FILE := Info-cmdline.plist
+ $1_PLIST_EXTRA := SecTaskAccessallowed
endif
$1_CFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
@@ -129,11 +127,13 @@
$1_PLIST_FILE := $$(SUPPORT_OUTPUTDIR)/native/$$(MODULE)/$1/Info.plist
$$(eval $$(call SetupTextFileProcessing, BUILD_PLIST_$1, \
- SOURCE_FILES := $$(TOPDIR)/src/java.base/macosx/native/launcher/$$($1_PLIST_SRC_FILE), \
+ SOURCE_FILES := $(TOPDIR)/make/data/bundle/cmdline-Info.plist, \
OUTPUT_FILE := $$($1_PLIST_FILE), \
REPLACEMENTS := \
- @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$(VERSION_SHORT).$1 ; \
+ @@ID@@ => $(MACOSX_BUNDLE_ID_BASE).$1 ; \
@@VERSION@@ => $(VERSION_NUMBER) ; \
+ @@BUILD_VERSION@@ => $(MACOSX_BUNDLE_BUILD_VERSION) ; \
+ @@EXTRA@@ => $$($1_PLIST_EXTRA), \
))
$1_LDFLAGS += -Wl,-all_load -sectcreate __TEXT __info_plist $$($1_PLIST_FILE)
@@ -215,4 +215,8 @@
$$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, java, /libjava) \
$$($1_WINDOWS_JLI_LIB)
endif
+
+ ifeq ($(call isTargetOs, macosx), true)
+ $$(BUILD_LAUNCHER_$1): $$($1_PLIST_FILE)
+ endif
endef
diff -Nru openjdk-11-11.0.16+8/make/lib/Awt2dLibraries.gmk openjdk-11-11.0.18+10/make/lib/Awt2dLibraries.gmk
--- openjdk-11-11.0.16+8/make/lib/Awt2dLibraries.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/lib/Awt2dLibraries.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -28,6 +28,7 @@
WIN_AWT_LIB := $(SUPPORT_OUTPUTDIR)/native/$(MODULE)/libawt/awt.lib
LIBAWT_DEFAULT_HEADER_DIRS := \
+ common/awt/utility \
libawt/awt/image \
libawt/awt/image/cvutils \
libawt/java2d \
@@ -581,6 +582,7 @@
libharfbuzz \
libharfbuzz/hb-ucdn \
common/awt \
+ common/awt/utility \
common/font \
libawt/java2d \
libawt/java2d/pipe \
@@ -677,6 +679,7 @@
LIBJAWT_EXTRA_HEADER_DIRS := \
include \
common/awt/debug \
+ common/awt/utility \
libawt/awt/image/cvutils \
libawt/java2d \
libawt/java2d/windows \
@@ -775,6 +778,8 @@
common/awt/systemscale \
#
+ LIBSPLASHSCREEN_HEADER_DIRS += common/awt/utility
+
ifeq ($(USE_EXTERNAL_LIBGIF), false)
LIBSPLASHSCREEN_HEADER_DIRS += libsplashscreen/giflib
else
@@ -810,6 +815,7 @@
ifeq ($(USE_EXTERNAL_LIBZ), false)
LIBSPLASHSCREEN_EXTRA_SRC += java.base:libzip/zlib
+ LIBZ_DISABLED_WARNINGS_CLANG := format-nonliteral
endif
ifeq ($(OPENJDK_TARGET_OS), macosx)
@@ -869,7 +875,8 @@
EXTRA_HEADER_DIRS := $(LIBSPLASHSCREEN_HEADER_DIRS), \
DISABLED_WARNINGS_gcc := sign-compare type-limits unused-result \
maybe-uninitialized shift-negative-value implicit-fallthrough, \
- DISABLED_WARNINGS_clang := incompatible-pointer-types deprecated-declarations, \
+ DISABLED_WARNINGS_clang := incompatible-pointer-types deprecated-declarations \
+ $(LIBZ_DISABLED_WARNINGS_CLANG), \
DISABLED_WARNINGS_solstudio := E_NEWLINE_NOT_LAST E_DECLARATION_IN_CODE \
E_STATEMENT_NOT_REACHED, \
DISABLED_WARNINGS_microsoft := 4018 4244 4267, \
diff -Nru openjdk-11-11.0.16+8/make/lib/CoreLibraries.gmk openjdk-11-11.0.18+10/make/lib/CoreLibraries.gmk
--- openjdk-11-11.0.16+8/make/lib/CoreLibraries.gmk 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/lib/CoreLibraries.gmk 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2022, 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
@@ -149,6 +149,7 @@
$(LIBZ_CFLAGS), \
CFLAGS_unix := $(BUILD_LIBZIP_MMAP) -UDEBUG, \
DISABLED_WARNINGS_gcc := unused-function implicit-fallthrough, \
+ DISABLED_WARNINGS_clang := format-nonliteral, \
LDFLAGS := $(LDFLAGS_JDKLIB) \
$(call SET_SHARED_LIBRARY_ORIGIN), \
LIBS_unix := -ljvm -ljava $(LIBZ_LIBS), \
@@ -211,6 +212,9 @@
LIBJLI_OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE)
# Supply the name of the C runtime lib.
LIBJLI_CFLAGS += -DMSVCR_DLL_NAME='"$(notdir $(MSVCR_DLL))"'
+ ifneq ($(VCRUNTIME_1_DLL), )
+ LIBJLI_CFLAGS += -DVCRUNTIME_1_DLL_NAME='"$(notdir $(VCRUNTIME_1_DLL))"'
+ endif
ifneq ($(MSVCP_DLL), )
LIBJLI_CFLAGS += -DMSVCP_DLL_NAME='"$(notdir $(MSVCP_DLL))"'
endif
diff -Nru openjdk-11-11.0.16+8/make/scripts/extract-vs-env.cmd openjdk-11-11.0.18+10/make/scripts/extract-vs-env.cmd
--- openjdk-11-11.0.16+8/make/scripts/extract-vs-env.cmd 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/scripts/extract-vs-env.cmd 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,49 @@
+@echo off
+
+REM
+REM Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+REM DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+REM
+REM This code is free software; you can redistribute it and/or modify it
+REM under the terms of the GNU General Public License version 2 only, as
+REM published by the Free Software Foundation.
+REM
+REM This code is distributed in the hope that it will be useful, but WITHOUT
+REM ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+REM FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+REM version 2 for more details (a copy is included in the LICENSE file that
+REM accompanied this code).
+REM
+REM You should have received a copy of the GNU General Public License version
+REM 2 along with this work; if not, write to the Free Software Foundation,
+REM Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+REM
+REM Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+REM or visit www.oracle.com if you need additional information or have any
+REM questions.
+REM
+REM
+
+set vcvarscmd=%1
+set output=%2
+if not "%3" == "auto" set version=-vcvars_ver=%3
+
+set PATH_BEFORE=%PATH%
+
+call %vcvarscmd% %version% %4 %5 %6 %7 %8 %9
+if exist %output% del %output%
+
+call :extract "%PATH_BEFORE%", PATH_BEFORE
+call :extract "%PATH%", PATH_AFTER
+call :extract "%INCLUDE%", VS_INCLUDE
+call :extract "%LIB%", VS_LIB
+call :extract "%VCINSTALLDIR%", VCINSTALLDIR
+call :extract "%VCToolsRedistDir%", VCToolsRedistDir
+call :extract "%WindowsSdkDir%", WindowsSdkDir
+call :extract "%WINDOWSSDKDIR%", WINDOWSSDKDIR
+
+exit /b 0
+
+:extract
+echo %~2=$($BASH $TOPDIR/make/scripts/fixpath.sh -i import '%~1 ') >> %output%
+exit /b 0
diff -Nru openjdk-11-11.0.16+8/make/scripts/fixpath.sh openjdk-11-11.0.18+10/make/scripts/fixpath.sh
--- openjdk-11-11.0.16+8/make/scripts/fixpath.sh 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/make/scripts/fixpath.sh 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,512 @@
+#!/bin/bash
+#
+# Copyright (c) 2020, 2022, 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 environment fixpath assumes. Read from command line options if
+# available, or extract values automatically from the environment if missing.
+# This is robust, but slower.
+function setup() {
+
+ # Make regexp tests case insensitive
+ shopt -s nocasematch
+ # Prohibit msys2 from meddling with paths
+ export MSYS2_ARG_CONV_EXCL="*"
+ # Make sure WSL gets a copy of the path
+ export WSLENV=PATH/l
+
+ while getopts "e:p:r:t:c:qmi" opt; do
+ case "$opt" in
+ e) PATHTOOL="$OPTARG" ;;
+ p) DRIVEPREFIX="$OPTARG" ;;
+ r) ENVROOT="$OPTARG" ;;
+ t) WINTEMP="$OPTARG" ;;
+ c) CMD="$OPTARG" ;;
+ q) QUIET=true ;;
+ m) MIXEDMODE=true ;;
+ i) IGNOREFAILURES=true ;;
+ ?)
+ # optargs found argument error
+ exit 2
+ ;;
+ esac
+ done
+
+ shift $((OPTIND-1))
+ ACTION="$1"
+
+ # Locate variables ourself if not giving from caller
+ if [[ -z ${PATHTOOL+x} ]]; then
+ PATHTOOL="$(type -p cygpath)"
+ if [[ $PATHTOOL == "" ]]; then
+ PATHTOOL="$(type -p wslpath)"
+ if [[ $PATHTOOL == "" ]]; then
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Cannot locate cygpath or wslpath >&2
+ fi
+ exit 2
+ fi
+ fi
+ fi
+
+ if [[ -z ${DRIVEPREFIX+x} ]]; then
+ winroot="$($PATHTOOL -u c:/)"
+ DRIVEPREFIX="${winroot%/c/}"
+ else
+ if [[ $DRIVEPREFIX == "NONE" ]]; then
+ DRIVEPREFIX=""
+ fi
+ fi
+
+ if [[ -z ${ENVROOT+x} ]]; then
+ unixroot="$($PATHTOOL -w / 2> /dev/null)"
+ # Remove trailing backslash
+ ENVROOT="${unixroot%\\}"
+ elif [[ "$ENVROOT" == "[unavailable]" ]]; then
+ ENVROOT=""
+ fi
+
+ if [[ -z ${CMD+x} ]]; then
+ CMD="$DRIVEPREFIX/c/windows/system32/cmd.exe"
+ fi
+
+ if [[ -z ${WINTEMP+x} ]]; then
+ wintemp_win="$($CMD /q /c echo %TEMP% 2>/dev/null | tr -d \\n\\r)"
+ WINTEMP="$($PATHTOOL -u "$wintemp_win")"
+ fi
+}
+
+# Cleanup handling
+TEMPDIRS=""
+trap "cleanup" EXIT
+function cleanup() {
+ if [[ "$TEMPDIRS" != "" ]]; then
+ rm -rf $TEMPDIRS
+ fi
+}
+
+# Import a single path
+# Result: imported path returned in $result
+function import_path() {
+ path="$1"
+ # Strip trailing and leading space
+ path="${path#"${path%%[![:space:]]*}"}"
+ path="${path%"${path##*[![:space:]]}"}"
+
+ if [[ $path =~ ^.:[/\\].*$ ]] || [[ "$path" =~ ^"$ENVROOT"\\.*$ ]] ; then
+ # We got a Windows path as input; use pathtool to convert to unix path
+ path="$($PATHTOOL -u "$path")"
+ # Path will now be absolute
+ else
+ # Make path absolute, and resolve embedded '..' in path
+ dirpart="$(dirname "$path")"
+ dirpart="$(cd "$dirpart" 2>&1 > /dev/null && pwd)"
+ if [[ $? -ne 0 ]]; then
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Directory containing path "'"$path"'" does not exist >&2
+ fi
+ if [[ $IGNOREFAILURES != true ]]; then
+ exit 1
+ else
+ path=""
+ fi
+ else
+ basepart="$(basename "$path")"
+ if [[ $dirpart == / ]]; then
+ # Avoid double leading /
+ dirpart=""
+ fi
+ if [[ $basepart == / ]]; then
+ # Avoid trailing /
+ basepart=""
+ fi
+ path="$dirpart/$basepart"
+ fi
+ fi
+
+ if [[ "$path" != "" ]]; then
+ # Now turn it into a windows path
+ winpath="$($PATHTOOL -w "$path" 2>/dev/null)"
+ # If it fails, try again with an added .exe (needed on WSL)
+ if [[ $? -ne 0 ]]; then
+ winpath="$($PATHTOOL -w "$path.exe" 2>/dev/null)"
+ fi
+ if [[ $? -eq 0 ]]; then
+ if [[ ! "$winpath" =~ ^"$ENVROOT"\\.*$ ]] ; then
+ # If it is not in envroot, it's a generic windows path
+ if [[ ! $winpath =~ ^[-_.:\\a-zA-Z0-9]*$ ]] ; then
+ # Path has forbidden characters, rewrite as short name
+ # This monster of a command uses the %~s support from cmd.exe to
+ # reliably convert to short paths on all winenvs.
+ shortpath="$($CMD /q /c for %I in \( "$winpath" \) do echo %~sI 2>/dev/null | tr -d \\n\\r)"
+ path="$($PATHTOOL -u "$shortpath")"
+ # Path is now unix style, based on short name
+ fi
+ # Make it lower case
+ path="$(echo "$path" | tr [:upper:] [:lower:])"
+ fi
+ else
+ # On WSL1, PATHTOOL will fail for files in envroot. If the unix path
+ # exists, we assume that $path is a valid unix path.
+
+ if [[ ! -e $path ]]; then
+ if [[ -e $path.exe ]]; then
+ path="$path.exe"
+ else
+ if [[ $QUIET != true ]]; then
+ echo fixpath: warning: Path "'"$path"'" does not exist >&2
+ fi
+ # This is not a fatal error, maybe the path will be created later on
+ fi
+ fi
+ fi
+ fi
+
+ if [[ "$path" =~ " " ]]; then
+ # Our conversion attempts failed. Perhaps the path did not exists, and thus
+ # we could not convert it to short name.
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Path "'"$path"'" contains space >&2
+ fi
+ if [[ $IGNOREFAILURES != true ]]; then
+ exit 1
+ else
+ path=""
+ fi
+ fi
+
+ result="$path"
+}
+
+# Import a single path, or a pathlist in Windows style (i.e. ; separated)
+# Incoming paths can be in Windows or unix style.
+# Returns in $result a converted path or path list
+function import_command_line() {
+ imported=""
+
+ old_ifs="$IFS"
+ IFS=";"
+ for arg in $1; do
+ if ! [[ $arg =~ ^" "+$ ]]; then
+ import_path "$arg"
+
+ if [[ "$result" != "" && "$imported" = "" ]]; then
+ imported="$result"
+ else
+ imported="$imported:$result"
+ fi
+ fi
+ done
+ IFS="$old_ifs"
+
+ result="$imported"
+}
+
+# If argument seems to be colon separated path list, and all elements
+# are possible to convert to paths, make a windows path list
+# Return 0 if successful with converted path list in $result, or
+# 1 if it was not a path list.
+function convert_pathlist() {
+ converted_list=""
+ pathlist_args="$1"
+
+ IFS=':' read -r -a arg_array <<< "$pathlist_args"
+ for arg in "${arg_array[@]}"; do
+ winpath=""
+ # Start looking for drive prefix
+ if [[ $arg =~ ^($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
+ winpath="${BASH_REMATCH[2]}:${BASH_REMATCH[3]}"
+ # Change slash to backslash (or vice versa if mixed mode)
+ if [[ $MIXEDMODE != true ]]; then
+ winpath="${winpath//'/'/'\'}"
+ else
+ winpath="${winpath//'\'/'/'}"
+ fi
+ elif [[ $arg =~ ^(/[-_.*a-zA-Z0-9]+(/[-_.*a-zA-Z0-9]+)+.*$) ]] ; then
+ # This looks like a unix path, like /foo/bar
+ pathmatch="${BASH_REMATCH[1]}"
+ if [[ $ENVROOT == "" ]]; then
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Path "'"$pathmatch"'" cannot be converted to Windows path >&2
+ fi
+ exit 1
+ fi
+ winpath="$ENVROOT$pathmatch"
+ # Change slash to backslash (or vice versa if mixed mode)
+ if [[ $MIXEDMODE != true ]]; then
+ winpath="${winpath//'/'/'\'}"
+ else
+ winpath="${winpath//'\'/'/'}"
+ fi
+ else
+ # This does not look like a path, so assume this is not a proper pathlist.
+ # Flag this to caller.
+ result=""
+ return 1
+ fi
+
+ if [[ "$converted_list" = "" ]]; then
+ converted_list="$winpath"
+ else
+ converted_list="$converted_list;$winpath"
+ fi
+ done
+
+ result="$converted_list"
+ return 0
+}
+
+# The central conversion function. Convert a single argument, so that any
+# contained paths are converted to Windows style paths. Result is returned
+# in $result. If it is a path list, convert it as one.
+function convert_path() {
+ if [[ $1 =~ : ]]; then
+ convert_pathlist "$1"
+ if [[ $? -eq 0 ]]; then
+ return 0
+ fi
+ # Not all elements was possible to convert to Windows paths, so we
+ # presume it is not a pathlist. Continue using normal conversion.
+ fi
+
+ arg="$1"
+ winpath=""
+ # Start looking for drive prefix. Also allow /xxxx prefixes (typically options
+ # for Visual Studio tools), and embedded file:// URIs.
+ if [[ $arg =~ ^([^/]*|.*file://|/[a-zA-Z:]{1,3}:?)($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
+ prefix="${BASH_REMATCH[1]}"
+ winpath="${BASH_REMATCH[3]}:${BASH_REMATCH[4]}"
+
+ # If the thing in its entirety points to an existing path, use that instead of thinking
+ # we have a prefix. This can only happen if the top-level directory has a single-letter name.
+ if [[ ${#prefix} -eq 2 && "${prefix:0:1}" == "/" ]]; then
+ possiblepath="${BASH_REMATCH[1]}/${BASH_REMATCH[3]}${BASH_REMATCH[4]}"
+ if [[ -e "$possiblepath" || -e "$(dirname $possiblepath)" || -e "$(echo $possiblepath | cut -d / -f 1-5)" ]] ; then
+ prefix=
+ drivepart="${possiblepath:1:1}"
+ pathpart="${possiblepath:2}"
+ winpath="$drivepart:$pathpart"
+ fi
+ fi
+
+ # Change slash to backslash (or vice versa if mixed mode)
+ if [[ $MIXEDMODE != true ]]; then
+ winpath="${winpath//'/'/'\'}"
+ else
+ winpath="${winpath//'\'/'/'}"
+ fi
+ elif [[ $arg =~ ^([^/]*|(.*file://))(/([-_.a-zA-Z0-9]+)(/[-_.a-zA-Z0-9]+)+)(.*)?$ ]] ; then
+ # This looks like a unix path, like /foo/bar. Also embedded file:// URIs.
+ prefix="${BASH_REMATCH[1]}"
+ pathmatch="${BASH_REMATCH[3]}"
+ firstdir="${BASH_REMATCH[4]}"
+ suffix="${BASH_REMATCH[6]}"
+
+ # We only believe this is a path if the first part is an existing directory
+ if [[ -d "/$firstdir" ]]; then
+ if [[ $ENVROOT == "" ]]; then
+ if [[ $QUIET != true ]]; then
+ echo fixpath: failure: Path "'"$pathmatch"'" cannot be converted to Windows path >&2
+ fi
+ exit 1
+ fi
+ winpath="$ENVROOT$pathmatch"
+ # Change slash to backslash (or vice versa if mixed mode)
+ if [[ $MIXEDMODE != true ]]; then
+ winpath="${winpath//'/'/'\'}"
+ else
+ winpath="${winpath//'\'/'/'}"
+ fi
+ winpath="$winpath$suffix"
+ fi
+ fi
+
+ if [[ $winpath != "" ]]; then
+ result="$prefix$winpath"
+ else
+ # Return the arg unchanged
+ result="$arg"
+ fi
+}
+
+# Treat $1 as name of a file containg paths. Convert those paths to Windows style,
+# in a new temporary file, and return a string "@" pointing to that
+# new file.
+function convert_at_file() {
+ infile="$1"
+ if [[ -e $infile ]] ; then
+ tempdir=$(mktemp -dt fixpath.XXXXXX -p "$WINTEMP")
+ TEMPDIRS="$TEMPDIRS $tempdir"
+
+ while read line; do
+ convert_path "$line"
+ echo "$result" >> $tempdir/atfile
+ done < $infile
+ convert_path "$tempdir/atfile"
+ result="@$result"
+ else
+ result="@$infile"
+ fi
+}
+
+# Convert an entire command line, replacing all unix paths with Windows paths,
+# and all unix-style path lists (colon separated) with Windows-style (semicolon
+# separated).
+function print_command_line() {
+ converted_args=""
+ for arg in "$@" ; do
+ if [[ $arg =~ ^@(.*$) ]] ; then
+ # This is an @-file with paths that need converting
+ convert_at_file "${BASH_REMATCH[1]}"
+ else
+ convert_path "$arg"
+ fi
+ converted_args="$converted_args$result "
+ done
+ result="${converted_args% }"
+}
+
+# Check if the winenv will allow us to start a Windows program when we are
+# standing in the current directory
+function verify_current_dir() {
+ arg="$PWD"
+ if [[ $arg =~ ^($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
+ return 0
+ elif [[ $arg =~ ^(/[^/]+.*$) ]] ; then
+ if [[ $ENVROOT == "" || $ENVROOT =~ ^\\\\.* ]]; then
+ # This is a WSL1 or WSL2 environment
+ return 1
+ fi
+ return 0
+ fi
+ # This should not happen
+ return 1
+}
+
+# The core functionality of fixpath. Take the given command line, and convert
+# it and execute it, so that all paths are converted to Windows style.
+# The return code is the return code of the executed command.
+function exec_command_line() {
+ # Check that Windows can handle our current directory (only an issue for WSL)
+ verify_current_dir
+
+ if [[ $? -ne 0 ]]; then
+ # WSL1 will just forcefully put us in C:\Windows\System32 if we execute this from
+ # a unix directory. WSL2 will do the same, and print a warning. In both cases,
+ # we prefer to take control.
+ cd "$WINTEMP"
+ if [[ $QUIET != true ]]; then
+ echo fixpath: warning: Changing directory to $WINTEMP >&2
+ fi
+ fi
+
+ collected_args=()
+ command=""
+ for arg in "$@" ; do
+ if [[ $command == "" ]]; then
+ # We have not yet located the command to run
+ if [[ $arg =~ ^(.*)=(.*)$ ]]; then
+ # It's a leading env variable assignment (FOO=bar)
+ key="${BASH_REMATCH[1]}"
+ arg="${BASH_REMATCH[2]}"
+ convert_path "$arg"
+ # Set the variable to the converted result
+ export $key="$result"
+ # While this is only needed on WSL, it does not hurt to do everywhere
+ export WSLENV=$WSLENV:$key/w
+ else
+ # The actual command will be executed by bash, so don't convert it
+ command="$arg"
+ fi
+ else
+ # Now we are collecting arguments; they all need converting
+ if [[ $arg =~ ^@(.*$) ]] ; then
+ # This is an @-file with paths that need converting
+ convert_at_file "${BASH_REMATCH[1]}"
+ else
+ convert_path "$arg"
+ fi
+ collected_args=("${collected_args[@]}" "$result")
+ fi
+ done
+
+ # Now execute it
+ if [[ -v DEBUG_FIXPATH ]]; then
+ echo fixpath: debug: input: "$@" >&2
+ echo fixpath: debug: output: "$command" "${collected_args[@]}" >&2
+ fi
+
+ if [[ ! -e "$command" ]]; then
+ if [[ -e "$command.exe" ]]; then
+ command="$command.exe"
+ fi
+ fi
+
+ if [[ $ENVROOT != "" || ! -x /bin/grep ]]; then
+ "$command" "${collected_args[@]}"
+ else
+ # For WSL1, automatically strip away warnings from WSLENV=PATH/l
+ "$command" "${collected_args[@]}" 2> >(/bin/grep -v "ERROR: UtilTranslatePathList" 1>&2)
+ fi
+}
+
+# Check that the input represents a path that is reachable from Windows
+function verify_command_line() {
+ arg="$1"
+ if [[ $arg =~ ^($DRIVEPREFIX/)([a-z])(/[^/]+.*$) ]] ; then
+ return 0
+ elif [[ $arg =~ ^(/[^/]+/[^/]+.*$) ]] ; then
+ if [[ $ENVROOT != "" ]]; then
+ return 0
+ fi
+ fi
+ return 1
+}
+
+#### MAIN FUNCTION
+
+setup "$@"
+# Shift away the options processed in setup
+shift $((OPTIND))
+
+if [[ "$ACTION" == "import" ]] ; then
+ import_command_line "$@"
+ echo "$result"
+elif [[ "$ACTION" == "print" ]] ; then
+ print_command_line "$@"
+ echo "$result"
+elif [[ "$ACTION" == "exec" ]] ; then
+ exec_command_line "$@"
+ # Propagate exit code
+ exit $?
+elif [[ "$ACTION" == "verify" ]] ; then
+ verify_command_line "$@"
+ exit $?
+else
+ if [[ $QUIET != true ]]; then
+ echo Unknown operation: "$ACTION" >&2
+ echo Supported operations: import print exec verify >&2
+ fi
+ exit 2
+fi
diff -Nru openjdk-11-11.0.16+8/make/src/native/fixpath.c openjdk-11-11.0.18+10/make/src/native/fixpath.c
--- openjdk-11-11.0.16+8/make/src/native/fixpath.c 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/make/src/native/fixpath.c 1970-01-01 00:00:00.000000000 +0000
@@ -1,545 +0,0 @@
-/*
- * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-#include
-#include
-#include
-#include
-#include
-
-void report_error(char const * msg)
-{
- LPVOID lpMsgBuf;
- DWORD dw = GetLastError();
-
- FormatMessage(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- dw,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (LPTSTR) &lpMsgBuf,
- 0,
- NULL);
-
- fprintf(stderr,
- "%s Failed with error %d: %s\n",
- msg, dw, lpMsgBuf);
-
- LocalFree(lpMsgBuf);
-}
-
-/*
- * Test if pos points to /cygdrive/_/ where _ can
- * be any character.
- */
-int is_cygdrive_here(int pos, char const *in, int len)
-{
- // Length of /cygdrive/c/ is 12
- if (pos+12 > len) return 0;
- if (in[pos+11]=='/' &&
- in[pos+9]=='/' &&
- in[pos+8]=='e' &&
- in[pos+7]=='v' &&
- in[pos+6]=='i' &&
- in[pos+5]=='r' &&
- in[pos+4]=='d' &&
- in[pos+3]=='g' &&
- in[pos+2]=='y' &&
- in[pos+1]=='c' &&
- in[pos+0]=='/') {
- return 1;
- }
- return 0;
-}
-
-/*
- * Replace /cygdrive/_/ with _:/
- * Works in place since drive letter is always
- * shorter than /cygdrive/
- */
-char *replace_cygdrive_cygwin(char const *in)
-{
- size_t len = strlen(in);
- char *out = (char*) malloc(len+1);
- int i,j;
-
- if (len < 12) {
- memmove(out, in, len + 1);
- return out;
- }
-
- for (i = 0, j = 0; i *bl) {
- *bl *= 2;
- *b = (char*) realloc(*b, *bl);
- }
- memcpy(*b+*u, add, addlen);
- *u += addlen;
-}
-
-/*
- * Creates a new string from in where the first occurrence of sub is
- * replaced by rep.
- */
-char *replace_substring(char *in, char *sub, char *rep)
-{
- int in_len = strlen(in);
- int sub_len = strlen(sub);
- int rep_len = strlen(rep);
- char *out = (char *) malloc(in_len - sub_len + rep_len + 1);
- char *p;
-
- if (!(p = strstr(in, sub))) {
- // If sub isn't a substring of in, just return in.
- return in;
- }
-
- // Copy characters from beginning of in to start of sub.
- strncpy(out, in, p - in);
- out[p - in] = '\0';
-
- sprintf(out + (p - in), "%s%s", rep, p + sub_len);
-
- return out;
-}
-
-char* msys_path_list; // @-separated list of paths prefix to look for
-char* msys_path_list_end; // Points to last \0 in msys_path_list.
-
-void setup_msys_path_list(char const * argument)
-{
- char* p;
- char* drive_letter_pos;
-
- msys_path_list = strdup(&argument[2]);
- msys_path_list_end = &msys_path_list[strlen(msys_path_list)];
-
- // Convert all at-sign (@) in path list to \0.
- // @ was chosen as separator to minimize risk of other tools messing around with it
- p = msys_path_list;
- do {
- if (p[1] == ':') {
- // msys has mangled our path list, restore it from c:/... to /c/...
- drive_letter_pos = p+1;
- *drive_letter_pos = *p;
- *p = '/';
- }
-
- // Look for an @ in the list
- p = strchr(p, '@');
- if (p != NULL) {
- *p = '\0';
- p++;
- }
- } while (p != NULL);
-}
-
-char *replace_cygdrive_msys(char const *in)
-{
- char* str;
- char* prefix;
- char* p;
-
- str = strdup(in);
-
- // For each prefix in the path list, search for it and replace /c/... with c:/...
- for (prefix = msys_path_list; prefix < msys_path_list_end && prefix != NULL; prefix += strlen(prefix)+1) {
- p=str;
- while ((p = strstr(p, prefix))) {
- char* drive_letter = p+1;
- *p = *drive_letter;
- *drive_letter = ':';
- p++;
- }
- }
-
- return str;
-}
-
-char*(*replace_cygdrive)(char const *in) = NULL;
-
-char *files_to_delete[1024];
-int num_files_to_delete = 0;
-
-char *fix_at_file(char const *in)
-{
- char *tmpdir;
- char name[2048];
- char *atname;
- char *buffer;
- size_t buflen=65536;
- size_t used=0;
- size_t len;
- int rc;
- FILE *atout;
- FILE *atin;
- char block[2048];
- size_t blocklen;
- char *fixed;
-
- atin = fopen(in+1, "r");
- if (atin == NULL) {
- fprintf(stderr, "Could not read at file %s\n", in+1);
- exit(-1);
- }
-
- tmpdir = getenv("TEMP");
- if (tmpdir == NULL) {
-#if _WIN64
- tmpdir = "c:/cygwin64/tmp";
-#else
- tmpdir = "c:/cygwin/tmp";
-#endif
- }
- _snprintf(name, sizeof(name), "%s\\atfile_XXXXXX", tmpdir);
-
- rc = _mktemp_s(name, strlen(name)+1);
- if (rc) {
- fprintf(stderr, "Could not create temporary file name for at file!\n");
- exit(-1);
- }
-
- atout = fopen(name, "w");
- if (atout == NULL) {
- fprintf(stderr, "Could not open temporary file for writing! %s\n", name);
- exit(-1);
- }
-
- buffer = (char*) malloc(buflen);
- while ((blocklen = fread(block, 1, sizeof(block), atin)) > 0) {
- append(&buffer, &buflen, &used, block, blocklen);
- }
- buffer[used] = 0;
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath input from @-file %s: %s\n", &in[1], buffer);
- }
- fixed = replace_cygdrive(buffer);
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath converted to @-file %s is: %s\n", name, fixed);
- }
- fwrite(fixed, strlen(fixed), 1, atout);
- fclose(atin);
- fclose(atout);
- free(fixed);
- free(buffer);
- files_to_delete[num_files_to_delete] = (char*) malloc(strlen(name)+1);
- strcpy(files_to_delete[num_files_to_delete], name);
- num_files_to_delete++;
- atname = (char*) malloc(strlen(name)+2);
- atname[0] = '@';
- strcpy(atname+1, name);
- return atname;
-}
-
-// given an argument, convert it to the windows command line safe quoted version
-// using rules from:
-// http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx
-// caller is responsible for freeing both input and output.
-char * quote_arg(char const * in_arg) {
- char *quoted = NULL;
- char *current = quoted;
- int pass;
-
- if (strlen(in_arg) == 0) {
- // empty string? explicitly quote it.
- return _strdup("\"\"");
- }
-
- if (strpbrk(in_arg, " \t\n\v\r\\\"") == NULL) {
- return _strdup(in_arg);
- }
-
- // process the arg twice. Once to calculate the size and then to copy it.
- for (pass=1; pass<=2; pass++) {
- char const *arg = in_arg;
-
- // initial "
- if (pass == 2) {
- *current = '\"';
- }
- current++;
-
- // process string to be quoted until NUL
- do {
- int escapes = 0;
-
- while (*arg == '\\') {
- // count escapes.
- escapes++;
- arg++;
- }
-
- if (*arg == '\0') {
- // escape the escapes before final "
- escapes *= 2;
- } else if (*arg == '"') {
- // escape the escapes and the "
- escapes = escapes * 2 + 1;
- } else {
- // escapes aren't special, just echo them.
- }
-
- // emit some escapes
- while (escapes > 0) {
- if (pass == 2) {
- *current = '\\';
- }
- current++;
- escapes--;
- }
-
- // and the current char
- if (pass == 2) {
- *current = *arg;
- }
- current++;
- } while (*arg++ != '\0');
-
- // allocate the buffer
- if (pass == 1) {
- size_t alloc = (size_t) (current - quoted + (ptrdiff_t) 2);
- current = quoted = (char*) calloc(alloc, sizeof(char));
- }
- }
-
- // final " and \0
- *(current - 1) = '"';
- *current = '\0';
-
- return quoted;
-}
-
-int main(int argc, char const ** argv)
-{
- STARTUPINFO si;
- PROCESS_INFORMATION pi;
- unsigned short rc;
-
- char *line;
- char *current;
- int i, cmd;
- DWORD exitCode = 0;
- DWORD processFlags = 0;
- BOOL processInheritHandles = TRUE;
- BOOL waitForChild = TRUE;
-
- if (argc<2 || argv[1][0] != '-' || (argv[1][1] != 'c' && argv[1][1] != 'm')) {
- fprintf(stderr, "Usage: fixpath -c|m [--detach] /cygdrive/c/WINDOWS/notepad.exe [/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");
- exit(0);
- }
-
- if (getenv("DEBUG_FIXPATH") != NULL) {
- char const * cmdline = GetCommandLine();
- fprintf(stderr, "fixpath input line >%s<\n", strstr(cmdline, argv[1]));
- }
-
- if (argv[1][1] == 'c' && argv[1][2] == '\0') {
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath using cygwin mode\n");
- }
- replace_cygdrive = replace_cygdrive_cygwin;
- } else if (argv[1][1] == 'm') {
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath using msys mode, with path list: %s\n", &argv[1][2]);
- }
- setup_msys_path_list(argv[1]);
- replace_cygdrive = replace_cygdrive_msys;
- } else {
- fprintf(stderr, "fixpath Unknown mode: %s\n", argv[1]);
- exit(-1);
- }
-
- if (argv[2][0] == '-') {
- if (strcmp(argv[2], "--detach") == 0) {
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath in detached mode\n");
- }
- processFlags |= DETACHED_PROCESS;
- processInheritHandles = FALSE;
- waitForChild = FALSE;
- } else {
- fprintf(stderr, "fixpath Unknown argument: %s\n", argv[2]);
- exit(-1);
- }
- i = 3;
- } else {
- i = 2;
- }
-
- // handle assignments
- while (i < argc) {
- char const * assignment = strchr(argv[i], '=');
- if (assignment != NULL && assignment != argv[i]) {
- size_t var_len = (size_t) (assignment - argv[i] + (ptrdiff_t) 1);
- char *var = (char *) calloc(var_len, sizeof(char));
- char *val = replace_cygdrive(assignment + 1);
- memmove(var, argv[i], var_len);
- var[var_len - 1] = '\0';
- strupr(var);
-
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath setting var >%s< to >%s<\n", var, val);
- }
-
- rc = SetEnvironmentVariable(var, val);
- if (!rc) {
- // Could not set var for some reason. Try to report why.
- const int msg_len = 80 + var_len + strlen(val);
- char * msg = (char *) alloca(msg_len);
- _snprintf_s(msg, msg_len, _TRUNCATE, "Could not set environment variable [%s=%s]", var, val);
- report_error(msg);
- exit(1);
- }
- free(var);
- free(val);
- } else {
- // no more assignments;
- break;
- }
- i++;
- }
-
- // remember index of the command
- cmd = i;
-
- // handle command and it's args.
- while (i < argc) {
- char const *replaced = replace_cygdrive(argv[i]);
- if (replaced[0] == '@') {
- if (waitForChild == FALSE) {
- fprintf(stderr, "fixpath Cannot use @-files in detached mode: %s\n", replaced);
- exit(1);
- }
- // Found at-file! Fix it!
- replaced = fix_at_file(replaced);
- }
- argv[i] = quote_arg(replaced);
- i++;
- }
-
- // determine the length of the line
- line = NULL;
- // args
- for (i = cmd; i < argc; i++) {
- line += (ptrdiff_t) strlen(argv[i]);
- }
- // spaces and null
- line += (ptrdiff_t) (argc - cmd + 1);
- // allocate
- line = (char*) calloc(line - (char*) NULL, sizeof(char));
-
- // copy in args.
- current = line;
- for (i = cmd; i < argc; i++) {
- ptrdiff_t len = strlen(argv[i]);
- if (i != cmd) {
- *current++ = ' ';
- }
- memmove(current, argv[i], len);
- current += len;
- }
- *current = '\0';
-
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath converted line >%s<\n", line);
- }
-
- if (cmd == argc) {
- if (getenv("DEBUG_FIXPATH") != NULL) {
- fprintf(stderr, "fixpath no command provided!\n");
- }
- exit(0);
- }
-
- ZeroMemory(&si, sizeof(si));
- si.cb=sizeof(si);
- ZeroMemory(&pi, sizeof(pi));
-
- fflush(stderr);
- fflush(stdout);
-
- rc = CreateProcess(NULL,
- line,
- 0,
- 0,
- processInheritHandles,
- processFlags,
- NULL,
- NULL,
- &si,
- &pi);
- if (!rc) {
- // Could not start process for some reason. Try to report why:
- report_error("Could not start process!");
- exit(126);
- }
-
- if (waitForChild == TRUE) {
- WaitForSingleObject(pi.hProcess, INFINITE);
- GetExitCodeProcess(pi.hProcess, &exitCode);
-
- if (getenv("DEBUG_FIXPATH") != NULL) {
- for (i=0; iopcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 2);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2577,7 +2577,7 @@
enc_class aarch64_enc_ldrsh(iRegI dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrsh, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 2);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2585,7 +2585,7 @@
enc_class aarch64_enc_ldrh(iRegI dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrh, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 2);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2593,7 +2593,7 @@
enc_class aarch64_enc_ldrh(iRegL dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrh, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 2);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2601,7 +2601,7 @@
enc_class aarch64_enc_ldrw(iRegI dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrw, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 4);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2609,7 +2609,7 @@
enc_class aarch64_enc_ldrw(iRegL dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrw, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 4);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2617,7 +2617,7 @@
enc_class aarch64_enc_ldrsw(iRegL dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldrsw, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 4);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -2625,7 +2625,7 @@
enc_class aarch64_enc_ldr(iRegL dst, memory mem) %{
Register dst_reg = as_Register($dst$$reg);
loadStore(MacroAssembler(&cbuf), &MacroAssembler::ldr, dst_reg, $mem->opcode(),
- as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp);
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, 8);
%}
// This encoding class is generated automatically from ad_encode.m4.
@@ -4440,6 +4440,16 @@
interface(CONST_INTER);
%}
+operand immI_positive()
+%{
+ predicate(n->get_int() > 0);
+ match(ConI);
+
+ op_cost(0);
+ format %{ %}
+ interface(CONST_INTER);
+%}
+
// Narrow pointer operands
// Narrow Pointer Immediate
operand immN()
@@ -13889,10 +13899,10 @@
%{
match(Set cr (OverflowAddL op1 op2));
- format %{ "cmn $op1, $op2\t# overflow check long" %}
+ format %{ "adds zr, $op1, $op2\t# overflow check long" %}
ins_cost(INSN_COST);
ins_encode %{
- __ cmn($op1$$Register, $op2$$constant);
+ __ adds(zr, $op1$$Register, $op2$$constant);
%}
ins_pipe(icmp_reg_imm);
@@ -17432,7 +17442,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsra8B_imm(vecD dst, vecD src, immI shift) %{
+instruct vsra8B_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 4 ||
n->as_Vector()->length() == 8);
match(Set dst (RShiftVB src shift));
@@ -17447,7 +17457,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsra16B_imm(vecX dst, vecX src, immI shift) %{
+instruct vsra16B_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 16);
match(Set dst (RShiftVB src shift));
ins_cost(INSN_COST);
@@ -17461,7 +17471,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsrl8B_imm(vecD dst, vecD src, immI shift) %{
+instruct vsrl8B_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 4 ||
n->as_Vector()->length() == 8);
match(Set dst (URShiftVB src shift));
@@ -17481,7 +17491,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsrl16B_imm(vecX dst, vecX src, immI shift) %{
+instruct vsrl16B_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 16);
match(Set dst (URShiftVB src shift));
ins_cost(INSN_COST);
@@ -17636,7 +17646,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsra4S_imm(vecD dst, vecD src, immI shift) %{
+instruct vsra4S_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2 ||
n->as_Vector()->length() == 4);
match(Set dst (RShiftVS src shift));
@@ -17651,7 +17661,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsra8S_imm(vecX dst, vecX src, immI shift) %{
+instruct vsra8S_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 8);
match(Set dst (RShiftVS src shift));
ins_cost(INSN_COST);
@@ -17665,7 +17675,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsrl4S_imm(vecD dst, vecD src, immI shift) %{
+instruct vsrl4S_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2 ||
n->as_Vector()->length() == 4);
match(Set dst (URShiftVS src shift));
@@ -17685,7 +17695,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsrl8S_imm(vecX dst, vecX src, immI shift) %{
+instruct vsrl8S_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 8);
match(Set dst (URShiftVS src shift));
ins_cost(INSN_COST);
@@ -17824,7 +17834,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsra2I_imm(vecD dst, vecD src, immI shift) %{
+instruct vsra2I_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
@@ -17837,7 +17847,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsra4I_imm(vecX dst, vecX src, immI shift) %{
+instruct vsra4I_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 4);
match(Set dst (RShiftVI src shift));
ins_cost(INSN_COST);
@@ -17850,7 +17860,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsrl2I_imm(vecD dst, vecD src, immI shift) %{
+instruct vsrl2I_imm(vecD dst, vecD src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (URShiftVI src shift));
ins_cost(INSN_COST);
@@ -17863,7 +17873,7 @@
ins_pipe(vshift64_imm);
%}
-instruct vsrl4I_imm(vecX dst, vecX src, immI shift) %{
+instruct vsrl4I_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 4);
match(Set dst (URShiftVI src shift));
ins_cost(INSN_COST);
@@ -17936,7 +17946,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsra2L_imm(vecX dst, vecX src, immI shift) %{
+instruct vsra2L_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (RShiftVL src shift));
ins_cost(INSN_COST);
@@ -17949,7 +17959,7 @@
ins_pipe(vshift128_imm);
%}
-instruct vsrl2L_imm(vecX dst, vecX src, immI shift) %{
+instruct vsrl2L_imm(vecX dst, vecX src, immI_positive shift) %{
predicate(n->as_Vector()->length() == 2);
match(Set dst (URShiftVL src shift));
ins_cost(INSN_COST);
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/ad_encode.m4 openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/ad_encode.m4
--- openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/ad_encode.m4 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/ad_encode.m4 2023-01-10 08:32:35.000000000 +0000
@@ -36,6 +36,17 @@
dnl
dnl
dnl
+define(LOADL,`
+ // This encoding class is generated automatically from ad_encode.m4.
+ // DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
+ enc_class aarch64_enc_$2($1 dst, memory mem) %{
+ $3Register dst_reg = as_$3Register($dst$$reg);
+ loadStore(MacroAssembler(&cbuf), &MacroAssembler::$2, dst_reg, $mem->opcode(),
+ as_Register($mem$$base), $mem$$index, $mem$$scale, $mem$$disp, $4);
+ %}')dnl
+dnl
+dnl
+dnl
define(LOADV,`
// This encoding class is generated automatically from ad_encode.m4.
// DO NOT EDIT ANYTHING IN THIS SECTION OF THE FILE
@@ -106,14 +117,14 @@
LOAD(iRegI,ldrsb)
LOAD(iRegI,ldrb)
LOAD(iRegL,ldrb)
-LOAD(iRegI,ldrshw)
-LOAD(iRegI,ldrsh)
-LOAD(iRegI,ldrh)
-LOAD(iRegL,ldrh)
-LOAD(iRegI,ldrw)
-LOAD(iRegL,ldrw)
-LOAD(iRegL,ldrsw)
-LOAD(iRegL,ldr)
+LOADL(iRegI,ldrshw,,2)
+LOADL(iRegI,ldrsh,,2)
+LOADL(iRegI,ldrh,,2)
+LOADL(iRegL,ldrh,,2)
+LOADL(iRegI,ldrw,,4)
+LOADL(iRegL,ldrw,,4)
+LOADL(iRegL,ldrsw,,4)
+LOADL(iRegL,ldr,,8)
LOAD(vRegF,ldrs,Float)
LOAD(vRegD,ldrd,Float)
LOADV(vecD,ldrvS,S)
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -147,7 +147,7 @@
if (index->is_constant()) {
LIR_Const *constant = index->as_constant_ptr();
if (constant->type() == T_INT) {
- large_disp += index->as_jint() << shift;
+ large_disp += ((intx)index->as_jint()) << shift;
} else {
assert(constant->type() == T_LONG, "should be");
jlong c = index->as_jlong() << shift;
@@ -193,7 +193,7 @@
if (large_disp == 0 && index->is_register()) {
return new LIR_Address(base, index, type);
} else {
- assert(Address::offset_ok_for_immed(large_disp, 0), "must be");
+ assert(Address::offset_ok_for_immed(large_disp, shift), "failed for large_disp: " INTPTR_FORMAT " and shift %d", large_disp, shift);
return new LIR_Address(base, large_disp, type);
}
}
@@ -203,24 +203,7 @@
int offset_in_bytes = arrayOopDesc::base_offset_in_bytes(type);
int elem_size = type2aelembytes(type);
int shift = exact_log2(elem_size);
-
- LIR_Address* addr;
- if (index_opr->is_constant()) {
- addr = new LIR_Address(array_opr,
- offset_in_bytes + (intx)(index_opr->as_jint()) * elem_size, type);
- } else {
- if (offset_in_bytes) {
- LIR_Opr tmp = new_pointer_register();
- __ add(array_opr, LIR_OprFact::intConst(offset_in_bytes), tmp);
- array_opr = tmp;
- offset_in_bytes = 0;
- }
- addr = new LIR_Address(array_opr,
- index_opr,
- LIR_Address::scale(type),
- offset_in_bytes, type);
- }
- return addr;
+ return generate_address(array_opr, index_opr, shift, offset_in_bytes, type);
}
LIR_Opr LIRGenerator::load_immediate(int x, BasicType type) {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/frame_aarch64.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -149,10 +149,12 @@
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
-
-
inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
+inline intptr_t* frame::link_or_null() const {
+ intptr_t** ptr = (intptr_t **)addr_at(link_offset);
+ return os::is_readable_pointer(ptr) ? *ptr : NULL;
+}
inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -743,8 +743,23 @@
|| entry.rspec().type() == relocInfo::static_call_type
|| entry.rspec().type() == relocInfo::virtual_call_type, "wrong reloc type");
+ bool need_trampoline = far_branches();
+ if (!need_trampoline && entry.rspec().type() == relocInfo::runtime_call_type && !CodeCache::contains(entry.target())) {
+ // If it is a runtime call of an address outside small CodeCache,
+ // we need to check whether it is in range.
+ address target = entry.target();
+ assert(target < CodeCache::low_bound() || target >= CodeCache::high_bound(), "target is inside CodeCache");
+ // Case 1: -------T-------L====CodeCache====H-------
+ // ^-------longest branch---|
+ // Case 2: -------L====CodeCache====H-------T-------
+ // |-------longest branch ---^
+ address longest_branch_start = (target < CodeCache::low_bound()) ? CodeCache::high_bound() - NativeInstruction::instruction_size
+ : CodeCache::low_bound();
+ need_trampoline = !reachable_from_branch_at(longest_branch_start, target);
+ }
+
// We need a trampoline if branches are far.
- if (far_branches()) {
+ if (need_trampoline) {
bool in_scratch_emit_size = false;
#ifdef COMPILER2
// We don't want to emit a trampoline if C2 is generating dummy
@@ -765,7 +780,7 @@
if (cbuf) cbuf->set_insts_mark();
relocate(entry.rspec());
- if (!far_branches()) {
+ if (!need_trampoline) {
bl(entry.target());
} else {
bl(pc());
@@ -1253,7 +1268,7 @@
if (!IS_A_TEMP(r2)) pushed_registers += r2;
if (!IS_A_TEMP(r5)) pushed_registers += r5;
- if (super_klass != r0 || UseCompressedOops) {
+ if (super_klass != r0) {
if (!IS_A_TEMP(r0)) pushed_registers += r0;
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -217,7 +217,7 @@
UseAES = true;
}
if (FLAG_IS_DEFAULT(UseAESCTRIntrinsics)) {
- FLAG_SET_DEFAULT(UseAESCTRIntrinsics, false);
+ FLAG_SET_DEFAULT(UseAESCTRIntrinsics, true);
}
} else {
if (UseAES) {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/arm/frame_arm.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/arm/frame_arm.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/arm/frame_arm.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/arm/frame_arm.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -132,9 +132,13 @@
return this->id() > id ; }
-
inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
+inline intptr_t* frame::link_or_null() const {
+ intptr_t** ptr = (intptr_t **)addr_at(link_offset);
+ return os::is_readable_pointer(ptr) ? *ptr : NULL;
+}
+
inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
// Return address:
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/ppc/frame_ppc.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/ppc/frame_ppc.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/ppc/frame_ppc.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/ppc/frame_ppc.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -117,6 +117,10 @@
return (intptr_t*)callers_abi()->callers_sp;
}
+inline intptr_t* frame::link_or_null() const {
+ return link();
+}
+
inline intptr_t* frame::real_fp() const {
return fp();
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/ppc/ppc.ad openjdk-11-11.0.18+10/src/hotspot/cpu/ppc/ppc.ad
--- openjdk-11-11.0.16+8/src/hotspot/cpu/ppc/ppc.ad 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/ppc/ppc.ad 2023-01-10 08:32:35.000000000 +0000
@@ -1,6 +1,6 @@
//
// Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
-// Copyright (c) 2012, 2020 SAP SE. All rights reserved.
+// Copyright (c) 2012, 2022 SAP SE. 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
@@ -257,70 +257,70 @@
// ----------------------------
// Vector-Scalar Registers
// ----------------------------
- reg_def VSR0 ( SOC, SOC, Op_VecX, 0, NULL);
- reg_def VSR1 ( SOC, SOC, Op_VecX, 1, NULL);
- reg_def VSR2 ( SOC, SOC, Op_VecX, 2, NULL);
- reg_def VSR3 ( SOC, SOC, Op_VecX, 3, NULL);
- reg_def VSR4 ( SOC, SOC, Op_VecX, 4, NULL);
- reg_def VSR5 ( SOC, SOC, Op_VecX, 5, NULL);
- reg_def VSR6 ( SOC, SOC, Op_VecX, 6, NULL);
- reg_def VSR7 ( SOC, SOC, Op_VecX, 7, NULL);
- reg_def VSR8 ( SOC, SOC, Op_VecX, 8, NULL);
- reg_def VSR9 ( SOC, SOC, Op_VecX, 9, NULL);
- reg_def VSR10 ( SOC, SOC, Op_VecX, 10, NULL);
- reg_def VSR11 ( SOC, SOC, Op_VecX, 11, NULL);
- reg_def VSR12 ( SOC, SOC, Op_VecX, 12, NULL);
- reg_def VSR13 ( SOC, SOC, Op_VecX, 13, NULL);
- reg_def VSR14 ( SOC, SOC, Op_VecX, 14, NULL);
- reg_def VSR15 ( SOC, SOC, Op_VecX, 15, NULL);
- reg_def VSR16 ( SOC, SOC, Op_VecX, 16, NULL);
- reg_def VSR17 ( SOC, SOC, Op_VecX, 17, NULL);
- reg_def VSR18 ( SOC, SOC, Op_VecX, 18, NULL);
- reg_def VSR19 ( SOC, SOC, Op_VecX, 19, NULL);
- reg_def VSR20 ( SOC, SOC, Op_VecX, 20, NULL);
- reg_def VSR21 ( SOC, SOC, Op_VecX, 21, NULL);
- reg_def VSR22 ( SOC, SOC, Op_VecX, 22, NULL);
- reg_def VSR23 ( SOC, SOC, Op_VecX, 23, NULL);
- reg_def VSR24 ( SOC, SOC, Op_VecX, 24, NULL);
- reg_def VSR25 ( SOC, SOC, Op_VecX, 25, NULL);
- reg_def VSR26 ( SOC, SOC, Op_VecX, 26, NULL);
- reg_def VSR27 ( SOC, SOC, Op_VecX, 27, NULL);
- reg_def VSR28 ( SOC, SOC, Op_VecX, 28, NULL);
- reg_def VSR29 ( SOC, SOC, Op_VecX, 29, NULL);
- reg_def VSR30 ( SOC, SOC, Op_VecX, 30, NULL);
- reg_def VSR31 ( SOC, SOC, Op_VecX, 31, NULL);
- reg_def VSR32 ( SOC, SOC, Op_VecX, 32, NULL);
- reg_def VSR33 ( SOC, SOC, Op_VecX, 33, NULL);
- reg_def VSR34 ( SOC, SOC, Op_VecX, 34, NULL);
- reg_def VSR35 ( SOC, SOC, Op_VecX, 35, NULL);
- reg_def VSR36 ( SOC, SOC, Op_VecX, 36, NULL);
- reg_def VSR37 ( SOC, SOC, Op_VecX, 37, NULL);
- reg_def VSR38 ( SOC, SOC, Op_VecX, 38, NULL);
- reg_def VSR39 ( SOC, SOC, Op_VecX, 39, NULL);
- reg_def VSR40 ( SOC, SOC, Op_VecX, 40, NULL);
- reg_def VSR41 ( SOC, SOC, Op_VecX, 41, NULL);
- reg_def VSR42 ( SOC, SOC, Op_VecX, 42, NULL);
- reg_def VSR43 ( SOC, SOC, Op_VecX, 43, NULL);
- reg_def VSR44 ( SOC, SOC, Op_VecX, 44, NULL);
- reg_def VSR45 ( SOC, SOC, Op_VecX, 45, NULL);
- reg_def VSR46 ( SOC, SOC, Op_VecX, 46, NULL);
- reg_def VSR47 ( SOC, SOC, Op_VecX, 47, NULL);
- reg_def VSR48 ( SOC, SOC, Op_VecX, 48, NULL);
- reg_def VSR49 ( SOC, SOC, Op_VecX, 49, NULL);
- reg_def VSR50 ( SOC, SOC, Op_VecX, 50, NULL);
- reg_def VSR51 ( SOC, SOC, Op_VecX, 51, NULL);
- reg_def VSR52 ( SOC, SOC, Op_VecX, 52, NULL);
- reg_def VSR53 ( SOC, SOC, Op_VecX, 53, NULL);
- reg_def VSR54 ( SOC, SOC, Op_VecX, 54, NULL);
- reg_def VSR55 ( SOC, SOC, Op_VecX, 55, NULL);
- reg_def VSR56 ( SOC, SOC, Op_VecX, 56, NULL);
- reg_def VSR57 ( SOC, SOC, Op_VecX, 57, NULL);
- reg_def VSR58 ( SOC, SOC, Op_VecX, 58, NULL);
- reg_def VSR59 ( SOC, SOC, Op_VecX, 59, NULL);
- reg_def VSR60 ( SOC, SOC, Op_VecX, 60, NULL);
- reg_def VSR61 ( SOC, SOC, Op_VecX, 61, NULL);
- reg_def VSR62 ( SOC, SOC, Op_VecX, 62, NULL);
- reg_def VSR63 ( SOC, SOC, Op_VecX, 63, NULL);
+ reg_def VSR0 ( SOC, SOC, Op_VecX, 0, VMRegImpl::Bad());
+ reg_def VSR1 ( SOC, SOC, Op_VecX, 1, VMRegImpl::Bad());
+ reg_def VSR2 ( SOC, SOC, Op_VecX, 2, VMRegImpl::Bad());
+ reg_def VSR3 ( SOC, SOC, Op_VecX, 3, VMRegImpl::Bad());
+ reg_def VSR4 ( SOC, SOC, Op_VecX, 4, VMRegImpl::Bad());
+ reg_def VSR5 ( SOC, SOC, Op_VecX, 5, VMRegImpl::Bad());
+ reg_def VSR6 ( SOC, SOC, Op_VecX, 6, VMRegImpl::Bad());
+ reg_def VSR7 ( SOC, SOC, Op_VecX, 7, VMRegImpl::Bad());
+ reg_def VSR8 ( SOC, SOC, Op_VecX, 8, VMRegImpl::Bad());
+ reg_def VSR9 ( SOC, SOC, Op_VecX, 9, VMRegImpl::Bad());
+ reg_def VSR10 ( SOC, SOC, Op_VecX, 10, VMRegImpl::Bad());
+ reg_def VSR11 ( SOC, SOC, Op_VecX, 11, VMRegImpl::Bad());
+ reg_def VSR12 ( SOC, SOC, Op_VecX, 12, VMRegImpl::Bad());
+ reg_def VSR13 ( SOC, SOC, Op_VecX, 13, VMRegImpl::Bad());
+ reg_def VSR14 ( SOC, SOC, Op_VecX, 14, VMRegImpl::Bad());
+ reg_def VSR15 ( SOC, SOC, Op_VecX, 15, VMRegImpl::Bad());
+ reg_def VSR16 ( SOC, SOC, Op_VecX, 16, VMRegImpl::Bad());
+ reg_def VSR17 ( SOC, SOC, Op_VecX, 17, VMRegImpl::Bad());
+ reg_def VSR18 ( SOC, SOC, Op_VecX, 18, VMRegImpl::Bad());
+ reg_def VSR19 ( SOC, SOC, Op_VecX, 19, VMRegImpl::Bad());
+ reg_def VSR20 ( SOC, SOC, Op_VecX, 20, VMRegImpl::Bad());
+ reg_def VSR21 ( SOC, SOC, Op_VecX, 21, VMRegImpl::Bad());
+ reg_def VSR22 ( SOC, SOC, Op_VecX, 22, VMRegImpl::Bad());
+ reg_def VSR23 ( SOC, SOC, Op_VecX, 23, VMRegImpl::Bad());
+ reg_def VSR24 ( SOC, SOC, Op_VecX, 24, VMRegImpl::Bad());
+ reg_def VSR25 ( SOC, SOC, Op_VecX, 25, VMRegImpl::Bad());
+ reg_def VSR26 ( SOC, SOC, Op_VecX, 26, VMRegImpl::Bad());
+ reg_def VSR27 ( SOC, SOC, Op_VecX, 27, VMRegImpl::Bad());
+ reg_def VSR28 ( SOC, SOC, Op_VecX, 28, VMRegImpl::Bad());
+ reg_def VSR29 ( SOC, SOC, Op_VecX, 29, VMRegImpl::Bad());
+ reg_def VSR30 ( SOC, SOC, Op_VecX, 30, VMRegImpl::Bad());
+ reg_def VSR31 ( SOC, SOC, Op_VecX, 31, VMRegImpl::Bad());
+ reg_def VSR32 ( SOC, SOC, Op_VecX, 32, VMRegImpl::Bad());
+ reg_def VSR33 ( SOC, SOC, Op_VecX, 33, VMRegImpl::Bad());
+ reg_def VSR34 ( SOC, SOC, Op_VecX, 34, VMRegImpl::Bad());
+ reg_def VSR35 ( SOC, SOC, Op_VecX, 35, VMRegImpl::Bad());
+ reg_def VSR36 ( SOC, SOC, Op_VecX, 36, VMRegImpl::Bad());
+ reg_def VSR37 ( SOC, SOC, Op_VecX, 37, VMRegImpl::Bad());
+ reg_def VSR38 ( SOC, SOC, Op_VecX, 38, VMRegImpl::Bad());
+ reg_def VSR39 ( SOC, SOC, Op_VecX, 39, VMRegImpl::Bad());
+ reg_def VSR40 ( SOC, SOC, Op_VecX, 40, VMRegImpl::Bad());
+ reg_def VSR41 ( SOC, SOC, Op_VecX, 41, VMRegImpl::Bad());
+ reg_def VSR42 ( SOC, SOC, Op_VecX, 42, VMRegImpl::Bad());
+ reg_def VSR43 ( SOC, SOC, Op_VecX, 43, VMRegImpl::Bad());
+ reg_def VSR44 ( SOC, SOC, Op_VecX, 44, VMRegImpl::Bad());
+ reg_def VSR45 ( SOC, SOC, Op_VecX, 45, VMRegImpl::Bad());
+ reg_def VSR46 ( SOC, SOC, Op_VecX, 46, VMRegImpl::Bad());
+ reg_def VSR47 ( SOC, SOC, Op_VecX, 47, VMRegImpl::Bad());
+ reg_def VSR48 ( SOC, SOC, Op_VecX, 48, VMRegImpl::Bad());
+ reg_def VSR49 ( SOC, SOC, Op_VecX, 49, VMRegImpl::Bad());
+ reg_def VSR50 ( SOC, SOC, Op_VecX, 50, VMRegImpl::Bad());
+ reg_def VSR51 ( SOC, SOC, Op_VecX, 51, VMRegImpl::Bad());
+ reg_def VSR52 ( SOC, SOC, Op_VecX, 52, VMRegImpl::Bad());
+ reg_def VSR53 ( SOC, SOC, Op_VecX, 53, VMRegImpl::Bad());
+ reg_def VSR54 ( SOC, SOC, Op_VecX, 54, VMRegImpl::Bad());
+ reg_def VSR55 ( SOC, SOC, Op_VecX, 55, VMRegImpl::Bad());
+ reg_def VSR56 ( SOC, SOC, Op_VecX, 56, VMRegImpl::Bad());
+ reg_def VSR57 ( SOC, SOC, Op_VecX, 57, VMRegImpl::Bad());
+ reg_def VSR58 ( SOC, SOC, Op_VecX, 58, VMRegImpl::Bad());
+ reg_def VSR59 ( SOC, SOC, Op_VecX, 59, VMRegImpl::Bad());
+ reg_def VSR60 ( SOC, SOC, Op_VecX, 60, VMRegImpl::Bad());
+ reg_def VSR61 ( SOC, SOC, Op_VecX, 61, VMRegImpl::Bad());
+ reg_def VSR62 ( SOC, SOC, Op_VecX, 62, VMRegImpl::Bad());
+ reg_def VSR63 ( SOC, SOC, Op_VecX, 63, VMRegImpl::Bad());
// ----------------------------
// Specify priority of register selection within phases of register
@@ -7191,6 +7191,9 @@
n2->_opnds[2] = op_dst;
n2->_bottom_type = _bottom_type;
+ assert(ra_->is_oop(this) == true, "A decodeN node must produce an oop!");
+ ra_->set_oop(n2, true);
+
ra_->set_pair(n1->_idx, ra_->get_reg_second(this), ra_->get_reg_first(this));
ra_->set_pair(n2->_idx, ra_->get_reg_second(this), ra_->get_reg_first(this));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/s390/assembler_s390.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/s390/assembler_s390.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/s390/assembler_s390.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/s390/assembler_s390.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -139,7 +139,7 @@
return inverse_cc;
}
-#ifdef ASSERT
+#ifndef PRODUCT
void Assembler::print_dbg_msg(outputStream* out, unsigned long inst, const char* msg, int ilen) {
out->flush();
switch (ilen) {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/s390/frame_s390.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/s390/frame_s390.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/s390/frame_s390.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/s390/frame_s390.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -163,6 +163,10 @@
return (intptr_t*) callers_abi()->callers_sp;
}
+inline intptr_t* frame::link_or_null() const {
+ return link();
+}
+
inline intptr_t** frame::interpreter_frame_locals_addr() const {
return (intptr_t**) &(ijava_state()->locals);
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/s390/interp_masm_s390.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/s390/interp_masm_s390.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/s390/interp_masm_s390.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/s390/interp_masm_s390.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -164,7 +164,7 @@
// Accessors to the template interpreter state.
- void asm_assert_ijava_state_magic(Register tmp) PRODUCT_RETURN;
+ void asm_assert_ijava_state_magic(Register tmp) NOT_DEBUG_RETURN;
void save_bcp();
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/sparc/frame_sparc.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/sparc/frame_sparc.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/sparc/frame_sparc.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/sparc/frame_sparc.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -70,6 +70,10 @@
inline intptr_t* frame::link() const { return (intptr_t *)(fp()[FP->sp_offset_in_saved_window()] + STACK_BIAS); }
+inline intptr_t* frame::link_or_null() const {
+ return link();
+}
+
inline intptr_t* frame::unextended_sp() const { return sp() + _sp_adjustment_by_callee; }
// return address:
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/sparc/nativeInst_sparc.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/sparc/nativeInst_sparc.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/sparc/nativeInst_sparc.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/sparc/nativeInst_sparc.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -313,7 +313,7 @@
// (used to manipulate inline caches, primitive & dll calls, etc.)
inline NativeCall* nativeCall_at(address instr);
inline NativeCall* nativeCall_overwriting_at(address instr,
- address destination);
+ address destination = NULL);
inline NativeCall* nativeCall_before(address return_address);
class NativeCall: public NativeInstruction {
public:
@@ -342,7 +342,7 @@
// Creation
friend inline NativeCall* nativeCall_at(address instr);
- friend NativeCall* nativeCall_overwriting_at(address instr, address destination = NULL) {
+ friend NativeCall* nativeCall_overwriting_at(address instr, address destination) {
// insert a "blank" call:
NativeCall* call = (NativeCall*)instr;
call->set_long_at(0 * BytesPerInstWord, call_instruction(destination, instr));
@@ -411,7 +411,7 @@
// == sethi %hi54(addr), O7 ; jumpl O7, %lo10(addr), O7 ;
// That is, it is essentially the same as a NativeJump.
class NativeFarCall;
-inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination);
+inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination = NULL);
inline NativeFarCall* nativeFarCall_at(address instr);
class NativeFarCall: public NativeInstruction {
public:
@@ -450,7 +450,7 @@
return call;
}
- friend inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination = NULL) {
+ friend inline NativeFarCall* nativeFarCall_overwriting_at(address instr, address destination) {
Unimplemented();
NativeFarCall* call = (NativeFarCall*)instr;
return call;
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/x86/frame_x86.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/x86/frame_x86.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/x86/frame_x86.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/x86/frame_x86.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -142,10 +142,13 @@
inline bool frame::is_older(intptr_t* id) const { assert(this->id() != NULL && id != NULL, "NULL frame id");
return this->id() > id ; }
-
-
inline intptr_t* frame::link() const { return (intptr_t*) *(intptr_t **)addr_at(link_offset); }
+inline intptr_t* frame::link_or_null() const {
+ intptr_t** ptr = (intptr_t **)addr_at(link_offset);
+ return os::is_readable_pointer(ptr) ? *ptr : NULL;
+}
+
inline intptr_t* frame::unextended_sp() const { return _unextended_sp; }
// Return address:
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/x86/macroAssembler_x86.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/x86/macroAssembler_x86.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/x86/macroAssembler_x86.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -4785,7 +4785,7 @@
// Get super_klass value into rax (even if it was in rdi or rcx).
bool pushed_rax = false, pushed_rcx = false, pushed_rdi = false;
- if (super_klass != rax || UseCompressedOops) {
+ if (super_klass != rax) {
if (!IS_A_TEMP(rax)) { push(rax); pushed_rax = true; }
mov(rax, super_klass);
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -808,11 +808,14 @@
addptr(pos, 1);
addptr(used, 1);
decrement(len_reg);
- jmp(PRELOOP_START);
+ jcc(Assembler::notEqual, PRELOOP_START);
bind(EXIT_PRELOOP);
movl(Address(used_addr, 0), used);
+ cmpl(len_reg, 0);
+ jcc(Assembler::equal, EXIT);
+
// Calculate number of rounds i.e. 10, 12, 14, based on key length(128, 192, 256).
movl(rounds, Address(key, arrayOopDesc::length_offset_in_bytes() - arrayOopDesc::base_offset_in_bytes(T_INT)));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp openjdk-11-11.0.18+10/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/x86/sharedRuntime_x86_64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -139,8 +139,8 @@
};
public:
- static OopMap* save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors);
- static void restore_live_registers(MacroAssembler* masm, bool restore_vectors = false);
+ static OopMap* save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_wide_vectors);
+ static void restore_live_registers(MacroAssembler* masm, bool restore_wide_vectors = false);
// Offsets into the register save area
// Used by deoptimization when it is managing result register
@@ -157,19 +157,19 @@
static void restore_result_registers(MacroAssembler* masm);
};
-OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_vectors) {
+OopMap* RegisterSaver::save_live_registers(MacroAssembler* masm, int additional_frame_words, int* total_frame_words, bool save_wide_vectors) {
int off = 0;
int num_xmm_regs = XMMRegisterImpl::number_of_registers;
if (UseAVX < 3) {
num_xmm_regs = num_xmm_regs/2;
}
#if COMPILER2_OR_JVMCI
- if (save_vectors && UseAVX == 0) {
- save_vectors = false; // vectors larger than 16 byte long are supported only with AVX
+ if (save_wide_vectors && UseAVX == 0) {
+ save_wide_vectors = false; // vectors larger than 16 byte long are supported only with AVX
}
- assert(!save_vectors || MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
+ assert(!save_wide_vectors || MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
#else
- save_vectors = false; // vectors are generated only by C2 and JVMCI
+ save_wide_vectors = false; // vectors are generated only by C2 and JVMCI
#endif
// Always make the frame size 16-byte aligned, both vector and non vector stacks are always allocated
@@ -190,7 +190,7 @@
__ push_CPU_state(); // Push a multiple of 16 bytes
// push cpu state handles this on EVEX enabled targets
- if (save_vectors) {
+ if (save_wide_vectors) {
// Save upper half of YMM registers(0..15)
int base_addr = XSAVE_AREA_YMM_BEGIN;
for (int n = 0; n < 16; n++) {
@@ -212,11 +212,12 @@
}
} else {
if (VM_Version::supports_evex()) {
- // Save upper bank of ZMM registers(16..31) for double/float usage
+ // Save upper bank of XMM registers(16..31) for scalar or 16-byte vector usage
int base_addr = XSAVE_AREA_UPPERBANK;
off = 0;
+ int vector_len = VM_Version::supports_avx512vl() ? Assembler::AVX_128bit : Assembler::AVX_512bit;
for (int n = 16; n < num_xmm_regs; n++) {
- __ movsd(Address(rsp, base_addr+(off++*64)), as_XMMRegister(n));
+ __ evmovdqul(Address(rsp, base_addr+(off++*64)), as_XMMRegister(n), vector_len);
}
}
}
@@ -273,7 +274,7 @@
}
#if COMPILER2_OR_JVMCI
- if (save_vectors) {
+ if (save_wide_vectors) {
// Save upper half of YMM registers(0..15)
off = ymm0_off;
delta = ymm1_off - ymm0_off;
@@ -336,7 +337,7 @@
return map;
}
-void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_vectors) {
+void RegisterSaver::restore_live_registers(MacroAssembler* masm, bool restore_wide_vectors) {
int num_xmm_regs = XMMRegisterImpl::number_of_registers;
if (UseAVX < 3) {
num_xmm_regs = num_xmm_regs/2;
@@ -347,18 +348,18 @@
}
#if COMPILER2_OR_JVMCI
- if (restore_vectors) {
+ if (restore_wide_vectors) {
assert(UseAVX > 0, "Vectors larger than 16 byte long are supported only with AVX");
assert(MaxVectorSize <= 64, "Only up to 64 byte long vectors are supported");
}
#else
- assert(!restore_vectors, "vectors are generated only by C2");
+ assert(!restore_wide_vectors, "vectors are generated only by C2");
#endif
__ vzeroupper();
// On EVEX enabled targets everything is handled in pop fpu state
- if (restore_vectors) {
+ if (restore_wide_vectors) {
// Restore upper half of YMM registers (0..15)
int base_addr = XSAVE_AREA_YMM_BEGIN;
for (int n = 0; n < 16; n++) {
@@ -380,11 +381,12 @@
}
} else {
if (VM_Version::supports_evex()) {
- // Restore upper bank of ZMM registers(16..31) for double/float usage
+ // Restore upper bank of XMM registers(16..31) for scalar or 16-byte vector usage
int base_addr = XSAVE_AREA_UPPERBANK;
int off = 0;
+ int vector_len = VM_Version::supports_avx512vl() ? Assembler::AVX_128bit : Assembler::AVX_512bit;
for (int n = 16; n < num_xmm_regs; n++) {
- __ movsd(as_XMMRegister(n), Address(rsp, base_addr+(off++*64)));
+ __ evmovdqul(as_XMMRegister(n), Address(rsp, base_addr+(off++*64)), vector_len);
}
}
}
@@ -2863,7 +2865,7 @@
// Prolog for non exception case!
// Save everything in sight.
- map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_vectors*/ true);
+ map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
// Normal deoptimization. Save exec mode for unpack_frames.
__ movl(r14, Deoptimization::Unpack_deopt); // callee-saved
@@ -2881,7 +2883,7 @@
// return address is the pc describes what bci to do re-execute at
// No need to update map as each call to save_live_registers will produce identical oopmap
- (void) RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_vectors*/ true);
+ (void) RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
__ movl(r14, Deoptimization::Unpack_reexecute); // callee-saved
__ jmp(cont);
@@ -2900,7 +2902,7 @@
uncommon_trap_offset = __ pc() - start;
// Save everything in sight.
- RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_vectors*/ true);
+ RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
// fetch_unroll_info needs to call last_java_frame()
__ set_last_Java_frame(noreg, noreg, NULL);
@@ -2947,7 +2949,7 @@
__ push(0);
// Save everything in sight.
- map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_vectors*/ true);
+ map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ true);
// Now it is safe to overwrite any register
@@ -3383,7 +3385,7 @@
address call_pc = NULL;
int frame_size_in_words;
bool cause_return = (poll_type == POLL_AT_RETURN);
- bool save_vectors = (poll_type == POLL_AT_VECTOR_LOOP);
+ bool save_wide_vectors = (poll_type == POLL_AT_VECTOR_LOOP);
if (UseRTMLocking) {
// Abort RTM transaction before calling runtime
@@ -3398,7 +3400,7 @@
}
// Save registers, fpu state, and flags
- map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, save_vectors);
+ map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, save_wide_vectors);
// The following is basically a call_VM. However, we need the precise
// address of the call in order to generate an oopmap. Hence, we do all the
@@ -3437,7 +3439,7 @@
// Exception pending
- RegisterSaver::restore_live_registers(masm, save_vectors);
+ RegisterSaver::restore_live_registers(masm, save_wide_vectors);
__ jump(RuntimeAddress(StubRoutines::forward_exception_entry()));
@@ -3505,7 +3507,7 @@
__ bind(no_adjust);
// Normal exit, restore registers and exit.
- RegisterSaver::restore_live_registers(masm, save_vectors);
+ RegisterSaver::restore_live_registers(masm, save_wide_vectors);
__ ret(0);
#ifdef ASSERT
@@ -3545,7 +3547,7 @@
int start = __ offset();
// No need to save vector registers since they are caller-saved anyway.
- map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_vectors*/ false);
+ map = RegisterSaver::save_live_registers(masm, 0, &frame_size_in_words, /*save_wide_vectors*/ false);
int frame_complete = __ offset();
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/zero/frame_zero.inline.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/zero/frame_zero.inline.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/zero/frame_zero.inline.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/zero/frame_zero.inline.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -82,6 +82,11 @@
return NULL;
}
+inline intptr_t* frame::link_or_null() const {
+ ShouldNotCallThis();
+ return NULL;
+}
+
#ifdef CC_INTERP
inline interpreterState frame::get_interpreterState() const {
return zero_interpreterframe()->interpreter_state();
diff -Nru openjdk-11-11.0.16+8/src/hotspot/cpu/zero/globalDefinitions_zero.hpp openjdk-11-11.0.18+10/src/hotspot/cpu/zero/globalDefinitions_zero.hpp
--- openjdk-11-11.0.16+8/src/hotspot/cpu/zero/globalDefinitions_zero.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/cpu/zero/globalDefinitions_zero.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -30,6 +30,10 @@
#define SUPPORTS_NATIVE_CX8
#endif
+#ifndef FFI_GO_CLOSURES
+#define FFI_GO_CLOSURES 0
+#endif
+
#include
// Indicates whether the C calling conventions require that
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupSubsystem_linux.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupSubsystem_linux.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupSubsystem_linux.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupSubsystem_linux.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2022, 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,11 +34,15 @@
#include "runtime/os.hpp"
#include "utilities/globalDefinitions.hpp"
+// controller names have to match the *_IDX indices
+static const char* cg_controller_name[] = { "cpu", "cpuset", "cpuacct", "memory", "pids" };
+
CgroupSubsystem* CgroupSubsystemFactory::create() {
CgroupV1MemoryController* memory = NULL;
CgroupV1Controller* cpuset = NULL;
CgroupV1Controller* cpu = NULL;
CgroupV1Controller* cpuacct = NULL;
+ CgroupV1Controller* pids = NULL;
CgroupInfo cg_infos[CG_INFO_LENGTH];
u1 cg_type_flags = INVALID_CGROUPS_GENERIC;
const char* proc_cgroups = "/proc/cgroups";
@@ -93,22 +97,55 @@
assert(is_cgroup_v1(&cg_type_flags), "Cgroup v1 expected");
for (int i = 0; i < CG_INFO_LENGTH; i++) {
CgroupInfo info = cg_infos[i];
- if (strcmp(info._name, "memory") == 0) {
- memory = new CgroupV1MemoryController(info._root_mount_path, info._mount_path);
- memory->set_subsystem_path(info._cgroup_path);
- } else if (strcmp(info._name, "cpuset") == 0) {
- cpuset = new CgroupV1Controller(info._root_mount_path, info._mount_path);
- cpuset->set_subsystem_path(info._cgroup_path);
- } else if (strcmp(info._name, "cpu") == 0) {
- cpu = new CgroupV1Controller(info._root_mount_path, info._mount_path);
- cpu->set_subsystem_path(info._cgroup_path);
- } else if (strcmp(info._name, "cpuacct") == 0) {
- cpuacct = new CgroupV1Controller(info._root_mount_path, info._mount_path);
- cpuacct->set_subsystem_path(info._cgroup_path);
+ if (info._data_complete) { // pids controller might have incomplete data
+ if (strcmp(info._name, "memory") == 0) {
+ memory = new CgroupV1MemoryController(info._root_mount_path, info._mount_path);
+ memory->set_subsystem_path(info._cgroup_path);
+ } else if (strcmp(info._name, "cpuset") == 0) {
+ cpuset = new CgroupV1Controller(info._root_mount_path, info._mount_path);
+ cpuset->set_subsystem_path(info._cgroup_path);
+ } else if (strcmp(info._name, "cpu") == 0) {
+ cpu = new CgroupV1Controller(info._root_mount_path, info._mount_path);
+ cpu->set_subsystem_path(info._cgroup_path);
+ } else if (strcmp(info._name, "cpuacct") == 0) {
+ cpuacct = new CgroupV1Controller(info._root_mount_path, info._mount_path);
+ cpuacct->set_subsystem_path(info._cgroup_path);
+ } else if (strcmp(info._name, "pids") == 0) {
+ pids = new CgroupV1Controller(info._root_mount_path, info._mount_path);
+ pids->set_subsystem_path(info._cgroup_path);
+ }
+ } else {
+ log_debug(os, container)("CgroupInfo for %s not complete", cg_controller_name[i]);
}
}
cleanup(cg_infos);
- return new CgroupV1Subsystem(cpuset, cpu, cpuacct, memory);
+ return new CgroupV1Subsystem(cpuset, cpu, cpuacct, pids, memory);
+}
+
+void CgroupSubsystemFactory::set_controller_paths(CgroupInfo* cg_infos,
+ int controller,
+ const char* name,
+ char* mount_path,
+ char* root_path) {
+ if (cg_infos[controller]._mount_path != NULL) {
+ // On some systems duplicate controllers get mounted in addition to
+ // the main cgroup controllers most likely under /sys/fs/cgroup. In that
+ // case pick the one under /sys/fs/cgroup and discard others.
+ if (strstr(cg_infos[controller]._mount_path, "/sys/fs/cgroup") != cg_infos[controller]._mount_path) {
+ log_debug(os, container)("Duplicate %s controllers detected. Picking %s, skipping %s.",
+ name, mount_path, cg_infos[controller]._mount_path);
+ os::free(cg_infos[controller]._mount_path);
+ os::free(cg_infos[controller]._root_mount_path);
+ cg_infos[controller]._mount_path = os::strdup(mount_path);
+ cg_infos[controller]._root_mount_path = os::strdup(root_path);
+ } else {
+ log_debug(os, container)("Duplicate %s controllers detected. Picking %s, skipping %s.",
+ name, cg_infos[controller]._mount_path, mount_path);
+ }
+ } else {
+ cg_infos[controller]._mount_path = os::strdup(mount_path);
+ cg_infos[controller]._root_mount_path = os::strdup(root_path);
+ }
}
bool CgroupSubsystemFactory::determine_type(CgroupInfo* cg_infos,
@@ -122,9 +159,10 @@
char buf[MAXPATHLEN+1];
char *p;
bool is_cgroupsV2;
- // true iff all controllers, memory, cpu, cpuset, cpuacct are enabled
+ // true iff all required controllers, memory, cpu, cpuset, cpuacct are enabled
// at the kernel level.
- bool all_controllers_enabled;
+ // pids might not be enabled on older Linux distros (SLES 12.1, RHEL 7.1)
+ bool all_required_controllers_enabled;
/*
* Read /proc/cgroups so as to be able to distinguish cgroups v2 vs cgroups v1.
@@ -136,10 +174,9 @@
*/
cgroups = fopen(proc_cgroups, "r");
if (cgroups == NULL) {
- log_debug(os, container)("Can't open %s, %s",
- proc_cgroups, os::strerror(errno));
- *flags = INVALID_CGROUPS_GENERIC;
- return false;
+ log_debug(os, container)("Can't open %s, %s", proc_cgroups, os::strerror(errno));
+ *flags = INVALID_CGROUPS_GENERIC;
+ return false;
}
while ((p = fgets(buf, MAXPATHLEN, cgroups)) != NULL) {
@@ -167,19 +204,30 @@
cg_infos[CPUACCT_IDX]._name = os::strdup(name);
cg_infos[CPUACCT_IDX]._hierarchy_id = hierarchy_id;
cg_infos[CPUACCT_IDX]._enabled = (enabled == 1);
+ } else if (strcmp(name, "pids") == 0) {
+ log_debug(os, container)("Detected optional pids controller entry in %s", proc_cgroups);
+ cg_infos[PIDS_IDX]._name = os::strdup(name);
+ cg_infos[PIDS_IDX]._hierarchy_id = hierarchy_id;
+ cg_infos[PIDS_IDX]._enabled = (enabled == 1);
}
}
fclose(cgroups);
is_cgroupsV2 = true;
- all_controllers_enabled = true;
+ all_required_controllers_enabled = true;
for (int i = 0; i < CG_INFO_LENGTH; i++) {
- is_cgroupsV2 = is_cgroupsV2 && cg_infos[i]._hierarchy_id == 0;
- all_controllers_enabled = all_controllers_enabled && cg_infos[i]._enabled;
+ // pids controller is optional. All other controllers are required
+ if (i != PIDS_IDX) {
+ is_cgroupsV2 = is_cgroupsV2 && cg_infos[i]._hierarchy_id == 0;
+ all_required_controllers_enabled = all_required_controllers_enabled && cg_infos[i]._enabled;
+ }
+ if (log_is_enabled(Debug, os, container) && !cg_infos[i]._enabled) {
+ log_debug(os, container)("controller %s is not enabled\n", cg_controller_name[i]);
+ }
}
- if (!all_controllers_enabled) {
- // one or more controllers disabled, disable container support
+ if (!all_required_controllers_enabled) {
+ // one or more required controllers disabled, disable container support
log_debug(os, container)("One or more required controllers disabled at kernel level.");
cleanup(cg_infos);
*flags = INVALID_CGROUPS_GENERIC;
@@ -220,21 +268,31 @@
while (!is_cgroupsV2 && (token = strsep(&controllers, ",")) != NULL) {
if (strcmp(token, "memory") == 0) {
- assert(hierarchy_id == cg_infos[MEMORY_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch");
+ assert(hierarchy_id == cg_infos[MEMORY_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch for memory");
cg_infos[MEMORY_IDX]._cgroup_path = os::strdup(cgroup_path);
} else if (strcmp(token, "cpuset") == 0) {
- assert(hierarchy_id == cg_infos[CPUSET_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch");
+ assert(hierarchy_id == cg_infos[CPUSET_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch for cpuset");
cg_infos[CPUSET_IDX]._cgroup_path = os::strdup(cgroup_path);
} else if (strcmp(token, "cpu") == 0) {
- assert(hierarchy_id == cg_infos[CPU_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch");
+ assert(hierarchy_id == cg_infos[CPU_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch for cpu");
cg_infos[CPU_IDX]._cgroup_path = os::strdup(cgroup_path);
} else if (strcmp(token, "cpuacct") == 0) {
- assert(hierarchy_id == cg_infos[CPUACCT_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch");
+ assert(hierarchy_id == cg_infos[CPUACCT_IDX]._hierarchy_id, "/proc/cgroups and /proc/self/cgroup hierarchy mismatch for cpuacc");
cg_infos[CPUACCT_IDX]._cgroup_path = os::strdup(cgroup_path);
+ } else if (strcmp(token, "pids") == 0) {
+ assert(hierarchy_id == cg_infos[PIDS_IDX]._hierarchy_id, "/proc/cgroups (%d) and /proc/self/cgroup (%d) hierarchy mismatch for pids",
+ cg_infos[PIDS_IDX]._hierarchy_id, hierarchy_id);
+ cg_infos[PIDS_IDX]._cgroup_path = os::strdup(cgroup_path);
}
}
if (is_cgroupsV2) {
+ // On some systems we have mixed cgroups v1 and cgroups v2 controllers (e.g. freezer on cg1 and
+ // all relevant controllers on cg2). Only set the cgroup path when we see a hierarchy id of 0.
+ if (hierarchy_id != 0) {
+ continue;
+ }
for (int i = 0; i < CG_INFO_LENGTH; i++) {
+ assert(cg_infos[i]._cgroup_path == NULL, "cgroup path must only be set once");
cg_infos[i]._cgroup_path = os::strdup(cgroup_path);
}
}
@@ -255,7 +313,6 @@
bool cgroupv2_mount_point_found = false;
bool any_cgroup_mounts_found = false;
while ((p = fgets(buf, MAXPATHLEN, mntinfo)) != NULL) {
- char tmp_mount_point[MAXPATHLEN+1];
char tmp_fs_type[MAXPATHLEN+1];
char tmproot[MAXPATHLEN+1];
char tmpmount[MAXPATHLEN+1];
@@ -266,28 +323,28 @@
// Cgroup v2 relevant info. We only look for the _mount_path iff is_cgroupsV2 so
// as to avoid memory stomping of the _mount_path pointer later on in the cgroup v1
// block in the hybrid case.
- //
- if (is_cgroupsV2 && sscanf(p, "%*d %*d %*d:%*d %*s %s %*[^-]- %s %*s %*s", tmp_mount_point, tmp_fs_type) == 2) {
+ if (is_cgroupsV2 && sscanf(p, "%*d %*d %*d:%*d %s %s %*[^-]- %s %*s %*s", tmproot, tmpmount, tmp_fs_type) == 3) {
// we likely have an early match return (e.g. cgroup fs match), be sure we have cgroup2 as fstype
- if (!cgroupv2_mount_point_found && strcmp("cgroup2", tmp_fs_type) == 0) {
+ if (strcmp("cgroup2", tmp_fs_type) == 0) {
cgroupv2_mount_point_found = true;
any_cgroup_mounts_found = true;
for (int i = 0; i < CG_INFO_LENGTH; i++) {
- assert(cg_infos[i]._mount_path == NULL, "_mount_path memory stomping");
- cg_infos[i]._mount_path = os::strdup(tmp_mount_point);
+ set_controller_paths(cg_infos, i, "(cg2, unified)", tmpmount, tmproot);
}
}
}
/* Cgroup v1 relevant info
*
- * Find the cgroup mount point for memory, cpuset, cpu, cpuacct
+ * Find the cgroup mount point for memory, cpuset, cpu, cpuacct, pids
*
* Example for docker:
* 219 214 0:29 /docker/7208cebd00fa5f2e342b1094f7bed87fa25661471a4637118e65f1c995be8a34 /sys/fs/cgroup/memory ro,nosuid,nodev,noexec,relatime - cgroup cgroup rw,memory
*
* Example for host:
* 34 28 0:29 / /sys/fs/cgroup/memory rw,nosuid,nodev,noexec,relatime shared:16 - cgroup cgroup rw,memory
+ *
+ * 44 31 0:39 / /sys/fs/cgroup/pids rw,nosuid,nodev,noexec,relatime shared:23 - cgroup cgroup rw,pids
*/
if (sscanf(p, "%*d %*d %*d:%*d %s %s %*[^-]- %s %*s %s", tmproot, tmpmount, tmp_fs_type, tmpcgroups) == 4) {
if (strcmp("cgroup", tmp_fs_type) != 0) {
@@ -297,42 +354,24 @@
while ((token = strsep(&cptr, ",")) != NULL) {
if (strcmp(token, "memory") == 0) {
any_cgroup_mounts_found = true;
- assert(cg_infos[MEMORY_IDX]._mount_path == NULL, "stomping of _mount_path");
- cg_infos[MEMORY_IDX]._mount_path = os::strdup(tmpmount);
- cg_infos[MEMORY_IDX]._root_mount_path = os::strdup(tmproot);
+ set_controller_paths(cg_infos, MEMORY_IDX, token, tmpmount, tmproot);
cg_infos[MEMORY_IDX]._data_complete = true;
} else if (strcmp(token, "cpuset") == 0) {
any_cgroup_mounts_found = true;
- if (cg_infos[CPUSET_IDX]._mount_path != NULL) {
- // On some systems duplicate cpuset controllers get mounted in addition to
- // the main cgroup controllers most likely under /sys/fs/cgroup. In that
- // case pick the one under /sys/fs/cgroup and discard others.
- if (strstr(cg_infos[CPUSET_IDX]._mount_path, "/sys/fs/cgroup") != cg_infos[CPUSET_IDX]._mount_path) {
- log_warning(os, container)("Duplicate cpuset controllers detected. Picking %s, skipping %s.",
- tmpmount, cg_infos[CPUSET_IDX]._mount_path);
- os::free(cg_infos[CPUSET_IDX]._mount_path);
- cg_infos[CPUSET_IDX]._mount_path = os::strdup(tmpmount);
- } else {
- log_warning(os, container)("Duplicate cpuset controllers detected. Picking %s, skipping %s.",
- cg_infos[CPUSET_IDX]._mount_path, tmpmount);
- }
- } else {
- cg_infos[CPUSET_IDX]._mount_path = os::strdup(tmpmount);
- }
- cg_infos[CPUSET_IDX]._root_mount_path = os::strdup(tmproot);
+ set_controller_paths(cg_infos, CPUSET_IDX, token, tmpmount, tmproot);
cg_infos[CPUSET_IDX]._data_complete = true;
} else if (strcmp(token, "cpu") == 0) {
any_cgroup_mounts_found = true;
- assert(cg_infos[CPU_IDX]._mount_path == NULL, "stomping of _mount_path");
- cg_infos[CPU_IDX]._mount_path = os::strdup(tmpmount);
- cg_infos[CPU_IDX]._root_mount_path = os::strdup(tmproot);
+ set_controller_paths(cg_infos, CPU_IDX, token, tmpmount, tmproot);
cg_infos[CPU_IDX]._data_complete = true;
} else if (strcmp(token, "cpuacct") == 0) {
any_cgroup_mounts_found = true;
- assert(cg_infos[CPUACCT_IDX]._mount_path == NULL, "stomping of _mount_path");
- cg_infos[CPUACCT_IDX]._mount_path = os::strdup(tmpmount);
- cg_infos[CPUACCT_IDX]._root_mount_path = os::strdup(tmproot);
+ set_controller_paths(cg_infos, CPUACCT_IDX, token, tmpmount, tmproot);
cg_infos[CPUACCT_IDX]._data_complete = true;
+ } else if (strcmp(token, "pids") == 0) {
+ any_cgroup_mounts_found = true;
+ set_controller_paths(cg_infos, PIDS_IDX, token, tmpmount, tmproot);
+ cg_infos[PIDS_IDX]._data_complete = true;
}
}
}
@@ -387,10 +426,13 @@
*flags = INVALID_CGROUPS_V1;
return false;
}
+ if (log_is_enabled(Debug, os, container) && !cg_infos[PIDS_IDX]._data_complete) {
+ log_debug(os, container)("Optional cgroup v1 pids subsystem not found");
+ // keep the other controller info, pids is optional
+ }
// Cgroups v1 case, we have all the info we need.
*flags = CGROUPS_V1;
return true;
-
};
void CgroupSubsystemFactory::cleanup(CgroupInfo* cg_infos) {
@@ -458,7 +500,10 @@
cpu_count = limit_count = os::Linux::active_processor_count();
int quota = cpu_quota();
int period = cpu_period();
- int share = cpu_shares();
+
+ // It's not a good idea to use cpu_shares() to limit the number
+ // of CPUs used by the JVM. See JDK-8281181.
+ int share = UseContainerCpuShares ? cpu_shares() : -1;
if (quota > -1 && period > 0) {
quota_count = ceilf((float)quota / (float)period);
@@ -509,8 +554,50 @@
if (!memory_limit->should_check_metric()) {
return memory_limit->value();
}
+ jlong phys_mem = os::Linux::physical_memory();
+ log_trace(os, container)("total physical memory: " JLONG_FORMAT, phys_mem);
jlong mem_limit = read_memory_limit_in_bytes();
+
+ if (mem_limit <= 0 || mem_limit >= phys_mem) {
+ jlong read_mem_limit = mem_limit;
+ const char *reason;
+ if (mem_limit >= phys_mem) {
+ // Exceeding physical memory is treated as unlimited. Cg v1's implementation
+ // of read_memory_limit_in_bytes() caps this at phys_mem since Cg v1 has no
+ // value to represent 'max'. Cg v2 may return a value >= phys_mem if e.g. the
+ // container engine was started with a memory flag exceeding it.
+ reason = "ignored";
+ mem_limit = -1;
+ } else if (OSCONTAINER_ERROR == mem_limit) {
+ reason = "failed";
+ } else {
+ assert(mem_limit == -1, "Expected unlimited");
+ reason = "unlimited";
+ }
+ log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value " JLONG_FORMAT,
+ reason, read_mem_limit, phys_mem);
+ }
+
// Update cached metric to avoid re-reading container settings too often
memory_limit->set_value(mem_limit, OSCONTAINER_CACHE_TIMEOUT);
return mem_limit;
}
+
+jlong CgroupSubsystem::limit_from_str(char* limit_str) {
+ if (limit_str == NULL) {
+ return OSCONTAINER_ERROR;
+ }
+ // Unlimited memory in cgroups is the literal string 'max' for
+ // some controllers, for example the pids controller.
+ if (strcmp("max", limit_str) == 0) {
+ os::free(limit_str);
+ return (jlong)-1;
+ }
+ julong limit;
+ if (sscanf(limit_str, JULONG_FORMAT, &limit) != 1) {
+ os::free(limit_str);
+ return OSCONTAINER_ERROR;
+ }
+ os::free(limit_str);
+ return (jlong)limit;
+}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupSubsystem_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupSubsystem_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupSubsystem_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupSubsystem_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021, 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
@@ -61,12 +61,13 @@
#define INVALID_CGROUPS_NO_MOUNT 5
#define INVALID_CGROUPS_GENERIC 6
-// Four controllers: cpu, cpuset, cpuacct, memory
-#define CG_INFO_LENGTH 4
+// Five controllers: cpu, cpuset, cpuacct, memory, pids
+#define CG_INFO_LENGTH 5
#define CPUSET_IDX 0
#define CPU_IDX 1
#define CPUACCT_IDX 2
#define MEMORY_IDX 3
+#define PIDS_IDX 4
typedef char * cptr;
@@ -240,10 +241,13 @@
public:
jlong memory_limit_in_bytes();
int active_processor_count();
+ jlong limit_from_str(char* limit_str);
virtual int cpu_quota() = 0;
virtual int cpu_period() = 0;
virtual int cpu_shares() = 0;
+ virtual jlong pids_max() = 0;
+ virtual jlong pids_current() = 0;
virtual jlong memory_usage_in_bytes() = 0;
virtual jlong memory_and_swap_limit_in_bytes() = 0;
virtual jlong memory_soft_limit_in_bytes() = 0;
@@ -304,6 +308,11 @@
}
#endif
+ static void set_controller_paths(CgroupInfo* cg_infos,
+ int controller,
+ const char* name,
+ char* mount_path,
+ char* root_path);
// Determine the cgroup type (version 1 or version 2), given
// relevant paths to files. Sets 'flags' accordingly.
static bool determine_type(CgroupInfo* cg_infos,
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
#include "runtime/globals.hpp"
#include "runtime/os.hpp"
#include "utilities/globalDefinitions.hpp"
+#include "os_linux.hpp"
/*
* Set directory to subsystem specific files based
@@ -105,7 +106,7 @@
GET_CONTAINER_INFO(julong, _memory->controller(), "/memory.limit_in_bytes",
"Memory Limit is: " JULONG_FORMAT, JULONG_FORMAT, memlimit);
- if (memlimit >= _unlimited_memory) {
+ if (memlimit >= os::Linux::physical_memory()) {
log_trace(os, container)("Non-Hierarchical Memory Limit is: Unlimited");
CgroupV1MemoryController* mem_controller = reinterpret_cast(_memory->controller());
if (mem_controller->is_hierarchical()) {
@@ -113,7 +114,7 @@
const char* format = "%s " JULONG_FORMAT;
GET_CONTAINER_INFO_LINE(julong, _memory->controller(), "/memory.stat", matchline,
"Hierarchical Memory Limit is: " JULONG_FORMAT, format, hier_memlimit)
- if (hier_memlimit >= _unlimited_memory) {
+ if (hier_memlimit >= os::Linux::physical_memory()) {
log_trace(os, container)("Hierarchical Memory Limit is: Unlimited");
} else {
return (jlong)hier_memlimit;
@@ -127,32 +128,54 @@
}
jlong CgroupV1Subsystem::memory_and_swap_limit_in_bytes() {
+ julong host_total_memsw;
GET_CONTAINER_INFO(julong, _memory->controller(), "/memory.memsw.limit_in_bytes",
"Memory and Swap Limit is: " JULONG_FORMAT, JULONG_FORMAT, memswlimit);
- if (memswlimit >= _unlimited_memory) {
+ host_total_memsw = os::Linux::host_swap() + os::Linux::physical_memory();
+ if (memswlimit >= host_total_memsw) {
log_trace(os, container)("Non-Hierarchical Memory and Swap Limit is: Unlimited");
CgroupV1MemoryController* mem_controller = reinterpret_cast(_memory->controller());
if (mem_controller->is_hierarchical()) {
const char* matchline = "hierarchical_memsw_limit";
const char* format = "%s " JULONG_FORMAT;
GET_CONTAINER_INFO_LINE(julong, _memory->controller(), "/memory.stat", matchline,
- "Hierarchical Memory and Swap Limit is : " JULONG_FORMAT, format, hier_memlimit)
- if (hier_memlimit >= _unlimited_memory) {
+ "Hierarchical Memory and Swap Limit is : " JULONG_FORMAT, format, hier_memswlimit)
+ if (hier_memswlimit >= host_total_memsw) {
log_trace(os, container)("Hierarchical Memory and Swap Limit is: Unlimited");
} else {
- return (jlong)hier_memlimit;
+ jlong swappiness = read_mem_swappiness();
+ if (swappiness == 0) {
+ const char* matchmemline = "hierarchical_memory_limit";
+ GET_CONTAINER_INFO_LINE(julong, _memory->controller(), "/memory.stat", matchmemline,
+ "Hierarchical Memory Limit is : " JULONG_FORMAT, format, hier_memlimit)
+ log_trace(os, container)("Memory and Swap Limit has been reset to " JULONG_FORMAT " because swappiness is 0", hier_memlimit);
+ return (jlong)hier_memlimit;
+ }
+ return (jlong)hier_memswlimit;
}
}
return (jlong)-1;
} else {
+ jlong swappiness = read_mem_swappiness();
+ if (swappiness == 0) {
+ jlong memlimit = read_memory_limit_in_bytes();
+ log_trace(os, container)("Memory and Swap Limit has been reset to " JULONG_FORMAT " because swappiness is 0", memlimit);
+ return memlimit;
+ }
return (jlong)memswlimit;
}
}
+jlong CgroupV1Subsystem::read_mem_swappiness() {
+ GET_CONTAINER_INFO(julong, _memory->controller(), "/memory.swappiness",
+ "Swappiness is: " JULONG_FORMAT, JULONG_FORMAT, swappiness);
+ return swappiness;
+}
+
jlong CgroupV1Subsystem::memory_soft_limit_in_bytes() {
GET_CONTAINER_INFO(julong, _memory->controller(), "/memory.soft_limit_in_bytes",
"Memory Soft Limit is: " JULONG_FORMAT, JULONG_FORMAT, memsoftlimit);
- if (memsoftlimit >= _unlimited_memory) {
+ if (memsoftlimit >= os::Linux::physical_memory()) {
log_trace(os, container)("Memory Soft Limit is: Unlimited");
return (jlong)-1;
} else {
@@ -241,3 +264,43 @@
return shares;
}
+
+
+char* CgroupV1Subsystem::pids_max_val() {
+ GET_CONTAINER_INFO_CPTR(cptr, _pids, "/pids.max",
+ "Maximum number of tasks is: %s", "%s %*d", pidsmax, 1024);
+ if (pidsmax == NULL) {
+ return NULL;
+ }
+ return os::strdup(pidsmax);
+}
+
+/* pids_max
+ *
+ * Return the maximum number of tasks available to the process
+ *
+ * return:
+ * maximum number of tasks
+ * -1 for unlimited
+ * OSCONTAINER_ERROR for not supported
+ */
+jlong CgroupV1Subsystem::pids_max() {
+ if (_pids == NULL) return OSCONTAINER_ERROR;
+ char * pidsmax_str = pids_max_val();
+ return limit_from_str(pidsmax_str);
+}
+
+/* pids_current
+ *
+ * The number of tasks currently in the cgroup (and its descendants) of the process
+ *
+ * return:
+ * current number of tasks
+ * OSCONTAINER_ERROR for not supported
+ */
+jlong CgroupV1Subsystem::pids_current() {
+ if (_pids == NULL) return OSCONTAINER_ERROR;
+ GET_CONTAINER_INFO(jlong, _pids, "/pids.current",
+ "Current number of tasks is: " JLONG_FORMAT, JLONG_FORMAT, pids_current);
+ return pids_current;
+}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021, 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
@@ -87,6 +87,9 @@
int cpu_shares();
+ jlong pids_max();
+ jlong pids_current();
+
const char * container_type() {
return "cgroupv1";
}
@@ -94,24 +97,28 @@
CachingCgroupController * cpu_controller() { return _cpu; }
private:
- julong _unlimited_memory;
-
/* controllers */
CachingCgroupController* _memory = NULL;
CgroupV1Controller* _cpuset = NULL;
CachingCgroupController* _cpu = NULL;
CgroupV1Controller* _cpuacct = NULL;
+ CgroupV1Controller* _pids = NULL;
+
+ char * pids_max_val();
+
+ jlong read_mem_swappiness();
public:
CgroupV1Subsystem(CgroupV1Controller* cpuset,
CgroupV1Controller* cpu,
CgroupV1Controller* cpuacct,
+ CgroupV1Controller* pids,
CgroupV1MemoryController* memory) {
_cpuset = cpuset;
_cpu = new CachingCgroupController(cpu);
_cpuacct = cpuacct;
+ _pids = pids;
_memory = new CachingCgroupController(memory);
- _unlimited_memory = (LONG_MAX / os::vm_page_size()) * os::vm_page_size();
}
};
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -203,24 +203,6 @@
return limit;
}
-jlong CgroupV2Subsystem::limit_from_str(char* limit_str) {
- if (limit_str == NULL) {
- return OSCONTAINER_ERROR;
- }
- // Unlimited memory in Cgroups V2 is the literal string 'max'
- if (strcmp("max", limit_str) == 0) {
- os::free(limit_str);
- return (jlong)-1;
- }
- julong limit;
- if (sscanf(limit_str, JULONG_FORMAT, &limit) != 1) {
- os::free(limit_str);
- return OSCONTAINER_ERROR;
- }
- os::free(limit_str);
- return (jlong)limit;
-}
-
char* CgroupV2Subsystem::mem_limit_val() {
GET_CONTAINER_INFO_CPTR(cptr, _unified, "/memory.max",
"Raw value for memory limit is: %s", "%s", mem_limit_str, 1024);
@@ -244,3 +226,40 @@
return os::strdup(buf);
}
+char* CgroupV2Subsystem::pids_max_val() {
+ GET_CONTAINER_INFO_CPTR(cptr, _unified, "/pids.max",
+ "Maximum number of tasks is: %s", "%s %*d", pidsmax, 1024);
+ if (pidsmax == NULL) {
+ return NULL;
+ }
+ return os::strdup(pidsmax);
+}
+
+/* pids_max
+ *
+ * Return the maximum number of tasks available to the process
+ *
+ * return:
+ * maximum number of tasks
+ * -1 for unlimited
+ * OSCONTAINER_ERROR for not supported
+ */
+jlong CgroupV2Subsystem::pids_max() {
+ char * pidsmax_str = pids_max_val();
+ return limit_from_str(pidsmax_str);
+}
+
+/* pids_current
+ *
+ * The number of tasks currently in the cgroup (and its descendants) of the process
+ *
+ * return:
+ * current number of tasks
+ * OSCONTAINER_ERROR for not supported
+ */
+jlong CgroupV2Subsystem::pids_current() {
+ GET_CONTAINER_INFO(jlong, _unified, "/pids.current",
+ "Current number of tasks is: " JLONG_FORMAT, JLONG_FORMAT, pids_current);
+ return pids_current;
+}
+
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -60,7 +60,7 @@
char *mem_swp_limit_val();
char *mem_soft_limit_val();
char *cpu_quota_val();
- jlong limit_from_str(char* limit_str);
+ char *pids_max_val();
public:
CgroupV2Subsystem(CgroupController * unified) {
@@ -79,6 +79,9 @@
jlong memory_max_usage_in_bytes();
char * cpu_cpuset_cpus();
char * cpu_cpuset_memory_nodes();
+ jlong pids_max();
+ jlong pids_current();
+
const char * container_type() {
return "cgroupv2";
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/globals_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/globals_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/globals_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/globals_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2022, 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
@@ -62,6 +62,10 @@
product(bool, UseContainerSupport, true, \
"Enable detection and runtime container configuration support") \
\
+ product(bool, UseContainerCpuShares, false, \
+ "Include CPU shares in the CPU availability" \
+ " calculation.") \
+ \
product(bool, PreferContainerQuotaForCPUCount, true, \
"Calculate the container CPU availability based on the value" \
" of quotas (if set), when true. Otherwise, use the CPU" \
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/osContainer_linux.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/osContainer_linux.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/osContainer_linux.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/osContainer_linux.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, 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
@@ -42,8 +42,6 @@
* we are running under cgroup control.
*/
void OSContainer::init() {
- jlong mem_limit;
-
assert(!_is_initialized, "Initializing OSContainer more than once");
_is_initialized = true;
@@ -59,15 +57,8 @@
if (cgroup_subsystem == NULL) {
return; // Required subsystem files not found or other error
}
- // We need to update the amount of physical memory now that
- // cgroup subsystem files have been processed.
- if ((mem_limit = cgroup_subsystem->memory_limit_in_bytes()) > 0) {
- os::Linux::set_physical_memory(mem_limit);
- log_info(os, container)("Memory Limit is: " JLONG_FORMAT, mem_limit);
- }
_is_containerized = true;
-
}
const char * OSContainer::container_type() {
@@ -138,3 +129,13 @@
assert(cgroup_subsystem != NULL, "cgroup subsystem not available");
return cgroup_subsystem->cpu_shares();
}
+
+jlong OSContainer::pids_max() {
+ assert(cgroup_subsystem != NULL, "cgroup subsystem not available");
+ return cgroup_subsystem->pids_max();
+}
+
+jlong OSContainer::pids_current() {
+ assert(cgroup_subsystem != NULL, "cgroup subsystem not available");
+ return cgroup_subsystem->pids_current();
+}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/osContainer_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/osContainer_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/osContainer_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/osContainer_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2021, 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
@@ -62,6 +62,8 @@
static int cpu_shares();
+ static jlong pids_max();
+ static jlong pids_current();
};
inline bool OSContainer::is_containerized() {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/os_linux.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/os_linux.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/os_linux.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/os_linux.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -209,15 +209,12 @@
julong avail_mem;
if (OSContainer::is_containerized()) {
- jlong mem_limit, mem_usage;
- if ((mem_limit = OSContainer::memory_limit_in_bytes()) < 1) {
- log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value",
- mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit);
- }
+ jlong mem_limit = OSContainer::memory_limit_in_bytes();
+ jlong mem_usage;
if (mem_limit > 0 && (mem_usage = OSContainer::memory_usage_in_bytes()) < 1) {
log_debug(os, container)("container memory usage failed: " JLONG_FORMAT ", using host value", mem_usage);
}
- if (mem_limit > 0 && mem_usage > 0 ) {
+ if (mem_limit > 0 && mem_usage > 0) {
avail_mem = mem_limit > mem_usage ? (julong)mem_limit - (julong)mem_usage : 0;
log_trace(os)("available container memory: " JULONG_FORMAT, avail_mem);
return avail_mem;
@@ -238,8 +235,6 @@
log_trace(os)("total container memory: " JLONG_FORMAT, mem_limit);
return mem_limit;
}
- log_debug(os, container)("container memory limit %s: " JLONG_FORMAT ", using host value",
- mem_limit == OSCONTAINER_ERROR ? "failed" : "unlimited", mem_limit);
}
phys_mem = Linux::physical_memory();
@@ -368,6 +363,14 @@
return (pid_t)rslt;
}
+// Returns the amount of swap currently configured, in bytes.
+// This can change at any time.
+julong os::Linux::host_swap() {
+ struct sysinfo si;
+ sysinfo(&si);
+ return (julong)si.totalswap;
+}
+
// Most versions of linux have a bug where the number of processors are
// determined by looking at the /proc file system. In a chroot environment,
// the system call returns 1. This causes the VM to act as if it is
@@ -2333,6 +2336,34 @@
"/sys/kernel/mm/transparent_hugepage/defrag", st);
}
+bool os::Linux::query_process_memory_info(os::Linux::meminfo_t* info) {
+ FILE* f = os::fopen("/proc/self/status", "r");
+ const int num_values = sizeof(os::Linux::meminfo_t) / sizeof(size_t);
+ int num_found = 0;
+ char buf[256];
+ info->vmsize = info->vmpeak = info->vmrss = info->vmhwm = info->vmswap =
+ info->rssanon = info->rssfile = info->rssshmem = -1;
+ if (f != NULL) {
+ while (::fgets(buf, sizeof(buf), f) != NULL && num_found < num_values) {
+ if ( (info->vmsize == -1 && sscanf(buf, "VmSize: " SSIZE_FORMAT " kB", &info->vmsize) == 1) ||
+ (info->vmpeak == -1 && sscanf(buf, "VmPeak: " SSIZE_FORMAT " kB", &info->vmpeak) == 1) ||
+ (info->vmswap == -1 && sscanf(buf, "VmSwap: " SSIZE_FORMAT " kB", &info->vmswap) == 1) ||
+ (info->vmhwm == -1 && sscanf(buf, "VmHWM: " SSIZE_FORMAT " kB", &info->vmhwm) == 1) ||
+ (info->vmrss == -1 && sscanf(buf, "VmRSS: " SSIZE_FORMAT " kB", &info->vmrss) == 1) ||
+ (info->rssanon == -1 && sscanf(buf, "RssAnon: " SSIZE_FORMAT " kB", &info->rssanon) == 1) || // Needs Linux 4.5
+ (info->rssfile == -1 && sscanf(buf, "RssFile: " SSIZE_FORMAT " kB", &info->rssfile) == 1) || // Needs Linux 4.5
+ (info->rssshmem == -1 && sscanf(buf, "RssShmem: " SSIZE_FORMAT " kB", &info->rssshmem) == 1) // Needs Linux 4.5
+ )
+ {
+ num_found ++;
+ }
+ }
+ fclose(f);
+ return true;
+ }
+ return false;
+}
+
#ifdef __GLIBC__
// For Glibc, print a one-liner with the malloc tunables.
// Most important and popular is MALLOC_ARENA_MAX, but we are
@@ -2367,38 +2398,17 @@
// Print virtual and resident set size; peak values; swap; and for
// rss its components if the kernel is recent enough.
- ssize_t vmsize = -1, vmpeak = -1, vmswap = -1,
- vmrss = -1, vmhwm = -1, rssanon = -1, rssfile = -1, rssshmem = -1;
- const int num_values = 8;
- int num_found = 0;
- FILE* f = ::fopen("/proc/self/status", "r");
- char buf[256];
- if (f != NULL) {
- while (::fgets(buf, sizeof(buf), f) != NULL && num_found < num_values) {
- if ( (vmsize == -1 && sscanf(buf, "VmSize: " SSIZE_FORMAT " kB", &vmsize) == 1) ||
- (vmpeak == -1 && sscanf(buf, "VmPeak: " SSIZE_FORMAT " kB", &vmpeak) == 1) ||
- (vmswap == -1 && sscanf(buf, "VmSwap: " SSIZE_FORMAT " kB", &vmswap) == 1) ||
- (vmhwm == -1 && sscanf(buf, "VmHWM: " SSIZE_FORMAT " kB", &vmhwm) == 1) ||
- (vmrss == -1 && sscanf(buf, "VmRSS: " SSIZE_FORMAT " kB", &vmrss) == 1) ||
- (rssanon == -1 && sscanf(buf, "RssAnon: " SSIZE_FORMAT " kB", &rssanon) == 1) ||
- (rssfile == -1 && sscanf(buf, "RssFile: " SSIZE_FORMAT " kB", &rssfile) == 1) ||
- (rssshmem == -1 && sscanf(buf, "RssShmem: " SSIZE_FORMAT " kB", &rssshmem) == 1)
- )
- {
- num_found ++;
- }
- }
- fclose(f);
-
- st->print_cr("Virtual Size: " SSIZE_FORMAT "K (peak: " SSIZE_FORMAT "K)", vmsize, vmpeak);
- st->print("Resident Set Size: " SSIZE_FORMAT "K (peak: " SSIZE_FORMAT "K)", vmrss, vmhwm);
- if (rssanon != -1) { // requires kernel >= 4.5
+ meminfo_t info;
+ if (query_process_memory_info(&info)) {
+ st->print_cr("Virtual Size: " SSIZE_FORMAT "K (peak: " SSIZE_FORMAT "K)", info.vmsize, info.vmpeak);
+ st->print("Resident Set Size: " SSIZE_FORMAT "K (peak: " SSIZE_FORMAT "K)", info.vmrss, info.vmhwm);
+ if (info.rssanon != -1) { // requires kernel >= 4.5
st->print(" (anon: " SSIZE_FORMAT "K, file: " SSIZE_FORMAT "K, shmem: " SSIZE_FORMAT "K)",
- rssanon, rssfile, rssshmem);
+ info.rssanon, info.rssfile, info.rssshmem);
}
st->cr();
- if (vmswap != -1) { // requires kernel >= 2.6.34
- st->print_cr("Swapped out: " SSIZE_FORMAT "K", vmswap);
+ if (info.vmswap != -1) { // requires kernel >= 2.6.34
+ st->print_cr("Swapped out: " SSIZE_FORMAT "K", info.vmswap);
}
} else {
st->print_cr("Could not open /proc/self/status to get process memory related information");
@@ -2424,7 +2434,7 @@
total_allocated = (size_t)(unsigned)mi.uordblks + (size_t)(unsigned)mi.hblkhd;
free_retained = (size_t)(unsigned)mi.fordblks;
// Since mallinfo members are int, glibc values may have wrapped. Warn about this.
- might_have_wrapped = (vmrss * K) > UINT_MAX && (vmrss * K) > (total_allocated + UINT_MAX);
+ might_have_wrapped = (info.vmrss * K) > UINT_MAX && (info.vmrss * K) > (total_allocated + UINT_MAX);
}
if (_mallinfo2 != NULL || _mallinfo != NULL) {
st->print_cr("C-Heap outstanding allocations: " SIZE_FORMAT "K, retained: " SIZE_FORMAT "K%s",
@@ -2450,9 +2460,22 @@
}
}
+static void print_container_helper(outputStream* st, jlong j, const char* metrics) {
+ st->print("%s: ", metrics);
+ if (j > 0) {
+ if (j >= 1024) {
+ st->print_cr(UINT64_FORMAT " k", uint64_t(j) / 1024);
+ } else {
+ st->print_cr(UINT64_FORMAT, uint64_t(j));
+ }
+ } else {
+ st->print_cr("%s", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
+ }
+}
void os::Linux::print_container_info(outputStream* st) {
if (!OSContainer::is_containerized()) {
+ st->print_cr("container information not found.");
return;
}
@@ -2505,45 +2528,30 @@
st->print("%s\n", i == OSCONTAINER_ERROR ? "not supported" : "no shares");
}
- jlong j = OSContainer::memory_limit_in_bytes();
- st->print("memory_limit_in_bytes: ");
- if (j > 0) {
- st->print(JLONG_FORMAT "\n", j);
- } else {
- st->print("%s\n", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
- }
-
- j = OSContainer::memory_and_swap_limit_in_bytes();
- st->print("memory_and_swap_limit_in_bytes: ");
- if (j > 0) {
- st->print(JLONG_FORMAT "\n", j);
- } else {
- st->print("%s\n", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
- }
+ print_container_helper(st, OSContainer::memory_limit_in_bytes(), "memory_limit_in_bytes");
+ print_container_helper(st, OSContainer::memory_and_swap_limit_in_bytes(), "memory_and_swap_limit_in_bytes");
+ print_container_helper(st, OSContainer::memory_soft_limit_in_bytes(), "memory_soft_limit_in_bytes");
+ print_container_helper(st, OSContainer::memory_usage_in_bytes(), "memory_usage_in_bytes");
+ print_container_helper(st, OSContainer::memory_max_usage_in_bytes(), "memory_max_usage_in_bytes");
- j = OSContainer::memory_soft_limit_in_bytes();
- st->print("memory_soft_limit_in_bytes: ");
+ jlong j = OSContainer::pids_max();
+ st->print("maximum number of tasks: ");
if (j > 0) {
- st->print(JLONG_FORMAT "\n", j);
+ st->print_cr(JLONG_FORMAT, j);
} else {
- st->print("%s\n", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
+ st->print_cr("%s", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
}
- j = OSContainer::OSContainer::memory_usage_in_bytes();
- st->print("memory_usage_in_bytes: ");
+ j = OSContainer::pids_current();
+ st->print("current number of tasks: ");
if (j > 0) {
- st->print(JLONG_FORMAT "\n", j);
+ st->print_cr(JLONG_FORMAT, j);
} else {
- st->print("%s\n", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
+ if (j == OSCONTAINER_ERROR) {
+ st->print_cr("not supported");
+ }
}
- j = OSContainer::OSContainer::memory_max_usage_in_bytes();
- st->print("memory_max_usage_in_bytes: ");
- if (j > 0) {
- st->print(JLONG_FORMAT "\n", j);
- } else {
- st->print("%s\n", j == OSCONTAINER_ERROR ? "not supported" : "unlimited");
- }
st->cr();
}
@@ -5646,7 +5654,8 @@
// dynamic check - see 6515172 for details.
// If anything goes wrong we fallback to returning the number of online
// processors - which can be greater than the number available to the process.
-int os::Linux::active_processor_count() {
+static int get_active_processor_count() {
+ // Note: keep this function, with its CPU_xx macros, *outside* the os namespace (see JDK-8289477).
cpu_set_t cpus; // can represent at most 1024 (CPU_SETSIZE) processors
cpu_set_t* cpus_p = &cpus;
int cpus_size = sizeof(cpu_set_t);
@@ -5718,6 +5727,10 @@
return cpu_count;
}
+int os::Linux::active_processor_count() {
+ return get_active_processor_count();
+}
+
// Determine the active processor count from one of
// three different sources:
//
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/os_linux.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/os_linux.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/os_linux.hpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/os_linux.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -74,8 +74,6 @@
static int _page_size;
static julong available_memory();
- static julong physical_memory() { return _physical_memory; }
- static void set_physical_memory(julong phys_mem) { _physical_memory = phys_mem; }
static int active_processor_count();
static void initialize_system_info();
@@ -152,6 +150,10 @@
static address ucontext_get_pc(const ucontext_t* uc);
static void ucontext_set_pc(ucontext_t* uc, address pc);
+
+ static julong physical_memory() { return _physical_memory; }
+ static julong host_swap();
+
static intptr_t* ucontext_get_sp(const ucontext_t* uc);
static intptr_t* ucontext_get_fp(const ucontext_t* uc);
@@ -226,6 +228,23 @@
static bool os_version_is_known();
static uint32_t os_version();
+ // Output structure for query_process_memory_info()
+ struct meminfo_t {
+ ssize_t vmsize; // current virtual size
+ ssize_t vmpeak; // peak virtual size
+ ssize_t vmrss; // current resident set size
+ ssize_t vmhwm; // peak resident set size
+ ssize_t vmswap; // swapped out
+ ssize_t rssanon; // resident set size (anonymous mappings, needs 4.5)
+ ssize_t rssfile; // resident set size (file mappings, needs 4.5)
+ ssize_t rssshmem; // resident set size (shared mappings, needs 4.5)
+ };
+
+ // Attempts to query memory information about the current process and return it in the output structure.
+ // May fail (returns false) or succeed (returns true) but not all output fields are available; unavailable
+ // fields will contain -1.
+ static bool query_process_memory_info(meminfo_t* info);
+
// Stack repair handling
// none present
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/trimCHeapDCmd.cpp openjdk-11-11.0.18+10/src/hotspot/os/linux/trimCHeapDCmd.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/trimCHeapDCmd.cpp 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/trimCHeapDCmd.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2021 SAP SE. All rights reserved.
+ * Copyright (c) 2021, 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.
+ *
+ * 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.
+ *
+ */
+
+#include "precompiled.hpp"
+#include "logging/log.hpp"
+#include "runtime/os.hpp"
+#include "utilities/debug.hpp"
+#include "utilities/ostream.hpp"
+#include "trimCHeapDCmd.hpp"
+
+#include
+
+void TrimCLibcHeapDCmd::execute(DCmdSource source, TRAPS) {
+#ifdef __GLIBC__
+ stringStream ss_report(1024); // Note: before calling trim
+
+ os::Linux::meminfo_t info1;
+ os::Linux::meminfo_t info2;
+ // Query memory before...
+ bool have_info1 = os::Linux::query_process_memory_info(&info1);
+
+ _output->print_cr("Attempting trim...");
+ ::malloc_trim(0);
+ _output->print_cr("Done.");
+
+ // ...and after trim.
+ bool have_info2 = os::Linux::query_process_memory_info(&info2);
+
+ // Print report both to output stream as well to UL
+ bool wrote_something = false;
+ if (have_info1 && have_info2) {
+ if (info1.vmsize != -1 && info2.vmsize != -1) {
+ ss_report.print_cr("Virtual size before: " SSIZE_FORMAT "k, after: " SSIZE_FORMAT "k, (" SSIZE_FORMAT "k)",
+ info1.vmsize, info2.vmsize, (info2.vmsize - info1.vmsize));
+ wrote_something = true;
+ }
+ if (info1.vmrss != -1 && info2.vmrss != -1) {
+ ss_report.print_cr("RSS before: " SSIZE_FORMAT "k, after: " SSIZE_FORMAT "k, (" SSIZE_FORMAT "k)",
+ info1.vmrss, info2.vmrss, (info2.vmrss - info1.vmrss));
+ wrote_something = true;
+ }
+ if (info1.vmswap != -1 && info2.vmswap != -1) {
+ ss_report.print_cr("Swap before: " SSIZE_FORMAT "k, after: " SSIZE_FORMAT "k, (" SSIZE_FORMAT "k)",
+ info1.vmswap, info2.vmswap, (info2.vmswap - info1.vmswap));
+ wrote_something = true;
+ }
+ }
+ if (!wrote_something) {
+ ss_report.print_raw("No details available.");
+ }
+
+ _output->print_raw(ss_report.base());
+ log_info(os)("malloc_trim:\n%s", ss_report.base());
+#else
+ _output->print_cr("Not available.");
+#endif
+}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/linux/trimCHeapDCmd.hpp openjdk-11-11.0.18+10/src/hotspot/os/linux/trimCHeapDCmd.hpp
--- openjdk-11-11.0.16+8/src/hotspot/os/linux/trimCHeapDCmd.hpp 1970-01-01 00:00:00.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/linux/trimCHeapDCmd.hpp 2023-01-10 08:32:35.000000000 +0000
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2021 SAP SE. All rights reserved.
+ * Copyright (c) 2021, 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.
+ *
+ * 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.
+ *
+ */
+
+#ifndef OS_LINUX_TRIMCHEAPDCMD_HPP
+#define OS_LINUX_TRIMCHEAPDCMD_HPP
+
+#include "services/diagnosticCommand.hpp"
+
+class outputStream;
+
+class TrimCLibcHeapDCmd : public DCmd {
+public:
+ TrimCLibcHeapDCmd(outputStream* output, bool heap) : DCmd(output, heap) {}
+ static const char* name() {
+ return "System.trim_native_heap";
+ }
+ static const char* description() {
+ return "Attempts to free up memory by trimming the C-heap.";
+ }
+ static const char* impact() {
+ return "Low";
+ }
+ static const JavaPermission permission() {
+ JavaPermission p = { "java.lang.management.ManagementPermission", "control", NULL };
+ return p;
+ }
+ virtual void execute(DCmdSource source, TRAPS);
+};
+
+#endif // OS_LINUX_TRIMCHEAPDCMD_HPP
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/posix/semaphore_posix.cpp openjdk-11-11.0.18+10/src/hotspot/os/posix/semaphore_posix.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/posix/semaphore_posix.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/posix/semaphore_posix.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -46,7 +46,8 @@
}
PosixSemaphore::~PosixSemaphore() {
- sem_destroy(&_semaphore);
+ int ret = sem_destroy(&_semaphore);
+ assert_with_errno(ret == 0, "sem_destroy failed");
}
void PosixSemaphore::signal(uint count) {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os/posix/vmError_posix.cpp openjdk-11-11.0.18+10/src/hotspot/os/posix/vmError_posix.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os/posix/vmError_posix.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os/posix/vmError_posix.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -124,19 +124,21 @@
}
// Needed to make it possible to call SafeFetch.. APIs in error handling.
- if (uc && pc && StubRoutines::is_safefetch_fault(pc)) {
- os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
- return;
- }
+ if (sig == SIGSEGV || sig == SIGBUS) {
+ if (uc && pc && StubRoutines::is_safefetch_fault(pc)) {
+ os::Posix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
+ return;
+ }
// Needed because asserts may happen in error handling too.
#ifdef CAN_SHOW_REGISTERS_ON_ASSERT
- if ((sig == SIGSEGV || sig == SIGBUS) && info != NULL && info->si_addr == g_assert_poison) {
- if (handle_assert_poison_fault(ucVoid, info->si_addr)) {
- return;
+ if (info != NULL && info->si_addr == g_assert_poison) {
+ if (handle_assert_poison_fault(ucVoid, info->si_addr)) {
+ return;
+ }
}
- }
#endif // CAN_SHOW_REGISTERS_ON_ASSERT
+ }
VMError::report_and_die(NULL, sig, pc, info, ucVoid);
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/aix_ppc/os_aix_ppc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -252,7 +252,7 @@
// SafeFetch 32 handling:
// - make it work if _thread is null
// - make it use the standard os::...::ucontext_get/set_pc APIs
- if (uc) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc) {
address const pc = os::Aix::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Aix::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -1,6 +1,7 @@
/*
- * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 SAP SE. All rights reserved.
+ * Copyright (c) 2022, IBM Corp.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -24,33 +25,99 @@
*/
#include "precompiled.hpp"
+#include "memory/metaspace.hpp"
#include "runtime/frame.inline.hpp"
#include "runtime/thread.hpp"
frame JavaThread::pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+ // Only called by current thread or when the thread is suspended.
+ // No memory barrier needed, here. Only writer must write sp last (for use by profiler).
intptr_t* sp = last_Java_sp();
address pc = _anchor.last_Java_pc();
// Last_Java_pc ist not set, if we come here from compiled code.
- if (pc == NULL)
- pc = (address) *(sp + 2);
+ // Assume spill slot for link register contains a suitable pc.
+ // Should have been filled by method entry code.
+ if (pc == NULL) {
+ pc = (address) *(sp + 2);
+ }
return frame(sp, pc);
}
bool JavaThread::pd_get_top_frame_for_profiling(frame* fr_addr, void* ucontext, bool isInJava) {
- ucontext_t* uc = (ucontext_t*) ucontext;
- *fr_addr = frame((intptr_t*)uc->uc_mcontext.jmp_context.gpr[1/*REG_SP*/],
- (address)uc->uc_mcontext.jmp_context.iar);
- return true;
+
+ // If we have a last_Java_frame, then we should use it even if
+ // isInJava == true. It should be more reliable than ucontext info.
+ if (has_last_Java_frame() && frame_anchor()->walkable()) {
+ intptr_t* sp = last_Java_sp();
+ address pc = _anchor.last_Java_pc();
+ // pc can be seen as null because not all writers use store pc + release store sp.
+ // Simply discard the sample in this very rare case.
+ if (pc == NULL) return false;
+ *fr_addr = frame(sp, pc);
+ return true;
+ }
+
+ // At this point, we don't have a last_Java_frame, so
+ // we try to glean some information out of the ucontext
+ // if we were running Java code when SIGPROF came in.
+ if (isInJava) {
+ ucontext_t* uc = (ucontext_t*) ucontext;
+ address pc = (address)uc->uc_mcontext.jmp_context.iar;
+
+ if (pc == NULL) {
+ // ucontext wasn't useful
+ return false;
+ }
+
+ frame ret_frame((intptr_t*)uc->uc_mcontext.jmp_context.gpr[1/*REG_SP*/], pc);
+
+ if (ret_frame.fp() == NULL) {
+ // The found frame does not have a valid frame pointer.
+ // Bail out because this will create big trouble later on, either
+ // - when using istate, calculated as (NULL - ijava_state_size) or
+ // - when using fp() directly in safe_for_sender()
+ //
+ // There is no conclusive description (yet) how this could happen, but it does.
+ // For more details on what was observed, see thread_linux_s390.cpp
+ return false;
+ }
+
+ if (ret_frame.is_interpreted_frame()) {
+ frame::ijava_state *istate = ret_frame.get_ijava_state();
+ const Method *m = (const Method*)(istate->method);
+ if (!Method::is_valid_method(m)) return false;
+ if (!Metaspace::contains(m->constMethod())) return false;
+
+ uint64_t reg_bcp = uc->uc_mcontext.jmp_context.gpr[14/*R14_bcp*/];
+ uint64_t istate_bcp = istate->bcp;
+ uint64_t code_start = (uint64_t)(m->code_base());
+ uint64_t code_end = (uint64_t)(m->code_base() + m->code_size());
+ if (istate_bcp >= code_start && istate_bcp < code_end) {
+ // we have a valid bcp, don't touch it, do nothing
+ } else if (reg_bcp >= code_start && reg_bcp < code_end) {
+ istate->bcp = reg_bcp;
+ } else {
+ return false;
+ }
+ }
+ if (!ret_frame.safe_for_sender(this)) {
+ // nothing else to try if the frame isn't good
+ return false;
+ }
+ *fr_addr = ret_frame;
+ return true;
+ }
+ // nothing else to try
+ return false;
}
-// Forte Analyzer AsyncGetCallTrace profiling support is not implemented on Aix/PPC.
+// Forte Analyzer AsyncGetCallTrace profiling support.
bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, bool isInJava) {
- Unimplemented();
- return false;
+ return pd_get_top_frame_for_profiling(fr_addr, ucontext, isInJava);
}
void JavaThread::cache_global_variables() { }
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -291,7 +291,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) os::Bsd::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Bsd::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_x86/os_bsd_x86.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -493,7 +493,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) os::Bsd::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Bsd::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -466,3 +466,9 @@
// Zero does not require an additional stack bang.
return 0;
}
+
+#if defined(AARCH64) && defined(__APPLE__)
+void os::current_thread_enable_wx(WXMode mode) {
+ pthread_jit_write_protect_np(mode == WXExec);
+}
+#endif
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -262,7 +262,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) os::Linux::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -333,7 +333,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) os::Linux::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_ppc/os_linux_ppc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -297,7 +297,7 @@
// Moved SafeFetch32 handling outside thread!=NULL conditional block to make
// it work if no associated JavaThread object exists.
- if (uc) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc) {
address const pc = os::Linux::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -30,6 +30,8 @@
frame JavaThread::pd_last_frame() {
assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+ // Only called by current thread or when the thread is suspended.
+ // No memory barrier needed, here. Only writer must write sp last (for use by profiler).
intptr_t* sp = last_Java_sp();
address pc = _anchor.last_Java_pc();
@@ -49,7 +51,12 @@
// If we have a last_Java_frame, then we should use it even if
// isInJava == true. It should be more reliable than ucontext info.
if (has_last_Java_frame() && frame_anchor()->walkable()) {
- *fr_addr = pd_last_frame();
+ intptr_t* sp = last_Java_sp();
+ address pc = _anchor.last_Java_pc();
+ // pc can be seen as null because not all writers use store pc + release store sp.
+ // Simply discard the sample in this very rare case.
+ if (pc == NULL) return false;
+ *fr_addr = frame(sp, pc);
return true;
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_s390/os_linux_s390.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -292,7 +292,7 @@
// Moved SafeFetch32 handling outside thread!=NULL conditional block to make
// it work if no associated JavaThread object exists.
- if (uc) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc) {
address const pc = os::Linux::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_sparc/os_linux_sparc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -553,7 +553,7 @@
return 1;
}
- if (checkPrefetch(uc, pc)) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && checkPrefetch(uc, pc)) {
return 1;
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -318,7 +318,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) os::Linux::ucontext_get_pc(uc);
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Linux::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
@@ -662,11 +662,26 @@
}
juint os::cpu_microcode_revision() {
+ // Note: this code runs on startup, and therefore should not be slow,
+ // see JDK-8283200.
+
juint result = 0;
- char data[2048] = {0}; // lines should fit in 2K buf
- size_t len = sizeof(data);
- FILE *fp = fopen("/proc/cpuinfo", "r");
+
+ // Attempt 1 (faster): Read the microcode version off the sysfs.
+ FILE *fp = fopen("/sys/devices/system/cpu/cpu0/microcode/version", "r");
+ if (fp) {
+ int read = fscanf(fp, "%x", &result);
+ fclose(fp);
+ if (read > 0) {
+ return result;
+ }
+ }
+
+ // Attempt 2 (slower): Read the microcode version off the procfs.
+ fp = fopen("/proc/cpuinfo", "r");
if (fp) {
+ char data[2048] = {0}; // lines should fit in 2K buf
+ size_t len = sizeof(data);
while (!feof(fp)) {
if (fgets(data, len, fp)) {
if (strstr(data, "microcode") != NULL) {
@@ -678,6 +693,7 @@
}
fclose(fp);
}
+
return result;
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/solaris_sparc/os_solaris_sparc.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -374,7 +374,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) uc->uc_mcontext.gregs[REG_PC];
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Solaris::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp openjdk-11-11.0.18+10/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp
--- openjdk-11-11.0.16+8/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/os_cpu/solaris_x86/os_solaris_x86.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -464,7 +464,7 @@
}
// Handle SafeFetch faults:
- if (uc != NULL) {
+ if ((sig == SIGSEGV || sig == SIGBUS) && uc != NULL) {
address const pc = (address) uc->uc_mcontext.gregs[REG_PC];
if (pc && StubRoutines::is_safefetch_fault(pc)) {
os::Solaris::ucontext_set_pc(uc, StubRoutines::continuation_for_safefetch_fault(pc));
diff -Nru openjdk-11-11.0.16+8/src/hotspot/share/adlc/main.cpp openjdk-11-11.0.18+10/src/hotspot/share/adlc/main.cpp
--- openjdk-11-11.0.16+8/src/hotspot/share/adlc/main.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/share/adlc/main.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -37,7 +37,7 @@
const char *basename = filename;
const char *cp;
for (cp = basename; *cp; cp++) {
- if (*cp == '/') {
+ if (*cp == '/' || *cp == '\\') {
basename = cp+1;
}
}
diff -Nru openjdk-11-11.0.16+8/src/hotspot/share/c1/c1_Canonicalizer.cpp openjdk-11-11.0.18+10/src/hotspot/share/c1/c1_Canonicalizer.cpp
--- openjdk-11-11.0.16+8/src/hotspot/share/c1/c1_Canonicalizer.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/share/c1/c1_Canonicalizer.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -771,7 +771,7 @@
else if (lss_sux == gtr_sux) { cond = If::neq; tsux = lss_sux; fsux = eql_sux; }
else if (eql_sux == gtr_sux) { cond = If::geq; tsux = eql_sux; fsux = lss_sux; }
else { ShouldNotReachHere(); }
- If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, cmp->state_before(), x->is_safepoint());
+ If* canon = new If(cmp->x(), cond, nan_sux == tsux, cmp->y(), tsux, fsux, x->state_before(), x->is_safepoint());
if (cmp->x() == cmp->y()) {
do_If(canon);
} else {
diff -Nru openjdk-11-11.0.16+8/src/hotspot/share/c1/c1_GraphBuilder.cpp openjdk-11-11.0.18+10/src/hotspot/share/c1/c1_GraphBuilder.cpp
--- openjdk-11-11.0.16+8/src/hotspot/share/c1/c1_GraphBuilder.cpp 2022-07-16 20:06:34.000000000 +0000
+++ openjdk-11-11.0.18+10/src/hotspot/share/c1/c1_GraphBuilder.cpp 2023-01-10 08:32:35.000000000 +0000
@@ -210,8 +210,10 @@
}
void BlockListBuilder::handle_jsr(BlockBegin* current, int sr_bci, int next_bci) {
- // start a new block after jsr-bytecode and link this block into cfg
- make_block_at(next_bci, current);
+ if (next_bci < method()->code_size()) {
+ // start a new block after jsr-bytecode and link this block into cfg
+ make_block_at(next_bci, current);
+ }
// start a new block at the subroutine entry at mark it with special flag
BlockBegin* sr_block = make_block_at(sr_bci, current);
@@ -231,6 +233,8 @@
// branch target and a modification of the successor lists.
const BitMap& bci_block_start = method()->bci_block_start();
+ int end_bci = method()->code_size();
+
ciBytecodeStream s(method());
while (s.next() != ciBytecodeStream::EOBC()) {
int cur_bci = s.cur_bci();
@@ -301,7 +305,9 @@
case Bytecodes::_if_acmpne: // fall through
case Bytecodes::_ifnull: // fall through
case Bytecodes::_ifnonnull:
- make_block_at(s.next_bci(), current);
+ if (s.next_bci() < end_bci) {
+ make_block_at(s.next_bci(), current);
+ }
make_block_at(s.get_dest(), current);
current = NULL;
break;
@@ -2155,8 +2161,7 @@
void GraphBuilder::new_instance(int klass_index) {
ValueStack* state_before = copy_state_exhandling();
- bool will_link;
- ciKlass* klass = stream()->get_klass(will_link);
+ ciKlass* klass = stream()->get_klass();
assert(klass->is_instance_klass(), "must be an instance klass");
NewInstance* new_instance = new NewInstance(klass->as_instance_klass(), state_before, stream()->is_unresolved_klass());
_memory->new_instance(new_instance);
@@ -2171,8 +2176,7 @@
void GraphBuilder::new_object_array() {
- bool will_link;
- ciKlass* klass = stream()->get_klass(will_link);
+ ciKlass* klass = stream()->get_klass();
ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
NewArray* n = new NewObjectArray(klass, ipop(), state_before);
apush(append_split(n));
@@ -2197,8 +2201,7 @@
void GraphBuilder::check_cast(int klass_index) {
- bool will_link;
- ciKlass* klass = stream()->get_klass(will_link);
+ ciKlass* klass = stream()->get_klass();
ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_for_exception();
CheckCast* c = new CheckCast(klass, apop(), state_before);
apush(append_split(c));
@@ -2218,8 +2221,7 @@
void GraphBuilder::instance_of(int klass_index) {
- bool will_link;
- ciKlass* klass = stream()->get_klass(will_link);
+ ciKlass* klass = stream()->get_klass();
ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
InstanceOf* i = new InstanceOf(klass, apop(), state_before);
ipush(append_split(i));
@@ -2253,8 +2255,7 @@
void GraphBuilder::new_multi_array(int dimensions) {
- bool will_link;
- ciKlass* klass = stream()->get_klass(will_link);
+ ciKlass* klass = stream()->get_klass();
ValueStack* state_before = !klass->is_loaded() || PatchALot ? copy_state_before() : copy_state_exhandling();
Values* dims = new Values(dimensions, dimensions, NULL);
@@ -4036,20 +4037,28 @@
const int args_base = state()->stack_size() - callee->arg_size();
ValueType* type = state()->stack_at(args_base)->type();
if (type->is_constant()) {
- ciMethod* target = type->as_ObjectType()->constant_value()->as_method_handle()->get_vmtarget();
- // We don't do CHA here so only inline static and statically bindable methods.
- if (target->is_static() || target->can_be_statically_bound()) {
- if (ciMethod::is_consistent_info(callee, target)) {
- Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual;
- ignore_return = ignore_return || (callee->return_type()->is_void() && !target->return_type()->is_void());
- if (try_inline(target, /*holder_known*/ !callee->is_static(), ignore_return, bc)) {
- return true;
+ ciObject* mh = type->as_ObjectType()->constant_value();
+ if (mh->is_method_handle()) {
+ ciMethod* target = mh->as_method_handle()->get_vmtarget();
+
+ // We don't do CHA here so only inline static and statically bindable methods.
+ if (target->is_static() || target->can_be_statically_bound()) {
+ if (ciMethod::is_consistent_info(callee, target)) {
+ Bytecodes::Code bc = target->is_static() ? Bytecodes::_invokestatic : Bytecodes::_invokevirtual;
+ ignore_return = ignore_return || (callee->return_type()->is