Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[GR-38378] Merge in jdk-17.0.4-b01.
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce-17/42
  • Loading branch information
marwan-hallaoui committed May 22, 2022
2 parents 3a75e92 + ad92827 commit 940070f
Show file tree
Hide file tree
Showing 523 changed files with 15,358 additions and 6,721 deletions.
259 changes: 159 additions & 100 deletions .github/workflows/submit.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .jcheck/conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[general]
project=jdk-updates
jbs=JDK
version=17.0.3
version=17.0.4

[checks]
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
Expand Down
37 changes: 19 additions & 18 deletions ci.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,18 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";

{
overlay: "de70fec80b4947d9ef25c39e059b01ef38dfc387",
specVersion: "2",
specVersion: "3",

OSBase:: {
mxDependencies:: {
"python_version": "3",
packages+: {
"mx": "HEAD",
"python3": "==3.8.10",
'pip:pylint': '==2.4.4',
},
},

OSBase:: self.mxDependencies + {
path(unixpath):: unixpath,
exe(unixpath):: unixpath,
jdk_home(java_home):: self.path(java_home),
Expand All @@ -19,7 +28,7 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
JIB_PATH: "${PATH}",
MAKE : "make",
ZLIB_BUNDLING: "system",
MX_PYTHON: "python3"
MX_PYTHON: "python3.8"
},
},

Expand All @@ -32,7 +41,7 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
downloads+: {
CYGWIN: {name: "cygwin", version: "3.0.7", platformspecific: true},
},
packages : {
packages+: {
# devkit_platform_revisions in make/conf/jib-profiles.js
"devkit:VS2019-16.9.3+1" : "==0"
},
Expand All @@ -53,14 +62,15 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
docker: {
image: defs.linux_docker_image_amd64_musl
},
packages: {},
},

LinuxAMD64(for_jdk_build):: self.Linux + self.AMD64 {
docker: {
image: defs.linux_docker_image_amd64,
mount_modules: !for_jdk_build # needed for installing the devtoolset package below
mount_modules: true # needed for installing the devtoolset package below
},
packages : if for_jdk_build then {
packages+: if for_jdk_build then {
# devkit_platform_revisions in make/conf/jib-profiles.js
"devkit:gcc10.3.0-OL6.4+1" : "==0"
} else {
Expand All @@ -70,7 +80,7 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
},
},
LinuxAArch64(for_jdk_build):: self.Linux + self.AArch64 {
packages : if for_jdk_build then {
packages+: if for_jdk_build then {
# devkit_platform_revisions in make/conf/jib-profiles.js
"devkit:gcc10.3.0-OL7.6+1" : "==0"
} else {
Expand All @@ -96,10 +106,7 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
DarwinAArch64:: self.Darwin + self.AArch64 + {
capabilities+: ["darwin"],
packages+: {
"python3": "==3.9.9",
'00:pip:logilab-common': '==1.8.3',
'01:pip:astroid': '==2.11.0',
'pip:pylint': '==2.12.2',

},
},

Expand Down Expand Up @@ -187,12 +194,6 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
},

Build(conf, is_musl_build):: conf + setupJDKSources(conf) + (if is_musl_build then self.MuslBootJDK else self.BootJDK) + {
packages+: if !is_musl_build && !std.endsWith(conf.name, 'darwin-aarch64') then {
# GR-19828
"00:pip:logilab-common ": "==1.4.4",
"01:pip:astroid" : "==1.1.0",
"pip:pylint" : "==1.1.0",
} else {},
name: "build-jdk" + conf.name,
timelimit: "1:50:00",
diskspace_required: "10G",
Expand Down Expand Up @@ -385,7 +386,7 @@ local labsjdk_builder_version = "e9c60b5174490f2012c7c5d60a20aace93209a56";
self.LinuxAArch64(true),
self.DarwinAMD64,
self.DarwinAArch64,
self.Windows + self.AMD64
self.Windows + self.AMD64
],

local graal_confs = [
Expand Down
8 changes: 8 additions & 0 deletions make/CreateJmods.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ else
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
endif

# For reproducible builds specify the jmod --date using SOURCE_DATE in ISO-8601
ifeq ($(ENABLE_REPRODUCIBLE_BUILD), true)
JMOD_SOURCE_DATE := --date $(SOURCE_DATE_ISO_8601)
else
JMOD_SOURCE_DATE :=
endif

# Create jmods in the support dir and then move them into place to keep the
# module path in $(IMAGES_OUTPUTDIR)/jmods valid at all times.
$(eval $(call SetupExecute, create_$(JMOD_FILE), \
Expand All @@ -232,6 +239,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
$(JMOD_SOURCE_DATE) \
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
))
Expand Down
11 changes: 10 additions & 1 deletion make/InitSupport.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# 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
Expand Down Expand Up @@ -313,6 +313,15 @@ else # $(HAS_SPEC)=true
SOURCE_DATE := $$(shell $$(DATE) +"%s")
endif
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
ifeq ($$(IS_GNU_DATE), yes)
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) --utc \
--date="@$$(SOURCE_DATE_EPOCH)" \
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
else
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) -u \
-j -f "%s" "$$(SOURCE_DATE_EPOCH)" \
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
endif
endef

# Parse COMPARE_BUILD into COMPARE_BUILD_*
Expand Down
4 changes: 2 additions & 2 deletions make/TestImage.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ BUILD_INFO_PROPERTIES := $(TEST_IMAGE_DIR)/build-info.properties
$(BUILD_INFO_PROPERTIES):
$(call MakeTargetDir)
$(ECHO) "# Build info properties for JDK tests" > $@
$(ECHO) "build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))" >> $@
$(ECHO) "build.output.root=$(call FixPath, $(OUTPUTDIR))" >> $@
$(ECHO) 'build.workspace.root=$(call FixPath, $(WORKSPACE_ROOT))' >> $@
$(ECHO) 'build.output.root=$(call FixPath, $(OUTPUTDIR))' >> $@

README := $(TEST_IMAGE_DIR)/Readme.txt

Expand Down
14 changes: 13 additions & 1 deletion make/autoconf/basic_tools.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, 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
Expand Down Expand Up @@ -356,6 +356,18 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
fi
AC_SUBST(IS_GNU_TIME)
# Check if it's a GNU date compatible version
AC_MSG_CHECKING([if date is a GNU compatible version])
check_date=`$DATE --version 2>&1 | $GREP "GNU\|BusyBox"`
if test "x$check_date" != x; then
AC_MSG_RESULT([yes])
IS_GNU_DATE=yes
else
AC_MSG_RESULT([no])
IS_GNU_DATE=no
fi
AC_SUBST(IS_GNU_DATE)
if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
UTIL_REQUIRE_PROGS(DSYMUTIL, dsymutil)
UTIL_REQUIRE_PROGS(MIG, mig)
Expand Down
10 changes: 10 additions & 0 deletions make/autoconf/boot-jdk.m4
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,16 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
# Finally, set some other options...
# Determine if the boot jdk jar supports the --date option
if $JAR --help 2>&1 | $GREP -q "\-\-date=TIMESTAMP"; then
BOOT_JDK_JAR_SUPPORTS_DATE=true
else
BOOT_JDK_JAR_SUPPORTS_DATE=false
fi
AC_MSG_CHECKING([if Boot JDK jar supports --date=TIMESTAMP])
AC_MSG_RESULT([$BOOT_JDK_JAR_SUPPORTS_DATE])
AC_SUBST(BOOT_JDK_JAR_SUPPORTS_DATE)
# When compiling code to be executed by the Boot JDK, force compatibility with the
# oldest supported bootjdk.
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
Expand Down
4 changes: 1 addition & 3 deletions make/autoconf/flags-cflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -782,10 +782,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
# There is a known issue with the pathmap if the mapping is made to the
# empty string. Add a minimal string "s" as prefix to work around this.
workspace_root_win=`$FIXPATH_BASE print "${WORKSPACE_ROOT%/}"`
# PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
PATHMAP_FLAGS="-pathmap:${workspace_root_win//\//\\\\}=s \
-pathmap:${workspace_root_win}=s"
PATHMAP_FLAGS="-pathmap:${WORKSPACE_ROOT}=s"
FILE_MACRO_CFLAGS="$PATHMAP_FLAGS"
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${FILE_MACRO_CFLAGS}],
PREFIX: $3,
Expand Down
27 changes: 25 additions & 2 deletions make/autoconf/help.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2021, 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
Expand All @@ -25,7 +25,7 @@

AC_DEFUN_ONCE([HELP_SETUP_DEPENDENCY_HELP],
[
UTIL_LOOKUP_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd pacman)
UTIL_LOOKUP_PROGS(PKGHANDLER, zypper apt-get yum brew port pkgutil pkgadd pacman apk)
])

AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
Expand Down Expand Up @@ -58,6 +58,8 @@ AC_DEFUN([HELP_MSG_MISSING_DEPENDENCY],
zypper_help $MISSING_DEPENDENCY ;;
*pacman)
pacman_help $MISSING_DEPENDENCY ;;
*apk)
apk_help $MISSING_DEPENDENCY ;;
esac
if test "x$PKGHANDLER_COMMAND" != x; then
Expand Down Expand Up @@ -184,6 +186,27 @@ pkgadd_help() {
PKGHANDLER_COMMAND=""
}

apk_help() {
case $1 in
devkit)
PKGHANDLER_COMMAND="sudo apk add alpine-sdk linux-headers" ;;
alsa)
PKGHANDLER_COMMAND="sudo apk add alsa-lib-dev" ;;
cups)
PKGHANDLER_COMMAND="sudo apk add cups-dev" ;;
fontconfig)
PKGHANDLER_COMMAND="sudo apk add fontconfig-dev" ;;
freetype)
PKGHANDLER_COMMAND="sudo apk add freetype-dev" ;;
harfbuzz)
PKGHANDLER_COMMAND="sudo apk add harfbuzz-dev" ;;
x11)
PKGHANDLER_COMMAND="sudo apk add libxtst-dev libxt-dev libxrender-dev libxrandr-dev" ;;
ccache)
PKGHANDLER_COMMAND="sudo apk add ccache" ;;
esac
}

# This function will check if we're called from the "configure" wrapper while
# printing --help. If so, we will print out additional information that can
# only be extracted within the autoconf script, and then exit. This must be
Expand Down
6 changes: 6 additions & 0 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
AC_MSG_ERROR([Copyright year must have a value])
elif test "x$with_copyright_year" != x; then
COPYRIGHT_YEAR="$with_copyright_year"
elif test "x$SOURCE_DATE_EPOCH" != x; then
if test "x$IS_GNU_DATE" = xyes; then
COPYRIGHT_YEAR=`date --date=@$SOURCE_DATE_EPOCH +%Y`
else
COPYRIGHT_YEAR=`date -j -f %s $SOURCE_DATE_EPOCH +%Y`
fi
else
COPYRIGHT_YEAR=`$DATE +'%Y'`
fi
Expand Down
4 changes: 4 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,9 @@ BUILD_JDK:=@BUILD_JDK@
CREATE_BUILDJDK:=@CREATE_BUILDJDK@
EXTERNAL_BUILDJDK:=@EXTERNAL_BUILDJDK@

# Whether the boot jdk jar supports --date=TIMESTAMP
BOOT_JDK_JAR_SUPPORTS_DATE:=@BOOT_JDK_JAR_SUPPORTS_DATE@

# When compiling Java source to be run by the boot jdk
# use these extra flags, eg -source 6 -target 6
BOOT_JDK_SOURCETARGET:=@BOOT_JDK_SOURCETARGET@
Expand Down Expand Up @@ -700,6 +703,7 @@ CODESIGN:=@CODESIGN@
CP:=@CP@
CUT:=@CUT@
DATE:=@DATE@
IS_GNU_DATE:=@IS_GNU_DATE@
DIFF:=@DIFF@
DIRNAME:=@DIRNAME@
DSYMUTIL:=@DSYMUTIL@
Expand Down
14 changes: 8 additions & 6 deletions make/autoconf/util.m4
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# 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
Expand Down Expand Up @@ -236,13 +236,15 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
# $2: input date/time string
AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
[
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
if test "x$timestamp" = x; then
# GNU date format did not work, try BSD date options
timestamp=$($DATE -j -f "%F %T" "$2" "+%s" 2> /dev/null)
if test "x$IS_GNU_DATE" = xyes; then
# GNU date
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
else
# BSD date
timestamp=$($DATE -u -j -f "%F %T" "$2" "+%s" 2> /dev/null)
if test "x$timestamp" = x; then
# Perhaps the time was missing
timestamp=$($DATE -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
timestamp=$($DATE -u -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
# If this did not work, we give up and return the empty string
fi
fi
Expand Down
28 changes: 15 additions & 13 deletions make/common/JarArchive.gmk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
# 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
Expand Down Expand Up @@ -193,7 +193,7 @@ define SetupJarArchiveBody
$1_UPDATE_CONTENTS=\
if [ "`$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'`" -gt "0" ]; then \
$(ECHO) " updating" `$(WC) -l $$($1_BIN)/_the.$$($1_JARNAME)_contents | $(AWK) '{ print $$$$1 }'` files && \
$$($1_JAR_CMD) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents; \
$$($1_JAR_CMD) --update $$($1_JAR_OPTIONS) --file $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents; \
fi $$(NEWLINE)
# The s-variants of the above macros are used when the jar is created from scratch.
# NOTICE: please leave the parentheses space separated otherwise the AIX build will break!
Expand All @@ -212,25 +212,27 @@ define SetupJarArchiveBody
| $(SED) 's|$$(src)/|-C $$(src) |g' >> \
$$($1_BIN)/_the.$$($1_JARNAME)_contents) $$(NEWLINE) )
endif
$1_SUPDATE_CONTENTS=$$($1_JAR_CMD) $$($1_JAR_UPDATE_OPTIONS) $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)
$1_SUPDATE_CONTENTS=$$($1_JAR_CMD) --update $$($1_JAR_OPTIONS) --file $$@ @$$($1_BIN)/_the.$$($1_JARNAME)_contents $$(NEWLINE)

# Use a slightly shorter name for logging, but with enough path to identify this jar.
$1_NAME:=$$(subst $$(OUTPUTDIR)/,,$$($1_JAR))

# If reproducible build and the boot jdk jar supports --date option
# then specify the --date using SOURCE_DATE in ISO-8601
$1_JAR_OPTIONS :=
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
endif
endif
ifneq (,$$($1_CHECK_COMPRESS_JAR))
$1_JAR_CREATE_OPTIONS := c0fm
$1_JAR_UPDATE_OPTIONS := u0f
ifeq ($(COMPRESS_JARS), true)
$1_JAR_CREATE_OPTIONS := cfm
$1_JAR_UPDATE_OPTIONS := uf
ifneq ($(COMPRESS_JARS), true)
$1_JAR_OPTIONS += --no-compress
endif
else
$1_JAR_CREATE_OPTIONS := cfm
$1_JAR_UPDATE_OPTIONS := uf
endif

# Include all variables of significance in the vardeps file
$1_VARDEPS := $$($1_JAR_CMD) $$($1_JAR_CREATE_OPTIONS) $$($1_MANIFEST) \
$1_VARDEPS := $$($1_JAR_CMD) $$($1_JAR_OPTIONS) $$($1_MANIFEST) \
$$($1_JARMAIN) $$($1_EXTRA_MANIFEST_ATTR) $$($1_ORIG_DEPS) $$($1_SRCS) \
$$($1_INCLUDES) $$($1_EXCLUDES) $$($1_EXCLUDE_FILES) $$($1_EXTRA_FILES)
$1_VARDEPS_FILE := $$(call DependOnVariable, $1_VARDEPS, $$($1_BIN)/_the.$$($1_JARNAME).vardeps)
Expand All @@ -255,7 +257,7 @@ define SetupJarArchiveBody
$$(if $$($1_EXTRA_MANIFEST_ATTR), \
$(PRINTF) "$$($1_EXTRA_MANIFEST_ATTR)\n" >> $$($1_MANIFEST_FILE) $$(NEWLINE)) \
$(ECHO) Creating $$($1_NAME) $$(NEWLINE) \
$$($1_JAR_CMD) $$($1_JAR_CREATE_OPTIONS) $$@ $$($1_MANIFEST_FILE) $$(NEWLINE) \
$$($1_JAR_CMD) --create $$($1_JAR_OPTIONS) --file $$@ --manifest $$($1_MANIFEST_FILE) $$(NEWLINE) \
$$($1_SCAPTURE_CONTENTS) \
$$($1_SCAPTURE_METAINF) \
$$($1_SUPDATE_CONTENTS) \
Expand Down
Loading

0 comments on commit 940070f

Please sign in to comment.