pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang



Module Name:    pkgsrc
Committed By:   tnn
Date:           Wed May 25 06:05:34 UTC 2022

Modified Files:
        pkgsrc/lang/openjdk11: PLIST distinfo options.mk
        pkgsrc/lang/openjdk17: distinfo options.mk
Added Files:
        pkgsrc/lang/openjdk11/patches: patch-make_autoconf_buildjdk-spec.gmk.in
            patch-make_autoconf_hotspot.m4
            patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp
        pkgsrc/lang/openjdk17/patches: patch-make_autoconf_buildjdk-spec.gmk.in
            patch-make_autoconf_hotspot.m4

Log Message:
openjdk{11,17}: fix build issues on earmv[67]hf


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/openjdk11/PLIST
cvs rdiff -u -r1.31 -r1.32 pkgsrc/lang/openjdk11/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/openjdk11/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/openjdk11/patches/patch-make_autoconf_buildjdk-spec.gmk.in \
    pkgsrc/lang/openjdk11/patches/patch-make_autoconf_hotspot.m4 \
    pkgsrc/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/openjdk17/distinfo
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/openjdk17/options.mk
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/openjdk17/patches/patch-make_autoconf_buildjdk-spec.gmk.in \
    pkgsrc/lang/openjdk17/patches/patch-make_autoconf_hotspot.m4

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/openjdk11/PLIST
diff -u pkgsrc/lang/openjdk11/PLIST:1.11 pkgsrc/lang/openjdk11/PLIST:1.12
--- pkgsrc/lang/openjdk11/PLIST:1.11    Tue Mar  1 13:51:44 2022
+++ pkgsrc/lang/openjdk11/PLIST Wed May 25 06:05:34 2022
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.11 2022/03/01 13:51:44 ryoon Exp $
+@comment $NetBSD: PLIST,v 1.12 2022/05/25 06:05:34 tnn Exp $
 bin/openjdk11-jar
 bin/openjdk11-jarsigner
 bin/openjdk11-java
@@ -546,7 +546,7 @@ java/openjdk11/legal/jdk.xml.dom/LICENSE
 java/openjdk11/legal/jdk.zipfs/ADDITIONAL_LICENSE_INFO
 java/openjdk11/legal/jdk.zipfs/ASSEMBLY_EXCEPTION
 java/openjdk11/legal/jdk.zipfs/LICENSE
-java/openjdk11/lib/classlist
+${PLIST.hotspot}java/openjdk11/lib/classlist
 java/openjdk11/lib/ct.sym
 java/openjdk11/lib/fontconfig.bfc
 java/openjdk11/lib/fontconfig.properties.src

Index: pkgsrc/lang/openjdk11/distinfo
diff -u pkgsrc/lang/openjdk11/distinfo:1.31 pkgsrc/lang/openjdk11/distinfo:1.32
--- pkgsrc/lang/openjdk11/distinfo:1.31 Sat May 14 12:02:56 2022
+++ pkgsrc/lang/openjdk11/distinfo      Wed May 25 06:05:34 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.31 2022/05/14 12:02:56 tnn Exp $
+$NetBSD: distinfo,v 1.32 2022/05/25 06:05:34 tnn Exp $
 
 BLAKE2s (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = b57b09661581b7dc6e3700a777f030dfa2fef6f953533456686bfd0dde9157d0
 SHA512 (bootstrap-jdk-1.11.0.5.8-netbsd-7-amd64-20190928.tar.xz) = 6e61996f7e3c3492b0c878644db30d72021dc4096639992e53b4440d4e2e18cd92e5630ecd4600d1917a1e63a7c814b63f74f811a40588febfe19ad8d3208a9d
@@ -12,7 +12,9 @@ Size (bootstrap-jdk-1.11.0.7.10-netbsd-9
 BLAKE2s (jdk11u-jdk-11.0.15-10-1.tar.gz) = 1ead16eff10210e68cd9c1407a9d729e248bb1ff075606d7fe3e5e62e4cde42d
 SHA512 (jdk11u-jdk-11.0.15-10-1.tar.gz) = f2d3b5cea79d737c7f4c5cdd2924aa7fd69fa6fb02fc8672f21060452f7483dc09157a7828642b3e43b033c26eaba0507ddd50491daceb6cf176cea47333857a
 Size (jdk11u-jdk-11.0.15-10-1.tar.gz) = 123036045 bytes
+SHA1 (patch-make_autoconf_buildjdk-spec.gmk.in) = d0b600237853c17ecc2864604f0bd847ba6b0149
 SHA1 (patch-make_autoconf_flags-cflags.m4) = 3b37853298805e2ffb92d3babd700d0048f24d8d
+SHA1 (patch-make_autoconf_hotspot.m4) = 437c8b09114933cca22c4a847a90a415cd113e5a
 SHA1 (patch-make_autoconf_lib-alsa.m4) = 999fbf951363f6b49b22aad81537728f22d7c381
 SHA1 (patch-make_autoconf_lib-bundled.m4) = 8720c3f674955e8a51b2ab7dba80c36d34ba8594
 SHA1 (patch-make_autoconf_lib-freetype.m4) = 3dbdfea4011dc69593ab302626b9ec4dfc7a7d54
@@ -24,6 +26,7 @@ SHA1 (patch-src_hotspot_cpu_arm_c1__LIRA
 SHA1 (patch-src_hotspot_cpu_arm_c1__LIRGenerator__arm.cpp) = cfaace9741b0b30daf827119127478a195f8374f
 SHA1 (patch-src_hotspot_os__cpu_bsd__arm_bsd__arm__32.s) = 474a66abfb25030d4e32134816c14b157d1ebe6a
 SHA1 (patch-src_hotspot_os__cpu_bsd__arm_vm__version__bsd__arm__32.cpp) = 8a99417711c4826490954d43f142afc0a0c68e9f
+SHA1 (patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp) = 384214d554db82dc9092ee8f975aa5a73aae67ab
 SHA1 (patch-src_hotspot_os_bsd_os__bsd.cpp) = 6322cbdda03dee528e89ac8b725f3df5e2165797
 SHA1 (patch-src_hotspot_os_bsd_os__perf__bsd.cpp) = 7bb57f82f3a93adc1970ed4215148fc02ecbcd5a
 SHA1 (patch-src_hotspot_os_posix_os__posix.cpp) = e70e8c1e59f0be184a7a1d6e9d11ac7b934ce4b2

Index: pkgsrc/lang/openjdk11/options.mk
diff -u pkgsrc/lang/openjdk11/options.mk:1.7 pkgsrc/lang/openjdk11/options.mk:1.8
--- pkgsrc/lang/openjdk11/options.mk:1.7        Mon Jun 28 23:12:22 2021
+++ pkgsrc/lang/openjdk11/options.mk    Wed May 25 06:05:34 2022
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.7 2021/06/28 23:12:22 tnn Exp $
+# $NetBSD: options.mk,v 1.8 2022/05/25 06:05:34 tnn Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.openjdk11
 PKG_OPTIONS_OPTIONAL_GROUPS=   variant
@@ -6,7 +6,7 @@ PKG_OPTIONS_GROUP.variant=      jdk-zero-vm
 PKG_SUPPORTED_OPTIONS=         debug dtrace jre-jce x11 static-libstdcpp
 PKG_SUGGESTED_OPTIONS=         jre-jce x11
 
-.if ${MACHINE_ARCH} == "aarch64" || !empty(MACHINE_ARCH:M*arm*) || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 PKG_OPTIONS_GROUP.variant+=    jdk-hotspot-vm
 PKG_SUGGESTED_OPTIONS+=                jdk-hotspot-vm
 .else
@@ -99,10 +99,12 @@ CONFIGURE_ARGS+=    --with-stdc++lib=dynami
 #
 # Build variant. Zero VM builds a portable JVM without assembly optimization.
 #
+PLIST_VARS+=           hotspot
 .if !empty(PKG_OPTIONS:Mjdk-zero-vm)
 BUILD_VARIANT=         zero
 .include "../../devel/libffi/buildlink3.mk"
 .elif !empty(PKG_OPTIONS:Mjdk-hotspot-vm)
 BUILD_VARIANT=         server
+PLIST.hotspot=         yes
 .endif
 CONFIGURE_ARGS+=       --with-jvm-variants=${BUILD_VARIANT}

Index: pkgsrc/lang/openjdk17/distinfo
diff -u pkgsrc/lang/openjdk17/distinfo:1.5 pkgsrc/lang/openjdk17/distinfo:1.6
--- pkgsrc/lang/openjdk17/distinfo:1.5  Sun May 15 22:30:49 2022
+++ pkgsrc/lang/openjdk17/distinfo      Wed May 25 06:05:34 2022
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2022/05/15 22:30:49 tnn Exp $
+$NetBSD: distinfo,v 1.6 2022/05/25 06:05:34 tnn Exp $
 
 BLAKE2s (bootstrap-jdk-1.17.0.3.7-netbsd-9-aarch64-20220516.tar.xz) = b632092d25292e795a2d7567ec55d03f21021dbba27eab3e81a48aed5e5bdd68
 SHA512 (bootstrap-jdk-1.17.0.3.7-netbsd-9-aarch64-20220516.tar.xz) = fb86749d56be94cc1509f92d8fbdec481b0c7f6fdd5e731826098e6eaa668539052571ffd09125346c1920262b07857ea675799ab8476fcff53c03e158536c1d
@@ -12,7 +12,9 @@ Size (bootstrap-jdk-1.17.0.3.7-netbsd-9-
 BLAKE2s (jdk17u-jdk-17.0.3-7-1.tar.gz) = d080a7513b3e1d431e24673fff10695adf0154b97fd45be7307be09e929e78a6
 SHA512 (jdk17u-jdk-17.0.3-7-1.tar.gz) = ddbe9c6e2c48c320247e023070de9f4b770a58d6eaf763f6331d6cccfd4bd5591445994174d5196392e5a4f0bb398d6b309e37dc5079c823458ac7fc4d9b6a9d
 Size (jdk17u-jdk-17.0.3-7-1.tar.gz) = 104898973 bytes
+SHA1 (patch-make_autoconf_buildjdk-spec.gmk.in) = 01b6ac6dae1a886949020b9d472aab1e357084b0
 SHA1 (patch-make_autoconf_flags-cflags.m4) = 0379aeecc6181cbd15f6f31518b73ca915f1f73b
+SHA1 (patch-make_autoconf_hotspot.m4) = 6370c6cb2a3f225c502e7916342104cf1288f4cf
 SHA1 (patch-make_autoconf_lib-alsa.m4) = 999fbf951363f6b49b22aad81537728f22d7c381
 SHA1 (patch-make_autoconf_lib-bundled.m4) = 8720c3f674955e8a51b2ab7dba80c36d34ba8594
 SHA1 (patch-make_autoconf_lib-freetype.m4) = bd791b99e4fd87f24432831fba1e814dd199445f

Index: pkgsrc/lang/openjdk17/options.mk
diff -u pkgsrc/lang/openjdk17/options.mk:1.2 pkgsrc/lang/openjdk17/options.mk:1.3
--- pkgsrc/lang/openjdk17/options.mk:1.2        Mon May 16 12:29:33 2022
+++ pkgsrc/lang/openjdk17/options.mk    Wed May 25 06:05:34 2022
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.2 2022/05/16 12:29:33 tnn Exp $
+# $NetBSD: options.mk,v 1.3 2022/05/25 06:05:34 tnn Exp $
 
 PKG_OPTIONS_VAR=               PKG_OPTIONS.openjdk17
 PKG_OPTIONS_OPTIONAL_GROUPS=   variant
@@ -6,7 +6,7 @@ PKG_OPTIONS_GROUP.variant=      jdk-zero-vm
 PKG_SUPPORTED_OPTIONS=         debug dtrace jre-jce x11 static-libstdcpp
 PKG_SUGGESTED_OPTIONS=         jre-jce x11
 
-.if ${MACHINE_ARCH} == "aarch64" || !empty(MACHINE_ARCH:M*arm*) || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64"
 PKG_OPTIONS_GROUP.variant+=    jdk-hotspot-vm
 PKG_SUGGESTED_OPTIONS+=                jdk-hotspot-vm
 .else

Added files:

Index: pkgsrc/lang/openjdk11/patches/patch-make_autoconf_buildjdk-spec.gmk.in
diff -u /dev/null pkgsrc/lang/openjdk11/patches/patch-make_autoconf_buildjdk-spec.gmk.in:1.1
--- /dev/null   Wed May 25 06:05:34 2022
+++ pkgsrc/lang/openjdk11/patches/patch-make_autoconf_buildjdk-spec.gmk.in      Wed May 25 06:05:34 2022
@@ -0,0 +1,20 @@
+$NetBSD: patch-make_autoconf_buildjdk-spec.gmk.in,v 1.1 2022/05/25 06:05:34 tnn Exp $
+
+Use the same variant for the buildjdk as the target jdk.
+This is needed for native builds on platforms where hotspot is broken or not
+supported. In that case the buildjdk can't be hardcoded to "server" but must
+use "zero". This is fine for pkgsrc since we only ever build one variant.
+
+--- make/autoconf/buildjdk-spec.gmk.in.orig    2022-05-03 03:11:37.000000000 +0000
++++ make/autoconf/buildjdk-spec.gmk.in
+@@ -88,8 +88,8 @@ ENABLE_DEBUG_SYMBOLS := false
+ # Control wether Hotspot builds gtest tests
+ BUILD_GTEST := false
+ 
+-JVM_VARIANTS := server
+-JVM_VARIANT_MAIN := server
++JVM_VARIANTS := @JVM_VARIANTS@
++JVM_VARIANT_MAIN := @JVM_VARIANT_MAIN@
+ 
+ # Some users still set EXTRA_*FLAGS on the make command line. Must
+ # make sure to override that when building buildjdk.
Index: pkgsrc/lang/openjdk11/patches/patch-make_autoconf_hotspot.m4
diff -u /dev/null pkgsrc/lang/openjdk11/patches/patch-make_autoconf_hotspot.m4:1.1
--- /dev/null   Wed May 25 06:05:34 2022
+++ pkgsrc/lang/openjdk11/patches/patch-make_autoconf_hotspot.m4        Wed May 25 06:05:34 2022
@@ -0,0 +1,26 @@
+$NetBSD: patch-make_autoconf_hotspot.m4,v 1.1 2022/05/25 06:05:34 tnn Exp $
+
+Fix buildjdk targeting for 32-bit ARM.
+
+--- make/autoconf/hotspot.m4.orig      2022-05-03 03:11:37.000000000 +0000
++++ make/autoconf/hotspot.m4
+@@ -147,6 +147,8 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANT
+     # We are guaranteed that we do not build any other variants when building zero.
+     HOTSPOT_TARGET_CPU=zero
+     HOTSPOT_TARGET_CPU_ARCH=zero
++    HOTSPOT_BUILD_CPU=zero
++    HOTSPOT_BUILD_CPU_ARCH=zero
+   fi
+ ])
+ 
+@@ -337,6 +339,10 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_FEATURE
+     HOTSPOT_TARGET_CPU=arm_64
+     HOTSPOT_TARGET_CPU_ARCH=arm
+   fi
++  if test "x$OPENJDK_BUILD_CPU" = xarm; then
++    HOTSPOT_BUILD_CPU=arm_32
++    HOTSPOT_BUILD_CPU_DEFINE="ARM32"
++  fi
+ 
+   # Verify that dependencies are met for explicitly set features.
+   if HOTSPOT_CHECK_JVM_FEATURE(jvmti) && ! HOTSPOT_CHECK_JVM_FEATURE(services); then
Index: pkgsrc/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp
diff -u /dev/null pkgsrc/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp:1.1
--- /dev/null   Wed May 25 06:05:34 2022
+++ pkgsrc/lang/openjdk11/patches/patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp Wed May 25 06:05:34 2022
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_hotspot_os__cpu_bsd__zero_os__bsd__zero.cpp,v 1.1 2022/05/25 06:05:34 tnn Exp $
+
+#if 0 functions already defined in os_bsd.cpp
+
+--- src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp.orig   2022-05-03 03:11:37.000000000 +0000
++++ src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp
+@@ -340,13 +340,16 @@ static void current_stack_region(address
+   *size = stack_top - stack_bottom;
+ }
+ 
++#if 0
+ address os::current_stack_base() {
+   address bottom;
+   size_t size;
+   current_stack_region(&bottom, &size);
+   return bottom + size;
+ }
++#endif
+ 
++#if 0
+ size_t os::current_stack_size() {
+   // stack size includes normal stack and HotSpot guard pages
+   address bottom;
+@@ -354,6 +357,7 @@ size_t os::current_stack_size() {
+   current_stack_region(&bottom, &size);
+   return size;
+ }
++#endif
+ 
+ /////////////////////////////////////////////////////////////////////////////
+ // helper functions for fatal error handler

Index: pkgsrc/lang/openjdk17/patches/patch-make_autoconf_buildjdk-spec.gmk.in
diff -u /dev/null pkgsrc/lang/openjdk17/patches/patch-make_autoconf_buildjdk-spec.gmk.in:1.1
--- /dev/null   Wed May 25 06:05:34 2022
+++ pkgsrc/lang/openjdk17/patches/patch-make_autoconf_buildjdk-spec.gmk.in      Wed May 25 06:05:34 2022
@@ -0,0 +1,21 @@
+$NetBSD: patch-make_autoconf_buildjdk-spec.gmk.in,v 1.1 2022/05/25 06:05:34 tnn Exp $
+
+Use the same variant for the buildjdk as the target jdk.
+This is needed for native builds on platforms where hotspot is broken or not
+supported. In that case the buildjdk can't be hardcoded to "server" but must
+use "zero". This is fine for pkgsrc since we only ever build one variant.
+
+--- make/autoconf/buildjdk-spec.gmk.in.orig    2022-04-23 02:25:56.000000000 +0000
++++ make/autoconf/buildjdk-spec.gmk.in
+@@ -94,8 +94,9 @@ DISABLE_WARNING_PREFIX := @BUILD_CC_DISA
+ # Save speed and disk space by not enabling debug symbols for the buildjdk
+ ENABLE_DEBUG_SYMBOLS := false
+ 
+-JVM_VARIANTS := server
+-JVM_VARIANT_MAIN := server
++JVM_VARIANTS :=  @JVM_VARIANTS@
++JVM_VARIANT_MAIN := @JVM_VARIANT_MAIN@
++JVM_FEATURES_zero := g1gc serialgc zero
+ JVM_FEATURES_server := cds compiler1 compiler2 g1gc serialgc
+ 
+ # Some users still set EXTRA_*FLAGS on the make command line. Must
Index: pkgsrc/lang/openjdk17/patches/patch-make_autoconf_hotspot.m4
diff -u /dev/null pkgsrc/lang/openjdk17/patches/patch-make_autoconf_hotspot.m4:1.1
--- /dev/null   Wed May 25 06:05:34 2022
+++ pkgsrc/lang/openjdk17/patches/patch-make_autoconf_hotspot.m4        Wed May 25 06:05:34 2022
@@ -0,0 +1,26 @@
+$NetBSD: patch-make_autoconf_hotspot.m4,v 1.1 2022/05/25 06:05:34 tnn Exp $
+
+Fix buildjdk targeting for 32-bit ARM.
+
+--- make/autoconf/hotspot.m4.orig      2022-04-23 02:25:56.000000000 +0000
++++ make/autoconf/hotspot.m4
+@@ -121,6 +121,8 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
+     # But when building zero, we never build any other variants so it works.
+     HOTSPOT_TARGET_CPU=zero
+     HOTSPOT_TARGET_CPU_ARCH=zero
++    HOTSPOT_BUILD_CPU=zero
++    HOTSPOT_BUILD_CPU_ARCH=zero
+   fi
+ 
+   AC_ARG_WITH([hotspot-build-time], [AS_HELP_STRING([--with-hotspot-build-time],
+@@ -137,6 +139,10 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
+     HOTSPOT_TARGET_CPU=arm_32
+     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
+   fi
++  if test "x$OPENJDK_BUILD_CPU" = xarm; then
++    HOTSPOT_BUILD_CPU=arm_32
++    HOTSPOT_BUILD_CPU_DEFINE="ARM32"
++  fi
+ 
+   # --with-cpu-port is no longer supported
+   UTIL_DEPRECATED_ARG_WITH(with-cpu-port)



Home | Main Index | Thread Index | Old Index