[packages/openjdk12] up to 12.0.2

atler atler at pld-linux.org
Wed Feb 9 14:08:32 CET 2022


commit 4ebf0f12871cb4ae541b863cc9a13c4aea0364f2
Author: Jan Palus <atler at pld-linux.org>
Date:   Wed Feb 9 14:04:02 2022 +0100

    up to 12.0.2
    
    - libpath no longer needed -- paths can be customized via
      configure now
    - x32 support appears to be upstream now since:
      https://github.com/openjdk/jdk12u/commit/e7a2c9d679e854ea612664b88abbcfc98d2d8671
    - lower optimization level to -O0: -O2 produces segfaulting binary, -O1
      triggers ICE in gcc

 libpath.patch                    | 23 ---------------
 make-4.3.patch                   | 34 +++++++++++++++++++++
 no_optflags.patch                | 32 ++++++++++----------
 openjdk11.spec => openjdk12.spec | 64 ++++++++++------------------------------
 x32.patch                        | 57 -----------------------------------
 5 files changed, 66 insertions(+), 144 deletions(-)
---
diff --git a/openjdk11.spec b/openjdk12.spec
similarity index 91%
rename from openjdk11.spec
rename to openjdk12.spec
index f546dc9..99b63ab 100644
--- a/openjdk11.spec
+++ b/openjdk12.spec
@@ -2,9 +2,9 @@
 %bcond_without	cacerts		# don't include the default CA certificates
 
 %if %{with bootstrap}
-%define		use_jdk	openjdk10
-%else
 %define		use_jdk	openjdk11
+%else
+%define		use_jdk	openjdk12
 %endif
 
 %ifarch %{x8664} aarch64
@@ -20,21 +20,20 @@
 %endif
 
 # class data version seen with file(1) that this jvm is able to load
-%define		_classdataversion 55.0
+%define		_classdataversion 56.0
 
 Summary:	Open-source implementation of the Java Platform, Standard Edition
-Summary(pl.UTF-8):	Wolnoźródłowa implementacja Java 11 SE
-Name:		openjdk11
-Version:	11.0.14.1
+Summary(pl.UTF-8):	Wolnoźródłowa implementacja Java 12 SE
+Name:		openjdk12
+Version:	12.0.2
 Release:	1
 License:	GPL v2
 Group:		Development/Languages/Java
-Source0:	https://github.com/openjdk/jdk11u/archive/jdk-%{version}-ga/%{name}-%{version}.tar.gz
-# Source0-md5:	9e357196b0a0d50e4955882bfa97a2f9
+Source0:	https://github.com/openjdk/jdk12u/archive/jdk-%{version}-ga/%{name}-%{version}.tar.gz
+# Source0-md5:	fe3addb26254c5a9ac17922358e2a055
 Source10:	make-cacerts.sh
-Patch0:		libpath.patch
-Patch1:		x32.patch
-Patch2:		no_optflags.patch
+Patch0:		no_optflags.patch
+Patch1:		make-4.3.patch
 URL:		http://openjdk.java.net/
 BuildRequires:	/usr/bin/jar
 BuildRequires:	alsa-lib-devel
@@ -48,7 +47,6 @@ BuildRequires:	freetype-devel >= 1:2.10.2
 BuildRequires:	gawk
 BuildRequires:	giflib-devel >= 5.2.1
 BuildRequires:	glibc-misc
-BuildRequires:	harfbuzz-devel >= 2.3.1
 %{?buildrequires_jdk}
 BuildRequires:	lcms2-devel >= 2.11
 BuildRequires:	libjpeg-devel
@@ -259,7 +257,6 @@ Summary(pl.UTF-8):	OpenJDK - środowisko uruchomieniowe - obsługa fontów
 Group:		Development/Languages/Java
 Requires:	%{name}-jre-base = %{version}-%{release}
 Requires:	freetype >= 1:2.10.2
-Requires:	harfbuzz >= 2.3.1
 
 %description jre-base-freetype
 Font handling library for OpenJDK runtime environment built using free
@@ -344,11 +341,10 @@ Code examples for OpenJDK.
 Przykłady dla OpenJDK.
 
 %prep
-%setup -qn jdk11u-jdk-%{version}-ga
+%setup -qn jdk12u-jdk-%{version}-ga
 
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %build
 # Make sure we have /proc mounted - otherwise idlc will fail later.
@@ -374,9 +370,10 @@ chmod a+x configure
 %configure \
 	%{?with_zero:--with-jvm-variants=zero} \
 	--with-boot-jdk="%{java_home}" \
-	--with-extra-cflags="%{rpmcppflags} %{rpmcflags}" \
-	--with-extra-cxxflags="%{rpmcppflags} %{rpmcxxflags}" \
+	--with-extra-cflags="%{rpmcppflags} %{rpmcflags} -fcommon -O0" \
+	--with-extra-cxxflags="%{rpmcppflags} %{rpmcxxflags} -fcommon -O0" \
 	--with-extra-ldflags="%{rpmldflags}" \
+	--with-jni-libpath="%{_libdir}/java %{_libdir} /%{_lib}" \
 	--with-jvm-features="%{?with_shenandoahgc:shenandoahgc}" \
 	--with-native-debug-symbols=none \
 	--disable-full-docs \
@@ -386,7 +383,6 @@ chmod a+x configure
 	--with-jobs="%{__jobs}" \
 	--with-freetype=system \
 	--with-giflib=system \
-	--with-harfbuzz=system \
 	--with-libjpeg=system \
 	--with-libpng=system \
 	--with-lcms=system \
@@ -438,9 +434,6 @@ mv $RPM_BUILD_ROOT%{dstdir}/demo $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{versio
 mv $RPM_BUILD_ROOT%{dstdir}/lib/src.zip $RPM_BUILD_ROOT%{_javasrcdir}/%{name}-jdk.zip
 
 # move manual pages to its place
-mv $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8/man1 $RPM_BUILD_ROOT%{_mandir}/ja/man1
-rmdir $RPM_BUILD_ROOT%{dstdir}/man/ja_JP.UTF-8
-rm $RPM_BUILD_ROOT%{dstdir}/man/ja
 mv $RPM_BUILD_ROOT%{dstdir}/man/man1 $RPM_BUILD_ROOT%{_mandir}/man1
 rmdir $RPM_BUILD_ROOT%{dstdir}/man
 
@@ -508,22 +501,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/jstatd.1*
 %{_mandir}/man1/serialver.1*
 %{_mandir}/man1/rmic.1*
-%lang(ja) %{_mandir}/ja/man1/jarsigner.1*
-%lang(ja) %{_mandir}/ja/man1/javac.1*
-%lang(ja) %{_mandir}/ja/man1/javadoc.1*
-%lang(ja) %{_mandir}/ja/man1/javap.1*
-%lang(ja) %{_mandir}/ja/man1/jcmd.1*
-%lang(ja) %{_mandir}/ja/man1/jconsole.1*
-%lang(ja) %{_mandir}/ja/man1/jdb.1*
-%lang(ja) %{_mandir}/ja/man1/jdeps.1*
-%lang(ja) %{_mandir}/ja/man1/jinfo.1*
-%lang(ja) %{_mandir}/ja/man1/jmap.1*
-%lang(ja) %{_mandir}/ja/man1/jps.1*
-%lang(ja) %{_mandir}/ja/man1/jstack.1*
-%lang(ja) %{_mandir}/ja/man1/jstat.1*
-%lang(ja) %{_mandir}/ja/man1/jstatd.1*
-%lang(ja) %{_mandir}/ja/man1/serialver.1*
-%lang(ja) %{_mandir}/ja/man1/rmic.1*
 
 %files jdk-base
 %defattr(644,root,root,755)
@@ -575,14 +552,6 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/rmid.1*
 %{_mandir}/man1/rmiregistry.1*
 %{_mandir}/man1/unpack200.1*
-%lang(ja) %{_mandir}/ja/man1/java.1*
-%lang(ja) %{_mandir}/ja/man1/jjs.1*
-%lang(ja) %{_mandir}/ja/man1/jrunscript.1*
-%lang(ja) %{_mandir}/ja/man1/keytool.1*
-%lang(ja) %{_mandir}/ja/man1/pack200.1*
-%lang(ja) %{_mandir}/ja/man1/rmid.1*
-%lang(ja) %{_mandir}/ja/man1/rmiregistry.1*
-%lang(ja) %{_mandir}/ja/man1/unpack200.1*
 
 %files jre-base
 %defattr(644,root,root,755)
@@ -606,12 +575,11 @@ rm -rf $RPM_BUILD_ROOT
 %dir %{dstdir}/lib
 %dir %{dstdir}/lib/jfr
 %{dstdir}/lib/jfr/*.jfc
-%dir %{dstdir}/lib/jli
-%attr(755,root,root) %{dstdir}/lib/jli/libjli.so
 %{dstdir}/lib/security
 %dir %{dstdir}/lib/server
 %attr(755,root,root) %{dstdir}/lib/server/*.so
 %{dstdir}/lib/server/Xusage.txt
+%{dstdir}/lib/server/classes.jsa
 %{!?with_zero:%{dstdir}/lib/classlist}
 %{dstdir}/lib/jrt-fs.jar
 %{dstdir}/lib/jvm.cfg
@@ -627,6 +595,7 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{dstdir}/lib/libjaas.so
 %attr(755,root,root) %{dstdir}/lib/libjava.so
 %attr(755,root,root) %{dstdir}/lib/libjimage.so
+%attr(755,root,root) %{dstdir}/lib/libjli.so
 %attr(755,root,root) %{dstdir}/lib/liblcms.so
 %attr(755,root,root) %{dstdir}/lib/libmanagement_agent.so
 %attr(755,root,root) %{dstdir}/lib/libmanagement_ext.so
@@ -673,7 +642,6 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/jar
 %{_mandir}/man1/jar.1*
-%lang(ja) %{_mandir}/ja/man1/jar.1*
 
 %files jdk-sources
 %defattr(644,root,root,755)
diff --git a/libpath.patch b/libpath.patch
deleted file mode 100644
index 922ef45..0000000
--- a/libpath.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- jdk9u-jdk-9.0.4+12/src/hotspot/os/linux/os_linux.cpp.orig	2020-08-16 13:46:08.240275890 +0200
-+++ jdk9u-jdk-9.0.4+12/src/hotspot/os/linux/os_linux.cpp	2020-08-16 13:47:54.932632691 +0200
-@@ -289,17 +289,10 @@
-   //        1: ...
-   //        ...
-   //        7: The default directories, normally /lib and /usr/lib.
--#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390)
--  #define DEFAULT_LIBPATH "/usr/lib64:/lib64:/lib:/usr/lib"
-+#if defined(AMD64) || (defined(_LP64) && defined(SPARC)) || defined(PPC64) || defined(S390) || defined(AARCH64)
-+  #define DEFAULT_LIBPATH "/usr/lib64/java:/usr/lib64:/lib64:/lib:/usr/lib"
- #else
--#if defined(AARCH64)
--  // Use 32-bit locations first for AARCH64 (a 64-bit architecture), since some systems
--  // might not adhere to the FHS and it would be a change in behaviour if we used
--  // DEFAULT_LIBPATH of other 64-bit architectures which prefer the 64-bit paths.
--  #define DEFAULT_LIBPATH "/lib:/usr/lib:/usr/lib64:/lib64"
--#else
--  #define DEFAULT_LIBPATH "/lib:/usr/lib"
--#endif // AARCH64
-+  #define DEFAULT_LIBPATH "/usr/lib/java:/lib:/usr/lib"
- #endif
- 
- // Base path of extensions installed on the system.
diff --git a/make-4.3.patch b/make-4.3.patch
new file mode 100644
index 0000000..76da003
--- /dev/null
+++ b/make-4.3.patch
@@ -0,0 +1,34 @@
+
+# HG changeset patch
+# User ihse
+# Date 1580378910 -3600
+# Node ID 0743e1d49930a95d045bfdaa8f8607a00289e677
+# Parent  24b4c763cb2276db073bec263246879eb312daeb
+8237879: make 4.3 breaks build
+Reviewed-by: erikj, tbell
+
+diff -r 24b4c763cb22 -r 0743e1d49930 make/common/MakeBase.gmk
+--- a/make/common/MakeBase.gmk	Thu Jan 30 10:10:48 2020 +0100
++++ b/make/common/MakeBase.gmk	Thu Jan 30 11:08:30 2020 +0100
+@@ -525,15 +525,16 @@
+ # Param 2 - (optional) name of file to store value in
+ DependOnVariableHelper = \
+     $(strip \
+-        $(eval -include $(call DependOnVariableFileName, $1, $2)) \
++        $(eval $1_filename := $(call DependOnVariableFileName, $1, $2)) \
++        $(if $(wildcard $($1_filename)), $(eval include $($1_filename))) \
+         $(if $(call equals, $(strip $($1)), $(strip $($1_old))),,\
+-          $(call MakeDir, $(dir $(call DependOnVariableFileName, $1, $2))) \
++          $(call MakeDir, $(dir $($1_filename))) \
+           $(if $(findstring $(LOG_LEVEL), trace), \
+               $(info NewVariable $1: >$(strip $($1))<) \
+               $(info OldVariable $1: >$(strip $($1_old))<)) \
+           $(call WriteFile, $1_old:=$(call DoubleDollar,$(call EscapeHash,$($1))), \
+-              $(call DependOnVariableFileName, $1, $2))) \
+-        $(call DependOnVariableFileName, $1, $2) \
++              $($1_filename))) \
++        $($1_filename) \
+     )
+ 
+ # Main macro
+
diff --git a/no_optflags.patch b/no_optflags.patch
index fbd0637..372bbc1 100644
--- a/no_optflags.patch
+++ b/no_optflags.patch
@@ -1,31 +1,31 @@
---- jdk11u-jdk-11.0.14.1-ga/make/common/NativeCompilation.gmk.orig	2022-02-07 17:26:34.000000000 +0100
-+++ jdk11u-jdk-11.0.14.1-ga/make/common/NativeCompilation.gmk	2022-02-08 02:14:57.986886271 +0100
-@@ -369,13 +369,13 @@
+--- jdk12u-jdk-12.0.2-ga/make/common/NativeCompilation.gmk.orig	2019-07-16 18:38:28.000000000 +0200
++++ jdk12u-jdk-12.0.2-ga/make/common/NativeCompilation.gmk	2022-02-08 09:20:46.175688972 +0100
+@@ -282,13 +282,13 @@
      ifneq ($$(filter %.c, $$($1_FILENAME)), )
        # Compile as a C file
        $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \
--          $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
-+          $$($1_CFLAGS) -c
+-          $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
++          $$($1_CFLAGS) $$($1_THIS_FILE) -c
        $1_COMPILER := $$($$($1_BASE)_CC)
        $1_DEP_FLAG := $(C_FLAG_DEPS)
      else ifneq ($$(filter %.m, $$($1_FILENAME)), )
        # Compile as an Objective-C file
        $1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \
--          $$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c
-+          $$($1_BASE_CFLAGS) $$($1_CFLAGS) -c
+-          $$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
++          $$($1_BASE_CFLAGS) $$($1_CFLAGS) $$($1_THIS_FILE) -c
        $1_COMPILER := $$($$($1_BASE)_CC)
        $1_DEP_FLAG := $(C_FLAG_DEPS)
      else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), )
-@@ -386,7 +386,7 @@
+@@ -299,7 +299,7 @@
      else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), )
        # Compile as a C++ or Objective-C++ file
        $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \
--          $$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c
-+          $$($1_CXXFLAGS) -c
+-          $$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
++          $$($1_CXXFLAGS) $$($1_THIS_FILE) -c
        $1_COMPILER := $$($$($1_BASE)_CXX)
        $1_DEP_FLAG := $(CXX_FLAG_DEPS)
      else
-@@ -793,7 +793,7 @@
+@@ -679,7 +679,7 @@
    # lines for all object files in this setup. This includes at least all the
    # variables used in the call to add_native_source below.
    $1_COMPILE_VARDEPS := $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
@@ -34,12 +34,12 @@
        $$($1_CC) $$($1_CXX) $$($1_AS) $$($1_ASFLAGS)
    $1_COMPILE_VARDEPS_FILE := $$(call DependOnVariable, $1_COMPILE_VARDEPS, \
        $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).comp.vardeps)
-@@ -838,7 +838,7 @@
-         -include $$($1_PCH_DEPS_TARGETS_FILE)
+@@ -725,7 +725,7 @@
+         -include $$($1_PCH_DEP_TARGETS)
  
          $1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \
--            $$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) \
-+            -x c++-header -c $(C_FLAG_DEPS) \
-             $$(addsuffix .tmp, $$($1_PCH_DEPS_FILE))
+-            $$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEP)
++            -x c++-header -c $(C_FLAG_DEPS) $$($1_PCH_DEP)
  
          $$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE)
+ 		$$(call LogInfo, Generating precompiled header)
diff --git a/x32.patch b/x32.patch
deleted file mode 100644
index 2d214df..0000000
--- a/x32.patch
+++ /dev/null
@@ -1,57 +0,0 @@
---- a/src/hotspot/os/linux/os_linux.cpp
-+++ b/src/hotspot/os/linux/os_linux.cpp
-@@ -1847,7 +1847,7 @@ void * os::dll_load(const char *filename
- 
- #if  (defined IA32)
-   static  Elf32_Half running_arch_code=EM_386;
--#elif   (defined AMD64)
-+#elif   (defined AMD64) || defined(X32)
-   static  Elf32_Half running_arch_code=EM_X86_64;
- #elif  (defined IA64)
-   static  Elf32_Half running_arch_code=EM_IA_64;
---- a/make/autoconf/platform.m4
-+++ b/make/autoconf/platform.m4
-@@ -35,6 +35,10 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU
-       VAR_CPU_ARCH=x86
-       VAR_CPU_BITS=64
-       VAR_CPU_ENDIAN=little
-+      case "$host" in *x32)
-+        VAR_CPU=x32
-+        VAR_CPU_BITS=32
-+      esac
-       ;;
-     i?86)
-       VAR_CPU=x86
-@@ -455,6 +459,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HEL
-     HOTSPOT_$1_CPU_DEFINE=IA32
-   elif test "x$OPENJDK_$1_CPU" = xx86_64; then
-     HOTSPOT_$1_CPU_DEFINE=AMD64
-+  elif test "x$OPENJDK_$1_CPU" = xx32; then
-+    HOTSPOT_$1_CPU_DEFINE=X32
-   elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
-     HOTSPOT_$1_CPU_DEFINE=SPARC
-   elif test "x$OPENJDK_$1_CPU" = xaarch64; then
---- a/make/autoconf/flags.m4
-+++ b/make/autoconf/flags.m4
-@@ -254,6 +254,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
-         test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
-       MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
-     fi
-+    case "$host" in *x32) MACHINE_FLAG=;; esac
-   fi
- 
-   # FIXME: global flags are not used yet...
-@@ -328,11 +329,8 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL]
-   AC_SUBST(COMPILER_COMMAND_FILE_FLAG)
-   AC_SUBST(COMPILER_BINDCMD_FILE_FLAG)
- 
--  # Check that the compiler supports -mX (or -qX on AIX) flags
--  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
--  FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}],
--      IF_TRUE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=true],
--      IF_FALSE: [COMPILER_SUPPORTS_TARGET_BITS_FLAG=false])
-+  # Don't run the -mX check and set this always to false, or else x32 gets passed -m32
-+  COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
-   AC_SUBST(COMPILER_SUPPORTS_TARGET_BITS_FLAG)
- 
-   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/openjdk12.git/commitdiff/4ebf0f12871cb4ae541b863cc9a13c4aea0364f2



More information about the pld-cvs-commit mailing list