#22 Adapted patches to jdk12
Closed a year ago by jerboaa. Opened a year ago by jvanek.
rpms/ jvanek/java-openjdk jdk12  into  master

file modified
+31 -63

@@ -132,7 +132,7 @@ 

  # 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]*||')

+ %global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||' | sed 's|-Werror=format-security||')

  %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')

  %global ourldflags %{__global_ldflags}

  

@@ -210,7 +210,7 @@ 

  # buildjdkver is usually same as %%{majorver},

  # but in time of bootstrap of next jdk, it is majorver-1, 

  # and this it is better to change it here, on single place

- %global buildjdkver %{majorver}

+ %global buildjdkver 11

  # Used via new version scheme. JDK 11 was

  # GA'ed in March 2019 => 19.3

  %global vendor_version_string 19.3

@@ -559,13 +559,13 @@ 

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/classlist

  %endif

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jexec

+ %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jspawnhelper

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jrt-fs.jar

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/modules

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfont.properties.ja

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/psfontj2d.properties

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/tzdb.dat

- %dir %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jli

- %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jli/libjli.so

+ %{_jvmdir}/%{sdkdir -- %{?1}}/lib/libjli.so

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/jvm.cfg

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/libattach.so

  %{_jvmdir}/%{sdkdir -- %{?1}}/lib/libawt.so

@@ -628,6 +628,7 @@ 

  %dir %{etcjavadir -- %{?1}}/lib/security

  %{etcjavadir -- %{?1}}/lib/security/cacerts

  %dir %{etcjavadir -- %{?1}}/conf

+ %dir %{etcjavadir -- %{?1}}/conf/sdp

  %dir %{etcjavadir -- %{?1}}/conf/management

  %dir %{etcjavadir -- %{?1}}/conf/security

  %dir %{etcjavadir -- %{?1}}/conf/security/policy

@@ -647,8 +648,9 @@ 

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/logging.properties

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/security/nss.cfg

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/management/jmxremote.access

- # this is conifg template, thus not config-noreplace

+ # this are conifg templates, thus not config-noreplace

  %config  %{etcjavadir -- %{?1}}/conf/management/jmxremote.password.template

+ %config  %{etcjavadir -- %{?1}}/conf/sdp/sdp.conf.template

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/management/management.properties

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/net.properties

  %config(noreplace) %{etcjavadir -- %{?1}}/conf/sound.properties

@@ -681,6 +683,7 @@ 

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/javap

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jconsole

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jcmd

+ %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jfr

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdb

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeps

  %{_jvmdir}/%{sdkdir -- %{?1}}/bin/jdeprscan

@@ -1032,51 +1035,7 @@ 

  # Follow system wide crypto policy RHBZ#1249083

  Patch4:    pr3183-rh1340845-support_fedora_rhel_system_crypto_policy.patch

  # System NSS via SunEC Provider

- Patch5:    pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch

- 

- #############################################

- #

- # Shenandaoh specific patches

- #

- #############################################

- 

- Patch585: rh1648995-shenandoah_array_copy_broken_by_not_always_copy_forward_for_disjoint_arrays.patch

- 

- #############################################

- #

- # OpenJDK specific patches

- #

- #############################################

- 

- # 8210416, RHBZ#1632174: [linux] Poor StrictMath performance due to non-optimized compilation

- Patch8:    jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch

- # 8210425, RHBZ#1632174: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization

- Patch9:    jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch

- 

- #############################################

- #

- # JDK 9+ only patches

- #

- #############################################

- 

- # 8210647, RHBZ#1632174: libsaproc is being compiled without optimization

- Patch10:    jdk8210647-rh1632174-libsaproc_is_being_compiled_without_optimization.patch

- # 8210761, RHBZ#1632174: libjsig is being compiled without optimization

- Patch11:    jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

- # 8210703, RHBZ#1632174: vmStructs.cpp compiled with -O0

- Patch12:    jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0

- # 8211105, RHBZ-1628612, RHBZ-1630996: Temporarily disable dsin/dcos/log

- # intrinsics on aarch64, falling back to C code. Re-enable once JDK-8210461

- # is fixed and available in jdk11u.

- Patch6:    jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch

- 

- #############################################

- #

- # Patches appearing in 11.0.2

- #

- #############################################

- 

- Patch584: jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch

+ Patch5:    pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk12.patch

  

  BuildRequires: autoconf

  BuildRequires: automake

@@ -1340,14 +1299,6 @@ 

  %patch3 -p1

  %patch4 -p1

  %patch5 -p1

- %patch6 -p1

- %patch8 -p1

- %patch9 -p1

- %patch10 -p1

- %patch11 -p1

- %patch12 -p1

- %patch584 -p1

- %patch585 -p1

  popd # openjdk

  

  %patch1000

@@ -1471,7 +1422,7 @@ 

  %endif

      --disable-warnings-as-errors

  

- make \

+ make --no-print-directory \

Please add a comment why --no-print-directory is needed here.

      JAVAC_FLAGS=-g \

      LOG=trace \

      WARNINGS_ARE_ERRORS="-Wno-error" \

@@ -1514,7 +1465,7 @@ 

  

  #check sheandoah is enabled

  %if %{use_shenandoah_hotspot}

- $JAVA_HOME//bin/java -XX:+UseShenandoahGC -version

+ $JAVA_HOME//bin/java -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -version

  %endif

  

  # Check unlimited policy has been used

@@ -1668,7 +1619,7 @@ 

  # Install Javadoc documentation

  install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}

  cp -a %{buildoutputdir -- $suffix}/images/docs $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}

- cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{newjavaver}+%{buildver}%{lts_designator_zip}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip

+ cp -a %{buildoutputdir -- $suffix}/bundles/jdk-%{majorver}+%{buildver}-docs.zip $RPM_BUILD_ROOT%{_javadocdir}/%{uniquejavadocdir -- $suffix}.zip

  

  # Install icons and menu entries

  for s in 16 24 32 48 ; do

@@ -1899,8 +1850,25 @@ 

  

  %changelog

  * Fri Dec 21 2018 Jiri Vanek <jvanek@redhat.com> - 1:12.0.0.25-0.ea.1.rolling

- - bumped souorces to jdk12. Crypto list synced.

- - prep currently fails.

+ - bumped sources to jdk12. Crypto list synced.

+ - adapted patches to usptream (removed are upstreamed)

+ - removed partially fixed partially usptreammed patch6,  jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch:

+ - renamed patch5, pr1983-rh1565658-..._sunec_provider_jdk11.patch to pr1983-rh1565658-..._sunec_provider_jdk12.patch

+ - adapted patch5, pr1983-rh1565658 to jdk12 (libraries.m4 and /Lib-jdk.crypto.ec.gmk)

+ - removed patch8, jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch

+ - removed patch9, jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch

+ - removed patch10, jdk8210647-rh1632174. Is rummored to be in upstream

+ - removed patch11, jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch

+ - removed patch12, jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0

+ - removed patch584, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch

+ - removed patch585, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch

+ - set build jdk to jdk11; buildjdkver set to 11

+ - todo, revisit _privatelibs and slaves, discuse patch10, more?

+ - now building with --no-print-directory to workaround JDK8215213

s/JDK8215213/JDK-8215213/ It's easier to read.

+ - renamed original of docs zip to jdk-major+build

+ - check shenandaoh with -XX:+UnlockExperimentalVMOptions

+ - libjli moved from lib/libjli to lib

+ - added lib/jspawnhelper and bin/jfr and conf/sdp/sdp.conf.template

  

  * Wed Dec 5 2018 Jiri Vanek <jvanek@redhat.com> - 1:11.0.1.13-10.rolling

  - for non debug supackages, ghosted all masters and slaves (rhbz1649776)

@@ -1,114 +0,0 @@ 

- 

- # HG changeset patch

- # User roland

- # Date 1534518792 -7200

- # Node ID 690d9be191bf068b68c37bc835b355b1535e6075

- # Parent  5be470fb7a19293eb95fd33806413b94abca9724

- 8209639: assert failure in coalesce.cpp: attempted to spill a non-spillable item

- Reviewed-by: neliasso, kvn

- 

- diff -r 5be470fb7a19 -r 690d9be191bf src/hotspot/share/opto/coalesce.cpp

- --- a/src/hotspot/share/opto/coalesce.cpp	Tue Oct 16 12:47:56 2018 +0100

- +++ b/src/hotspot/share/opto/coalesce.cpp	Fri Aug 17 17:13:12 2018 +0200

- @@ -25,6 +25,7 @@

-  #include "precompiled.hpp"

-  #include "memory/allocation.inline.hpp"

-  #include "opto/block.hpp"

- +#include "opto/c2compiler.hpp"

-  #include "opto/cfgnode.hpp"

-  #include "opto/chaitin.hpp"

-  #include "opto/coalesce.hpp"

- @@ -294,9 +295,13 @@

-              } else {

-                uint ireg = m->ideal_reg();

-                if (ireg == 0 || ireg == Op_RegFlags) {

- -                assert(false, "attempted to spill a non-spillable item: %d: %s, ireg = %u, spill_type: %s",

- -                       m->_idx, m->Name(), ireg, MachSpillCopyNode::spill_type(MachSpillCopyNode::PhiInput));

- -                C->record_method_not_compilable("attempted to spill a non-spillable item");

- +                if (C->subsume_loads()) {

- +                  C->record_failure(C2Compiler::retry_no_subsuming_loads());

- +                } else {

- +                  assert(false, "attempted to spill a non-spillable item: %d: %s, ireg = %u, spill_type: %s",

- +                         m->_idx, m->Name(), ireg, MachSpillCopyNode::spill_type(MachSpillCopyNode::PhiInput));

- +                  C->record_method_not_compilable("attempted to spill a non-spillable item");

- +                }

-                  return;

-                }

-                const RegMask *rm = C->matcher()->idealreg2spillmask[ireg];

- diff -r 5be470fb7a19 -r 690d9be191bf test/hotspot/jtreg/compiler/c2/SubsumingLoadsCauseFlagSpill.java

- --- /dev/null	Thu Jan 01 00:00:00 1970 +0000

- +++ b/test/hotspot/jtreg/compiler/c2/SubsumingLoadsCauseFlagSpill.java	Fri Aug 17 17:13:12 2018 +0200

- @@ -0,0 +1,72 @@

- +/*

- + * Copyright (c) 2018, 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.

- + *

- + * 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.

- + */

- +

- +/**

- + * @test

- + * @bug 8209639

- + * @summary assert failure in coalesce.cpp: attempted to spill a non-spillable item

- + *

- + * @run main/othervm -XX:-BackgroundCompilation -XX:CompileCommand=dontinline,SubsumingLoadsCauseFlagSpill::not_inlined -Xmx1024m SubsumingLoadsCauseFlagSpill

- + *

- + */

- +

- +public class SubsumingLoadsCauseFlagSpill {

- +    private static Object field;

- +    private static boolean do_throw;

- +    private static volatile boolean barrier;

- +

- +    public static void main(String[] args) {

- +        for (int i = 0; i < 20_000; i++) {

- +            do_throw = true;

- +            field = null;

- +            test(0);

- +            do_throw = false;

- +            field = new Object();

- +            test(0);

- +        }

- +    }

- +

- +    private static float test(float f) {

- +        Object v = null;

- +        try {

- +            not_inlined();

- +            v = field;

- +        } catch (MyException me) {

- +            v = field;

- +            barrier = true;

- +        }

- +        if (v == null) {

- +            return f * f;

- +        }

- +        return f;

- +    }

- +

- +    private static void not_inlined() throws MyException{

- +        if (do_throw) {

- +            throw new MyException();

- +        }

- +    }

- +

- +    private static class MyException extends Throwable {

- +    }

- +}

- 

@@ -8,39 +8,6 @@ 

  Summary: Compile fdlibm with -O2 -ffp-contract=off on gcc/clang arches.

  Reviewed-by: aph, erikj, dholmes, darcy

  

- diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4

- --- a/make/autoconf/flags-cflags.m4

- +++ b/make/autoconf/flags-cflags.m4

- @@ -373,6 +373,18 @@

-  

-    FLAGS_SETUP_CFLAGS_CPU_DEP([BUILD], [OPENJDK_BUILD_])

-  

- +  COMPILER_FP_CONTRACT_OFF_FLAG="-ffp-contract=off"

- +  # Check that the compiler supports -ffp-contract=off flag

- +  # Set FDLIBM_CFLAGS to -ffp-contract=off if it does. Empty

- +  # otherwise.

- +  # These flags are required for GCC-based builds of

- +  # fdlibm with optimization without losing precision.

- +  # Notably, -ffp-contract=off needs to be added for GCC >= 4.6.

- +  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_FP_CONTRACT_OFF_FLAG}],

- +      IF_TRUE: [FDLIBM_CFLAGS=${COMPILER_FP_CONTRACT_OFF_FLAG}],

- +      IF_FALSE: [FDLIBM_CFLAGS=""])

- +  AC_SUBST(FDLIBM_CFLAGS)

- +

-    # Tests are only ever compiled for TARGET

-    CFLAGS_TESTLIB="$CFLAGS_JDKLIB"

-    CXXFLAGS_TESTLIB="$CXXFLAGS_JDKLIB"

- diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in

- --- a/make/autoconf/spec.gmk.in

- +++ b/make/autoconf/spec.gmk.in

- @@ -450,6 +450,7 @@

-  LIBJSIG_HASHSTYLE_LDFLAGS := @LIBJSIG_HASHSTYLE_LDFLAGS@

-  LIBJSIG_NOEXECSTACK_LDFLAGS := @LIBJSIG_NOEXECSTACK_LDFLAGS@

-  

- +FDLIBM_CFLAGS := @FDLIBM_CFLAGS@

-  JVM_CFLAGS := @JVM_CFLAGS@

-  JVM_LDFLAGS := @JVM_LDFLAGS@

-  JVM_ASFLAGS := @JVM_ASFLAGS@

  diff --git a/make/lib/CoreLibraries.gmk b/make/lib/CoreLibraries.gmk

  --- a/make/lib/CoreLibraries.gmk

  +++ b/make/lib/CoreLibraries.gmk

@@ -1,48 +0,0 @@ 

- # HG changeset patch

- # User sgehwolf

- # Date 1536682731 -7200

- #      Tue Sep 11 18:18:51 2018 +0200

- # Node ID 7157249fdd4366d95dd68f3d083ebb0ef84c753b

- # Parent  8d86b149e10f0a0896e5fd4d8d407e5fda64a529

- 8210425: [x86] sharedRuntimeTrig/sharedRuntimeTrans compiled without optimization

- Reviewed-by: duke

- 

- diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk

- --- a/make/hotspot/lib/JvmOverrideFiles.gmk

- +++ b/make/hotspot/lib/JvmOverrideFiles.gmk

- @@ -43,20 +43,26 @@ ifeq ($(TOOLCHAIN_TYPE), gcc)

-    endif

-  endif

-  

- +LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NONE)

- +# If the FDLIBM_CFLAGS variable is non-empty we know

- +# that the fdlibm-fork in hotspot can get optimized

- +# by using -ffp-contract=off on GCC/Clang platforms.

- +ifneq ($(FDLIBM_CFLAGS), )

- +  LIBJVM_FDLIBM_COPY_OPT_FLAG := $(CXX_O_FLAG_NORM)

- +endif

- +

-  ifeq ($(OPENJDK_TARGET_OS), linux)

-    BUILD_LIBJVM_ostream.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64

-    BUILD_LIBJVM_logFileOutput.cpp_CXXFLAGS := -D_FILE_OFFSET_BITS=64

-  

- -  ifeq ($(OPENJDK_TARGET_CPU_ARCH), x86)

- -    BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)

- -    BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(CXX_O_FLAG_NONE)

- +  BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)

- +  BUILD_LIBJVM_sharedRuntimeTrans.cpp_CXXFLAGS := -DNO_PCH $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)

-  

- -    ifeq ($(TOOLCHAIN_TYPE), clang)

- -      JVM_PRECOMPILED_HEADER_EXCLUDE := \

- -          sharedRuntimeTrig.cpp \

- -          sharedRuntimeTrans.cpp \

- -          #

- -    endif

- +  ifeq ($(TOOLCHAIN_TYPE), clang)

- +    JVM_PRECOMPILED_HEADER_EXCLUDE := \

- +       sharedRuntimeTrig.cpp \

- +       sharedRuntimeTrans.cpp \

- +       #

-    endif

-  

-    ifeq ($(OPENJDK_TARGET_CPU), x86)

@@ -1,21 +0,0 @@ 

- # HG changeset patch

- # User sgehwolf

- # Date 1536751862 -7200

- #      Wed Sep 12 13:31:02 2018 +0200

- # Node ID f95c6746fe256fe0456e0ea0d2930631ef840286

- # Parent  7157249fdd4366d95dd68f3d083ebb0ef84c753b

- 8210647: libsaproc is being compiled without optimization

- Reviewed-by: duke

- 

- diff --git a/make/lib/Lib-jdk.hotspot.agent.gmk b/make/lib/Lib-jdk.hotspot.agent.gmk

- --- a/make/lib/Lib-jdk.hotspot.agent.gmk

- +++ b/make/lib/Lib-jdk.hotspot.agent.gmk

- @@ -52,7 +52,7 @@

-  

-  $(eval $(call SetupJdkLibrary, BUILD_LIBSA, \

-      NAME := saproc, \

- -    OPTIMIZATION := NONE, \

- +    OPTIMIZATION := LOW, \

-      DISABLED_WARNINGS_microsoft := 4267, \

-      DISABLED_WARNINGS_gcc := sign-compare, \

-      DISABLED_WARNINGS_CXX_solstudio := truncwarn unknownpragma, \

@@ -1,21 +0,0 @@ 

- # HG changeset patch

- # User sgehwolf

- # Date 1536829660 -7200

- #      Thu Sep 13 11:07:40 2018 +0200

- # Node ID 39ccca116f79139fc4b779f5df83cb32357b9ae9

- # Parent  7512bd28304cf0dc5676247990f1907162c719ca

- 8210703: vmStructs.cpp compiled with -O0

- Reviewed-by: duke

- 

- diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk

- --- a/make/hotspot/lib/JvmOverrideFiles.gmk

- +++ b/make/hotspot/lib/JvmOverrideFiles.gmk

- @@ -30,7 +30,7 @@

-  # status for individual files on specific platforms.

-  

-  ifeq ($(TOOLCHAIN_TYPE), gcc)

- -  BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments -O0

- +  BUILD_LIBJVM_vmStructs.cpp_CXXFLAGS := -fno-var-tracking-assignments

-    BUILD_LIBJVM_jvmciCompilerToVM.cpp_CXXFLAGS := -fno-var-tracking-assignments

-    BUILD_LIBJVM_jvmciCompilerToVMInit.cpp_CXXFLAGS := -fno-var-tracking-assignments

-    BUILD_LIBJVM_assembler_x86.cpp_CXXFLAGS := -Wno-maybe-uninitialized

@@ -1,20 +0,0 @@ 

- # HG changeset patch

- # User sgehwolf

- # Date 1537541916 -7200

- #      Fri Sep 21 16:58:36 2018 +0200

- # Node ID cd8483acfe56ade257685d93323f78e6e13704a0

- # Parent  e40fa3a70efdbc22f85c0d30350189f632779831

- 8210761: libjsig is being compiled without optimization

- Reviewed-by: duke

- 

- diff --git a/make/lib/Lib-java.base.gmk b/make/lib/Lib-java.base.gmk

- --- a/make/lib/Lib-java.base.gmk

- +++ b/make/lib/Lib-java.base.gmk

- @@ -138,6 +138,7 @@

-  

-      $(eval $(call SetupJdkLibrary, BUILD_LIBJSIG, \

-          NAME := jsig, \

- +        OPTIMIZATION := LOW, \

-          CFLAGS := $(CFLAGS_JDKLIB) $(LIBJSIG_CFLAGS), \

-          LDFLAGS := $(LDFLAGS_JDKLIB) \

-              $(call SET_SHARED_LIBRARY_ORIGIN), \

@@ -1,35 +0,0 @@ 

- # HG changeset patch

- # User adinn

- # Date 1537977709 -3600

- #      Wed Sep 26 17:01:49 2018 +0100

- # Node ID 18426968f11cd0c3b238dec365003798d07576fc

- # Parent  0abe9de66ea9e1371bf35a2394daf31d8bfada98

- 8211105: AArch64: Disable cos/sin and log intrinsics in jdk11u pending fix

- Summary: AArch64 cos/sin and log intrinsics are currently broken so should be disabled

- Reviewed-by: aph, shade

- 

- diff --git a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

- --- a/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

- +++ b/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp

- @@ -5741,15 +5741,18 @@

-      }

-  

-      if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dlog)) {

- -      StubRoutines::_dlog = generate_dlog();

- +      // disabled pending fix and retest of generated code via JDK-8210858

- +      // StubRoutines::_dlog = generate_dlog();

-      }

-  

-      if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dsin)) {

- -      StubRoutines::_dsin = generate_dsin_dcos(/* isCos = */ false);

- +      // disabled pending fix and retest of generated code via JDK-8210461

- +      // StubRoutines::_dsin = generate_dsin_dcos(/* isCos = */ false);

-      }

-  

-      if (vmIntrinsics::is_intrinsic_available(vmIntrinsics::_dcos)) {

- -      StubRoutines::_dcos = generate_dsin_dcos(/* isCos = */ true);

- +      // disabled pending fix and retest of generated code via JDK-8210461

- +      // StubRoutines::_dcos = generate_dsin_dcos(/* isCos = */ true);

-      }

-    }

-  

pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk12.patch pr1983-rh1565658-support_using_the_system_installation_of_nss_with_the_sunec_provider_jdk11.patch
file renamed
+17 -12

@@ -19,7 +19,7 @@ 

  @@ -178,6 +178,48 @@

     AC_SUBST(LIBDL)

     LIBS="$save_LIBS"

-  

+ 

  +  ###############################################################################

  +  #

  +  # Check for the NSS libraries

@@ -62,9 +62,9 @@ 

  +  AC_SUBST(USE_EXTERNAL_NSS)

  +

  +

-    # Deprecated libraries, keep the flags for backwards compatibility

-    if test "x$OPENJDK_TARGET_OS" = "xwindows"; then

-      BASIC_DEPRECATED_ARG_WITH([dxsdk])

+    # Control if libzip can use mmap. Available for purposes of overriding.

+    LIBZIP_CAN_USE_MMAP=true

+    AC_SUBST(LIBZIP_CAN_USE_MMAP)

  diff --git a/make/autoconf/spec.gmk.in b/make/autoconf/spec.gmk.in

  --- a/make/autoconf/spec.gmk.in

  +++ b/make/autoconf/spec.gmk.in

@@ -82,21 +82,26 @@ 

  diff --git a/make/lib/Lib-jdk.crypto.ec.gmk b/make/lib/Lib-jdk.crypto.ec.gmk

  --- a/make/lib/Lib-jdk.crypto.ec.gmk

  +++ b/make/lib/Lib-jdk.crypto.ec.gmk

- @@ -38,6 +38,11 @@

-      BUILD_LIBSUNEC_CXXFLAGS_JDKLIB := $(CXXFLAGS_JDKLIB)

-    endif

+ @@ -28,19 +28,26 @@

+  ################################################################################

   

+  ifeq ($(ENABLE_INTREE_EC), true)

  +  ifeq ($(USE_EXTERNAL_NSS), true)

- +    BUILD_LIBSUNEC_CFLAGS_JDKLIB += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC

- +    BUILD_LIBSUNEC_CXXFLAGS_JDKLIB += $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC

+ +    BUILD_LIBSUNEC_CFLAGS_JDKLIB := $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC

+ +    BUILD_LIBSUNEC_CXXFLAGS_JDKLIB := $(NSS_CFLAGS) -DSYSTEM_NSS -DNSS_ENABLE_ECC

  +  endif

  +

     $(eval $(call SetupJdkLibrary, BUILD_LIBSUNEC, \

         NAME := sunec, \

         TOOLCHAIN := TOOLCHAIN_LINK_CXX, \

- @@ -47,9 +52,11 @@

-        CXXFLAGS := $(BUILD_LIBSUNEC_CXXFLAGS_JDKLIB), \

-        DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough, \

+        OPTIMIZATION := LOW, \

+ -      CFLAGS := $(CFLAGS_JDKLIB) \

+ +      CFLAGS := $(BUILD_LIBSUNEC_CFLAGS_JDKLIB) $(CFLAGS_JDKLIB) \

+            -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B, \

+ -      CXXFLAGS := $(CXXFLAGS_JDKLIB), \

+ +      CXXFLAGS := $(BUILD_LIBSUNEC_CXXFLAGS_JDKLIB) $(CXXFLAGS_JDKLIB), \

+        DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value, \

+        DISABLED_WARNINGS_clang := sign-compare, \

         DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018, \

  -      LDFLAGS := $(LDFLAGS_JDKLIB) $(LDFLAGS_CXX_JDK), \

  +      LDFLAGS := $(subst -Xlinker --as-needed,, \

@@ -1,198 +0,0 @@ 

- 

- # HG changeset patch

- # User zgu

- # Date 1541803086 18000

- # Node ID 9c4bf4a86cd89f33bee1e372fd8f6071636b0953

- # Parent  1e4229c1a99bdbe79e202a41a046c13b9b4bd0b6

- [backport] Always copy forward for disjoint arrays

- 

- diff -r 1e4229c1a99b -r 9c4bf4a86cd8 src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp

- --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp	Fri Nov 09 12:49:43 2018 +0100

- +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.hpp	Fri Nov 09 17:38:06 2018 -0500

- @@ -120,18 +120,18 @@

-  

-    template <typename T>

-    bool arraycopy_loop_1(T* src, T* dst, size_t length, Klass* bound,

- -                        bool checkcast, bool satb, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

- +                        bool checkcast, bool satb, bool disjoint, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

-  

-    template <typename T, bool CHECKCAST>

-    bool arraycopy_loop_2(T* src, T* dst, size_t length, Klass* bound,

- -                        bool satb, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

- +                        bool satb, bool disjoint, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

-  

-    template <typename T, bool CHECKCAST, bool SATB>

-    bool arraycopy_loop_3(T* src, T* dst, size_t length, Klass* bound,

- -                        ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

- +                        bool disjoint, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode);

-  

-    template <typename T, bool CHECKCAST, bool SATB, ShenandoahBarrierSet::ArrayCopyStoreValMode STOREVAL_MODE>

- -  bool arraycopy_loop(T* src, T* dst, size_t length, Klass* bound);

- +  bool arraycopy_loop(T* src, T* dst, size_t length, Klass* bound, bool disjoint);

-  

-    template <typename T, bool CHECKCAST, bool SATB, ShenandoahBarrierSet::ArrayCopyStoreValMode STOREVAL_MODE>

-    bool arraycopy_element(T* cur_src, T* cur_dst, Klass* bound, Thread* thread);

- diff -r 1e4229c1a99b -r 9c4bf4a86cd8 src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp

- --- a/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp	Fri Nov 09 12:49:43 2018 +0100

- +++ b/src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp	Fri Nov 09 17:38:06 2018 -0500

- @@ -93,34 +93,36 @@

-  

-  template <typename T>

-  bool ShenandoahBarrierSet::arraycopy_loop_1(T* src, T* dst, size_t length, Klass* bound,

- -                                            bool checkcast, bool satb, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode) {

- +                                            bool checkcast, bool satb, bool disjoint,

- +                                            ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode) {

-    if (checkcast) {

- -    return arraycopy_loop_2<T, true>(src, dst, length, bound, satb, storeval_mode);

- +    return arraycopy_loop_2<T, true>(src, dst, length, bound, satb, disjoint, storeval_mode);

-    } else {

- -    return arraycopy_loop_2<T, false>(src, dst, length, bound, satb, storeval_mode);

- +    return arraycopy_loop_2<T, false>(src, dst, length, bound, satb, disjoint, storeval_mode);

-    }

-  }

-  

-  template <typename T, bool CHECKCAST>

-  bool ShenandoahBarrierSet::arraycopy_loop_2(T* src, T* dst, size_t length, Klass* bound,

- -                                            bool satb, ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode) {

- +                                            bool satb, bool disjoint,

- +                                            ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode) {

-    if (satb) {

- -    return arraycopy_loop_3<T, CHECKCAST, true>(src, dst, length, bound, storeval_mode);

- +    return arraycopy_loop_3<T, CHECKCAST, true>(src, dst, length, bound, disjoint, storeval_mode);

-    } else {

- -    return arraycopy_loop_3<T, CHECKCAST, false>(src, dst, length, bound, storeval_mode);

- +    return arraycopy_loop_3<T, CHECKCAST, false>(src, dst, length, bound, disjoint, storeval_mode);

-    }

-  }

-  

-  template <typename T, bool CHECKCAST, bool SATB>

- -bool ShenandoahBarrierSet::arraycopy_loop_3(T* src, T* dst, size_t length, Klass* bound,

- +bool ShenandoahBarrierSet::arraycopy_loop_3(T* src, T* dst, size_t length, Klass* bound, bool disjoint,

-                                              ShenandoahBarrierSet::ArrayCopyStoreValMode storeval_mode) {

-    switch (storeval_mode) {

-      case NONE:

- -      return arraycopy_loop<T, CHECKCAST, SATB, NONE>(src, dst, length, bound);

- +      return arraycopy_loop<T, CHECKCAST, SATB, NONE>(src, dst, length, bound, disjoint);

-      case READ_BARRIER:

- -      return arraycopy_loop<T, CHECKCAST, SATB, READ_BARRIER>(src, dst, length, bound);

- +      return arraycopy_loop<T, CHECKCAST, SATB, READ_BARRIER>(src, dst, length, bound, disjoint);

-      case WRITE_BARRIER:

- -      return arraycopy_loop<T, CHECKCAST, SATB, WRITE_BARRIER>(src, dst, length, bound);

- +      return arraycopy_loop<T, CHECKCAST, SATB, WRITE_BARRIER>(src, dst, length, bound, disjoint);

-      default:

-        ShouldNotReachHere();

-        return true; // happy compiler

- @@ -128,30 +130,30 @@

-  }

-  

-  template <typename T, bool CHECKCAST, bool SATB, ShenandoahBarrierSet::ArrayCopyStoreValMode STOREVAL_MODE>

- -bool ShenandoahBarrierSet::arraycopy_loop(T* src, T* dst, size_t length, Klass* bound) {

- +bool ShenandoahBarrierSet::arraycopy_loop(T* src, T* dst, size_t length, Klass* bound, bool disjoint) {

-    Thread* thread = Thread::current();

-  

-    ShenandoahEvacOOMScope oom_evac_scope;

-  

-    // We need to handle four cases:

-    //

- -  // a) src < dst, intersecting, can only copy backward only

- +  // a) src < dst, conjoint, can only copy backward only

-    //   [...src...]

-    //         [...dst...]

-    //

- -  // b) src < dst, non-intersecting, can copy forward/backward

- +  // b) src < dst, disjoint, can only copy forward, because types may mismatch

-    //   [...src...]

-    //              [...dst...]

-    //

- -  // c) src > dst, intersecting, can copy forward only

- +  // c) src > dst, conjoint, can copy forward only

-    //         [...src...]

-    //   [...dst...]

-    //

- -  // d) src > dst, non-intersecting, can copy forward/backward

- +  // d) src > dst, disjoint, can only copy forward, because types may mismatch

-    //              [...src...]

-    //   [...dst...]

-    //

- -  if (src > dst) {

- +  if (src > dst || disjoint) {

-      // copy forward:

-      T* cur_src = src;

-      T* cur_dst = dst;

- @@ -248,6 +250,7 @@

-  

-    bool satb = ShenandoahSATBBarrier && heap->is_concurrent_mark_in_progress();

-    bool checkcast = HasDecorator<decorators, ARRAYCOPY_CHECKCAST>::value;

- +  bool disjoint = HasDecorator<decorators, ARRAYCOPY_DISJOINT>::value;

-    ArrayCopyStoreValMode storeval_mode;

-    if (heap->has_forwarded_objects()) {

-      if (heap->is_concurrent_traversal_in_progress()) {

- @@ -273,7 +276,7 @@

-  

-    Klass* bound = objArrayOop(dst_obj)->element_klass();

-    ShenandoahBarrierSet* bs = ShenandoahBarrierSet::barrier_set();

- -  return bs->arraycopy_loop_1(src_raw, dst_raw, length, bound, checkcast, satb, storeval_mode);

- +  return bs->arraycopy_loop_1(src_raw, dst_raw, length, bound, checkcast, satb, disjoint, storeval_mode);

-  }

-  

-  #endif //SHARE_VM_GC_SHENANDOAH_SHENANDOAHBARRIERSET_INLINE_HPP

- diff -r 1e4229c1a99b -r 9c4bf4a86cd8 test/hotspot/jtreg/gc/shenandoah/WrongArrayMember.java

- --- /dev/null	Thu Jan 01 00:00:00 1970 +0000

- +++ b/test/hotspot/jtreg/gc/shenandoah/WrongArrayMember.java	Fri Nov 09 17:38:06 2018 -0500

- @@ -0,0 +1,55 @@

- +/*

- + * Copyright (c) 2018, Red Hat, Inc. and/or its affiliates.

- + *

- + * 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.

- + *

- + */

- +

- +/*

- + * @test WrongArrayMember

- + *

- + * @run main/othervm -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC                                      WrongArrayMember

- + * @run main/othervm -Xmx128m -XX:+UnlockExperimentalVMOptions -XX:+UseShenandoahGC -XX:ShenandoahGCHeuristics=traversal WrongArrayMember

- + */

- +

- +public class WrongArrayMember {

- +    public static void main(String... args) throws Exception {

- +        Object[] src = new Object[3];

- +        src[0] = new Integer(0);

- +        src[1] = new Object();

- +        src[2] = new Object();

- +        Object[] dst = new Integer[3];

- +        dst[0] = new Integer(1);

- +        dst[1] = new Integer(2);

- +        dst[2] = new Integer(3);

- +        try {

- +            System.arraycopy(src, 0, dst, 0, 3);

- +            throw new RuntimeException("Expected ArrayStoreException");

- +        } catch (ArrayStoreException e) {

- +            if (src[0] != dst[0]) {

- +                throw new RuntimeException("First element not copied");

- +            } else if (src[1] == dst[1] || src[2] == dst[2]) {

- +                throw new RuntimeException("Second and third elements are affected");

- +            } else {

- +                return; // Passed!

- +            }

- +        }

- +    }

- +}

- +

- 

Please include also https://src.fedoraproject.org/rpms/java-openjdk/c/5f453c8d2d0210cae1dc1460d52b52d20a8431c5?branch=master to the review

  • adapted patches to usptream (removed are upstreamed)
  • removed partially fixed partially usptreammed patch6, jdk8211105-aarch64-disable_cos_sin_and_log_intrinsics.patch:
  • renamed patch5, pr1983-rh1565658-..._sunec_provider_jdk11.patch to pr1983-rh1565658-..._sunec_provider_jdk12.patch
  • adapted patch5, pr1983-rh1565658 to jdk12 (libraries.m4 and /Lib-jdk.crypto.ec.gmk)
  • removed patch8, jdk8210416-rh1632174-compile_fdlibm_with_o2_ffp_contract_off_on_gcc_clang_arches.patch
  • removed patch9, jdk8210425-rh1632174-sharedRuntimeTrig_sharedRuntimeTrans_compiled_without_optimization.patch
  • adapted patch10, jdk8210647-rh1632174. Unsure! was optimization none->low, changed to high->low
  • removed patch11, jdk8210761-rh1632174-libjsig_is_being_compiled_without_optimization.patch
  • removed patch12, jdk8210703-rh1632174-vmStructs_cpp_no_longer_compiled_with_o0
  • removed patch584, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
  • removed patch585, jdk8209639-rh1640127-02-coalesce_attempted_spill_non_spillable.patch
  • todo, revisit _privatelibs and slaves, discuse patch10, more?

rebased onto 6f8355b

a year ago

Failed with:
BUILDSTDERR: make/Init.gmk:347: Building on-failure
(/usr/bin/grep -v -e "^Note: including file:" < /builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/make-support/failure-logs/support_native_jdk.crypto.ec_libsunec_ECC_JNI.o.log || true) | /usr/bin/head -n 12
+ /usr/bin/grep -v -e '^Note: including file:'
+ /usr/bin/head -n 12
/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/jdk.crypto.ec/share/native/libsunec/ECC_JNI.cpp:31:10: fatal error: impl/ecc_impl.h: No such file or directory
#include "impl/ecc_impl.h"
^

1 new commit added

  • Propagating _LIBSUNEC_ flags to generic flags
a year ago

Hmm. did not helped. Issue is, system nss switches are not propagated.
In jdk11 build we have:

 [2] NAME := sunec  
 [3] TOOLCHAIN := TOOLCHAIN_LINK_CXX  
 [4] OPTIMIZATION := LOW  
 [5] CFLAGS := -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_include/java.base -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_include/java.base/linux -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/java.base/share/native/libjava -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/java.base/unix/native/libjava -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/hotspot/share/include -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/hotspot/os/posix/include -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -m64 -g -pipe -Wformat -Wno-cpp -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B  
 [6] CXXFLAGS := -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_include/java.base -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_include/java.base/linux -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/java.base/share/native/libjava -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/java.base/unix/native/libjava -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/hotspot/share/include -I/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/src/hotspot/os/posix/include -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -std=gnu++98 -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Woverloaded-virtual -Wreorder -m64 -g -pipe -Wformat -Wno-cpp -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden  
 [7] DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value  
 [8] DISABLED_WARNINGS_clang := sign-compare  
 [9] DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018  
 [10] LDFLAGS := -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,noexecstack -Wl,-O1 -m64 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_libs/java.base -L/builddir/build/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc30.x86_64/openjdk/build/support/modules_libs/java.base/server -shared -Wl,--exclude-libs,ALL -Wl,-O1  
 [11] LDFLAGS_macosx := -Wl,-z,origin -Wl,-rpath,\$ORIGIN  
 [12] LIBS :=  
 [13] LIBS_linux := -lc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lfreebl                                              

bu in those failed builds is:

[2] NAME := sunec  
 [3] TOOLCHAIN := TOOLCHAIN_LINK_CXX  
 [4] OPTIMIZATION := LOW  
 [5] CFLAGS := -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base/linux -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/share/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/unix/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/share/include -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/os/posix/include -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -m64 -g -pipe -Wformat -Wno-cpp -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -DMP_API_COMPATIBLE -DNSS_ECC_MORE_THAN_SUITE_B  
 [6] CXXFLAGS := -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base/linux -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/share/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/unix/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/share/include -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/os/posix/include -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -std=gnu++98 -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -Woverloaded-virtual -Wreorder -m64 -g -pipe -Wformat -Wno-cpp -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu++98 -fno-delete-null-pointer-checks -fno-lifetime-dse -D_LITTLE_ENDIAN -DARCH='"amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden  
 [7] DISABLED_WARNINGS_gcc := sign-compare implicit-fallthrough unused-value  
 [8] DISABLED_WARNINGS_clang := sign-compare  
 [9] DISABLED_WARNINGS_microsoft := 4101 4244 4146 4018  
 [10] LDFLAGS := -Wl,--hash-style=both -Wl,-z,defs -Wl,-z,noexecstack -Wl,-O1 -m64 -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -L/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_libs/java.base -L/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_libs/java.base/server -shared -Wl,--exclude-libs,ALL -Wl,-O1  
 [11] LDFLAGS_macosx := -Wl,-z,origin -Wl,-rpath,\$ORIGIN  
 [12] LIBS :=  
 [13] LIBS_linux := -lc -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -lfreebl                                              

Noticable is abence of

-I/usr/include/nss3 -I/usr/include/nspr4 -DSYSTEM_NSS -DNSS_ENABLE_ECC 

for both cflags and cxxflags

1 new commit added

  • Enfoce system NSS
a year ago

Commetning out USE_EXTERNAL_NSS is fixing the issue. I really do not see why USE_EXTERNAL_NSS is not propagated correctly to the makefiles.

However, build failed later for me with:

+ /usr/bin/gcc -MMD -MF /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/test/hotspot/jtreg/native/support/libNoFramePointer/libNoFramePointer.d -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/modules_include/java.base/linux -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/share/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/java.base/unix/native/libjava -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/share/include -I/home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/src/hotspot/os/posix/include -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fno-strict-aliasing -Wall -Wextra -Wformat=2 -Wpointer-arith -Wsign-compare -Wunused-function -Wundef -Wunused-value -Wreturn-type -m64 -g -pipe -Wformat -Wno-cpp -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -std=gnu++98 -Wno-error -fno-delete-null-pointer-checks -fno-lifetime-dse -D_LITTLE_ENDIAN '-DARCH="amd64"' -Damd64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fomit-frame-pointer -g -Wno-unused-parameter -Wno-unused -Wno-format -Wno-undef -Wno-unused-function -Wno-unused-value -O3 '-DTHIS_FILE="libNoFramePointer.c"' -c -o /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/test/hotspot/jtreg/native/support/libNoFramePointer/libNoFramePointer.o /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/test/hotspot/jtreg/serviceability/sa/libNoFramePointer.c
++ /usr/bin/tee -a /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/test/hotspot/jtreg/native/support/libNoFramePointer/libNoFramePointer.o.log
++ /usr/bin/tee -a /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/support/test/hotspot/jtreg/native/support/libNoFramePointer/libNoFramePointer.o.log
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C
cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
cc1: some warnings being treated as errors

Lets see how the scratch will go.

1 new commit added

  • Remove -Werror=format-security from %optflags untill it is fixed in upstream
a year ago

The build is now getting over all above parts, but keep segfaulting on my local machine very often.

Thats keep failing on

 workaround make/Main.gmk:1085: *** target pattern contains no '%'.  Stop.

Where line 1085+6 are:

$(foreach t, $(ALL_NAMED_TESTS), $(eval run-test-$t: test-$t))
RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))

I killed half of today on that, and it keeps dying with:

workaround make/Main.gmk:1084: *** target pattern contains no '%'.  Stop.

even if line 1085+6 are removed or commented out.... 😭

Thats keep failing on
workaround make/Main.gmk:1085: *** target pattern contains no '%'. Stop.

Where line 1085+6 are:
$(foreach t, $(ALL_NAMED_TESTS), $(eval run-test-$t: test-$t))
RUN_TEST_TARGETS := $(addprefix run-test-, $(ALL_NAMED_TESTS))

I killed half of today on that, and it keeps dying with:
workaround make/Main.gmk:1084: *** target pattern contains no '%'. Stop.

even if line 1085+6 are removed or commented out.... 😭

This is https://bugs.openjdk.java.net/browse/JDK-8215213 try adding --no-print-directory or use LOG=info for a build.

1 new commit added

  • Workarounded build failure of JDK8215213 by adding make --no-print-directory
a year ago

Thanx - a lot! that worked. Now only few post-build failures are around

1 new commit added

  • Adapted RPM to match JDK12
a year ago

Thsi built for me wihtout slowdebug. I'm running the build with both release and slowdebug locally now. I'm wondering what happened with the CI scratches here...
Note, that nasty https://src.fedoraproject.org/fork/jvanek/rpms/java-openjdk/c/e4bd74d8b1d84ffd10881f532a12d98688ddffeb is still there.

Thsi built for me wihtout slowdebug. I'm running the build with both release and slowdebug locally now. I'm wondering what happened with the CI scratches here...
Note, that nasty https://src.fedoraproject.org/fork/jvanek/rpms/java-openjdk/c/e4bd74d8b1d84ffd10881f532a12d98688ddffeb is still there.

Right. We need to fix this properly.

both slowdebug and normal build passed for me. jfr still do not have manpage, and provides looks final. Except the nasty e4bd74d , are you ok with all other changes?

Please add a comment as to why --no-print-directory is needed.

You've dropped %{lts_designator_zip}, please re-add as it's going to be empty for non-lts builds anyway.

I'm surprised this patch still applies. JDK-8210647 is in 12, 11 and 8u. It should get removed for JDK 12.

Typo conifg => config. Suggested rephrasing:

 these are config templates, thus not config-noreplace

I'm surprised this patch still applies. JDK-8210647 is in 12, 11 and 8u. It should get removed for JDK 12.

OK. adapted patch10, jdk8210647-rh1632174. Unsure! was optimization none->low, changed to high->low is a tell :) Please just use what's in upstream.

Why was removal of -Werror=format-secuity needed? Those warnings are potential security concerns.

With it, the build was failing for me.

With it, the build was failing for me.

Right, but the warning would have revealed where the issue is. It should probably changed in code, but it's hard to tell without knowing.

Note, that nasty https://src.fedoraproject.org/fork/jvanek/rpms/java-openjdk/c/e4bd74d8b1d84ffd10881f532a12d98688ddffeb is still there.
Right. We need to fix this properly.
This should work for you as a proper fix:
https://src.fedoraproject.org/fork/jerboaa/rpms/java-openjdk/c/34583b010abe7d71d38b3f16060778e62ac9183f?branch=pr22-fixup

The CFLAGS are order sensitive? interesting. Thanx!

I don't know what your build issues were but if I had to guess it's probably += vs := for BUILD_LIBSUNEC_CFLAGS_JDKLIB. What makes you think CFLAGS are order sensitive? The reason I've swapped it around is because general lib cflags might override others from BUILD_LIBSUNEC_CFLAGS_JDKLIB which we probably want to support.

1 new commit added

  • Fixed pr1983 so USE_EXTERNAL_NSS is properly honored (thanx to jerboaa)
a year ago

1 new commit added

  • removed patch10, jdk8210647-rh1632174. Is rummored to be in upstream
a year ago

Thanx for all explanations. Now the build looks sane for me.

As for -Werror=format-security , see (non slowdebug build):

---- Build times -------
Start 2019-01-09 18:49:50
End   2019-01-09 18:59:13

00:09:23 TOTAL
-------------------------
+ wait
make/Init.gmk:347: Building on-failure 
/usr/bin/printf "\n=== Output from failing command(s) repeated here ===\n" 
+ /usr/bin/printf '\n=== Output from failing command(s) repeated here ===\n'

=== Output from failing command(s) repeated here ===
make/Init.gmk:347: Building on-failure 
/usr/bin/printf "* For target support_test_hotspot_jtreg_native_support_libJNIBooleanTest_libJNIBooleanTest.o:\n" 
+ /usr/bin/printf '* For target support_test_hotspot_jtreg_native_support_libJNIBooleanTest_libJNIBooleanTest.o:\n'
* For target support_test_hotspot_jtreg_native_support_libJNIBooleanTest_libJNIBooleanTest.o:
make/Init.gmk:347: Building on-failure 
(/usr/bin/grep -v -e "^Note: including file:" <  /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libJNIBooleanTest_libJNIBooleanTest.o.log || true) | /usr/bin/head -n 12 
+ /usr/bin/grep -v -e '^Note: including file:'
+ /usr/bin/head -n 12
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C
cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
cc1: some warnings being treated as errors
make/Init.gmk:347: Building on-failure 
if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs/support_test_hotspot_jtreg_native_support_libJNIBooleanTest_libJNIBooleanTest.o.log` -gt 12; then /usr/bin/echo "   ... (rest of output omitted)" ; fi 
++ /usr/bin/wc -l
+ test 3 -gt 12
make/Init.gmk:347: Building on-failure 
/usr/bin/printf "* For target support_test_jdk_jtreg_native_support_libDirectIO_libDirectIO.o:\n" 
+ /usr/bin/printf '* For target support_test_jdk_jtreg_native_support_libDirectIO_libDirectIO.o:\n'
* For target support_test_jdk_jtreg_native_support_libDirectIO_libDirectIO.o:
make/Init.gmk:347: Building on-failure 
(/usr/bin/grep -v -e "^Note: including file:" <  /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs/support_test_jdk_jtreg_native_support_libDirectIO_libDirectIO.o.log || true) | /usr/bin/head -n 12 
+ /usr/bin/grep -v -e '^Note: including file:'
+ /usr/bin/head -n 12
cc1: warning: command line option '-std=gnu++98' is valid for C++/ObjC++ but not for C
cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
cc1: some warnings being treated as errors
make/Init.gmk:347: Building on-failure 
if test `/usr/bin/wc -l < /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs/support_test_jdk_jtreg_native_support_libDirectIO_libDirectIO.o.log` -gt 12; then /usr/bin/echo "   ... (rest of output omitted)" ; fi 
++ /usr/bin/wc -l
+ test 3 -gt 12
make/Init.gmk:347: Building on-failure 
/usr/bin/printf "\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs.\n" 
+ /usr/bin/printf '\n* All command lines available in /home/jvanek/rpmbuild/BUILD/java-12-openjdk-12.0.0.25-0.ea.1.rolling.fc29.x86_64/openjdk/build/make-support/failure-logs.\n'

What are next steps of this PR? Are the patches ok by you? Is it generally ok by you?

before push, I would like to squeze this to two changesets - one is pathces work, nd second is rpms work (generally https://src.fedoraproject.org/fork/jvanek/rpms/java-openjdk/c/bf3b562eba1203c0674d85f3d91ceda493f09849 and others squeezed). Do we have some workflow? Do you have some prefferences? Should it be new PR or overwrite thisone?

I would like to go no with -Werror=format-security excluded, but keep an eye on it, or better fix it, before it is GA and thus live in live fedoras.

Please add a comment why --no-print-directory is needed here.

s/JDK8215213/JDK-8215213/ It's easier to read.

Re: -Werror=format-security. The comment above that sed-replace expression has:

We replace it with -Wformat (required by -Werror=format-security) ...

Apparently there is no -Wformat any more. Just add that instead and the warning should go way?

What are next steps of this PR? Are the patches ok by you? Is it generally ok by you?

A few more things to fix first :)

before push, I would like to squeze this to two changesets - one is pathces work, nd second is rpms work (generally https://src.fedoraproject.org/fork/jvanek/rpms/java-openjdk/c/bf3b562eba1203c0674d85f3d91ceda493f09849 and others squeezed). Do we have some workflow? Do you have some prefferences? Should it be new PR or overwrite thisone?

Just do an interactive rebase and squash commits to your liking. Or replace the branch with a newly created one and force push it to jdk12. No need for a new PR. All the review comments are here.

I would like to go no with -Werror=format-security excluded, but keep an eye on it, or better fix it, before it is GA and thus live in live fedoras.

Please don't. It looks like we should be able to fix that otherwise. See comment above.

Closing this PR in favor of #24.

Pull-Request has been closed by jerboaa

a year ago