The package rpms/java-1.8.0-openjdk.git has added or updated architecture specific content
in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/commit/?id...
https://src.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/commit/?id....
Change:
+%ifarch %{share_arches}
+%ifarch %{ssbd_arches}
Thanks.
Full change:
============
commit c21b9968badf771fec46e66da37d3d4c11e679d2
Author: Andrew Hughes <gnu.andrew(a)redhat.com>
Date: Mon Dec 21 15:53:52 2020 +0000
Enable JFR on x86, now we have JDK-8252096: Shenandoah: adjust SerialPageShiftCount
for x86_32 and JFR
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index ee182f7..cf43caa 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -96,7 +96,7 @@
# See
https://bugzilla.redhat.com/show_bug.cgi?id=513605
# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT
%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
-%global jfr_arches x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+%global jfr_arches %{jit_arches}
# Set of architectures for which alt-java has SSB mitigation
%global ssbd_arches x86_64
@@ -289,7 +289,7 @@
%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
# eg jdk8u60-b27 -> b27
%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
-%global rpmrelease 4
+%global rpmrelease 5
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
# Release will be (where N is usually a number starting at 1):
# - 0.N%%{?extraver}%%{?dist} for EA releases,
@@ -2603,6 +2603,9 @@ require "copy_jdk_configs.lua"
%endif
%changelog
+* Mon Dec 21 2020 Andrew Hughes <gnu.andrew(a)redhat.com> - 1:1.8.0.275.b01-5
+- Enable JFR on x86, now we have JDK-8252096: Shenandoah: adjust SerialPageShiftCount for
x86_32 and JFR
+
* Sat Dec 19 2020 Jiri Vanek <jvanek(a)redhat.com> - 1:1.8.0.275.b01-4
- introduced fastdebug build cycle and subpackages
commit 855be9b0be71fd0b290d2c99792e1fda576aad92
Author: Jiri <jvanek(a)redhat.com>
Date: Mon Dec 21 09:42:40 2020 +0100
returned license for javadoc as correctly noarch
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index f403258..ee182f7 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -1030,7 +1030,8 @@ exit 0
%define files_javadoc() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
-%license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
+#javadoc is in jdk8 noarch, so also licnese file must be treated like it
+%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java
@@ -1041,7 +1042,8 @@ exit 0
%define files_javadoc_zip() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
-%license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
+#javadoc is in jdk8 noarch, so also licnese file must be treated like it
+%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java-zip
commit d7f5b8288666de530ef8819f06b8451de57571ac
Author: Jiri <jvanek(a)redhat.com>
Date: Sun Dec 20 17:51:35 2020 +0100
introduced fastdebug build cycle and subpackages
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index f9c3b24..f403258 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -4,18 +4,20 @@
#
# Examples:
#
-# Produce release *and* slowdebug builds on x86_64 (default):
+# Produce release, fastdebug *and* slowdebug builds on x86_64 (default):
# $ rpmbuild -ba java-1.8.0-openjdk.spec
#
# Produce only release builds (no slowdebug builds) on x86_64:
-# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug
+# $ rpmbuild -ba java-1.8.0-openjdk.spec --without slowdebug --without fastdebug
#
# Only produce a release build on x86_64:
-# $ fedpkg mockbuild --without slowdebug
+# $ fedpkg mockbuild --without slowdebug --without fastdebug
#
# Only produce a debug build on x86_64:
# $ fedpkg local --without release
#
+# Enable fastdebug builds by default on relevant arches.
+%bcond_without fastdebug
# Enable slowdebug builds by default on relevant arches.
%bcond_without slowdebug
# Enable release builds by default on relevant arches.
@@ -32,13 +34,16 @@
# See
https://github.com/rpm-software-management/rpm/issues/127 to comments at
"pmatilai commented on Aug 18, 2017"
# (initiated in
https://bugzilla.redhat.com/show_bug.cgi?id=1482192)
%global debug_suffix_unquoted -slowdebug
+%global fastdebug_suffix_unquoted -fastdebug
# quoted one for shell operations
%global debug_suffix "%{debug_suffix_unquoted}"
+%global fastdebug_suffix "%{fastdebug_suffix_unquoted}"
%global normal_suffix ""
-# if you want only debug build but providing java build only normal build but set
normalbuild_parameter
-%global debug_warning This package has full debug on. Install only in need and remove
asap.
+%global debug_warning This package is unoptimised with full debugging. Install only as
needed and remove ASAP.
%global debug_on with full debug on
+%global fastdebug_warning This package is optimised with full debugging. Install only as
needed and remove ASAP.
+%global for_fastdebug_on with minimal debug on
%global for_debug for packages with debug on
%if %{with release}
@@ -48,9 +53,9 @@
%endif
%if %{include_normal_build}
-%global build_loop1 %{normal_suffix}
+%global normal_build %{normal_suffix}
%else
-%global build_loop1 %{nil}
+%global normal_build %{nil}
%endif
# We have hardcoded list of files, which is appearing in alternatives, and in files
@@ -59,8 +64,8 @@
# the ghosts are here to allow installation via query like `dnf install /usr/bin/java`
# you can list those files, with appropriate sections: cat *.spec | grep -e --install -e
--slave -e post_
# TODO - fix those hardcoded lists via single list
-# those files ,must *NOT* be ghosted for *slowdebug* packages
-# FIXME - if you are moving jshell or jlink or simialr, always modify all three sections
+# Those files must *NOT* be ghosted for *slowdebug* packages
+# FIXME - if you are moving jshell or jlink or similar, always modify all three sections
# you can check via headless and devels:
# rpm -ql --noghost java-11-openjdk-headless-11.0.1.13-8.fc29.x86_64.rpm | grep bin
# == rpm -ql java-11-openjdk-headless-slowdebug-11.0.1.13-8.fc29.x86_64.rpm |
grep bin
@@ -76,17 +81,29 @@
# we need to distinguish between big and little endian PPC64
%global ppc64le ppc64le
%global ppc64be ppc64 ppc64p7
+# Set of architectures which support multiple ABIs
%global multilib_arches %{power64} sparc64 x86_64
-%global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+# Set of architectures for which we build debug builds
+%global debug_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+# Set of architectures with a Just-In-Time (JIT) compiler
+%global jit_arches %{debug_arches}
+# Set of architectures which support SystemTap tapsets
+%global systemtap_arches %{jit_arches}
+%global fastdebug_arches x86_64 ppc64le aarch64
+# Set of architectures which support the serviceability agent
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
+# Set of architectures which support class data sharing
+# See
https://bugzilla.redhat.com/show_bug.cgi?id=513605
+# MetaspaceShared::generate_vtable_methods is not implemented for the PPC JIT
+%global share_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
%global jfr_arches x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+
# Set of architectures for which alt-java has SSB mitigation
%global ssbd_arches x86_64
# By default, we build a debug build during main build on JIT architectures
%if %{with slowdebug}
-%ifarch %{jit_arches}
-%ifnarch %{arm}
+%ifarch %{debug_arches}
%global include_debug_build 1
%else
%global include_debug_build 0
@@ -94,42 +111,48 @@
%else
%global include_debug_build 0
%endif
+
+# By default, we build a fastdebug build during main build only on fastdebug
architectures
+%if %{with fastdebug}
+%ifarch %{fastdebug_arches}
+%global include_fastdebug_build 1
%else
-%global include_debug_build 0
+%global include_fastdebug_build 0
+%endif
+%else
+%global include_fastdebug_build 0
%endif
%if %{include_debug_build}
-%global build_loop2 %{debug_suffix}
+%global slowdebug_build %{debug_suffix}
%else
-%global build_loop2 %{nil}
+%global slowdebug_build %{nil}
%endif
-# if you disable both builds, then the build fails
-%global build_loop %{build_loop1} %{build_loop2}
-# note: that order: normal_suffix debug_suffix, in case of both enabled
-# is expected in one single case at the end of the build
-%global rev_build_loop %{build_loop2} %{build_loop1}
-
-%ifarch %{jit_arches}
-%global bootstrap_build 1
+%if %{include_fastdebug_build}
+%global fastdebug_build %{fastdebug_suffix}
%else
-%global bootstrap_build 1
+%global fastdebug_build %{nil}
%endif
+%global bootstrap_build 1
+
+# If you disable both builds, then the build fails
+# Note that the debug build requires the normal build for docs
+%global build_loop %{normal_build} %{fastdebug_build} %{slowdebug_build}
+# Test slowdebug first as it provides the best diagnostics
+%global rev_build_loop %{slowdebug_build} %{fastdebug_build} %{normal_build}
%global bootstrap_targets images
%global release_targets images docs-zip
-# No docs nor bootcycle for debug builds
%global debug_targets images
-# This package fails to build with LTO due to undefined symbols. LTO
-# was disabled in OpenSuSE as well, but with no real explanation why
-# beyond the undefined symbols. It really should be investigated further.
-# Disable LTO
+# Disable LTO as this causes build failures at the moment.
+# See RHBZ#1861401
%define _lto_cflags %{nil}
# Filter out flags from the optflags macro that cause problems with the OpenJDK build
-# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands
of warnings (100+mb logs)
# We filter out -O flags so that the optimization of HotSpot is not lowered from O3 to
O2
+# We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands
of warnings (100+mb logs)
# We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid
FORTIFY_SOURCE warnings
# We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and
it's otherwise the default for C++
%global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r
-e 's|-O[0-9]*||')
@@ -210,7 +233,9 @@
%global stapinstall %{nil}
%endif
-%ifarch %{jit_arches}
+
+
+%ifarch %{systemtap_arches}
%global with_systemtap 1
%else
%global with_systemtap 0
@@ -239,7 +264,10 @@
%global with_openjfx_binding 0
%endif
-# Standard JPackage naming and versioning defines.
+# Define IcedTea version used for SystemTap tapsets and desktop file
+%global icedteaver 3.15.0
+
+# Standard JPackage naming and versioning defines
%global origin openjdk
%global origin_nice OpenJDK
%global top_level_dir_name %{origin}
@@ -251,8 +279,7 @@
%global project %{shenandoah_project}
%global repo %{shenandoah_repo}
%global revision %{shenandoah_revision}
-# Define IcedTea version used for SystemTap tapsets and desktop files
-%global icedteaver 3.15.0
+
# e.g. aarch64-shenandoah-jdk8u212-b04-shenandoah-merge-2019-04-30 ->
aarch64-shenandoah-jdk8u212-b04
%global version_tag %(VERSION=%{revision}; echo ${VERSION%%-shenandoah-merge*})
@@ -262,7 +289,7 @@
%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
# eg jdk8u60-b27 -> b27
%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
-%global rpmrelease 3
+%global rpmrelease 4
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
# Release will be (where N is usually a number starting at 1):
# - 0.N%%{?extraver}%%{?dist} for EA releases,
@@ -309,7 +336,7 @@
# parametrized macros are order-sensitive
%global compatiblename %{name}
%global fullversion %{compatiblename}-%{version}-%{release}
-# images stub
+# images directories from upstream build
%global jdkimage j2sdk-image
# output dir stub
%define buildoutputdir() %{expand:build/jdk8.build%{?1}}
@@ -318,6 +345,7 @@
# main id and dir of this jdk
%define uniquesuffix() %{expand:%{fullversion}.%{_arch}%{?1}}
+#################################################################
# fix for
https://bugzilla.redhat.com/show_bug.cgi?id=1111349
#
https://bugzilla.redhat.com/show_bug.cgi?id=1590796#c14
#
https://bugzilla.redhat.com/show_bug.cgi?id=1655938
@@ -329,6 +357,8 @@
# Never generate lib-style provides/requires for slowdebug packages
%global __provides_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
%global __requires_exclude_from ^.*/%{uniquesuffix -- %{debug_suffix_unquoted}}/.*$
+%global __provides_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
+%global __requires_exclude_from ^.*/%{uniquesuffix -- %{fastdebug_suffix_unquoted}}/.*$
%else
# Don't generate provides/requires for JDK provided shared libraries at all.
%global __provides_exclude ^(%{_privatelibs}|%{_publiclibs})$
@@ -375,13 +405,9 @@ exit 0
%define post_headless() %{expand:
-%ifarch %{jit_arches}
-# MetaspaceShared::generate_vtable_methods not implemented for PPC JIT
-%ifnarch %{power64}
-# see
https://bugzilla.redhat.com/show_bug.cgi?id=513605
+%ifarch %{share_arches}
%{jrebindir -- %{?1}}/java -Xshare:dump >/dev/null 2>/dev/null
%endif
-%endif
PRIORITY=%{priority}
if [ "%{?1}" == %{debug_suffix} ]; then
@@ -718,12 +744,10 @@ exit 0
%{_mandir}/man1/policytool-%{uniquesuffix -- %{?1}}.1*
%{_jvmdir}/%{jredir -- %{?1}}/lib/security/nss.cfg
%config(noreplace) %{etcjavadir -- %{?1}}/lib/security/nss.cfg
-%ifarch %{jit_arches}
-%ifnarch %{power64}
+%ifarch %{share_arches}
%attr(444, root, root) %ghost %{_jvmdir}/%{jredir --
%{?1}}/lib/%{archinstall}/server/classes.jsa
%attr(444, root, root) %ghost %{_jvmdir}/%{jredir --
%{?1}}/lib/%{archinstall}/client/classes.jsa
%endif
-%endif
%dir %{etcjavasubdir}
%dir %{etcjavadir -- %{?1}}
%dir %{etcjavadir -- %{?1}}/lib
@@ -991,13 +1015,10 @@ exit 0
%endif
}
-%define files_jmods() %{expand:
-%{_jvmdir}/%{sdkdir -- %{?1}}/jmods
-}
%define files_demo() %{expand:
%defattr(-,root,root,-)
-%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
+%license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
}
%define files_src() %{expand:
@@ -1009,7 +1030,7 @@ exit 0
%define files_javadoc() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}
-%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
+%license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java
@@ -1020,7 +1041,7 @@ exit 0
%define files_javadoc_zip() %{expand:
%defattr(-,root,root,-)
%doc %{_javadocdir}/%{uniquejavadocdir -- %{?1}}.zip
-%license %{buildoutputdir -- %{?1}}/images/%{jdkimage}/jre/LICENSE
+%license %{_jvmdir}/%{jredir -- %{?1}}/LICENSE
%if %is_system_jdk
%if %{is_release_build -- %{?1}}
%ghost %{_javadocdir}/java-zip
@@ -1049,7 +1070,7 @@ OrderWithRequires: %{name}-headless%{?1}%{?_isa} =
%{epoch}:%{version}-%{release
Recommends: gtk2%{?_isa}
%endif
-Provides: java-%{javaver}-%{origin} = %{epoch}:%{version}-%{release}
+Provides: java-%{javaver}-%{origin}%{?1} = %{epoch}:%{version}-%{release}
# Standard JPackage base provides
Provides: jre-%{javaver}%{?1} = %{epoch}:%{version}-%{release}
@@ -1066,11 +1087,12 @@ Provides: jre%{?1} = %{epoch}:%{version}-%{release}
%define java_headless_rpo() %{expand:
# Require /etc/pki/java/cacerts
Requires: ca-certificates
-# Require javapackages-filesystem for ownership of /usr/lib/jvm/
+# Require javapackages-filesystem for ownership of /usr/lib/jvm/ and macros
Requires: javapackages-filesystem
# Require zoneinfo data provided by tzdata-java subpackage.
# 2020b required as of JDK-8254177 in October CPU
Requires: tzdata-java >= 2020b
+# for support of kernel stream control
# libsctp.so.1 is being `dlopen`ed on demand
Requires: lksctp-tools%{?_isa}
# tool to copy jdk's configs - should be Recommends only, but then only dnf/yum
enforce it,
@@ -1465,6 +1487,17 @@ The %{origin_nice} runtime environment %{majorver}.
%{debug_warning}
%endif
+%if %{include_fastdebug_build}
+%package fastdebug
+Summary: %{origin_nice} Runtime Environment %{majorver} %{fastdebug_on}
+Group: Development/Languages
+
+%{java_rpo -- %{fastdebug_suffix_unquoted}}
+%description fastdebug
+The %{origin_nice} runtime environment.
+%{fastdebug_warning}
+%endif
+
%if %{include_normal_build}
%package headless
Summary: %{origin_nice} Headless Runtime Environment %{majorver}
@@ -1486,6 +1519,18 @@ The %{origin_nice} runtime environment %{majorver} without audio
and video suppo
%{debug_warning}
%endif
+%if %{include_fastdebug_build}
+%package headless-fastdebug
+Summary: %{origin_nice} Runtime Environment %{fastdebug_on}
+Group: Development/Languages
+
+%{java_headless_rpo -- %{fastdebug_suffix_unquoted}}
+
+%description headless-fastdebug
+The %{origin_nice} runtime environment %{majorver} without audio and video support.
+%{fastdebug_warning}
+%endif
+
%if %{include_normal_build}
%package devel
Summary: %{origin_nice} Development Environment %{majorver}
@@ -1507,6 +1552,18 @@ The %{origin_nice} development tools %{majorver}.
%{debug_warning}
%endif
+%if %{include_fastdebug_build}
+%package devel-fastdebug
+Summary: %{origin_nice} Development Environment %{majorver} %{fastdebug_on}
+Group: Development/Tools
+
+%{java_devel_rpo -- %{fastdebug_suffix_unquoted}}
+
+%description devel-fastdebug
+The %{origin_nice} development tools %{majorver}.
+%{fastdebug_warning}
+%endif
+
%if %{include_normal_build}
%package demo
Summary: %{origin_nice} Demos %{majorver}
@@ -1528,6 +1585,18 @@ The %{origin_nice} demos %{majorver}.
%{debug_warning}
%endif
+%if %{include_fastdebug_build}
+%package demo-fastdebug
+Summary: %{origin_nice} Demos %{majorver} %{fastdebug_on}
+Group: Development/Languages
+
+%{java_demo_rpo -- %{fastdebug_suffix_unquoted}}
+
+%description demo-fastdebug
+The %{origin_nice} demos %{majorver}.
+%{fastdebug_warning}
+%endif
+
%if %{include_normal_build}
%package src
Summary: %{origin_nice} Source Bundle %{majorver}
@@ -1550,6 +1619,19 @@ The java-%{origin}-src-slowdebug sub-package contains the complete
%{origin_nice
class library source code for use by IDE indexers and debuggers. Debugging
%{for_debug}.
%endif
+%if %{include_fastdebug_build}
+%package src-fastdebug
+Summary: %{origin_nice} Source Bundle %{majorver} %{for_fastdebug}
+Group: Development/Languages
+
+%{java_src_rpo -- %{fastdebug_suffix_unquoted}}
+
+%description src-fastdebug
+The java-%{origin}-src-fastdebug sub-package contains the complete %{origin_nice}
%{majorver}
+ class library source code for use by IDE indexers and debuggers. Debugging
%{for_fastdebug}.
+%endif
+
+
%if %{include_normal_build}
%package javadoc
Summary: %{origin_nice} %{majorver} API documentation
@@ -1603,6 +1685,16 @@ Summary: %{origin_nice} %{majorver} accessibility connector
%{for_debug}
See normal java-%{version}-openjdk-accessibility description.
%endif
+%if %{include_fastdebug_build}
+%package accessibility-fastdebug
+Summary: %{origin_nice} %{majorver} accessibility connector %{for_fastdebug}
+
+%{java_accessibility_rpo -- %{fastdebug_suffix_unquoted}}
+
+%description accessibility-fastdebug
+See normal java-%{version}-openjdk-accessibility description.
+%endif
+
%if %{with_openjfx_binding}
%package openjfx
@@ -1638,6 +1730,24 @@ Provides: javafx-devel-slowdebug = %{epoch}:%{version}-%{release}
%description openjfx-devel-slowdebug
Set of links from OpenJDK-slowdebug (sdk) to normal OpenJFX. OpenJFX do not support debug
buuilds of itself
%endif
+
+%if %{include_fastdebug_build}
+%package openjfx-fastdebug
+Summary: OpenJDK x OpenJFX connector %{for_fastdebug}. his package adds symliks finishing
Java FX integration to %{name}-fastdebug
+Requires: %{name}-fastdebug%{?_isa} = %{epoch}:%{version}-%{release}
+Requires: openjfx8%{?_isa}
+Provides: javafx-fastdebug = %{epoch}:%{version}-%{release}
+%description openjfx-fastdebug
+Set of links from OpenJDK-fastdebug (jre) to normal OpenJFX. OpenJFX do not support debug
buuilds of itself
+
+%package openjfx-devel-fastdebug
+Summary: OpenJDK x OpenJFX connector for FX developers %{for_fastdebug}. This package
adds symliks finishing Java FX integration to %{name}-devel-slowdebug
+Requires: %{name}-devel-fastdebug%{?_isa} = %{epoch}:%{version}-%{release}
+Requires: openjfx8-devel%{?_isa}
+Provides: javafx-devel-fastdebug = %{epoch}:%{version}-%{release}
+%description openjfx-devel-fastdebug
+Set of links from OpenJDK-fastdebug (sdk) to normal OpenJFX. OpenJFX do not support debug
buuilds of itself
+%endif
%endif
%prep
@@ -1652,19 +1762,25 @@ Set of links from OpenJDK-slowdebug (sdk) to normal OpenJFX.
OpenJFX do not supp
if [ %{include_normal_build} -eq 0 -o %{include_normal_build} -eq 1 ] ; then
echo "include_normal_build is %{include_normal_build}"
else
- echo "include_normal_build is %{include_normal_build}, thats invalid. Use 1 for
yes or 0 for no"
+ echo "include_normal_build is %{include_normal_build}, that is invalid. Use 1 for
yes or 0 for no"
exit 11
fi
if [ %{include_debug_build} -eq 0 -o %{include_debug_build} -eq 1 ] ; then
echo "include_debug_build is %{include_debug_build}"
else
- echo "include_debug_build is %{include_debug_build}, thats invalid. Use 1 for yes
or 0 for no"
+ echo "include_debug_build is %{include_debug_build}, that is invalid. Use 1 for
yes or 0 for no"
exit 12
fi
-if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 ] ; then
- echo "You have disabled both include_debug_build and include_normal_build. That is
a no go."
+if [ %{include_fastdebug_build} -eq 0 -o %{include_fastdebug_build} -eq 1 ] ; then
+ echo "include_fastdebug_build is %{include_fastdebug_build}"
+else
+ echo "include_fastdebug_build is %{include_fastdebug_build}, that is invalid. Use
1 for yes or 0 for no"
exit 13
fi
+if [ %{include_debug_build} -eq 0 -a %{include_normal_build} -eq 0 -a
%{include_fastdebug_build} -eq 0 ] ; then
+ echo "You have disabled all builds (normal,fastdebug,slowdebug). That is a no
go."
+ exit 14
+fi
echo "Update version: %{updatever}"
echo "Build number: %{buildver}"
@@ -1750,6 +1866,9 @@ tar --strip-components=1 -x -I xz -f %{SOURCE8}
%if %{include_debug_build}
cp -r tapset tapset%{debug_suffix}
%endif
+%if %{include_fastdebug_build}
+cp -r tapset tapset%{fastdebug_suffix}
+%endif
for suffix in %{build_loop} ; do
@@ -1962,7 +2081,7 @@ $JAVA_HOME/bin/java TestCryptoLevel
$JAVA_HOME/bin/javac -d . %{SOURCE14}
$JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed "s|\.java||")
-# Verify system crypto (policy) can be disabled
+# Check system crypto (policy) can be disabled
$JAVA_HOME/bin/javac -d . %{SOURCE15}
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename
%{SOURCE15})|sed "s|\.java||")
@@ -2038,6 +2157,7 @@ quit
end
run -version
EOF
+
grep 'JavaCallWrapper::JavaCallWrapper' gdb.out
# Check src.zip has all sources. See RHBZ#1130490
@@ -2355,6 +2475,32 @@ require "copy_jdk_configs.lua"
%posttrans devel-slowdebug
%{posttrans_devel -- %{debug_suffix_unquoted}}
+%endif
+
+%if %{include_fastdebug_build}
+%post fastdebug
+%{post_script -- %{fastdebug_suffix_unquoted}}
+
+%post headless-fastdebug
+%{post_headless -- %{fastdebug_suffix_unquoted}}
+
+%postun fastdebug
+%{postun_script -- %{fastdebug_suffix_unquoted}}
+
+%postun headless-fastdebug
+%{postun_headless -- %{fastdebug_suffix_unquoted}}
+
+%posttrans fastdebug
+%{posttrans_script -- %{fastdebug_suffix_unquoted}}
+
+%post devel-fastdebug
+%{post_devel -- %{fastdebug_suffix_unquoted}}
+
+%postun devel-fastdebug
+%{postun_devel -- %{fastdebug_suffix_unquoted}}
+
+%posttrans devel-fastdebug
+%{posttrans_devel -- %{fastdebug_suffix_unquoted}}
%endif
@@ -2386,9 +2532,7 @@ require "copy_jdk_configs.lua"
%files javadoc
%{files_javadoc %{nil}}
-# this puts huge file to /usr/share
-# unluckily ti is really a documentation file
-# and unluckily it really is architecture-dependent, as eg. aot and grail are now x86_64
only
+# This puts a huge documentation file in /usr/share
# same for debug variant
%files javadoc-zip
%{files_javadoc_zip %{nil}}
@@ -2429,7 +2573,37 @@ require "copy_jdk_configs.lua"
%endif
%endif
+%if %{include_fastdebug_build}
+%files fastdebug
+%{files_jre -- %{fastdebug_suffix_unquoted}}
+
+%files headless-fastdebug
+%{files_jre_headless -- %{fastdebug_suffix_unquoted}}
+
+%files devel-fastdebug
+%{files_devel -- %{fastdebug_suffix_unquoted}}
+
+
+%files demo-fastdebug -f %{name}-demo.files-fastdebug
+%{files_demo -- %{fastdebug_suffix_unquoted}}
+
+%files src-fastdebug
+%{files_src -- %{fastdebug_suffix_unquoted}}
+
+%files accessibility-fastdebug
+%{files_accessibility -- %{fastdebug_suffix_unquoted}}
+
+%if %{with_openjfx_binding}
+%files openjfx-fastdebug -f %{name}-openjfx.files-fastdebug
+
+%files openjfx-devel-fastdebug -f %{name}-openjfx-devel.files-fastdebug
+%endif
+%endif
+
%changelog
+* Sat Dec 19 2020 Jiri Vanek <jvanek(a)redhat.com> - 1:1.8.0.275.b01-4
+- introduced fastdebug build cycle and subpackages
+
* Thu Dec 17 2020 Andrew Hughes <gnu.andrew(a)redhat.com> - 1:1.8.0.275.b01-3
- introduced nm based check to verify alt-java on x86_64 is patched, and no other
alt-java or java is patched
- patch600 rh1750419-redhat_alt_java.patch amended to die, if it is used wrongly
commit 00f1f317d9f194a34e2ebcb38e8f4545338be8da
Author: Jiri Vanek <jvanek(a)redhat.com>
Date: Thu Dec 17 15:49:22 2020 +0100
Added checks and restrictions around alt-java
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index ea1d9a7..f9c3b24 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -80,6 +80,8 @@
%global jit_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64} %{power64}
%global sa_arches %{ix86} x86_64 sparcv9 sparc64 %{aarch64}
%global jfr_arches x86_64 sparcv9 sparc64 %{aarch64} %{power64}
+# Set of architectures for which alt-java has SSB mitigation
+%global ssbd_arches x86_64
# By default, we build a debug build during main build on JIT architectures
%if %{with slowdebug}
@@ -260,7 +262,7 @@
%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
# eg jdk8u60-b27 -> b27
%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
-%global rpmrelease 2
+%global rpmrelease 3
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
# Release will be (where N is usually a number starting at 1):
# - 0.N%%{?extraver}%%{?dist} for EA releases,
@@ -1964,6 +1966,17 @@ $JAVA_HOME/bin/java $(echo $(basename %{SOURCE14})|sed
"s|\.java||")
$JAVA_HOME/bin/javac -d . %{SOURCE15}
$JAVA_HOME/bin/java -Djava.security.disableSystemPropertiesFile=true $(echo $(basename
%{SOURCE15})|sed "s|\.java||")
+# Check java launcher has no SSB mitigation
+if ! nm $JAVA_HOME/bin/java | grep set_speculation ; then true ; else false; fi
+
+# Check alt-java launcher has SSB mitigation on supported architectures
+%ifarch %{ssbd_arches}
+nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation
+%else
+if ! nm $JAVA_HOME/bin/%{alt_java_name} | grep set_speculation ; then true ; else false;
fi
+%endif
+
+
# Check debug symbols are present and can identify code
find "$JAVA_HOME" -iname '*.so' -print0 | while read -d $'\0'
lib
do
@@ -2417,6 +2430,11 @@ require "copy_jdk_configs.lua"
%endif
%changelog
+* Thu Dec 17 2020 Andrew Hughes <gnu.andrew(a)redhat.com> - 1:1.8.0.275.b01-3
+- introduced nm based check to verify alt-java on x86_64 is patched, and no other
alt-java or java is patched
+- patch600 rh1750419-redhat_alt_java.patch amended to die, if it is used wrongly
+- introduced ssbd_arches with currently only valid arch of x86_64 to separate real
alt-java architectures
+
* Fri Nov 27 2020 Jiri Vanek <jvanek(a)redhat.com> - 1:1.8.0.275.b01-2
- added patch600, rh1750419-redhat_alt_java.patch
- Replaced alt-java palceholder by real pathced alt-java
diff --git a/rh1750419-redhat_alt_java.patch b/rh1750419-redhat_alt_java.patch
index d7accf1..b3cbff8 100644
--- a/rh1750419-redhat_alt_java.patch
+++ b/rh1750419-redhat_alt_java.patch
@@ -1,12 +1,13 @@
diff -r 25e94aa812b2 make/CompileLaunchers.gmk
--- openjdk/jdk/make/CompileLaunchers.gmk Wed Feb 05 12:20:36 2020 -0300
+++ openjdk/jdk/make/CompileLaunchers.gmk Tue Jun 02 17:15:28 2020 +0100
-@@ -234,6 +234,20 @@
+@@ -234,6 +234,21 @@
BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
++#Wno-error=cpp is present to allow commented warning in ifdef part of main.c
+$(eval $(call SetupLauncher,alt-java, \
-+ -DEXPAND_CLASSPATH_WILDCARDS -DREDHAT_ALT_JAVA,,,user32.lib comctl32.lib, \
++ -DEXPAND_CLASSPATH_WILDCARDS -DREDHAT_ALT_JAVA -Wno-error=cpp,,,user32.lib
comctl32.lib, \
+ $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
+ $(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true))
+
@@ -102,12 +103,16 @@ diff -r 25e94aa812b2 src/share/bin/alt_main.h
diff -r 25e94aa812b2 src/share/bin/main.c
--- openjdk/jdk/src/share/bin/main.c Wed Feb 05 12:20:36 2020 -0300
+++ openjdk/jdk/src/share/bin/main.c Tue Jun 02 17:15:28 2020 +0100
-@@ -32,6 +32,10 @@
+@@ -32,6 +32,14 @@
#include "defines.h"
++#ifdef REDHAT_ALT_JAVA
+#if defined(__linux__) && defined(__x86_64__)
+#include "alt_main.h"
++#else
++#warning alt-java requested but SSB mitigation not available on this platform.
++#endif
+#endif
+
#ifdef _MSC_VER
commit 0b99caae7095a7d9832e08d5fe28e98e86d61b4a
Author: Jiri Vanek <jvanek(a)redhat.com>
Date: Thu Dec 17 13:34:57 2020 +0100
Redeffined linux -> __linux__ and __x86_64 -> __x86_64__
diff --git a/rh1750419-redhat_alt_java.patch b/rh1750419-redhat_alt_java.patch
index 5a7b2d8..d7accf1 100644
--- a/rh1750419-redhat_alt_java.patch
+++ b/rh1750419-redhat_alt_java.patch
@@ -106,7 +106,7 @@ diff -r 25e94aa812b2 src/share/bin/main.c
#include "defines.h"
-+#if defined(linux) && defined(__x86_64)
++#if defined(__linux__) && defined(__x86_64__)
+#include "alt_main.h"
+#endif
+
commit d1c71825038ee37dbbc47419455bda9aaf9de045
Author: Jiri <jvanek(a)redhat.com>
Date: Mon Dec 7 20:05:38 2020 +0100
Fixes comment for speculative store bypass patch
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index 72e8348..ea1d9a7 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -1295,7 +1295,7 @@ Patch539:
pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_jav
Patch400: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
# PR3655: Allow use of system crypto policy to be disabled by the user
Patch401: pr3655-toggle_system_crypto_policy.patch
-# enable build of spectre/meltdown hardened alt-java
+# enable build of speculative store bypass hardened alt-java
Patch600: rh1750419-redhat_alt_java.patch
# JDK-8218811: replace open by os::open in hotspot coding
# This fixes a GCC 10 build issue
commit 48e4f2011c0a12962af1f93bc9d8664996b1619e
Author: Jiri Vanek <jvanek(a)redhat.com>
Date: Fri Nov 27 18:41:13 2020 +0100
Replaced alt-java palceholder by real pathced alt-java
diff --git a/java-1.8.0-openjdk.spec b/java-1.8.0-openjdk.spec
index ca3024b..72e8348 100644
--- a/java-1.8.0-openjdk.spec
+++ b/java-1.8.0-openjdk.spec
@@ -260,7 +260,7 @@
%global updatever %(VERSION=%{whole_update}; echo ${VERSION##*u})
# eg jdk8u60-b27 -> b27
%global buildver %(VERSION=%{version_tag}; echo ${VERSION##*-})
-%global rpmrelease 1
+%global rpmrelease 2
# Define milestone (EA for pre-releases, GA ("fcs") for releases)
# Release will be (where N is usually a number starting at 1):
# - 0.N%%{?extraver}%%{?dist} for EA releases,
@@ -1286,9 +1286,6 @@ Patch512:
rh1649664-awt2dlibraries_compiled_with_no_strict_overflow.patch
Patch523:
pr2974-rh1337583-add_systemlineendings_option_to_keytool_and_use_line_separator_instead_of_crlf_in_pkcs10.patch
# PR3083, RH1346460: Regression in SSL debug output without an ECC provider
Patch528:
pr3083-rh1346460-for_ssl_debug_return_null_instead_of_exception_when_theres_no_ecc_provider.patch
-# RH1566890: CVE-2018-3639
-Patch529: rh1566890-CVE_2018_3639-speculative_store_bypass.patch
-Patch531: rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
# PR3601: Fix additional -Wreturn-type issues introduced by 8061651
Patch530:
pr3601-fix_additional_Wreturn_type_issues_introduced_by_8061651_for_prims_jvm_cpp.patch
# PR2888: OpenJDK should check for system cacerts database (e.g. /etc/pki/java/cacerts)
@@ -1298,6 +1295,8 @@ Patch539:
pr2888-openjdk_should_check_for_system_cacerts_database_eg_etc_pki_jav
Patch400: pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch
# PR3655: Allow use of system crypto policy to be disabled by the user
Patch401: pr3655-toggle_system_crypto_policy.patch
+# enable build of spectre/meltdown hardened alt-java
+Patch600: rh1750419-redhat_alt_java.patch
# JDK-8218811: replace open by os::open in hotspot coding
# This fixes a GCC 10 build issue
Patch111: jdk8218811-perfMemory_linux.patch
@@ -1723,8 +1722,6 @@ sh %{SOURCE12}
%patch512
%patch523
%patch528
-%patch529
-%patch531
%patch530
%patch571
%patch574
@@ -1735,6 +1732,7 @@ sh %{SOURCE12}
# RPM-only fixes
%patch539
+%patch600
%patch1000
# RHEL-only patches
@@ -1938,11 +1936,8 @@ install -m 644 nss.cfg $JAVA_HOME/jre/lib/security/
rm $JAVA_HOME/jre/lib/tzdb.dat
ln -s %{_datadir}/javazi-1.8/tzdb.dat $JAVA_HOME/jre/lib/tzdb.dat
-# Create fake alt-java as a placeholder for future alt-java
-pushd ${JAVA_HOME}
-cp -a jre/bin/java jre/bin/%{alt_java_name}
-cp -a bin/java bin/%{alt_java_name}
# add alt-java man page
+pushd ${JAVA_HOME}
echo "Hardened java binary recommended for launching untrusted code from the Web
e.g. javaws" > man/man1/%{alt_java_name}.1
cat man/man1/java.1 >> man/man1/%{alt_java_name}.1
popd
@@ -2422,6 +2417,14 @@ require "copy_jdk_configs.lua"
%endif
%changelog
+* Fri Nov 27 2020 Jiri Vanek <jvanek(a)redhat.com> - 1:1.8.0.275.b01-2
+- added patch600, rh1750419-redhat_alt_java.patch
+- Replaced alt-java palceholder by real pathced alt-java
+- remove patch529 rh1566890-CVE_2018_3639-speculative_store_bypass.patch
+- remove patch531 rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
+- both suprassed by new patch
+
+
* Mon Nov 23 2020 Jiri Vanek <jvanek(a)redhat.com> - 1:1.8.0.275.b01-1
- Created copy of java as alt-java and adapted alternatives and man pages
diff --git a/rh1566890-CVE_2018_3639-speculative_store_bypass.patch
b/rh1566890-CVE_2018_3639-speculative_store_bypass.patch
deleted file mode 100644
index d8f3a5a..0000000
--- a/rh1566890-CVE_2018_3639-speculative_store_bypass.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
-@@ -103,6 +103,8 @@
- # include <inttypes.h>
- # include <sys/ioctl.h>
-
-+#include <sys/prctl.h>
-+
- PRAGMA_FORMAT_MUTE_WARNINGS_FOR_GCC
-
- #ifndef _GNU_SOURCE
-@@ -4997,6 +4999,31 @@
- }
- }
-
-+/* Per task speculation control */
-+#ifndef PR_GET_SPECULATION_CTRL
-+#define PR_GET_SPECULATION_CTRL 52
-+#endif
-+#ifndef PR_SET_SPECULATION_CTRL
-+#define PR_SET_SPECULATION_CTRL 53
-+#endif
-+/* Speculation control variants */
-+# undef PR_SPEC_STORE_BYPASS
-+# define PR_SPEC_STORE_BYPASS 0
-+/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
-+# undef PR_SPEC_NOT_AFFECTED
-+# undef PR_SPEC_PRCTL
-+# undef PR_SPEC_ENABLE
-+# undef PR_SPEC_DISABLE
-+# define PR_SPEC_NOT_AFFECTED 0
-+# define PR_SPEC_PRCTL (1UL << 0)
-+# define PR_SPEC_ENABLE (1UL << 1)
-+# define PR_SPEC_DISABLE (1UL << 2)
-+
-+static void set_speculation() __attribute__((constructor));
-+static void set_speculation() {
-+ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
-+}
-+
- // this is called _before_ most of the global arguments have been parsed
- void os::init(void) {
- char dummy; /* used to get a guess on initial stack address */
diff --git a/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
b/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
deleted file mode 100644
index 94ef9d4..0000000
--- a/rh1566890-CVE_2018_3639-speculative_store_bypass_toggle.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
openjdk/hotspot/src/os/linux/vm/os_linux.cpp
---- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp
-+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp
-@@ -5001,26 +5001,43 @@
-
- /* Per task speculation control */
- #ifndef PR_GET_SPECULATION_CTRL
--#define PR_GET_SPECULATION_CTRL 52
-+# define PR_GET_SPECULATION_CTRL 52
- #endif
- #ifndef PR_SET_SPECULATION_CTRL
--#define PR_SET_SPECULATION_CTRL 53
-+# define PR_SET_SPECULATION_CTRL 53
- #endif
- /* Speculation control variants */
--# undef PR_SPEC_STORE_BYPASS
-+#ifndef PR_SPEC_STORE_BYPASS
- # define PR_SPEC_STORE_BYPASS 0
-+#endif
- /* Return and control values for PR_SET/GET_SPECULATION_CTRL */
--# undef PR_SPEC_NOT_AFFECTED
--# undef PR_SPEC_PRCTL
--# undef PR_SPEC_ENABLE
--# undef PR_SPEC_DISABLE
-+
-+#ifndef PR_SPEC_NOT_AFFECTED
- # define PR_SPEC_NOT_AFFECTED 0
-+#endif
-+#ifndef PR_SPEC_PRCTL
- # define PR_SPEC_PRCTL (1UL << 0)
-+#endif
-+#ifndef PR_SPEC_ENABLE
- # define PR_SPEC_ENABLE (1UL << 1)
-+#endif
-+#ifndef PR_SPEC_DISABLE
- # define PR_SPEC_DISABLE (1UL << 2)
-+#endif
-+#ifndef PR_SPEC_FORCE_DISABLE
-+# define PR_SPEC_FORCE_DISABLE (1UL << 3)
-+#endif
-+#ifndef PR_SPEC_DISABLE_NOEXEC
-+# define PR_SPEC_DISABLE_NOEXEC (1UL << 4)
-+#endif
-
- static void set_speculation() __attribute__((constructor));
- static void set_speculation() {
-+ if ( prctl(PR_SET_SPECULATION_CTRL,
-+ PR_SPEC_STORE_BYPASS,
-+ PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) {
-+ return;
-+ }
- prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
- }
-
diff --git a/rh1750419-redhat_alt_java.patch b/rh1750419-redhat_alt_java.patch
new file mode 100644
index 0000000..5a7b2d8
--- /dev/null
+++ b/rh1750419-redhat_alt_java.patch
@@ -0,0 +1,115 @@
+diff -r 25e94aa812b2 make/CompileLaunchers.gmk
+--- openjdk/jdk/make/CompileLaunchers.gmk Wed Feb 05 12:20:36 2020 -0300
++++ openjdk/jdk/make/CompileLaunchers.gmk Tue Jun 02 17:15:28 2020 +0100
+@@ -234,6 +234,20 @@
+
+ BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/java$(EXE_SUFFIX)
+
++$(eval $(call SetupLauncher,alt-java, \
++ -DEXPAND_CLASSPATH_WILDCARDS -DREDHAT_ALT_JAVA,,,user32.lib comctl32.lib, \
++ $(JDK_OUTPUTDIR)/objs/jli_static.lib, $(JAVA_RC_FLAGS), \
++ $(JDK_TOPDIR)/src/windows/resource/java.rc, $(JDK_OUTPUTDIR)/objs/java_objs,true))
++
++$(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/alt-java$(EXE_SUFFIX): $(BUILD_LAUNCHER_alt-java)
++ $(MKDIR) -p $(@D)
++ $(RM) $@
++ $(CP) $(JDK_OUTPUTDIR)/objs/java_objs$(OUTPUT_SUBDIR)/alt-java$(EXE_SUFFIX) $@
++
++ifeq ($(OPENJDK_TARGET_OS), linux)
++ BUILD_LAUNCHERS += $(JDK_OUTPUTDIR)/bin$(OUTPUT_SUBDIR)/alt-java$(EXE_SUFFIX)
++endif
++
+ ifeq ($(OPENJDK_TARGET_OS), windows)
+ $(eval $(call SetupLauncher,javaw, \
+ -DJAVAW -DEXPAND_CLASSPATH_WILDCARDS,,,user32.lib comctl32.lib, \
+diff -r 25e94aa812b2 src/share/bin/alt_main.h
+--- /dev/null Thu Jan 01 00:00:00 1970 +0000
++++ openjdk/jdk/src/share/bin/alt_main.h Tue Jun 02 17:15:28 2020 +0100
+@@ -0,0 +1,73 @@
++/*
++ * Copyright (c) 2019, Red Hat, Inc. All rights reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * 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.
++ */
++
++#ifdef REDHAT_ALT_JAVA
++
++#include <sys/prctl.h>
++
++
++/* Per task speculation control */
++#ifndef PR_GET_SPECULATION_CTRL
++# define PR_GET_SPECULATION_CTRL 52
++#endif
++#ifndef PR_SET_SPECULATION_CTRL
++# define PR_SET_SPECULATION_CTRL 53
++#endif
++/* Speculation control variants */
++#ifndef PR_SPEC_STORE_BYPASS
++# define PR_SPEC_STORE_BYPASS 0
++#endif
++/* Return and control values for PR_SET/GET_SPECULATION_CTRL */
++
++#ifndef PR_SPEC_NOT_AFFECTED
++# define PR_SPEC_NOT_AFFECTED 0
++#endif
++#ifndef PR_SPEC_PRCTL
++# define PR_SPEC_PRCTL (1UL << 0)
++#endif
++#ifndef PR_SPEC_ENABLE
++# define PR_SPEC_ENABLE (1UL << 1)
++#endif
++#ifndef PR_SPEC_DISABLE
++# define PR_SPEC_DISABLE (1UL << 2)
++#endif
++#ifndef PR_SPEC_FORCE_DISABLE
++# define PR_SPEC_FORCE_DISABLE (1UL << 3)
++#endif
++#ifndef PR_SPEC_DISABLE_NOEXEC
++# define PR_SPEC_DISABLE_NOEXEC (1UL << 4)
++#endif
++
++static void set_speculation() __attribute__((constructor));
++static void set_speculation() {
++ if ( prctl(PR_SET_SPECULATION_CTRL,
++ PR_SPEC_STORE_BYPASS,
++ PR_SPEC_DISABLE_NOEXEC, 0, 0) == 0 ) {
++ return;
++ }
++ prctl(PR_SET_SPECULATION_CTRL, PR_SPEC_STORE_BYPASS, PR_SPEC_DISABLE, 0, 0);
++}
++
++#endif // REDHAT_ALT_JAVA
+diff -r 25e94aa812b2 src/share/bin/main.c
+--- openjdk/jdk/src/share/bin/main.c Wed Feb 05 12:20:36 2020 -0300
++++ openjdk/jdk/src/share/bin/main.c Tue Jun 02 17:15:28 2020 +0100
+@@ -32,6 +32,10 @@
+
+ #include "defines.h"
+
++#if defined(linux) && defined(__x86_64)
++#include "alt_main.h"
++#endif
++
+ #ifdef _MSC_VER
+ #if _MSC_VER > 1400 && _MSC_VER < 1600
+